Merge branch 'master' of github.com:mono/mono
authorJonathan Pobst <monkey@jpobst.com>
Tue, 7 Sep 2010 02:59:48 +0000 (21:59 -0500)
committerJonathan Pobst <monkey@jpobst.com>
Tue, 7 Sep 2010 02:59:48 +0000 (21:59 -0500)
1119 files changed:
.gitattributes
ChangeLog
Makefile.am
README
configure.in
data/dotnet35.pc.in
data/gdb/mono-gdb.py
data/net_4_0/machine.config
eglib/configure.ac
eglib/src/.gitignore
eglib/src/eglib-config.h.in
eglib/src/ghashtable.c
eglib/src/glib.h
eglib/src/gmodule-unix.c
eglib/src/goutput.c
eglib/src/gspawn.c
eglib/src/gunicode.c
eglib/src/gutf8.c
eglib/test/.gitignore
eglib/test/markup.c
eglib/test/path.c
eglib/test/test.c
libgc/configure.in
libgc/pthread_support.c
man/ChangeLog
man/Makefile.am
man/ccrewrite.1 [new file with mode: 0644]
man/man.xml
man/mono-api-info.1 [new file with mode: 0644]
man/mono.1
man/monolinker.1
man/xbuild.1
mcs/.gitignore
mcs/Makefile
mcs/build/profiles/basic.make
mcs/build/profiles/default.make [deleted file]
mcs/build/profiles/monotouch_bootstrap.make
mcs/build/profiles/moonlight_bootstrap.make
mcs/build/profiles/net_1_0.make [deleted file]
mcs/build/profiles/net_1_1.make [deleted file]
mcs/build/profiles/net_1_1_java.make [deleted file]
mcs/build/profiles/net_2_0.make
mcs/build/profiles/net_3_5.make
mcs/build/profiles/net_4_0.make
mcs/build/rules.make
mcs/build/tests.make
mcs/class/Makefile
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/NotifyIcon.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListControlTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewTest.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeType.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/EngineTest.cs [changed mode: 0644->0755]
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Touch.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/Binder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpBinaryOperationBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpConvertBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpGetIndexBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpGetMemberBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpInvokeBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpInvokeConstructorBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpInvokeMemberBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpIsEventBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpSetIndexBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpSetMemberBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpUnaryOperationBinder.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/RuntimeBinderContext.cs
mcs/class/Mono.Cecil.Mdb/Makefile
mcs/class/Mono.Cecil/Mono.Cecil.Metadata/MetadataWriter.cs
mcs/class/Mono.CodeContracts/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Makefile [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/Expr.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprAdd.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOp.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpArithmetic.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpComparison.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBlock.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBox.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCall.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareEqual.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareGreaterThan.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareLessThan.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprConv.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprLoadArg.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprLoadConstant.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprNop.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprReturn.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprSub.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprType.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/Sn.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/CompileVisitor.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/ExprVisitor.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/InstructionExtentVisitor.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/SourcePositionVisitor.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/AssemblyRef.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ConditionTextExtractor.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractRequiresInfo.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/Decompile.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ExprGen.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/MethodInfo.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/PerformRewrite.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/Rewriter.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/RewriterOptions.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/RewriterResults.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/TransformContractsVisitor.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts.dll.sources [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Mono.CodeContracts_test.dll.sources [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Test/RewriteAndLoad.cs [new file with mode: 0644]
mcs/class/Mono.CodeContracts/Test/TestCCRewrite.cs [new file with mode: 0644]
mcs/class/Mono.CompilerServices.SymbolWriter/Makefile
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixClientTransportSink.cs
mcs/class/System.ComponentModel.DataAnnotations/ChangeLog
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations.dll.sources
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DisplayAttribute.cs [new file with mode: 0644]
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RangeAttribute.cs
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationAttribute.cs
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations_test.dll.sources
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/DisplayAttributeTest.cs [new file with mode: 0644]
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/RangeAttributeTest.cs [new file with mode: 0644]
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/StringLengthAttributeTest.cs [new file with mode: 0644]
mcs/class/System.Configuration/System.Configuration/Configuration.cs
mcs/class/System.Configuration/System.Configuration/ConfigurationSection.cs
mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
mcs/class/System.Core/System.Collections.Generic/HashSet.cs
mcs/class/System.Core/System.Core.dll.sources
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/ChangeLog [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ChangeLog [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/RangeList.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs [new file with mode: 0644]
mcs/class/System.Core/System.Linq/Enumerable.cs
mcs/class/System.Core/System.Linq/Internal/AggregationList.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/ChangeLog [deleted file]
mcs/class/System.Core/System.Linq/Internal/ConcurrentGrouping.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/ConcurrentLookup.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/OrderingEnumerator.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/ParallelQuickSort.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/ChangeLog [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryBaseNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryCastNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryChildNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryConcatNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryDefaultEmptyNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryGroupByNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryMuxNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOptionNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderByNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderGuardNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderedStreamNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryReverseNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySelectManyNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySelectNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySetNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryStartNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryStreamNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryWhereNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryZipNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/SetInclusion.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/QueryNodes/WrapHelper.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/RangeList.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/RepeatList.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/ReverseList.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/StripPartitioner.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/Visitors/ChangeLog [deleted file]
mcs/class/System.Core/System.Linq/Internal/Visitors/INodeVisitor.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/Visitors/IVisitableNode.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/Visitors/QueryCheckerVisitor.cs [deleted file]
mcs/class/System.Core/System.Linq/Internal/Visitors/QueryOptions.cs [deleted file]
mcs/class/System.Core/System.Linq/OrderedParallelQuery.cs
mcs/class/System.Core/System.Linq/ParallelEnumerable.cs
mcs/class/System.Core/System.Linq/ParallelExecuter.cs [deleted file]
mcs/class/System.Core/System.Linq/ParallelExecutionMode.cs
mcs/class/System.Core/System.Linq/ParallelMergeOptions.cs
mcs/class/System.Core/System.Linq/ParallelPartitioner.cs [deleted file]
mcs/class/System.Core/System.Linq/ParallelQuery.cs
mcs/class/System.Core/System.Linq/ParallelQueryEnumerator.cs [deleted file]
mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs [new file with mode: 0644]
mcs/class/System.Core/System.Threading/ThreadLockState.cs [new file with mode: 0644]
mcs/class/System.Core/System/Actions.cs
mcs/class/System.Core/System/TimeZoneInfo.cs
mcs/class/System.Core/Test/System.Collections.Generic/HashSetTest.cs
mcs/class/System.Core/Test/System.Linq/EnumerableMoreTest.cs
mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs
mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
mcs/class/System.Core/monotouch_bootstrap_System.Core.dll.sources
mcs/class/System.Core/net_4_0_System.Core.dll.sources
mcs/class/System.Json/Assembly/AssemblyInfo.cs
mcs/class/System.Json/Makefile
mcs/class/System.Json/System.Json.dll.sources
mcs/class/System.Json/System.Json/JsonArray.cs
mcs/class/System.Json/System.Json/JsonObject.cs
mcs/class/System.Json/System.Json/MergedEnumerable.cs [deleted file]
mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs
mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs
mcs/class/System.Net/System.Net/InternalWebRequestStreamWrapper.cs
mcs/class/System.Net/System.Net/WebClient_2_1.cs
mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs
mcs/class/System.Net/System.Net/WebRequest_2_1.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Unix/IpcServerChannel.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientTransportSink.cs
mcs/class/System.Runtime.Remoting/Test/IpcChannelTest.cs
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs [changed mode: 0644->0755]
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs [changed mode: 0644->0755]
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs
mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs [changed mode: 0644->0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Channels/DiscoveryChannelBase.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Channels/RequestChannelBase.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpChannelFactory.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpChannelListener.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpDuplexChannel.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpTransportBindingElement.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/AnnouncementClient11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryMessageSequence11.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryProxyClient11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryTargetClient11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/EndpointDiscoveryMetadata11.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/FindCriteria11.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IAnnouncementContract11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IDiscoveryProxyContract11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IDiscoveryTargetContract11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/MessageContracts11.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/ResolveCriteria11.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/AnnouncementClientApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryMessageSequenceApril2005.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryProxyClientApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryTargetClientApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/EndpointDiscoveryMetadataApril2005.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/FindCriteriaApril2005.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IAnnouncementContractApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IDiscoveryProxyContractApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IDiscoveryTargetContractApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/MessageContractsApril2005.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/ResolveCriteriaApril2005.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/AnnouncementClientCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequence11.cs [deleted file]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequenceCD1.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryProxyClientCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryTargetClientCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadata11.cs [deleted file]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadataCD1.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/FindCriteria11.cs [deleted file]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/FindCriteriaCD1.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IAnnouncementContractCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IDiscoveryProxyContractCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IDiscoveryTargetContractCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/MessageContractsCD1.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/ResolveCriteria11.cs [deleted file]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/ResolveCriteriaCD1.cs [new file with mode: 0755]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.dll.sources
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/AnnouncementClient.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/AnnouncementEndpoint.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/AnnouncementService.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryChannelDispatcher.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryChannelFactory.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryClient.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryClientBindingElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryEndpoint.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryEndpointProvider.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryEndpointPublisherBehavior.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryMessageSequence.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryMessageSequenceGenerator.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryOperationContextExtension.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryProxy.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryRequestChannel.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryService.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryServiceExtension.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryVersion.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryViaUriBehavior.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DynamicEndpoint.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/EndpointDiscoveryBehavior.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/EndpointDiscoveryMetadata.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/FindCriteria.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/FindRequestContext.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/ResolveCriteria.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/ServiceDiscoveryBehavior.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/UdpAnnouncementEndpoint.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/UdpDiscoveryEndpoint.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/UdpTransportSettings.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery_test.dll.sources
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementBoundDiscoveryService.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementClientTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementEndpointTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementServiceTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/ContractTypes.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryClientBindingElementTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryClientTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryEndpointTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryProxyTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryServiceTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DynamicEndpointTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/EndpointDiscoveryBehaviorTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/EndpointDiscoveryMetadataTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/FindCriteriaTest.cs
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/InspectionBehaviors.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/IntegratedDiscoveryTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/MyDiscoveryServiceTypes.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/ServiceDiscoveryBehaviorTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpAnnouncementEndpointTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpDiscoveryEndpointTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpTransportTest.cs [new file with mode: 0644]
mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpBindingCollectionElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpBindingElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpSecurityElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebMessageEncodingElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpContextInfo.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpListenerManager.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpReplyChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/AsymmetricSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SymmetricSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/IdentityElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceAuthorizationBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceDebugBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/OperationContext.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageEncodingBindingElementTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/TypedMessageConverterTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ClientBaseTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs
mcs/class/System.Web.Extensions/System.Web.UI/AsyncPostBackTrigger.cs
mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
mcs/class/System.Web/Makefile
mcs/class/System.Web/System.Web.Caching/OutputCache.cs
mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs
mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
mcs/class/System.Web/System.Web.Compilation/BuildManagerDirectoryBuilder.cs
mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs
mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
mcs/class/System.Web/System.Web.SessionState_2.0/SessionInProcHandler.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs
mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs
mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
mcs/class/System.Web/System.Web.UI/BaseTemplateParser.cs
mcs/class/System.Web/System.Web.UI/BoundPropertyEntry.cs
mcs/class/System.Web/System.Web.UI/Control.cs
mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
mcs/class/System.Web/System.Web.UI/PageParser.cs
mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
mcs/class/System.Web/System.Web.UI/TemplateParser.cs
mcs/class/System.Web/System.Web.UI/UserControlParser.cs
mcs/class/System.Web/System.Web/HttpApplication.cs
mcs/class/System.Web/System.Web/HttpContext.cs
mcs/class/System.Web/System.Web/HttpRequest.cs
mcs/class/System.Web/System.Web/HttpRuntime.cs
mcs/class/System.Web/System.Web/QueueManager.cs
mcs/class/System.Web/System.Web_standalone_test.dll.sources
mcs/class/System.Web/System.Web_test.dll.sources
mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListTest.cs
mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.4.0.cs
mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.gen.cs
mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoUser.cs [new file with mode: 0644]
mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeTest.cs
mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs
mcs/class/System.Web/Test/TestMonoWeb/AsyncOperation.cs
mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs
mcs/class/System.Web/Test/standalone-runner-support/StandaloneTest.cs
mcs/class/System.Web/Test/standalone-runner-support/TestRunItem.cs
mcs/class/System.Web/Test/standalone-tests/ChildrenAsProperties.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone-tests/PageParserDefaultTypeProperties.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone-tests/RegisterBuildProvider.cs
mcs/class/System.Web/Test/standalone/ChildrenAsProperties/default.aspx [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/ChildrenAsProperties/default.aspx.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/ChildrenAsProperties/test.ascx [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/ChildrenAsProperties/test.ascx.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/ChildrenAsProperties/web.config [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Makefile [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/PreStartMethods.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Properties/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Web.config [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx.cs [new file with mode: 0644]
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx.designer.cs [new file with mode: 0644]
mcs/class/System.Web/resources/webform.js
mcs/class/System.XML/Mono.Xml.Xsl/XslFunctions.cs
mcs/class/System.XML/System.Xml/XmlQualifiedName.cs
mcs/class/System.XML/System.Xml/XmlReader.cs
mcs/class/System.XML/System.Xml/XmlWriter.cs [changed mode: 0644->0755]
mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs
mcs/class/System/Mono.Http/NtlmClient.cs
mcs/class/System/System.Collections.Concurrent/BlockingCollection.cs
mcs/class/System/System.Collections.Concurrent/ConcurrentBag.cs
mcs/class/System/System.ComponentModel/AttributeCollection.cs
mcs/class/System/System.ComponentModel/CultureInfoConverter.cs
mcs/class/System/System.Net.Mail/SmtpClient.cs
mcs/class/System/System.Net.Mime/ContentType.cs
mcs/class/System/System.Net.NetworkInformation/IPGlobalProperties.cs
mcs/class/System/System.Net.NetworkInformation/IPGlobalStatistics.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.Net.NetworkInformation/Ping.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/ServicePointManager.cs
mcs/class/System/System.Net/WebClient.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.Net/WebExceptionStatus.cs
mcs/class/System/System.Threading/Barrier.cs
mcs/class/System/System.Threading/BarrierPostPhaseException.cs [new file with mode: 0644]
mcs/class/System/System.dll.sources
mcs/class/System/System/Uri.cs
mcs/class/System/System/UriParser.cs
mcs/class/System/System_test.dll.sources
mcs/class/System/Test/System.ComponentModel/AttributeCollectionTest.cs [new file with mode: 0644]
mcs/class/System/Test/System.ComponentModel/ComplexBindingPropertiesAttributeTest.cs
mcs/class/System/Test/System.ComponentModel/CultureInfoConverterTest.cs
mcs/class/System/Test/System.ComponentModel/DefaultBindingPropertyAttributeTest.cs
mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
mcs/class/System/Test/System.Diagnostics/ProcessTest.cs
mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs
mcs/class/System/Test/System.Net.Mail/SmtpServer.cs [new file with mode: 0644]
mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs
mcs/class/System/Test/System.Net/WebPermissionTest.cs
mcs/class/System/Test/System.Threading/BarrierTest.cs
mcs/class/System/Test/System/UriTest.cs
mcs/class/aot-compiler/Makefile [new file with mode: 0644]
mcs/class/corlib/.gitignore
mcs/class/corlib/Makefile
mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs
mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs
mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
mcs/class/corlib/Microsoft.Win32/Win32ResultCode.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentSkipList.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs
mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs
mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs [new file with mode: 0644]
mcs/class/corlib/System.IO/DriveInfo.cs
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
mcs/class/corlib/System.Reflection/CustomAttributeData.cs
mcs/class/corlib/System.Reflection/MonoField.cs
mcs/class/corlib/System.Reflection/MonoProperty.cs
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs
mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
mcs/class/corlib/System.Runtime.Remoting.Messaging/StackBuilderSink.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/MessageFormatter.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs
mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
mcs/class/corlib/System.Text/UTF8Encoding.cs
mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs [new file with mode: 0644]
mcs/class/corlib/System.Threading.Tasks/Future.cs
mcs/class/corlib/System.Threading.Tasks/IScheduler.cs [new file with mode: 0644]
mcs/class/corlib/System.Threading.Tasks/Internal/ChangeLog [deleted file]
mcs/class/corlib/System.Threading.Tasks/Internal/CyclicDeque.cs [deleted file]
mcs/class/corlib/System.Threading.Tasks/Internal/IScheduler.cs [deleted file]
mcs/class/corlib/System.Threading.Tasks/Internal/Scheduler.cs [deleted file]
mcs/class/corlib/System.Threading.Tasks/Internal/SchedulerProxy.cs [deleted file]
mcs/class/corlib/System.Threading.Tasks/Internal/ThreadWorker.cs [deleted file]
mcs/class/corlib/System.Threading.Tasks/Parallel.cs
mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.cs
mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs
mcs/class/corlib/System.Threading.Tasks/ParallelOptions.cs
mcs/class/corlib/System.Threading.Tasks/Scheduler.cs [new file with mode: 0644]
mcs/class/corlib/System.Threading.Tasks/SchedulerProxy.cs [new file with mode: 0644]
mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.cs
mcs/class/corlib/System.Threading.Tasks/Task.cs
mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs
mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs
mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs
mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs
mcs/class/corlib/System.Threading.Tasks/TaskStatus.cs
mcs/class/corlib/System.Threading.Tasks/ThreadWorker.cs [new file with mode: 0644]
mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs
mcs/class/corlib/System.Threading/AtomicBoolean.cs
mcs/class/corlib/System.Threading/CSnzi.cs
mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
mcs/class/corlib/System.Threading/CancellationTokenSource.cs
mcs/class/corlib/System.Threading/CountdownEvent.cs
mcs/class/corlib/System.Threading/LazyInitializer.cs
mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
mcs/class/corlib/System.Threading/SemaphoreSlim.cs
mcs/class/corlib/System.Threading/Snzi.cs
mcs/class/corlib/System.Threading/SpinLock.cs
mcs/class/corlib/System.Threading/SpinWait.cs
mcs/class/corlib/System.Threading/ThreadLocal.cs
mcs/class/corlib/System.Threading/Timer.cs
mcs/class/corlib/System.Threading/Watch.cs
mcs/class/corlib/System/AggregateException.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/DateTime.cs
mcs/class/corlib/System/Delegate.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/Math.cs
mcs/class/corlib/System/WindowsConsoleDriver.cs [changed mode: 0644->0755]
mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs
mcs/class/corlib/Test/System.Collections.Concurrent/CollectionStressTestHelper.cs
mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentDictionaryTests.cs
mcs/class/corlib/Test/System.Diagnostics/StackFrameCas.cs
mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs
mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs
mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
mcs/class/corlib/Test/System.Runtime.Serialization.Formatters.Binary/BinaryFormatterTest.cs
mcs/class/corlib/Test/System.Runtime.Serialization/SerializationBinderTest.cs [new file with mode: 0644]
mcs/class/corlib/Test/System.Runtime.Serialization/SerializationInfoTest.cs [new file with mode: 0644]
mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs
mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
mcs/class/corlib/Test/System.Threading/ManualResetEventSlimTests.cs
mcs/class/corlib/Test/System.Threading/SemaphoreSlimTests.cs
mcs/class/corlib/Test/System.Threading/ThreadLazyTests.cs [deleted file]
mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs [new file with mode: 0644]
mcs/class/corlib/Test/System/DateTimeTest.cs
mcs/class/corlib/Test/System/DelegateTest.cs
mcs/class/corlib/Test/System/EnvironmentCas.cs
mcs/class/corlib/Test/System/ExceptionCas.cs
mcs/class/corlib/Test/System/MathTest.cs
mcs/class/corlib/corlib.dll.sources
mcs/class/corlib/corlib_test.dll.sources
mcs/class/corlib/monotouch_corlib.dll.sources
mcs/class/dlr/sync.sh [new file with mode: 0755]
mcs/errors/.cvsignore [deleted file]
mcs/errors/.gitattributes
mcs/errors/CS0534-6-lib.cs [new file with mode: 0644]
mcs/errors/Makefile
mcs/errors/cs0103-6.cs [new file with mode: 0644]
mcs/errors/cs0106-6.cs [new file with mode: 0644]
mcs/errors/cs0106-7.cs [new file with mode: 0644]
mcs/errors/cs0108-14.cs [new file with mode: 0644]
mcs/errors/cs0117-3.cs [new file with mode: 0644]
mcs/errors/cs0119-10.cs [new file with mode: 0644]
mcs/errors/cs0119-9.cs [new file with mode: 0644]
mcs/errors/cs0121-11.cs [new file with mode: 0644]
mcs/errors/cs0121-12.cs [new file with mode: 0644]
mcs/errors/cs0121-8.cs
mcs/errors/cs0122-33.cs [new file with mode: 0644]
mcs/errors/cs0122-9.cs
mcs/errors/cs0182-11.cs [new file with mode: 0644]
mcs/errors/cs0243-2.cs [new file with mode: 0644]
mcs/errors/cs0246-22.cs [new file with mode: 0644]
mcs/errors/cs0283-2.cs
mcs/errors/cs0283-4.cs [new file with mode: 0644]
mcs/errors/cs0283.cs
mcs/errors/cs0509-4.cs [new file with mode: 0644]
mcs/errors/cs0534-6.cs [new file with mode: 0644]
mcs/errors/cs0542-4.cs [new file with mode: 0644]
mcs/errors/cs0617-2.cs
mcs/errors/cs0617-4.cs [new file with mode: 0644]
mcs/errors/cs0617-5.cs [new file with mode: 0644]
mcs/errors/cs0617.cs
mcs/errors/cs1024-3.cs [new file with mode: 0644]
mcs/errors/cs1031.cs [new file with mode: 0644]
mcs/errors/cs1503-11.cs [new file with mode: 0644]
mcs/errors/cs1540-14.cs [new file with mode: 0644]
mcs/errors/cs1622-3.cs [new file with mode: 0644]
mcs/errors/cs1622-4.cs [new file with mode: 0644]
mcs/errors/cs1695-2.cs [new file with mode: 0644]
mcs/errors/cs1695-3.cs [new file with mode: 0644]
mcs/errors/cs1695.cs [new file with mode: 0644]
mcs/errors/cs1696.cs [new file with mode: 0644]
mcs/errors/cs1699-2.cs [new file with mode: 0644]
mcs/errors/cs1699-3.cs [new file with mode: 0644]
mcs/errors/cs1699.cs [new file with mode: 0644]
mcs/errors/cs1706-4.cs [new file with mode: 0644]
mcs/errors/cs1709.cs [new file with mode: 0644]
mcs/errors/cs1744.cs
mcs/errors/cs1763-2.cs [new file with mode: 0644]
mcs/errors/cs1763.cs
mcs/errors/dcs0019.cs [new file with mode: 0644]
mcs/errors/dcs0160.cs [new file with mode: 0644]
mcs/errors/dcs0182.cs [deleted file]
mcs/errors/dcs1660.cs [new file with mode: 0644]
mcs/errors/dcs1966-3.cs [new file with mode: 0644]
mcs/errors/dcs1973.cs [new file with mode: 0644]
mcs/errors/dcs1980.cs
mcs/errors/dcs1981.cs [new file with mode: 0644]
mcs/errors/dcs1982-2.cs [new file with mode: 0644]
mcs/errors/dcs1982-3.cs [new file with mode: 0644]
mcs/errors/dcs1982-4.cs [new file with mode: 0644]
mcs/errors/dcs1982-5.cs [new file with mode: 0644]
mcs/errors/dcs1982.cs [new file with mode: 0644]
mcs/errors/gcs0119-2.cs [new file with mode: 0644]
mcs/errors/gcs0131.cs [deleted file]
mcs/errors/gcs0266-6.cs [new file with mode: 0644]
mcs/errors/gcs0411-17.cs [new file with mode: 0644]
mcs/errors/gcs0416-3.cs [new file with mode: 0644]
mcs/errors/gcs1113-2.cs [new file with mode: 0644]
mcs/errors/known-issues-dmcs
mcs/errors/known-issues-gmcs
mcs/ilasm/parser/ILParser.jay
mcs/jay/defs.h
mcs/jay/main.c
mcs/jay/output.c
mcs/jay/reader.c
mcs/jay/skeleton.cs
mcs/mcs/.gitignore
mcs/mcs/Makefile
mcs/mcs/anonymous.cs
mcs/mcs/argument.cs
mcs/mcs/assign.cs
mcs/mcs/attribute.cs
mcs/mcs/cfold.cs
mcs/mcs/class.cs
mcs/mcs/codegen.cs
mcs/mcs/complete.cs
mcs/mcs/constant.cs
mcs/mcs/context.cs
mcs/mcs/convert.cs
mcs/mcs/cs-parser.jay
mcs/mcs/cs-tokenizer.cs
mcs/mcs/decl.cs
mcs/mcs/delegate.cs
mcs/mcs/dmcs.sln [new file with mode: 0644]
mcs/mcs/doc.cs
mcs/mcs/driver.cs
mcs/mcs/dynamic.cs
mcs/mcs/ecore.cs
mcs/mcs/eval.cs
mcs/mcs/expression.cs
mcs/mcs/field.cs
mcs/mcs/generic.cs
mcs/mcs/import.cs
mcs/mcs/iterators.cs
mcs/mcs/lambda.cs
mcs/mcs/location.cs
mcs/mcs/membercache.cs
mcs/mcs/method.cs
mcs/mcs/modifiers.cs
mcs/mcs/namespace.cs
mcs/mcs/nullable.cs
mcs/mcs/parameter.cs
mcs/mcs/property.cs
mcs/mcs/report.cs
mcs/mcs/rootcontext.cs
mcs/mcs/statement.cs
mcs/mcs/symbolwriter.cs
mcs/mcs/typemanager.cs
mcs/mcs/typespec.cs
mcs/tests/.cvsignore [deleted file]
mcs/tests/.gitattributes
mcs/tests/Makefile
mcs/tests/anon-test [deleted file]
mcs/tests/dtest-003.cs
mcs/tests/dtest-007.cs
mcs/tests/dtest-008.cs
mcs/tests/dtest-014.cs
mcs/tests/dtest-015.cs [new file with mode: 0644]
mcs/tests/dtest-016.cs [new file with mode: 0644]
mcs/tests/dtest-017.cs [new file with mode: 0644]
mcs/tests/dtest-018.cs [new file with mode: 0644]
mcs/tests/dtest-019.cs [new file with mode: 0644]
mcs/tests/dtest-020.cs [new file with mode: 0644]
mcs/tests/dtest-021.cs [new file with mode: 0644]
mcs/tests/dtest-022.cs [new file with mode: 0644]
mcs/tests/dtest-023.cs [new file with mode: 0644]
mcs/tests/dtest-024.cs [new file with mode: 0644]
mcs/tests/dtest-025.cs [new file with mode: 0644]
mcs/tests/dtest-026.cs [new file with mode: 0644]
mcs/tests/dtest-027.cs [new file with mode: 0644]
mcs/tests/dtest-028.cs [new file with mode: 0644]
mcs/tests/dtest-029.cs [new file with mode: 0644]
mcs/tests/dtest-implicitarray-01.cs [new file with mode: 0644]
mcs/tests/dtest-iter-01.cs [new file with mode: 0644]
mcs/tests/gtest-504-lib.cs
mcs/tests/gtest-522.cs
mcs/tests/gtest-523.cs
mcs/tests/gtest-525.cs
mcs/tests/gtest-527.cs [new file with mode: 0644]
mcs/tests/gtest-528.cs [new file with mode: 0644]
mcs/tests/gtest-529.cs [new file with mode: 0644]
mcs/tests/gtest-530.cs [new file with mode: 0644]
mcs/tests/gtest-531.cs [new file with mode: 0644]
mcs/tests/gtest-532-lib.cs [new file with mode: 0644]
mcs/tests/gtest-532.cs [new file with mode: 0644]
mcs/tests/gtest-533.cs [new file with mode: 0644]
mcs/tests/gtest-534-lib.cs [new file with mode: 0644]
mcs/tests/gtest-534.cs [new file with mode: 0644]
mcs/tests/gtest-535.cs [new file with mode: 0644]
mcs/tests/gtest-exmethod-37.cs [new file with mode: 0644]
mcs/tests/gtest-exmethod-38.cs [new file with mode: 0644]
mcs/tests/gtest-implicitarray-01.cs
mcs/tests/gtest-iter-15.cs [new file with mode: 0644]
mcs/tests/gtest-linq-24.cs
mcs/tests/gtest-named-03.cs [new file with mode: 0644]
mcs/tests/gtest-optional-09.cs [new file with mode: 0644]
mcs/tests/gtest-optional-10.cs [new file with mode: 0644]
mcs/tests/gtest-optional-11.cs [new file with mode: 0644]
mcs/tests/gtest-optional-12.cs [new file with mode: 0644]
mcs/tests/gtest-repl-01.cs
mcs/tests/gtest-variance-14.cs [new file with mode: 0644]
mcs/tests/gtest-variance-15.cs [new file with mode: 0644]
mcs/tests/gtest-variance-16.cs [new file with mode: 0644]
mcs/tests/known-issues-dmcs
mcs/tests/known-issues-gmcs
mcs/tests/test-106.cs
mcs/tests/test-291.cs
mcs/tests/test-746.cs
mcs/tests/test-788.cs
mcs/tests/test-789.cs [new file with mode: 0644]
mcs/tests/test-790.cs [new file with mode: 0644]
mcs/tests/test-791.cs [new file with mode: 0644]
mcs/tests/test-792-lib.il [new file with mode: 0644]
mcs/tests/test-792.cs [new file with mode: 0644]
mcs/tests/test-793.cs [new file with mode: 0644]
mcs/tests/test-794.cs [new file with mode: 0644]
mcs/tests/test-795.cs [new file with mode: 0644]
mcs/tests/test-796.cs [new file with mode: 0644]
mcs/tests/test-797.cs [new file with mode: 0644]
mcs/tests/test-798.cs [new file with mode: 0644]
mcs/tests/test-799.cs [new file with mode: 0644]
mcs/tests/test-800.cs [new file with mode: 0644]
mcs/tests/test-anon-94-lib.cs [new file with mode: 0644]
mcs/tests/test-anon-94.cs
mcs/tests/test-anon-96.cs [new file with mode: 0644]
mcs/tests/test-partial-29.cs [new file with mode: 0644]
mcs/tests/test-xml-053-ref.xml [new file with mode: 0644]
mcs/tests/test-xml-053.cs [new file with mode: 0644]
mcs/tests/test-xml-054-ref.xml [new file with mode: 0644]
mcs/tests/test-xml-054.cs [new file with mode: 0644]
mcs/tests/ver-il-dmcs.xml [new file with mode: 0644]
mcs/tests/ver-il-gmcs.xml
mcs/tools/Makefile
mcs/tools/ccrewrite/Makefile [new file with mode: 0644]
mcs/tools/ccrewrite/Program.cs [new file with mode: 0644]
mcs/tools/ccrewrite/ccrewrite.exe.sources [new file with mode: 0644]
mcs/tools/corcompare/ChangeLog
mcs/tools/corcompare/mono-api-info.cs
mcs/tools/mdoc/Makefile
mcs/tools/mdoc/Mono.Documentation/MdocFile.cs [new file with mode: 0644]
mcs/tools/mdoc/Mono.Documentation/ecmadoc.cs [new file with mode: 0644]
mcs/tools/mdoc/Mono.Documentation/mdoc.cs
mcs/tools/mdoc/Mono.Documentation/monodocer.cs
mcs/tools/mdoc/Mono.Documentation/msitomsx.cs [new file with mode: 0644]
mcs/tools/mdoc/Resources/monodoc-ecma.xsd
mcs/tools/mdoc/Resources/msitomsx.xsl [new file with mode: 0644]
mcs/tools/mdoc/Test/en.expected.importecmadoc/System/Action`1.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/System/Array.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/System/AsyncCallback.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/index.xml [new file with mode: 0644]
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/Func`2.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/GenericBase`1+FooEventArgs.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/GenericBase`1+NestedCollection+Enumerator.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/GenericBase`1+NestedCollection.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/IFoo`1.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/MyList`1.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/MyList`2.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Color.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/IProcess.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+Del.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+Direction.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+IMenuItem.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+NestedClass+Double+Triple+Quadruple.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+NestedClass+Double+Triple.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+NestedClass+Double.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+NestedClass.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget+NestedClass`1.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/NoNamespace.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Action`1.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Array.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/AsyncCallback.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Environment+SpecialFolder.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/index.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/Func`2.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/GenericBase`1+FooEventArgs.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/GenericBase`1+NestedCollection+Enumerator.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/GenericBase`1+NestedCollection.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/IFoo`1.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/MyList`1.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/MyList`2.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/AddedType.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Color.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/IProcess.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+Del.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+Direction.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+IMenuItem.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+NestedClass+Double+Triple+Quadruple.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+NestedClass+Double+Triple.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+NestedClass+Double.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+NestedClass.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget+NestedClass`1.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected.since/NoNamespace.xml
mcs/tools/mdoc/Test/en.expected.since/System/Action`1.xml
mcs/tools/mdoc/Test/en.expected.since/System/Array.xml
mcs/tools/mdoc/Test/en.expected.since/System/AsyncCallback.xml
mcs/tools/mdoc/Test/en.expected.since/System/Environment+SpecialFolder.xml
mcs/tools/mdoc/Test/en.expected.since/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.since/index.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/Func`2.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/GenericBase`1+FooEventArgs.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/GenericBase`1+NestedCollection+Enumerator.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/GenericBase`1+NestedCollection.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/IFoo`1.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/MyList`1.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/MyList`2.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Color.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/IProcess.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+Del.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+Direction.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+IMenuItem.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+NestedClass+Double+Triple+Quadruple.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+NestedClass+Double+Triple.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+NestedClass+Double.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+NestedClass.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget+NestedClass`1.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected/NoNamespace.xml
mcs/tools/mdoc/Test/en.expected/System/Action`1.xml
mcs/tools/mdoc/Test/en.expected/System/Array.xml
mcs/tools/mdoc/Test/en.expected/System/AsyncCallback.xml
mcs/tools/mdoc/Test/en.expected/System/Environment+SpecialFolder.xml
mcs/tools/mdoc/Test/en.expected/System/Environment.xml
mcs/tools/mdoc/Test/en.expected/index.xml
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`2.html
mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml
mcs/tools/mdoc/Test/validate.check.monodocer.importslashdoc
mcs/tools/mdoc/mdoc.exe.sources
mcs/tools/mkbundle/mkbundle.cs
mcs/tools/monodoc/Resources/mdoc-html-utils.xsl
mcs/tools/xbuild/SolutionParser.cs
mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/Microsoft.Silverlight.Common.targets
mono-core.spec.in
mono/arch/mips/mips-codegen.h
mono/arch/x86/x86-codegen.h
mono/dis/get.c
mono/io-layer/collection.c
mono/io-layer/handles-private.h
mono/io-layer/handles.c
mono/io-layer/io.c
mono/io-layer/locking.c
mono/io-layer/shared.c
mono/io-layer/shared.h
mono/io-layer/sockets.c
mono/io-layer/wapi-private.h
mono/io-layer/wthreads.c
mono/metadata/Makefile.am
mono/metadata/appdomain.c
mono/metadata/assembly.c
mono/metadata/boehm-gc.c
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/console-unix.c
mono/metadata/domain-internals.h
mono/metadata/domain.c
mono/metadata/gc-internal.h
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/image.c
mono/metadata/loader.c
mono/metadata/marshal.c
mono/metadata/metadata-internals.h
mono/metadata/metadata-verify.c
mono/metadata/metadata.c
mono/metadata/monitor.c
mono/metadata/mono-config.c
mono/metadata/mono-config.h
mono/metadata/mono-debug-debugger.c
mono/metadata/mono-debug-debugger.h
mono/metadata/mono-debug.h
mono/metadata/mono-hash.c
mono/metadata/mono-hash.h
mono/metadata/mono-wsq.c
mono/metadata/nacl-stub.c [new file with mode: 0644]
mono/metadata/null-gc.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/profiler.c
mono/metadata/rand.c
mono/metadata/reflection.c
mono/metadata/sgen-cardtable.c [new file with mode: 0644]
mono/metadata/sgen-cardtable.h [new file with mode: 0644]
mono/metadata/sgen-gc.c
mono/metadata/sgen-gc.h
mono/metadata/sgen-gray.c
mono/metadata/sgen-internal.c
mono/metadata/sgen-los.c
mono/metadata/sgen-major-copy-object.h [new file with mode: 0644]
mono/metadata/sgen-major-copying.c
mono/metadata/sgen-major-scan-object.h [new file with mode: 0644]
mono/metadata/sgen-marksweep-fixed-par.c [new file with mode: 0644]
mono/metadata/sgen-marksweep-fixed.c [new file with mode: 0644]
mono/metadata/sgen-marksweep-par.c [new file with mode: 0644]
mono/metadata/sgen-marksweep.c
mono/metadata/sgen-pinning-stats.c
mono/metadata/sgen-pinning.c
mono/metadata/sgen-protocol.c
mono/metadata/sgen-protocol.h
mono/metadata/sgen-scan-object.h
mono/metadata/sgen-workers.c [new file with mode: 0644]
mono/metadata/socket-io.c
mono/metadata/threadpool.c [changed mode: 0755->0644]
mono/metadata/threads.c
mono/metadata/verify-internals.h
mono/metadata/verify.c
mono/mini/.gitignore
mono/mini/ChangeLog
mono/mini/Makefile.am
mono/mini/abcremoval.c
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/cpu-amd64.md
mono/mini/cpu-mips.md
mono/mini/cpu-ppc64.md
mono/mini/cpu-x86.md
mono/mini/debug-debugger.c
mono/mini/debug-debugger.h
mono/mini/driver.c
mono/mini/dwarfwriter.c
mono/mini/exceptions-amd64.c
mono/mini/exceptions-sparc.c
mono/mini/exceptions-x86.c
mono/mini/exceptions.cs
mono/mini/fsacheck.c [new file with mode: 0644]
mono/mini/generics.cs
mono/mini/genmdesc.c
mono/mini/genmdesc.pl
mono/mini/image-writer.c
mono/mini/image-writer.h
mono/mini/jit-icalls.c
mono/mini/method-to-ir.c
mono/mini/mini-alpha.h
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-arm.c
mono/mini/mini-arm.h
mono/mini/mini-codegen.c
mono/mini/mini-exceptions.c
mono/mini/mini-gc.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-ia64.c
mono/mini/mini-ia64.h
mono/mini/mini-llvm-cpp.cpp
mono/mini/mini-llvm.c
mono/mini/mini-mips.c
mono/mini/mini-mips.h
mono/mini/mini-ops.h
mono/mini/mini-posix.c
mono/mini/mini-ppc.c
mono/mini/mini-ppc.h
mono/mini/mini-s390.h
mono/mini/mini-s390x.h
mono/mini/mini-sparc.c
mono/mini/mini-sparc.h
mono/mini/mini-trampolines.c
mono/mini/mini-x86.c
mono/mini/mini-x86.h
mono/mini/mini.c
mono/mini/mini.h
mono/mini/objects.cs
mono/mini/patch-info.h
mono/mini/ssa.c
mono/mini/tramp-amd64.c
mono/mini/tramp-mips.c
mono/mini/tramp-s390x.c
mono/mini/tramp-x86.c
mono/tests/.gitignore
mono/tests/Makefile.am
mono/tests/appdomain-unload.cs
mono/tests/appdomain-unload.exe.config [new file with mode: 0644]
mono/tests/bug-348522.2.cs
mono/tests/bug-633291.il [new file with mode: 0644]
mono/tests/delegate2.exe.config [new file with mode: 0644]
mono/tests/generic-marshalbyref.2.cs
mono/tests/interlocked.cs
mono/tests/load-exceptions.cs
mono/tests/t-missing.cs
mono/tests/threadpool-exceptions5.cs [new file with mode: 0644]
mono/tests/threadpool-exceptions6.cs [new file with mode: 0644]
mono/tests/threadpool-exceptions7.cs [new file with mode: 0644]
mono/tests/verifier/ChangeLog
mono/tests/verifier/Makefile
mono/tests/verifier/invalid_bad_merge_with_leave.il [new file with mode: 0644]
mono/utils/dlmalloc.c
mono/utils/mono-codeman.c
mono/utils/mono-sigcontext.h
mono/utils/strtod.c
po/mcs/POTFILES.in
scripts/.gitignore
scripts/Makefile.am
scripts/commits-to-changelog.py [new file with mode: 0755]
scripts/get-cygwin-deps.sh
scripts/mono-heapviz
tools/sgen/sgen-grep-binprot.c

index 9f803813ed27451d773651c9ff76689009646408..9bce5208ff0139c21c5e5faf2c45f0e60266c352 100644 (file)
@@ -1,13 +1,18 @@
-#*.c   crlf
-#*.h   crlf
-#*.cs  crlf
-#*.sh  crlf
+# ensure LF endings on all checkouts
+configure.in crlf=input
 
-#ChangeLog     crlf
-#*akefile*     crlf
-#*.sources     crlf
+# ensure native line endings on checkout
+*.c    crlf
+*.h    crlf
+*.cs   crlf
+*.sh   crlf
 
-# don't do anything to line-endings.  Let CRLFs go into the repo
+.gitattributes crlf
+ChangeLog      crlf
+*akefile*      crlf
+*.sources      crlf
+
+# don't do anything to line-endings.  Let CRLFs go into the repo, and CRLF on checkout
 *.bat          -crlf
 *.sln          -crlf
 *.*proj*       -crlf
index e7bf1f9b2ded8fdfa2f764adb370df0c1c23a538..92d7263beb3b31ce7576e6cb5bd881278a09fb71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-05  Andrés G. Aragoneses  <andres@lindenlab.com>
+
+       * scripts/.gitignore: added mono-abi-info.
+       * scripts/Makefile.am: added mono-abi-info autofoo.
+
 2010-07-16  Zoltan Varga  <vargaz@gmail.com>
 
        * configure.in: Remove the 'LLVM backend is experimental' warning.
index 17c95137b57ed367f4652afa7f9b88487bb4e439..0017405ca5a5c5937e8e74960040a95988e2b92d 100644 (file)
@@ -1,10 +1,10 @@
 AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS = -I .
 
-MOONLIGHT_SUBDIRS =    $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir)         data
+MOONLIGHT_SUBDIRS =    $(libgc_dir) eglib mono $(ikvm_native_dir)         data
 
 if CROSS_COMPILING
-SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) data runtime scripts man samples web msvc $(docs_dir)
+SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples web msvc $(docs_dir)
 # Keep in sync with SUBDIRS
 ## 'tools' is not normally built
 DIST_SUBDIRS = po libgc eglib mono ikvm-native         data runtime scripts man samples web tools msvc docs
@@ -12,7 +12,7 @@ else
 if ONLY_MOONLIGHT
 SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
 else
-SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
+SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
 # Keep in sync with SUBDIRS
 ## 'tools' is not normally built
 DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples web tools msvc docs
@@ -24,9 +24,11 @@ EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LIC
 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
 
 # Distribute the 'mcs' tree too
+GIT_DIR ?= $(srcdir)/.git
 dist-hook:
        test -d $(distdir)/mcs || mkdir $(distdir)/mcs
        d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
+       test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
 
 pkgconfigdir = $(libdir)/pkgconfig
 noinst_DATA = mono-uninstalled.pc
diff --git a/README b/README
index 8ea662022e91743dbdc9ca4ecd233e03e357bd4d..fcf01c3fca52ae5e0d4adc4cddcc784ee5d959dc 100644 (file)
--- a/README
+++ b/README
@@ -473,6 +473,15 @@ This is Mono.
                There are a number of runtime options to control this
                also, see the man page.
 
+       --enable-nacl
+
+               This configures the Mono compiler to generate code
+               suitable to be used by Google's Native Client:
+
+                        http://code.google.com/p/nativeclient/
+
+               Currently this is used with Mono's AOT engine as
+               Native Client does not support JIT engines yet.
 
 2. Using Mono
 =============
index e02a12bd944fd843125eccb5d1b48038238f8d8f..0bc49f1cc52e514838cae38f1aa75330fd722ce9 100644 (file)
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
 m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,2.7)
+AM_INIT_AUTOMAKE(mono,2.8.1)
 AM_MAINTAINER_MODE
 
 API_VER=2.0
@@ -67,6 +67,7 @@ AC_MSG_CHECKING([host platform characteristics])
 libgc_threads=no
 has_dtrace=no
 parallel_mark=yes
+ikvm_native=yes
 
 case "$host" in
        powerpc*-*-linux*)
@@ -156,7 +157,7 @@ case "$host" in
                ;;
        *-*-*openbsd*)
                host_win32=no
-               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_REENTRANT -DUSE_MMAP"
                if test "x$disable_munmap" != "xyes"; then
                CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
                fi
@@ -179,9 +180,22 @@ case "$host" in
                libmono_cflags="-D_REENTRANT"
                libdl="-ldl"
                libgc_threads=pthreads
-               AOT_SUPPORTED="yes"
                use_sigposix=yes
                ;;
+       *-*-nacl*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+               if test "x$disable_munmap" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+               fi
+               libmono_cflags="-D_REENTRANT"
+               libdl=
+               libgc_threads=pthreads
+               gc_default=boehm
+               use_sigposix=yes
+               ikvm_native=no
+               AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
+               ;;
        *-*-hpux*)
                host_win32=no
                CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
@@ -350,7 +364,7 @@ fi
 
 AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
 
-AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h)
+AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h)
 AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h)
 
 AC_CHECK_HEADERS(sys/user.h, [], [],
@@ -549,8 +563,6 @@ AC_ARG_WITH([glib],
        [  --with-glib=embedded|system    Choose glib API: system or embedded (default to embedded)],
        [], [with_glib=embedded])
 
-eglib_dir=
-
 ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\""
 AC_CONFIG_SUBDIRS(eglib)
 
@@ -562,39 +574,13 @@ embedded)
   BUILD_GLIB_LIBS="$GLIB_LIBS"
   GMODULE_CFLAGS="$GLIB_CFLAGS"
   GMODULE_LIBS="$GLIB_LIBS"
-  eglib_dir=eglib
   ;;
 system)
-  if test "x$PKG_CONFIG" = "xno"; then
-    AC_MSG_ERROR([You need to install pkg-config])
-  fi
-  echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
-  echo "cross_compiling=$cross_compiling"
-  BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
-  BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
-  
-  ## Versions of dependencies
-  GLIB_REQUIRED_VERSION=2.4.0
-
-  dnl
-  dnl No, you will not replace this check with a pkg.m4 check
-  dnl
-  if test "x$PKG_CONFIG" = "xno"; then
-    AC_MSG_ERROR([You need to install pkg-config])
-  fi
-  if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
-      GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
-      GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
-      GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
-      GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
-  else
-       AC_MSG_ERROR([You need at least glib-2.0 $GLIB_REQUIRED_VERSION])
-  fi
+  AC_MSG_ERROR([--with-glib=system is no longer supported as of Mono 2.8])
   ;;
 *)
   AC_MSG_ERROR([Invalid argument to --with-glib.])
 esac
-AM_CONDITIONAL(EGLIB_BUILD, test x$with_glib = xembedded)
   
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
@@ -602,7 +588,6 @@ AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 AC_SUBST(BUILD_GLIB_CFLAGS)
 AC_SUBST(BUILD_GLIB_LIBS)
-AC_SUBST(eglib_dir)
 
 if test x$cross_compiling$host_win32 = xnoyes; then
    AC_MSG_CHECKING(for cygwin glib2-dev package)
@@ -675,11 +660,7 @@ if test x$enable_small_config = xyes; then
        CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG"
 fi
 
-if test x$AOT_SUPPORTED != xyes; then
-   AOT_SUPPORTED=no
-fi
-
-AC_ARG_ENABLE(system-aot, [  --enable-system-aot  Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=$AOT_SUPPORTED)
+AC_ARG_ENABLE(system-aot, [  --enable-system-aot  Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default)
 
 DISABLED_FEATURES=none
 
@@ -985,7 +966,7 @@ if test x$target_win32 = xno; then
        dnl ******************************************************************
        dnl *** Checks for the IKVM JNI interface library                  ***
        dnl ******************************************************************
-       AC_ARG_WITH(ikvm-native, [  --with-ikvm-native=yes,no      build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=yes])
+       AC_ARG_WITH(ikvm-native, [  --with-ikvm-native=yes,no      build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=$ikvm_native])
 
        ikvm_native_dir=
        if test x$with_ikvm_native = xyes; then
@@ -2000,6 +1981,22 @@ fi
 AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
 AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
 
+dnl **************
+dnl ***  NaCl  ***
+dnl **************
+
+AC_ARG_ENABLE(nacl_codegen, [  --enable-nacl-codegen      Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
+
+AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
+if test "x$enable_nacl_codegen" = "xyes"; then
+   MONO_NACL_ALIGN_MASK_OFF=1
+   CPPFLAGS="$CPPFLAGS -D__native_client_codegen__"
+   AC_DEFINE(TARGET_NACL, 1, [...])
+else
+   MONO_NACL_ALIGN_MASK_OFF=0
+fi
+AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
+
 dnl **************
 dnl ***  LLVM  ***
 dnl **************
@@ -2126,7 +2123,11 @@ case "$host" in
                  haiku*)
                        LIBC=libroot.so
                        ;;
-                 linux*|darwin*)
+                 linux*)
+                       sgen_supported=true
+                       AOT_SUPPORTED="yes"
+                       ;;
+                 darwin*|openbsd*)
                        sgen_supported=true
                        ;;
                esac
@@ -2137,7 +2138,11 @@ case "$host" in
                JIT_SUPPORTED=yes
                jit_wanted=true
                case $host_os in
-                 linux*|darwin*)
+                 linux*)
+                       sgen_supported=true
+                       AOT_SUPPORTED="yes"
+                       ;;
+                 darwin*|openbsd*)
                        sgen_supported=true
                        ;;
                esac
@@ -2911,7 +2916,11 @@ fi
       echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
     fi
 
-    if test x$TARGET = xAMD64 -a x$host_win32 = xno -a "x$AOT_SUPPORTED" = "xyes" -a x$enable_system_aot = xyes; then
+       if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
+          enable_system_aot=yes
+       fi
+
+    if test x$host_win32 = xno -a x$platform_darwin != xyes -a x$enable_system_aot = xyes; then
       echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
     fi
 
index 9db3647aafb7aade4e716aa00b9e8506768b9f11..945b3bc69210f6e36b6325235415ebb31ffd3a09 100644 (file)
@@ -2,4 +2,4 @@
 Name: Standard libraries in a .NET setup
 Description: References all the standard .NET libraries for compilation (.NET Framework 3.5 compatibility)
 Version: @VERSION@
-Libs: -r:Accessibility.dll -r:cscompmgd.dll -r:Microsoft.JScript.dll -r:Microsoft.VisualC.dll -r:Microsoft.Vsa.dll -r:System.Configuration.Install.dll -r:System.Data.dll -r:System.Data.OracleClient.dll -r:System.Design.dll -r:System.DirectoryServices.dll -r:System.dll -r:System.Drawing.Design.dll -r:System.Drawing.dll -r:System.EnterpriseServices.dll -r:System.Management.dll -r:System.Messaging.dll -r:System.Runtime.Remoting.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Security.dll -r:System.ServiceProcess.dll -r:System.Web.dll -r:System.Web.Services.dll -r:System.Windows.Forms.dll -r:System.Xml.dll -r:System.Configuration.dll -r:System.Core.dll -r:System.Xml.Linq.dll -r:System.Data.DataSetExtensions.dll -r:System.Data.Linq.dll -r:System.Data.Services.dll -r:System.Web.Abstractions.dll -r:System.Web.Routing.dll -r:System.Web.DynamicData.dll -r:System.ComponentModel.DataAnnotations.dll
+Libs: -r:Accessibility.dll -r:cscompmgd.dll -r:Microsoft.VisualC.dll -r:System.Configuration.Install.dll -r:System.Data.dll -r:System.Data.OracleClient.dll -r:System.Design.dll -r:System.DirectoryServices.dll -r:System.dll -r:System.Drawing.Design.dll -r:System.Drawing.dll -r:System.EnterpriseServices.dll -r:System.Management.dll -r:System.Messaging.dll -r:System.Runtime.Remoting.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Security.dll -r:System.ServiceProcess.dll -r:System.Web.dll -r:System.Web.Services.dll -r:System.Windows.Forms.dll -r:System.Xml.dll -r:System.Configuration.dll -r:System.Core.dll -r:System.Xml.Linq.dll -r:System.Data.DataSetExtensions.dll -r:System.Data.Linq.dll -r:System.Data.Services.dll -r:System.Web.Abstractions.dll -r:System.Web.Routing.dll -r:System.Web.DynamicData.dll -r:System.ComponentModel.DataAnnotations.dll
index fc101f122f9ec0d56f2b588fdf00fc4bd3a2a959..1ce7e6e2d7be6517ac35e68d035ac8de64da4777 100644 (file)
@@ -103,8 +103,11 @@ class ObjectPrinter:
             class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
             if class_name [-2:len(class_name)] == "[]":
                 return {}.__iter__ ()
-            gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
-            return self._iterator(obj.cast (gdb_type))
+            try:
+                gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
+                return self._iterator(obj.cast (gdb_type))
+            except:
+                return {}.__iter__ ()
         except:
             print sys.exc_info ()[0]
             print sys.exc_info ()[1]
index f007af7bdb7050b741702dc7b014488abf833c8a..e1912412fe01d527882d233262fa1a419bf47e70 100644 (file)
                        <section name="webRequestModules" type="System.Net.Configuration.WebRequestModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </sectionGroup>
                <section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-               <sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-                       <section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-                       <section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+               <sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+                       <section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+                       <section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </sectionGroup>
                <section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                <section name="uri" type="System.Configuration.UriSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
index 17fb429f2f1a8a225cd7555a6c75ca885b1eb615..51e448d89a0690960e42f5c99aa7e9fd280ddac5 100644 (file)
@@ -49,6 +49,12 @@ case $host in
     ;;
 esac
 
+case $host in
+       *-*-solaris*)
+       CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+       ;;
+esac
+
 case $target in
 arm*-darwin*)
     CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
@@ -127,9 +133,6 @@ else
 fi
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test "x$PKG_CONFIG" = "xno"; then
-       AC_MSG_ERROR([You need to install pkg-config])
-fi
 
 pkg_config_path=
 AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir      Change pkg-config dir to custom dir],
@@ -147,13 +150,17 @@ AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir      Chan
 dnl
 dnl No, you can not replace the call below with a pkg.m4 macro
 dnl
-if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
-    have_glib=true;
-else
-    have_glib=false;
+have_glib=false
+if test "x$PKG_CONFIG" != "xno"; then
+    if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
+        have_glib=true;
+    else
+        have_glib=false;
+    fi
 fi
 AM_CONDITIONAL(HAVE_GLIB, $have_glib)
 
+AC_ARG_ENABLE(quiet-build, [  --enable-quiet-build  Enable quiet runtime build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
 AC_SUBST(GPOINTER_TO_INT)
 AC_SUBST(GPOINTER_TO_UINT)
 AC_SUBST(GINT_TO_POINTER)
@@ -163,6 +170,11 @@ AC_SUBST(GSIZE_FORMAT)
 AC_SUBST(G_GUINT64_FORMAT)
 AC_SUBST(G_GINT64_FORMAT)
 
+if test x$enable_quiet_build = xyes; then
+   AC_CONFIG_COMMANDS([quiet], [for i in `find src test -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/../scripts/patch-quiet.sh $i; fi; done], [shell=$SHELL])
+   AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
+fi
+
 AC_OUTPUT([
 Makefile
 src/Makefile
index 8d7d614d5ead80e31ade18cb1d6e66b2c01a4c71..6635df1a9f5947eff1b9b9457bd922df0faf84a0 100644 (file)
@@ -8,3 +8,4 @@
 /semantic.cache
 /.project
 /.cproject
+/eglib-config.h
index 7ec18710b8e5be9f3f80a24ae157d98f93a786ef..03ecbfd129d46b4c160a1014ac081e64e6cea925 100644 (file)
@@ -30,4 +30,12 @@ typedef signed   @GSIZE@ gssize;
 #define G_HAVE_ISO_VARARGS
 #endif
 
+#if defined (__native_client__)
+#define sem_trywait(x) sem_wait(x)
+#define sem_timedwait(x,y) sem_wait(x)
+#define getdtablesize() (32768)
+#undef G_BREAKPOINT
+#define G_BREAKPOINT()
+#endif
+
 #endif
index 6e967142654274e64805064d8252f8bf2d7b6d48..365752a539f7fe1fe05402bd6ca4592861321e93 100644 (file)
@@ -479,6 +479,27 @@ g_hash_table_destroy (GHashTable *hash)
        g_free (hash);
 }
 
+void
+g_hash_table_print_stats (GHashTable *table)
+{
+       int i, max_chain_index, chain_size, max_chain_size;
+       Slot *node;
+
+       max_chain_size = 0;
+       max_chain_index = -1;
+       for (i = 0; i < table->table_size; i++) {
+               chain_size = 0;
+               for (node = table->table [i]; node; node = node->next)
+                       chain_size ++;
+               if (chain_size > max_chain_size) {
+                       max_chain_size = chain_size;
+                       max_chain_index = i;
+               }
+       }
+
+       printf ("Size: %d Table Size: %d Max Chain Length: %d at %d\n", table->in_use, table->table_size, max_chain_size, max_chain_index);
+}
+
 gboolean
 g_direct_equal (gconstpointer v1, gconstpointer v2)
 {
index b56f3957255af9b80ca645a64980e1ebe0decafb..78bba09590a6d6cb1d464e25c4b93f88e751235c 100644 (file)
@@ -201,6 +201,7 @@ gboolean        g_hash_table_remove          (GHashTable *hash, gconstpointer ke
 guint           g_hash_table_foreach_remove  (GHashTable *hash, GHRFunc func, gpointer user_data);
 guint           g_hash_table_foreach_steal   (GHashTable *hash, GHRFunc func, gpointer user_data);
 void            g_hash_table_destroy         (GHashTable *hash);
+void            g_hash_table_print_stats     (GHashTable *table);
 
 guint           g_spaced_primes_closest      (guint x);
 
index e8b6dea646a2f93fc7e44688865e455085888d14..87eb27aef2a4e5465ac29c180cf7cd4f0d9ca785 100644 (file)
 #include <glib.h>
 #include <gmodule.h>
 
+#if defined(__native_client__)
+GModule *
+g_module_open (const gchar *file, GModuleFlags flags)
+{
+       printf("dlopen() not supported on Native Client.\n");
+       return NULL;
+}
+
+
+gboolean
+g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
+{
+       return FALSE;
+}
+
+
+const gchar*
+g_module_error(void)
+{
+       return "dlopen not supported on Native Client.";
+}
+
+gboolean
+g_module_close (GModule *module)
+{
+       return FALSE;
+}
+
+gchar*
+g_module_build_path (const gchar *directory, const gchar *module_name)
+{
+       return NULL;
+}
+
+#else
+
 #ifdef G_OS_UNIX
 #include <dlfcn.h>
 
@@ -286,3 +322,5 @@ g_module_build_path (const gchar *directory, const gchar *module_name)
        return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name); 
 }
 
+#endif /* __native_client__ */
+
index 8009c5ab09ac390c10b0ac0ed0fe2aba21c98f90..2272c97ff97c157b3631f5fa330753604ec65196 100644 (file)
@@ -153,5 +153,6 @@ g_assertion_message (const gchar *format, ...)
        va_start (args, format);
        g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
        va_end (args);
+       g_assert_not_reached ();
 }
 
index 386f9ed397a95ff01d4f00424047df705589cb5e..f55d5042123f1d00d1d2e8e61859049637086d1f 100644 (file)
@@ -35,7 +35,9 @@
 #include <glib.h>
 
 #ifdef HAVE_UNISTD_H
+#ifndef __USE_GNU
 #define __USE_GNU
+#endif
 #include <unistd.h>
 #endif
 
@@ -381,10 +383,10 @@ g_spawn_async_with_pipes (const gchar *working_directory,
                        }
 
                        if (standard_input) {
-                               dup2 (in_pipe [0], STDERR_FILENO);
+                               dup2 (in_pipe [0], STDIN_FILENO);
                        } else if ((flags & G_SPAWN_CHILD_INHERITS_STDIN) == 0) {
                                fd = open ("/dev/null", O_RDONLY);
-                               dup2 (fd, STDERR_FILENO);
+                               dup2 (fd, STDIN_FILENO);
                        }
 
                        if ((flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN) != 0) {
index 7a98658a706675d23f79beb50fd433541ea2ac02..af11774446494188c84b0cbfc9baa580681d883e 100644 (file)
@@ -302,10 +302,11 @@ g_get_charset (G_CONST_RETURN char **charset)
        is_utf8 = FALSE;
 #else
        if (my_charset == NULL){
+               /* These shouldn't be heap allocated */
 #if HAVE_LANGINFO_H
-               my_charset = g_strdup (nl_langinfo (CODESET));
+               my_charset = nl_langinfo (CODESET);
 #else
-               my_charset = g_strdup ("UTF-8");
+               my_charset = "UTF-8";
 #endif
                is_utf8 = strcmp (my_charset, "UTF-8") == 0;
        }
index ab6c12ea69c1fc5ad614df6e2e98b73310cf008b..6abd703deeb1f9cfc196faded14ab7919a78de48 100644 (file)
@@ -55,98 +55,6 @@ g_utf8_strdown (const gchar *str, gssize len)
        return (gchar*)utf8_case_conv (str, len, FALSE);
 }
 
-gunichar2*
-g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error)
-{
-       /* The conversion logic is almost identical to UTF8Encoding.GetChars(),
-          but error check is always done at utf8_to_utf16_len() so that
-          the conversion core below simply resets erroreous bits */
-       glong utf16_len;
-       gunichar2 *ret;
-       guchar ch, mb_size, mb_remain;
-       guint32 codepoint;
-       glong in_pos, out_pos;
-
-       utf16_len = 0;
-       mb_size = 0;
-       mb_remain = 0;
-       in_pos = 0;
-       out_pos = 0;
-
-       if (error)
-               *error = NULL;
-
-       if (items_written)
-               *items_written = 0;
-       utf16_len = utf8_to_utf16_len (str, len, items_read, error);
-       if (error)
-               if (*error)
-                       return NULL;
-       if (utf16_len < 0)
-               return NULL;
-
-       ret = g_malloc ((1 + utf16_len) * sizeof (gunichar2));
-
-       for (in_pos = 0; len < 0 ? str [in_pos] : in_pos < len; in_pos++) {
-               ch = (guchar) str [in_pos];
-               if (mb_size == 0) {
-                       if (ch < 0x80)
-                               ret [out_pos++] = ch;
-                       else if ((ch & 0xE0) == 0xC0) {
-                               codepoint = ch & 0x1F;
-                               mb_size = 2;
-                       } else if ((ch & 0xF0) == 0xE0) {
-                               codepoint = ch & 0x0F;
-                               mb_size = 3;
-                       } else if ((ch & 0xF8) == 0xF0) {
-                               codepoint = ch & 7;
-                               mb_size = 4;
-                       } else if ((ch & 0xFC) == 0xF8) {
-                               codepoint = ch & 3;
-                               mb_size = 5;
-                       } else if ((ch & 0xFE) == 0xFC) {
-                               codepoint = ch & 3;
-                               mb_size = 6;
-                       } else {
-                               /* invalid utf-8 sequence */
-                               codepoint = 0;
-                               mb_remain = mb_size = 0;
-                       }
-                       if (mb_size > 1)
-                               mb_remain = mb_size - 1;
-               } else {
-                       if ((ch & 0xC0) == 0x80) {
-                               codepoint = (codepoint << 6) | (ch & 0x3F);
-                               if (--mb_remain == 0) {
-                                       /* multi byte character is fully consumed now. */
-                                       if (codepoint < 0x10000) {
-                                               ret [out_pos++] = (gunichar2)(codepoint % 0x10000);
-                                       } else if (codepoint < 0x110000) {
-                                               /* surrogate pair */
-                                               codepoint -= 0x10000;
-                                               ret [out_pos++] = (gunichar2)((codepoint >> 10) + 0xD800);
-                                               ret [out_pos++] = (gunichar2)((codepoint & 0x3FF) + 0xDC00);
-                                       } else {
-                                               /* invalid utf-8 sequence (excess) */
-                                               codepoint = 0;
-                                               mb_remain = 0;
-                                       }
-                                       mb_size = 0;
-                               }
-                       } else {
-                               /* invalid utf-8 sequence */
-                               codepoint = 0;
-                               mb_remain = mb_size = 0;
-                       }
-               }
-       }
-
-       ret [out_pos] = 0;
-       if (items_written)
-               *items_written = out_pos;
-       return ret;
-}
-
 static glong
 utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **error)
 {
@@ -156,13 +64,27 @@ utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **erro
        guint32 codepoint;
        glong in_pos, ret;
 
+       if (len < 0)
+               len = strlen (str);
+
+       in_pos = 0;
+       ret = 0;
+
+       /* Common case */
+       for (in_pos = 0; in_pos < len && str [in_pos] < 0x80; in_pos++)
+               ret ++;
+
+       if (in_pos == len) {
+               if (items_read)
+                       *items_read = in_pos;
+               return ret;
+       }
+
        mb_size = 0;
        mb_remain = 0;
        overlong = 0;
-       in_pos = 0;
-       ret = 0;
 
-       for (in_pos = 0; len < 0 ? str [in_pos] : in_pos < len; in_pos++) {
+       for (; in_pos < len; in_pos++) {
                ch = str [in_pos];
                if (mb_size == 0) {
                        if (ch < 0x80)
@@ -271,6 +193,112 @@ utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **erro
        return ret;
 }
 
+gunichar2*
+g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error)
+{
+       /* The conversion logic is almost identical to UTF8Encoding.GetChars(),
+          but error check is always done at utf8_to_utf16_len() so that
+          the conversion core below simply resets erroreous bits */
+       glong utf16_len;
+       gunichar2 *ret;
+       guchar ch, mb_size, mb_remain;
+       guint32 codepoint;
+       glong in_pos, out_pos;
+
+       utf16_len = 0;
+       mb_size = 0;
+       mb_remain = 0;
+       in_pos = 0;
+       out_pos = 0;
+
+       if (error)
+               *error = NULL;
+
+       if (len < 0)
+               len = strlen (str);
+
+       if (items_read)
+               *items_read = 0;
+       if (items_written)
+               *items_written = 0;
+       utf16_len = utf8_to_utf16_len (str, len, items_read, error);
+       if (error)
+               if (*error)
+                       return NULL;
+       if (utf16_len < 0)
+               return NULL;
+
+       ret = g_malloc ((1 + utf16_len) * sizeof (gunichar2));
+
+       /* Common case */
+       for (in_pos = 0; in_pos < len; in_pos++) {
+               ch = (guchar) str [in_pos];
+
+               if (ch >= 0x80)
+                       break;
+               ret [out_pos++] = ch;
+       }
+
+       for (; in_pos < len; in_pos++) {
+               ch = (guchar) str [in_pos];
+               if (mb_size == 0) {
+                       if (ch < 0x80)
+                               ret [out_pos++] = ch;
+                       else if ((ch & 0xE0) == 0xC0) {
+                               codepoint = ch & 0x1F;
+                               mb_size = 2;
+                       } else if ((ch & 0xF0) == 0xE0) {
+                               codepoint = ch & 0x0F;
+                               mb_size = 3;
+                       } else if ((ch & 0xF8) == 0xF0) {
+                               codepoint = ch & 7;
+                               mb_size = 4;
+                       } else if ((ch & 0xFC) == 0xF8) {
+                               codepoint = ch & 3;
+                               mb_size = 5;
+                       } else if ((ch & 0xFE) == 0xFC) {
+                               codepoint = ch & 3;
+                               mb_size = 6;
+                       } else {
+                               /* invalid utf-8 sequence */
+                               codepoint = 0;
+                               mb_remain = mb_size = 0;
+                       }
+                       if (mb_size > 1)
+                               mb_remain = mb_size - 1;
+               } else {
+                       if ((ch & 0xC0) == 0x80) {
+                               codepoint = (codepoint << 6) | (ch & 0x3F);
+                               if (--mb_remain == 0) {
+                                       /* multi byte character is fully consumed now. */
+                                       if (codepoint < 0x10000) {
+                                               ret [out_pos++] = (gunichar2)(codepoint % 0x10000);
+                                       } else if (codepoint < 0x110000) {
+                                               /* surrogate pair */
+                                               codepoint -= 0x10000;
+                                               ret [out_pos++] = (gunichar2)((codepoint >> 10) + 0xD800);
+                                               ret [out_pos++] = (gunichar2)((codepoint & 0x3FF) + 0xDC00);
+                                       } else {
+                                               /* invalid utf-8 sequence (excess) */
+                                               codepoint = 0;
+                                               mb_remain = 0;
+                                       }
+                                       mb_size = 0;
+                               }
+                       } else {
+                               /* invalid utf-8 sequence */
+                               codepoint = 0;
+                               mb_remain = mb_size = 0;
+                       }
+               }
+       }
+
+       ret [out_pos] = 0;
+       if (items_written)
+               *items_written = out_pos;
+       return ret;
+}
+
 gchar*
 g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error)
 {
@@ -288,6 +316,8 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
        out_pos = 0;
        surrogate = FALSE;
 
+       if (items_read)
+               *items_read = 0;
        if (items_written)
                *items_written = 0;
        utf8_len = utf16_to_utf8_len (str, len, items_read, error);
index 8d7d614d5ead80e31ade18cb1d6e66b2c01a4c71..2d669e106db768eee27a33854972c8cb23da0804 100644 (file)
@@ -8,3 +8,5 @@
 /semantic.cache
 /.project
 /.cproject
+/test-eglib
+/test-glib
index 2d80fb819571a621bc9903471d6b42923c302b37..cf8d3f2d5793b1bea52118ff30310ca532f66b27 100644 (file)
@@ -3,7 +3,7 @@
 #include <glib.h>
 #include "test.h"
 
-#define do_bad_test(s) do { char *r = markup_test (s); if (r == NULL) return FAILED ("Failed on test " # s); else free (r); } while (0)
+#define do_bad_test(s) do { char *r = markup_test (s); if (r == NULL) return FAILED ("Failed on test " # s); else g_free (r); } while (0)
 #define do_ok_test(s) do { char *r = markup_test (s); if (r != NULL) return FAILED ("Could not parse valid " # s); } while (0)
 
 static char *
index 28b888517d30987127079dbc2be7f05d5159f37e..aaf5685d75fccfd920c0d9e1fa2e5609739657f0 100644 (file)
@@ -94,7 +94,7 @@ test_buildpath ()
        g_free (s);
 
        /* Null */
-       s = g_build_path ("/", NULL);
+       s = g_build_path ("/", NULL, NULL);
        if (s == NULL)
                return FAILED ("must get a non-NULL return");
        if (s [0] != 0)
index 9e23e37a8e014445ca591583666e4241c163283a..6dd7bf47469a891c8ca708bf157b99f04936fd02 100644 (file)
@@ -177,6 +177,11 @@ FAILED(const gchar *format, ...)
        va_list args;
        gint n;
 
+#if !defined(HAVE_VASPRINTF) && !defined(_EGLIB_MAJOR)
+       /* We are linked against the real glib, no vasprintf */
+       g_assert_not_reached ();
+       return NULL;
+#else
        va_start(args, format);
        n = vasprintf(&ret, format, args);
        va_end(args);
@@ -188,6 +193,7 @@ FAILED(const gchar *format, ...)
 
        last_result = ret;
        return ret;
+#endif
 }
 
 gdouble
index 2f7e173189b28e73b847343718fbfe356f6e6963..2bd596bb8c4e8b2d4c2e473c2cf3fbc7e53f74ed 100644 (file)
@@ -489,6 +489,7 @@ if test "${enable_gc_assertions}" = yes; then
     AC_DEFINE(GC_ASSERTIONS)
 fi
 
+AC_ARG_ENABLE(quiet-build, [  --enable-quiet-build  Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
 AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
 
 if test "${multilib}" = "yes"; then
@@ -497,6 +498,11 @@ else
   multilib_arg=
 fi
 
+if test x$enable_quiet_build = xyes; then
+   AC_CONFIG_COMMANDS([quiet], [for i in `find . -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/../scripts/patch-quiet.sh $i; fi; done], [shell=$SHELL])
+   AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
+fi
+
 AC_OUTPUT(Makefile
 include/Makefile
 include/private/Makefile
index 46a5f1f469fee38c061a4d85f9ecedb7ab2a28d1..f0132044a098c982ac032a2695d97f80c87238bc 100644 (file)
@@ -1061,6 +1061,8 @@ void GC_thr_init()
              GC_markers = atoi(markers_string);
            } else {
              GC_markers = GC_nprocs;
+                 if (GC_markers > MAX_MARKERS)
+                         GC_markers = MAX_MARKERS;
            }
           }
 #      endif
index 1e76cbb4fe53481f29f4b76bdd224c647a95858f..efb9636294f5858e368c61ec7b67c891da9d2b07 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-03  Andrés G. Aragoneses  <andres@lindenlab.com>
+
+       * monolinker.1: Add the name="..." notation to the field examples too
+       (besides the signature="..." one).
+
 2010-07-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>
 
        * mono.1: Document MONO_DEBUG's new reverse-pinvoke-exceptions option.
index 69e6432a08ffbc1530f983870daefad685e14d19..c1ed916a785d81821f152a04db4b58fd43b3d250 100644 (file)
@@ -33,6 +33,7 @@ man_MANS = \
        monodocs2html.1       \
        monolinker.1          \
        monop.1               \
+       mono-api-info.1       \
        mono-service.1        \
        mono-shlib-cop.1      \
        mono-xmltool.1        \
@@ -51,6 +52,7 @@ man_MANS = \
        wsdl.1                \
        xbuild.1              \
        xsd.1                 \
-       mono-configuration-crypto.1
+       mono-configuration-crypto.1 \
+       ccrewrite.1
 
 EXTRA_DIST = $(man_MANS)
diff --git a/man/ccrewrite.1 b/man/ccrewrite.1
new file mode 100644 (file)
index 0000000..22f242b
--- /dev/null
@@ -0,0 +1,67 @@
+.\" 
+.\" ccrewrite manual page.
+.\" Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+.\" Author:
+.\"   Chris Bacon <chrisbacon76@gmail.com>
+.\"
+.TH Mono "ccrewrite"
+.SH NAME
+ccrewrite \- Rewrite CLR assemblies for runtime code contract verification.
+.SH SYNOPSIS
+.PP
+.B ccrewrite --assembly=<assembly> [options]
+.SH DESCRIPTION
+Rewrite CLR assemblies to convert calls into the System.Diagnostics.Contracts
+namespace to perform runtime contract verification. This includes
+contract inheritance for virtual methods.
+.PP
+The assembly must have been built with the symbol CONTRACTS_FULL defined,
+otherwise the calls to the contract methods will have been removed
+by the compiler.
+.PP
+Currently only pre-conditions are supported, using the Contract.Requires()
+method. Contract inheritance for virtual methods is supported. Only a
+limited range of operations and types can be used within a pre-condition, 
+an error message will be shown if ccrewrite is unable to process the
+specified assembly.
+.SH CONFIGURATION OPTIONS
+.TP
+.I "--assembly <assembly-name>"
+The assembly to rewrite. If no --output option is specified, then this file
+overwritten with the rewritten version.
+.TP
+.I "--debug"
+Use debug information if available to improve the usefulness of contract
+failure messages.
+.TP
+.I "--help"
+Show help for ccrewrite, listing configuration options.
+.TP
+.I "--level <level> (default=4)"
+Set the which contract types are present in rewritten assembly:
+0 = No contracts;
+1 = Release requires;
+2 = Requires;
+3 = Ensures;
+4 = Invariants;
+(Each level includes all previous levels)
+.TP
+.I "--output <file-name>"
+Write the rewritten assembly to the specified file. If this is not present
+then the input assembly file is overwritten with the rewritten version.
+.TP
+.I "--rewrite (default=true)"
+Rewrite the assembly. If false, then nothing is done.
+.TP
+.I "--throwOnFailure (default=false)"
+Throw a ContractException on unhandled contract failure. The default
+behaviour is to Assert.
+
+
+.SH AUTHOR
+Written by Chris Bacon
+.SH COPYRIGHT
+Copyright (C) 2010 Chris Bacon.
+Released under MIT license.
+.SH WEB SITE
+Visit http://www.mono-project.com for details
index 27c4f6d3d037bf0dc2d7040829379381c169d184..9146c90d928297d048a900be4a4bc5cf4e15b5bb 100644 (file)
@@ -22,4 +22,5 @@
 <manpage name="xsd" page="xsd.1" />
 <manpage name="caspol" page="caspol.1" />
 <manpage name="al" page="al.1" />
+<manpage name="ccrewrite" page="ccrewrite.1" />
 </manpages>
diff --git a/man/mono-api-info.1 b/man/mono-api-info.1
new file mode 100644 (file)
index 0000000..33c22ba
--- /dev/null
@@ -0,0 +1,36 @@
+.\" 
+.\" mono-api-info manual page.
+.\" Copyright (C) 2010 Linden Lab, Inc (http://www.lindenlab.com)
+.\" Author:
+.\"   Andrés G. Aragoneses <andres@lindenlab.com>
+.\"
+.TH Mono "mono-api-info"
+.SH NAME
+mono-api-info \- Expose IL structure of CLR assemblies as XML.
+.
+.SH SYNOPSIS
+.PP
+.B mono-api-info [--abi] assembly1.dll assembly2.exe ...
+.SH DESCRIPTION
+Expose the structure of your CLR assemblies by examining their IL and
+giving XML output.
+.PP
+By default this tool gives information about just the public API of the
+assemblies to scan. So it's good for comparing API compatibility between
+versions of libraries.
+.SH OPTIONS
+.TP
+.I "--abi"
+Show the ABI instead of the API, that is, non-static fields (even the
+non-public ones) that are not marked as [NonSerialized()].
+.SH AUTHOR
+Written by Andrés G. Aragoneses
+.SH COPYRIGHT
+Copyright (C) 2010 LindenLab. 
+Released under BSD license.
+.SH MAILING LISTS
+Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
+.SH WEB SITE
+Visit http://www.mono-project.com for details
+.SH SEE ALSO
+.BR mono(1)
index 40875fc66ed0b121fe0c253327b4abe29a0c5b6e..3835ddfefab41596718c8b6b787c7c0dbc8f7bbd 100644 (file)
@@ -1347,10 +1347,52 @@ the right file name it is not necessarily possible to open the file.
 In general if you have problems with encodings in your filenames you
 should use the "convmv" program.
 .TP
+\fBMONO_GC_PARAMS\fR
+When using Mono with the SGen garbage collector this variable controls
+several parameters of the collector.  The variable's value is a comma
+separated list of words.
+.RS
+.ne 8
+.TP
+\fBnursery-size=\fIsize\fR
+Sets the size of the nursery.  The size is specified in bytes and must
+be a power of two.  The suffixes `k', `m' and `g' can be used to
+specify kilo-, mega- and gigabytes, respectively.  The nursery is the
+first generation (of two).  A larger nursery will usually speed up the
+program but will obviously use more memory.  The default nursery size
+4 MB.
+.TP
+\fBmajor=\fIcollector\fR
+Specifies which major collector to use.  Options are `marksweep' for
+the Mark&Sweep collector, `marksweep-par' for parallel Mark&Sweep,
+`marksweep-fixed' for Mark&Sweep with a fixed heap,
+`marksweep-fixed-par' for parallel Mark&Sweep with a fixed heap and
+`copying' for the copying collector. The Mark&Sweep collector is the
+default.
+.TP
+\fBmajor-heap-size=\fIsize\fR
+Sets the size of the major heap (not including the large object space)
+for the fixed-heap Mark&Sweep collector (i.e. `marksweep-fixed' and
+`marksweep-fixed-par').  The size is in bytes, with optional suffixes
+`k', `m' and `g' to specify kilo-, mega- and gigabytes, respectively.
+The default is 512 megabytes.
+.TP
+\fBwbarrier=\fIwbarrier\fR
+Specifies which write barrier to use.  Options are `cardtable' and
+`remset'.  The card table barrier is faster but less precise, and only
+supported for the Mark&Sweep major collector on 32 bit platforms.  The
+default is `cardtable' if it is supported, otherwise `remset'. The cardtable
+write barrier is faster and has a more stable and usually smaller
+memory footprint. If the program causes too much pinning during
+thread scan, it might be faster to enable remset.
+.ne
+.RE
+.TP
 \fBMONO_GC_DEBUG\fR
 When using Mono with the SGen garbage collector this environment
-variable can be used to control different aspects of the GC processs.
-The value of this variable is a comma separated list of words.   
+variable can be used to turn on various debugging features of the
+collector.  The value of this variable is a comma separated list of
+words.
 .RS
 .ne 8
 .TP
@@ -1565,6 +1607,13 @@ interpreter.  The possible values are `no' to disable the use of a
 custom serializer or a number to indicate when the XmlSerializer
 should start serializing.   The default value is 50, which means that
 the a custom serializer will be produced on the 50th use.
+.TP
+\fBMONO_X509_REVOCATION_MODE\fR
+Sets the revocation mode used when validating a X509 certificate chain (https,
+ftps, smtps...).  The default is 'nocheck', which performs no revocation check
+at all. The other possible values are 'offline', which performs CRL check (not
+implemented yet) and 'online' which uses OCSP and CRL to verify the revocation
+status (not implemented yet).
 .SH ENVIRONMENT VARIABLES FOR DEBUGGING
 .TP
 \fBMONO_ASPNET_NODELETE\fR
index f8baa8b38199a7171e2bb25740964dc7651ff295..cf49920a39c02ae96677203deac994d871954644 100644 (file)
@@ -111,6 +111,7 @@ Here is an example that shows all the possibilities of this format:
                <type fullname="Gazonk">
                        <method signature="System.Void .ctor(System.String)" />
                        <field signature="System.String _blah" />
+                       <field name="someFieldName" />
                </type>
        </assembly>
 </linker>
index ec9472f63328e7ffddc3e579bdf6f7c76578d5cd..c5ec5ca7b9c242d792d23dd39aedbfc5fd46dee1 100644 (file)
@@ -23,6 +23,15 @@ Set or override project properties
 .B \//logger:<logger>
 Custom logger to log build events
 .TP
+.B \//toolsversion:version , /tv:version
+Specify the toolset version to use.
+
+Eg. /tv:4.0
+    This would cause 4.0 version of the Microsoft.Common.targets (among others) to be used. This overrides
+    the value specified in a project file.
+
+Valid values: 2.0, 3.0, 3.5 and 4.0
+.TP
 .B \//verbosity:<level>
 Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
 .TP
@@ -33,7 +42,7 @@ Validate the project file against the schema
 Validate the project file against the specified schema
 .TP
 .B \//consoleloggerparameters:<params>
-Parameters for the console logger
+Parameters for the console logger : PerfomanceSummary, NoSummary, NoItemAndPropertyList
 .TP
 .B \//nologo
 Don't show the initial xbuild banner
@@ -49,6 +58,30 @@ Display xbuild version
 If this variable is set, then the project file generated from a solution
 file is emitted.
 .TP
+.I "XBUILD_LOG_REFERENCE_RESOLVER"
+References are resolved by trying a list of assembly search paths ($(AssemblySearchPaths)).
+If xbuild is unable to resolve a reference, then it logs details of why the various
+search paths failed. If this variable is set, then it logs the same even for references
+that were resolved successfully. These logs show up if the verbosity is set to detailed
+or higher.
+.TP
+.I "MSBuildExtensionsPath"
+MSBuild extensions are usually installed in $(MSBuildExtensionsPath), which xbuild resolves
+to $prefix/lib/mono/xbuild . When used in Import, like:
+
+  <Import Project="$(MSBuildExtensionsPath)\\TestTargets.targets"/>
+
+xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
+
+  1. Paths specified in the environment variable $MSBuildExtensionsPath.
+  2. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
+  3. $prefix/lib/mono/xbuild (default location)
+
+Anywhere else in the project files, $(MSBuildExtensionsPath) will always resolve to the default
+location. This is a xbuild-only feature.
+This is also applicable for the properties $(MSBuildExtensionsPath32) and $(MSBuildExtensionsPath64),
+and the environment variables have the corresponding names - MSBuildExtensionsPath32/64 .
+.TP
 .I "XBUILD_COLORS"
 If this variable is set, it contains a string of the form
 "type=foreground,type=.." that specifies which color to use to display
index 22da863639c07db8cde3d9cbe94c65b01d362ad3..f3e7d6b0fb0a07206df690afd2c96cc5b53d6ec2 100644 (file)
@@ -6,6 +6,7 @@
 *.o
 TestResult-*.log
 TestResult-*.xml
+TestResult*.xml
 errors/?mcs.log
 errors/dummy.xml
 tests/?mcs.log
index 3c04be99c3d083b017afd505be89e47c9648e85a..094b8ea702ffb3a6a8eb29515a8cd3b9348546f0 100644 (file)
@@ -80,7 +80,7 @@ all-local $(STD_TARGETS:=-local):
        @:
 
 dir-check:
-       @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then echo "Running make from the mcs directory is not supported. Run make from the parent directory (if using a tarball), or from the directory where the runtime is checked out (if using an SVN checkout)."; exit 1; fi
+       @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then echo "Running make from the mcs directory is not supported. Run make from the parent directory."; exit 1; fi
 
 # fun specialty targets
 
index c20e453ed9cbcaa38b4500a790375e5377130e04..df858ae27dfb7e977583f91198e6a4bb619a467c 100644 (file)
@@ -16,7 +16,7 @@ endif
 
 MCS = $(with_mono_path) $(INTERNAL_GMCS)
 
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:BOOTSTRAP_BASIC
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:BOOTSTRAP_BASIC -nowarn:1699
 NO_SIGN_ASSEMBLY = yes
 NO_TEST = yes
 NO_INSTALL = yes
diff --git a/mcs/build/profiles/default.make b/mcs/build/profiles/default.make
deleted file mode 100644 (file)
index 31f830d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- makefile -*-
-#
-# The default 'bootstrap' profile -- builds so that we link against
-# the libraries as we build them.
-#
-# We use the platform's native C# runtime and compiler if possible.
-
-# Note that we have sort of confusing terminology here; BOOTSTRAP_MCS
-# is what allows us to bootstrap ourselves, but when we are bootstrapping,
-# we use INTERNAL_MCS.
-
-# When bootstrapping, compile against our new assemblies.
-# (MONO_PATH doesn't just affect what assemblies are loaded to
-# run the compiler; /r: flags are by default loaded from whatever's
-# in the MONO_PATH too).
-
-BOOTSTRAP_PROFILE = net_1_1_bootstrap
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/mcs.exe
-MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS)
-MBAS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MBAS)
-
-# nuttzing!
-
-profile-check:
-
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1
-PROFILE_MBAS_FLAGS = -d:NET_1_1 -d:ONLY_1_1
-FRAMEWORK_VERSION = 1.0
index a280c2bf5136b39a3c1ee045cca75bc7de1f55f8..36f661d22e7c4b7acb323d78c34a039e68622021 100644 (file)
@@ -1,6 +1,7 @@
 #! -*- makefile -*-
 
 INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
+INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/basic/gmcs.exe
 
 BOOTSTRAP_PROFILE = net_2_0
 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
index 243fc6518f5f5dd100a9d40e776af13454d5b1d4..0f285db4cc19cdb338bcb6cdddd50326ca1a6356 100644 (file)
@@ -1,6 +1,7 @@
 #! -*- makefile -*-
 
 INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
+INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/basic/gmcs.exe
 
 BOOTSTRAP_PROFILE = basic
 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
diff --git a/mcs/build/profiles/net_1_0.make b/mcs/build/profiles/net_1_0.make
deleted file mode 100644 (file)
index e827c90..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Makefile -*-
-# 
-# Only build .NET 1.0 classes.
-# (will probably not work)
-
-include $(topdir)/build/profiles/default.make
-
-PROFILE_MCS_FLAGS = /d:NET_1_0 /d:ONLY_1_0
-FRAMEWORK_VERSION = 1.0
-
-# done
diff --git a/mcs/build/profiles/net_1_1.make b/mcs/build/profiles/net_1_1.make
deleted file mode 100644 (file)
index 31f830d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- makefile -*-
-#
-# The default 'bootstrap' profile -- builds so that we link against
-# the libraries as we build them.
-#
-# We use the platform's native C# runtime and compiler if possible.
-
-# Note that we have sort of confusing terminology here; BOOTSTRAP_MCS
-# is what allows us to bootstrap ourselves, but when we are bootstrapping,
-# we use INTERNAL_MCS.
-
-# When bootstrapping, compile against our new assemblies.
-# (MONO_PATH doesn't just affect what assemblies are loaded to
-# run the compiler; /r: flags are by default loaded from whatever's
-# in the MONO_PATH too).
-
-BOOTSTRAP_PROFILE = net_1_1_bootstrap
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/mcs.exe
-MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS)
-MBAS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MBAS)
-
-# nuttzing!
-
-profile-check:
-
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1
-PROFILE_MBAS_FLAGS = -d:NET_1_1 -d:ONLY_1_1
-FRAMEWORK_VERSION = 1.0
diff --git a/mcs/build/profiles/net_1_1_java.make b/mcs/build/profiles/net_1_1_java.make
deleted file mode 100644 (file)
index 95ca8e5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- makefile -*-
-#
-# The default 'bootstrap' profile -- builds so that we link against
-# the libraries as we build them.
-#
-# We use the platform's native C# runtime and compiler if possible.
-
-# Note that we have sort of confusing terminology here; BOOTSTRAP_MCS
-# is what allows us to bootstrap ourselves, but when we are bootstrapping,
-# we use INTERNAL_MCS.
-
-# When bootstrapping, compile against our new assemblies.
-# (MONO_PATH doesn't just affect what assemblies are loaded to
-# run the compiler; /r: flags are by default loaded from whatever's
-# in the MONO_PATH too).
-
-EXTERNAL_MCS = csc.exe
-NO_SIGN_ASSEMBLY = yes
-
-#DEXT = pdb
-
-ifdef PLATFORM_MONO_NATIVE
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_1_1_bootstrap/mcs.exe
-MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS)
-MBAS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MBAS)
-else
-BOOTSTRAP_MCS = $(EXTERNAL_MCS)
-MCS = $(PLATFORM_RUNTIME) $(EXTERNAL_MCS) /lib:$(topdir)/class/lib/$(PROFILE)
-MBAS = $(PLATFORM_RUNTIME) $(EXTERNAL_MBAS) /lib:$(topdir)/class/lib/$(PROFILE)
-endif
-
-# nuttzing!
-
-profile-check:
-
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1 -d:TARGET_JVM -d:JAVA
-PROFILE_MBAS_FLAGS = -d:NET_1_1 -d:ONLY_1_1 -d:TARGET_JVM -d:JAVA
-FRAMEWORK_VERSION = 1.0
-CONVERTER_DEBUG_LEVEL = 3
-ifeq ($(CONFIG),Release)
-PLATFORM_DEBUG_FLAGS = /debug:pdbonly
-CONVERTER_DEBUG_LEVEL = 2
-endif
-library_CLEAN_FILES += $(build_lib:.dll=.jar) $(build_lib:.dll=.pdb)
-
-all-local:
-       $(MAKE) $(build_lib:.dll=.jar)
-
-%.jar:%.dll
-       converter.exe /debug:$(CONVERTER_DEBUG_LEVEL) $< /out:$@ $(KEY) /lib:$(dir $@)
index ff0b7715f178d3810754da149898d94d7a1653f4..03ce4e94f7f13d035b970f724f2bf71667e0fa64 100644 (file)
@@ -10,5 +10,5 @@ MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_
 profile-check:
        @:
 
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -nowarn:1699
 FRAMEWORK_VERSION = 2.0
index 71e70cb57785104f0320317e9cb698ace3a1b6b2..07248ff39c66774178b28d8023dc1dc01aa6ec4c 100644 (file)
@@ -1,5 +1,7 @@
 # -*- makefile -*-
 
+INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0/gmcs.exe
+
 MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
 # nuttzing!
 
index 15cf837206956b61189d8c487091e182829a8ef8..dd9dab464ea61ac403a4a9d346be60d7702cd99e 100644 (file)
@@ -13,5 +13,5 @@ MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_
 profile-check:
        @:
 
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -nowarn:1699
 FRAMEWORK_VERSION = 4.0
index 08bdc227483efca89eb25b519de2b92253c0a5fe..b9a1d3e4be46571c0fecdb93e8dc6950e16c107e 100644 (file)
@@ -38,7 +38,7 @@ INSTALL_LIB = $(INSTALL_BIN)
 MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
 INTERNAL_MCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/mcs.exe
 INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
-INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mcs/gmcs.exe
+INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/gmcs.exe
 INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
 corlib = mscorlib.dll
 
index 98e1eb8d3d08f50ac26d3bdae294db7a06020dc1..7b10f85730ed6a76b0a3f176d17416ca4e81648a 100644 (file)
@@ -87,10 +87,14 @@ run-test-lib: test-local
        PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) -xml=TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
        $(TEST_HARNESS_POSTPROC) ; $$ok
 
+## Instructs compiler to compile to target .net execution, it can be usefull in rare cases when runtime detection is not possible
+run-test-ondotnet-lib: LOCAL_TEST_COMPILER_ONDOTNET_FLAGS:=-d:RUN_ONDOTNET
 run-test-ondotnet-lib: test-local
        ok=:; \
        $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONDOTNET_FLAGS) $(TEST_HARNESS_EXCLUDES_ONDOTNET) $(TEST_HARNESS_OUTPUT_ONDOTNET) -xml=TestResult-ondotnet-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \
        $(TEST_HARNESS_POSTPROC_ONDOTNET) ; $$ok
+       
+
 endif # test_assemblies
 
 TEST_FILES =
@@ -102,7 +106,7 @@ endif
 ifdef HAVE_CS_TESTS
 
 $(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep)
-       $(TEST_COMPILE) -target:library -out:$@ $(test_flags) @$(test_response)
+       $(TEST_COMPILE) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
 
 $(test_response): $(test_sourcefile)
        @echo Creating $@ ...
index e32a0a8d0f9f38f8fc2a6c4f0ff5de31a6b1ad19..1515bb7e966518713c50c9157ddc452dc6722ea4 100644 (file)
@@ -37,6 +37,7 @@ common_dirs := \
        System.Configuration            \
        System                          \
        System.XML                      \
+       aot-compiler            \
        I18N                            \
        System.Drawing                  \
        System.Transactions             \
@@ -173,8 +174,10 @@ net_4_0_dirs := \
        System.ComponentModel.Composition \
        System.Xaml \
        System.ServiceModel.Routing \
+       System.ServiceModel.Discovery \
        System.Runtime.Caching \
-       System.Runtime.DurableInstancing
+       System.Runtime.DurableInstancing \
+       Mono.CodeContracts
 
 net_2_0_bootstrap_SUBDIRS := $(bootstrap_dirs)
 net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs)
index e8ee5b94039cfc30f2207a4790d04a9c9373f489..bfc3ee01543c8f3e10ec2116480c6b21da4b88ab 100644 (file)
@@ -985,7 +985,11 @@ namespace System.Windows.Forms
                                        break;
                                }
 
-                               // Handle exit, Form might have received WM_CLOSE and set 'closing' in response
+                               // If our Form doesn't have a handle anymore, it means it was destroyed and we need to *wait* for WM_QUIT.
+                               if ((context.MainForm != null) && (!context.MainForm.IsHandleCreated))
+                                       continue;
+
+                               // Handle exit, Form might have received WM_CLOSE and set 'closing' in response.
                                if ((context.MainForm != null) && (context.MainForm.closing || (Modal && !context.MainForm.Visible))) {
                                        if (!Modal) {
                                                XplatUI.PostQuitMessage (0);
index 60d87c28727c5483036d4918e435457220377ef5..b1a0afc6ecc27d5a8bf6dfc3ecab1f6f79d0142b 100644 (file)
@@ -4841,15 +4841,6 @@ namespace System.Windows.Forms {
                                if (verticalScrollBar.Visible && (gridWidth + verticalScrollBar.Width) > Size.Width) 
                                        horizontalVisible = true;
 
-                               if (scrollBars != ScrollBars.Vertical && scrollBars != ScrollBars.Both)
-                                       verticalVisible = false;
-                               if (scrollBars != ScrollBars.Horizontal && scrollBars != ScrollBars.Both)
-                                       horizontalVisible = false;
-
-                               // MSNET compatibility here
-                               if (RowCount <= 1)
-                                       verticalVisible = false;
-
                                if (horizontalVisible) {
                                        horizontalScrollBar.Minimum = 0;
                                        horizontalScrollBar.Maximum = gridWidth;
@@ -4870,6 +4861,19 @@ namespace System.Windows.Forms {
                                                largeChange = ClientSize.Height;
                                        verticalScrollBar.LargeChange = largeChange;
                                }
+
+                               // Force the visibility of the scrollbars *after* computing the scrolling values,
+                               // as we need them *always* for navigation purposes.
+                               if (scrollBars != ScrollBars.Vertical && scrollBars != ScrollBars.Both)
+                                       verticalVisible = false;
+                               if (scrollBars != ScrollBars.Horizontal && scrollBars != ScrollBars.Both)
+                                       horizontalVisible = false;
+
+                               // MSNET compatibility here
+                               if (RowCount <= 1)
+                                       verticalVisible = false;
+
+
                        }
 
                        horizontalScrollBar.Visible = horizontalVisible;
index 4aa74f766334ca7068e42aa128de6596bbc37855..eb33bd03928cc06e789783f95964b9cd37553c41 100644 (file)
@@ -1386,8 +1386,14 @@ namespace System.Windows.Forms
                                if (hbar_offset < 0)
                                        hbar_offset = 0;
 
-                               if (IsHandleCreated)
+                               if (IsHandleCreated) {
                                        XplatUI.ScrollWindow (Handle, items_area, old_offset - hbar_offset, 0, false);
+
+                                       // Invalidate the previous selection border, to keep it properly updated.
+                                       Rectangle selection_border_area = new Rectangle (items_area.Width - (hbar_offset - old_offset) - 3, 0, 
+                                                       3, items_area.Height);
+                                       Invalidate (selection_border_area);
+                               }
                        }
                }
 
index e014954c58df956f3374f608d64643f7ba3e49df..739da32e6154684df0d8008c90b02bc7a756e8d6 100644 (file)
@@ -334,7 +334,7 @@ namespace System.Windows.Forms
                        
 #if NET_2_0
                        if (FormattingEnabled) {
-                               ListControlConvertEventArgs e = new ListControlConvertEventArgs (retval, typeof (string), item);
+                               ListControlConvertEventArgs e = new ListControlConvertEventArgs (o, typeof (string), item);
                                OnFormat (e);
                                
                                // The user provided their own value
index 535bbb1f889497fbc6a7e3a8375d4b1de956bb4e..52bd32b2cc5ba8a7ed698bb8082b73de2b708cdc 100644 (file)
@@ -2041,6 +2041,7 @@ namespace System.Windows.Forms
                        item_control.Visible = true;
                        item_control.Location = Point.Empty;
                        item_control.Width = ClientRectangle.Width;
+                       AdjustChildrenZOrder ();
 
                        int item_height = GetDetailsItemHeight ();
                        ItemSize = new Size (0, item_height); // We only cache Height for details view
@@ -2097,6 +2098,17 @@ namespace System.Windows.Forms
                        }
                }
 
+               // Need to make sure HeaderControl is on top, and we can't simply use BringToFront since
+               // these controls are implicit, so we need to re-populate our collection.
+               void AdjustChildrenZOrder ()
+               {
+                       SuspendLayout ();
+                       Controls.ClearImplicit ();
+                       Controls.AddImplicit (header_control);
+                       Controls.AddImplicit (item_control);
+                       ResumeLayout ();
+               }
+
                private void AdjustItemsPositionArray (int count)
                {
 #if  NET_2_0
@@ -3529,9 +3541,6 @@ namespace System.Windows.Forms
                protected override void Dispose (bool disposing)
                {
                        if (disposing) {
-                               h_scroll.Dispose ();
-                               v_scroll.Dispose ();
-                               
                                large_image_list = null;
                                small_image_list = null;
                                state_image_list = null;
@@ -5698,6 +5707,9 @@ namespace System.Windows.Forms
                                if (is_main_collection || item.ListView != null)
                                        CollectionChanged (true);
 
+                               // force an update of the selected info if the new item is selected.
+                               if (item.Selected)
+                                       item.SetSelectedCore (true);
 #if NET_2_0
                                //UIA Framework event: Item Added
                                OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, item));
@@ -5848,6 +5860,9 @@ namespace System.Windows.Forms
 
                                list.Add (value);
 
+                               // force an update of the selected info if the new item is selected.
+                               if (value.Selected)
+                                       value.SetSelectedCore (true);
                        }
 
                        void CollectionChanged (bool sort)
index 805c2a215c710fee727a3e13dfdb8c29e2cb626a..a33e23fd6c716df418442ac56c32f07107029876 100644 (file)
@@ -46,14 +46,12 @@ namespace System.Windows.Forms
                private object tag;
                private bool use_item_style = true;
                int display_index = -1;                 // actual position in ListView
-#if NET_2_0
                private ListViewGroup group = null;
                private string name = String.Empty;
                private string image_key = String.Empty;
                string tooltip_text = String.Empty;
                int indent_count;
                Point position = new Point (-1, -1);            // cached to mimic .Net behaviour       
-#endif
                Rectangle bounds = Rectangle.Empty;
                Rectangle checkbox_rect;        // calculated by CalcListViewItem method
                Rectangle icon_rect;
@@ -61,15 +59,12 @@ namespace System.Windows.Forms
                Rectangle label_rect;
                ListView owner;
                Font font;
-#if NET_2_0
                Font hot_font;                  // cached font for hot tracking
-#endif
                bool selected;
 
                internal int row;
                internal int col;
 
-#if NET_2_0
        
                #region UIA Framework: Methods, Properties and Events
 
@@ -96,7 +91,6 @@ namespace System.Windows.Forms
 
                #endregion // UIA Framework: Methods, Properties and Events
 
-#endif
 
                #endregion Instance Variables
 
@@ -145,7 +139,6 @@ namespace System.Windows.Forms
                        this.font = font;
                }
 
-#if NET_2_0
                public ListViewItem(string[] items, string imageKey) : this(items)
                {
                        this.ImageKey = imageKey;
@@ -236,15 +229,12 @@ namespace System.Windows.Forms
                {
                        Group = group;
                }
-#endif
                #endregion      // Public Constructors
 
-#if NET_2_0
                protected ListViewItem (SerializationInfo info, StreamingContext context)
                {
                        Deserialize (info, context);
                }
-#endif
 
                #region Public Instance Properties
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -290,10 +280,8 @@ namespace System.Windows.Forms
                                                is_checked = new_value == CheckState.Checked;
                                                Invalidate ();
 
-#if NET_2_0
                                                ItemCheckedEventArgs args = new ItemCheckedEventArgs (this);
                                                owner.OnItemChecked (args);
-#endif
                                        }
                                } else
                                        is_checked = value;
@@ -307,11 +295,9 @@ namespace System.Windows.Forms
                                if (owner == null)
                                        return false;
 
-#if NET_2_0
                                // In virtual mode the checks are always done using indexes
                                if (owner.VirtualMode)
                                        return Index == owner.focused_item_index;
-#endif
 
                                // Light check
                                return owner.FocusedItem == this;
@@ -329,10 +315,8 @@ namespace System.Windows.Forms
                                        prev_focused_item.UpdateFocusedState ();
                                        
                                owner.focused_item_index = value ? Index : -1;
-#if NET_2_0
                                if (value)
                                        owner.OnUIAFocusedItemChanged ();
-#endif
 
                                UpdateFocusedState ();
                        }
@@ -354,9 +338,7 @@ namespace System.Windows.Forms
                                        return;
 
                                font = value; 
-#if NET_2_0
                                hot_font = null;
-#endif
 
                                if (owner != null)
                                        Layout ();
@@ -383,12 +365,8 @@ namespace System.Windows.Forms
                [Editor ("System.Windows.Forms.Design.ImageIndexEditor, " + Consts.AssemblySystem_Design,
                         typeof (System.Drawing.Design.UITypeEditor))]
                [Localizable (true)]
-#if NET_2_0
                [RefreshProperties (RefreshProperties.Repaint)]
                [TypeConverter (typeof (NoneExcludedImageIndexConverter))]
-#else
-               [TypeConverter (typeof (ImageIndexConverter))]
-#endif
                public int ImageIndex {
                        get { return image_index; }
                        set {
@@ -396,9 +374,7 @@ namespace System.Windows.Forms
                                        throw new ArgumentException ("Invalid ImageIndex. It must be greater than or equal to -1.");
                                
                                image_index = value;
-#if NET_2_0
                                image_key = String.Empty;
-#endif
 
                                if (owner != null)
                                        Layout ();
@@ -406,7 +382,6 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
                [DefaultValue ("")]
                [LocalizableAttribute (true)]
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -427,7 +402,6 @@ namespace System.Windows.Forms
                                Invalidate ();
                        }
                }
-#endif
 
                [Browsable (false)]
                public ImageList ImageList {
@@ -441,7 +415,6 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
                [DefaultValue (0)]
                public int IndentCount {
                        get {
@@ -458,17 +431,14 @@ namespace System.Windows.Forms
                                Invalidate ();
                        }
                }
-#endif
 
                [Browsable (false)]
                public int Index {
                        get {
                                if (owner == null)
                                        return -1;
-#if NET_2_0
                                if (owner.VirtualMode)
                                        return display_index;
-#endif
 
                                if (display_index == -1)
                                        return owner.Items.IndexOf (this);
@@ -482,7 +452,6 @@ namespace System.Windows.Forms
                        get { return owner; }
                }
 
-#if NET_2_0
                [Browsable (false)]
                [Localizable (true)]
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -517,7 +486,6 @@ namespace System.Windows.Forms
                                owner.ChangeItemLocation (display_index, value);
                        }
                }
-#endif
 
                // When ListView uses VirtualMode, selection state info
                // lives in the ListView, not in the item
@@ -526,59 +494,49 @@ namespace System.Windows.Forms
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public bool Selected {
                        get { 
-#if NET_2_0
                                if (owner != null && owner.VirtualMode)
                                        return owner.SelectedIndices.Contains (Index);
-#endif
 
                                return selected; 
                        }
                        set {
-#if NET_2_0
                                if (selected == value && owner != null && !owner.VirtualMode)
-#else
-                               if (selected == value)
-#endif
                                        return;
 
-                               if (owner != null) {
-                                       if (value && !owner.MultiSelect)
-                                               owner.SelectedIndices.Clear ();
-#if NET_2_0
-                                       if (owner.VirtualMode)
-                                               if (value)
-                                                       owner.SelectedIndices.InsertIndex (Index);
-                                               else
-                                                       owner.SelectedIndices.RemoveIndex (Index);
-                                       else 
-#endif
-                                       {
-                                               selected = value;
-                                               owner.SelectedIndices.Reset (); // force re-population of list
-                                       }
+                               SetSelectedCore (value);
+                       }
+               }
 
-#if NET_2_0
-                                       owner.OnItemSelectionChanged (new ListViewItemSelectionChangedEventArgs (this, Index, value));
-#endif
-                                       owner.OnSelectedIndexChanged ();
+               // Expose this method as internal so we can force an update in the selection.
+               internal void SetSelectedCore (bool value)
+               {
+                       if (owner != null) {
+                               if (value && !owner.MultiSelect)
+                                       owner.SelectedIndices.Clear ();
+                               if (owner.VirtualMode) {
+                                       if (value)
+                                               owner.SelectedIndices.InsertIndex (Index);
+                                       else
+                                               owner.SelectedIndices.RemoveIndex (Index);
                                } else {
                                        selected = value;
+                                       owner.SelectedIndices.Reset (); // force re-population of list
                                }
+
+                               owner.OnItemSelectionChanged (new ListViewItemSelectionChangedEventArgs (this, Index, value));
+                               owner.OnSelectedIndexChanged ();
                                Invalidate ();
-                       }
+                       } else
+                               selected = value;
                }
 
                [DefaultValue (-1)]
                [Editor ("System.Windows.Forms.Design.ImageIndexEditor, " + Consts.AssemblySystem_Design,
                         typeof (System.Drawing.Design.UITypeEditor))]
                [Localizable (true)]
-#if NET_2_0
                [RefreshProperties (RefreshProperties.Repaint)]
                [RelatedImageListAttribute ("ListView.StateImageList")]
                [TypeConverter (typeof (NoneExcludedImageIndexConverter))]
-#else
-               [TypeConverter (typeof (ImageIndexConverter))]
-#endif
                public int StateImageIndex {
                        get { return state_image_index; }
                        set {
@@ -590,10 +548,8 @@ namespace System.Windows.Forms
                }
 
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
-#if NET_2_0
                [Editor ("System.Windows.Forms.Design.ListViewSubItemCollectionEditor, " + Consts.AssemblySystem_Design,
                         typeof (System.Drawing.Design.UITypeEditor))]
-#endif
                public ListViewSubItemCollection SubItems {
                        get {
                                if (sub_items.Count == 0)
@@ -630,11 +586,9 @@ namespace System.Windows.Forms
                                        Layout ();
                                Invalidate ();
 
-#if NET_2_0
                                //UIA Framework: Generates Text changed
                                OnUIATextChanged ();
 
-#endif 
                        }
                }
 
@@ -644,7 +598,6 @@ namespace System.Windows.Forms
                        set { use_item_style = value; }
                }
 
-#if NET_2_0
                [LocalizableAttribute(true)]
                [DefaultValue (null)]
                public ListViewGroup Group {
@@ -673,7 +626,6 @@ namespace System.Windows.Forms
                                tooltip_text = value;
                        }
                }
-#endif
 
                #endregion      // Public Instance Properties
 
@@ -707,10 +659,8 @@ namespace System.Windows.Forms
                        clone.tag = this.tag;
                        clone.use_item_style = this.use_item_style;
                        clone.owner = null;
-#if NET_2_0
                        clone.name = name;
                        clone.tooltip_text = tooltip_text;
-#endif
 
                        return clone;
                }
@@ -722,7 +672,6 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
                public ListViewItem FindNearestItem (SearchDirectionHint searchDirection)
                {
                        if (owner == null)
@@ -731,7 +680,6 @@ namespace System.Windows.Forms
                        Point loc = owner.GetItemLocation (display_index);
                        return owner.FindNearestItem (searchDirection, loc);
                }
-#endif
 
                public Rectangle GetBounds (ItemBoundsPortion portion)
                {
@@ -772,7 +720,6 @@ namespace System.Windows.Forms
                        Serialize (info, context);
                }
 
-#if NET_2_0
                public ListViewSubItem GetSubItemAt (int x, int y)
                {
                        if (owner != null && owner.View != View.Details)
@@ -784,7 +731,6 @@ namespace System.Windows.Forms
 
                        return null;
                }
-#endif
 
                public virtual void Remove ()
                {
@@ -831,7 +777,6 @@ namespace System.Windows.Forms
                                        case "SubItemCount":
                                                sub_items_count = (int)entry.Value;
                                                break;
-#if NET_2_0
                                        case "Group":
                                                group = (ListViewGroup)entry.Value;
                                                break;
@@ -839,7 +784,6 @@ namespace System.Windows.Forms
                                                if (image_index == -1)
                                                        image_key = (string)entry.Value;
                                                break;
-#endif
                                }
                        }
 
@@ -866,10 +810,8 @@ namespace System.Windows.Forms
                        info.AddValue ("UseItemStyleForSubItems", use_item_style);
                        info.AddValue ("BackColor", BackColor);
                        info.AddValue ("ForeColor", ForeColor);
-#if NET_2_0
                        info.AddValue ("ImageKey", image_key);
                        info.AddValue ("Group", group);
-#endif
                        if (sub_items.Count > 1) {
                                info.AddValue ("SubItemCount", sub_items.Count);
                                for (int i = 1; i < sub_items.Count; i++) {
@@ -893,11 +835,9 @@ namespace System.Windows.Forms
                Rectangle text_bounds;
                internal Rectangle TextBounds {
                        get {
-#if NET_2_0
                                // Call Layout() if it hasn't been called before.
                                if (owner.VirtualMode && bounds == new Rectangle (-1, -1, -1, -1))
                                        Layout ();
-#endif
                                Rectangle result = text_bounds;
                                Point loc = owner.GetItemLocation (DisplayIndex);
                                result.X += loc.X;
@@ -920,7 +860,6 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
                internal bool Hot {
                        get {
                                return Index == owner.HotItemIndex;
@@ -935,7 +874,6 @@ namespace System.Windows.Forms
                                return hot_font;
                        }
                }
-#endif
 
                internal ListView Owner {
                        set {
@@ -946,7 +884,6 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
                internal void SetGroup (ListViewGroup group)
                {
                        this.group = group;
@@ -956,7 +893,6 @@ namespace System.Windows.Forms
                {
                        this.position = position;
                }
-#endif 
 
                // When focus changed, we need to invalidate area
                // with previous layout and with the new one
@@ -1000,10 +936,8 @@ namespace System.Windows.Forms
                                // values in the case of Details view.
 
                                int x_offset = 0;
-#if NET_2_0
                                if (owner.SmallImageList != null)
                                        x_offset = indent_count * owner.SmallImageList.ImageSize.Width;
-#endif
 
                                // Handle reordered column
                                if (owner.Columns.Count > 0)
@@ -1113,7 +1047,6 @@ namespace System.Windows.Forms
                                total = Rectangle.Union (item_rect, checkbox_rect);
                                bounds.Size = total.Size;
                                break;
-#if NET_2_0
                        case View.Tile:
                                if (!Application.VisualStylesEnabled)
                                        goto case View.LargeIcon;
@@ -1176,7 +1109,6 @@ namespace System.Windows.Forms
                                item_rect = Rectangle.Union (icon_rect, label_rect);
                                bounds.Size = item_rect.Size;
                                break;
-#endif
                        }
                        
                }
@@ -1194,15 +1126,12 @@ namespace System.Windows.Forms
                        [NonSerialized]
                        internal ListViewItem owner;
                        private string text = string.Empty;
-#if NET_2_0
                        private string name;
                        private object userData;
-#endif
                        private SubItemStyle style;
                        [NonSerialized]
                        internal Rectangle bounds;
 
-#if NET_2_0
                
                        #region UIA Framework: Methods, Properties and Events
                
@@ -1217,7 +1146,6 @@ namespace System.Windows.Forms
 
                        #endregion // UIA Framework: Methods, Properties and Events
 
-#endif
                        
                        #region Public Constructors
                        public ListViewSubItem ()
@@ -1257,14 +1185,8 @@ namespace System.Windows.Forms
                                }
                        }
 
-#if NET_2_0
                        [Browsable (false)]
-                       public 
-#else
-                               
-                       internal
-#endif
-                       Rectangle Bounds {
+                       public Rectangle Bounds {
                                get {
                                        Rectangle retval = bounds;
                                        if (owner != null) {
@@ -1307,7 +1229,6 @@ namespace System.Windows.Forms
                                }
                        }
 
-#if NET_2_0
                        [Localizable (true)]
                        public string Name {
                                get {
@@ -1332,7 +1253,6 @@ namespace System.Windows.Forms
                                        userData = value;
                                }
                        }
-#endif
 
                        [Localizable (true)]
                        public string Text {
@@ -1348,10 +1268,8 @@ namespace System.Windows.Forms
 
                                        Invalidate ();
 
-#if NET_2_0
                                        // UIA Framework: Generates SubItem TextChanged
                                        OnUIATextChanged ();
-#endif
                                    }
                        }
                        #endregion // Public Instance Properties
@@ -1378,14 +1296,12 @@ namespace System.Windows.Forms
                                owner.Invalidate ();
                        }
 
-#if NET_2_0
                        [OnDeserialized]
                        void OnDeserialized (StreamingContext context)
                        {
                                name = null;
                                userData = null;
                        }
-#endif
 
                        internal int Height {
                                get {
@@ -1465,7 +1381,6 @@ namespace System.Windows.Forms
                                }
                        }
 
-#if NET_2_0
                        public virtual ListViewSubItem this [string key] {
                                get {
                                        int idx = IndexOfKey (key);
@@ -1475,7 +1390,6 @@ namespace System.Windows.Forms
                                        return (ListViewSubItem) list [idx];
                                }
                        }
-#endif
 
                        bool ICollection.IsSynchronized {
                                get { return list.IsSynchronized; }
@@ -1571,10 +1485,8 @@ namespace System.Windows.Forms
                                subItem.owner = owner;
                                list.Add (subItem);
 
-#if NET_2_0
                                //UIA Framework
                                subItem.UIATextChanged += OnUIASubItemTextChanged;
-#endif
                        }
 
                        public void Clear ()
@@ -1587,12 +1499,10 @@ namespace System.Windows.Forms
                                return list.Contains (subItem);
                        }
 
-#if NET_2_0
                        public virtual bool ContainsKey (string key)
                        {
                                return IndexOfKey (key) != -1;
                        }
-#endif
 
                        public IEnumerator GetEnumerator ()
                        {
@@ -1612,10 +1522,8 @@ namespace System.Windows.Forms
 
                                ListViewSubItem sub_item = (ListViewSubItem) item;
                                sub_item.owner = this.owner;
-#if NET_2_0
                                //UIA Framework
                                sub_item.UIATextChanged += OnUIASubItemTextChanged;
-#endif
                                return list.Add (sub_item);
                        }
 
@@ -1660,7 +1568,6 @@ namespace System.Windows.Forms
                                return list.IndexOf (subItem);
                        }
 
-#if NET_2_0
                        public virtual int IndexOfKey (string key)
                        {
                                if (key == null || key.Length == 0)
@@ -1674,7 +1581,6 @@ namespace System.Windows.Forms
 
                                return -1;
                        }
-#endif
 
                        public void Insert (int index, ListViewSubItem item)
                        {
@@ -1683,10 +1589,8 @@ namespace System.Windows.Forms
                                owner.Layout ();
                                owner.Invalidate ();
 
-#if NET_2_0
                                //UIA Framework
                                item.UIATextChanged += OnUIASubItemTextChanged;
-#endif
                        }
 
                        public void Remove (ListViewSubItem item)
@@ -1695,34 +1599,27 @@ namespace System.Windows.Forms
                                owner.Layout ();
                                owner.Invalidate ();
 
-#if NET_2_0
                                //UIA Framework
                                item.UIATextChanged -= OnUIASubItemTextChanged;
-#endif
                        }
 
-#if NET_2_0
                        public virtual void RemoveByKey (string key)
                        {
                                int idx = IndexOfKey (key);
                                if (idx != -1)
                                        RemoveAt (idx);
                        }
-#endif
 
                        public void RemoveAt (int index)
                        {
-#if NET_2_0
                                //UIA Framework
                                if (index >= 0 && index < list.Count)
                                        ((ListViewSubItem) list [index]).UIATextChanged -= OnUIASubItemTextChanged;
-#endif
 
                                list.RemoveAt (index);
 
                        }
                        #endregion // Public Methods
-#if NET_2_0
                        #region UIA Event Handler
                        
                        private void OnUIASubItemTextChanged (object sender, EventArgs args)
@@ -1732,7 +1629,6 @@ namespace System.Windows.Forms
 
                        #endregion
 
-#endif
 
                }
                #endregion // Subclasses
index 0a71465d76203471c8177cd359090bdac832d63f..bb98470254d2ce2bb4cb9185f7c246b3d8c76872 100644 (file)
@@ -197,7 +197,9 @@ namespace System.Windows.Forms {
 
                        internal override void OnPaintInternal (PaintEventArgs e) {
                                if (owner.icon != null) {
-                                       e.Graphics.FillRectangle(ThemeEngine.Current.ResPool.GetSolidBrush(SystemColors.Window), rect);
+                                       // At least in Gnome, the background of the panel is the same as the Menu, so we go for it
+                                       // instead of (most of the time) plain white.
+                                       e.Graphics.FillRectangle(ThemeEngine.Current.ResPool.GetSolidBrush(SystemColors.Menu), rect);
                                        e.Graphics.DrawImage(owner.icon_bitmap,
                                                             rect,
                                                             new Rectangle (0, 0, owner.icon_bitmap.Width, owner.icon_bitmap.Height),
index 4151589aa7efa37ab7d61f5d19584948235d410e..72fd50ae624ee0fdc197fc5ffeec882464bbaf7b 100644 (file)
@@ -666,6 +666,8 @@ namespace System.Windows.Forms
                                        ScrollToCaret ();
                                } else {
                                        document.Empty();
+
+                                       document.SetSelectionToCaret (true);
                                        if (IsHandleCreated)
                                                CalculateDocument ();
                                }
index 9dcca0b06083b047c24fd2e79f19449b4b88b79c..202f15727b5d731d9258396184208d9d540a2670 100644 (file)
@@ -764,6 +764,16 @@ namespace System.Windows.Forms {
                        Invalidate ();
                }
 
+               void SetVScrollValue (int value)
+               {
+                       if (value > vbar.Maximum)
+                               value = vbar.Maximum;
+                       else if (value < vbar.Minimum)
+                               value = vbar.Minimum;
+
+                       vbar.Value = value;
+               }
+               
                public void ExpandAll ()
                {
                        BeginUpdate ();
@@ -790,7 +800,7 @@ namespace System.Windows.Forms {
                                return;
 
                        if (IsHandleCreated && vbar.VisibleInternal) {
-                               vbar.Value = vbar.Maximum - VisibleCount + 1;
+                               SetVScrollValue (vbar.Maximum - VisibleCount + 1);
                        } else {
                                RecalculateVisibleOrder (root_node);
                                UpdateScrollBars (true);
@@ -811,7 +821,7 @@ namespace System.Windows.Forms {
                        EndUpdate ();
 
                        if (vbar.VisibleInternal)
-                               vbar.Value = vbar.Maximum - VisibleCount + 1;
+                               SetVScrollValue (vbar.Maximum - VisibleCount + 1);
                }
 
                public TreeNode GetNodeAt (Point pt) {
@@ -1392,7 +1402,7 @@ namespace System.Windows.Forms {
                                return;
                        }
 
-                       vbar.Value = Math.Min (order, vbar.Maximum - VisibleCount + 1);
+                       SetVScrollValue (Math.Min (order, vbar.Maximum - VisibleCount + 1));
                }
 
                internal void SetBottom (TreeNode node)
@@ -1412,7 +1422,7 @@ namespace System.Windows.Forms {
 
                        int nv = vbar.Value + offset;
                        if (vbar.Value + offset < vbar.Maximum) {
-                               vbar.Value = nv;
+                               SetVScrollValue (nv);
                        } else {
 #if DEBUG
                                Console.Error.WriteLine ("setting bottom to value greater then maximum ({0}, {1})",
@@ -1896,7 +1906,7 @@ namespace System.Windows.Forms {
                                skipped_nodes = 0;
                                RecalculateVisibleOrder (root_node);
                                vbar.Visible = false;
-                               vbar.Value = 0;
+                               SetVScrollValue (0);
                                vbar_bounds_set = false;
                        }
 
@@ -2037,9 +2047,9 @@ namespace System.Windows.Forms {
                        }
 
                        if (e.Delta < 0) {
-                               vbar.Value = Math.Min(vbar.Value + SystemInformation.MouseWheelScrollLines, vbar.Maximum - VisibleCount + 1);
+                               SetVScrollValue (Math.Min (vbar.Value + SystemInformation.MouseWheelScrollLines, vbar.Maximum - VisibleCount + 1));
                        } else {
-                               vbar.Value = Math.Max(0, vbar.Value - SystemInformation.MouseWheelScrollLines);
+                               SetVScrollValue (Math.Max (0, vbar.Value - SystemInformation.MouseWheelScrollLines));
                        }
                }
 
index 77a5f0f507cbb0132bfe73f469545f127a14cc5a..d37fed9e21cf28e3c095b650d0267c10d28eb877 100644 (file)
@@ -448,6 +448,24 @@ namespace MonoTests.System.Windows.Forms
                        dataSourceChanged++;
                }
 
+               [Test]
+               public void FormatEventValueType ()
+               {
+                       string event_log = null;
+                       ComboBox comboBox = new ComboBox ();
+                       comboBox.FormattingEnabled = true;
+                       comboBox.Format += delegate(object sender, ListControlConvertEventArgs e)
+                       {
+                               event_log = e.Value.GetType ().Name;
+                       };
+                       
+                       int [] objects = new int [] { 1, 2, 3 };
+                       comboBox.DataSource = objects;
+                       comboBox.GetItemText (1);
+
+                       Assert.AreEqual (typeof (int).Name, event_log, "#A0");
+               }
+
                public class ListControlChild : ListControl
                {
                        int selected_index = -1;
index 4428ace036f6bf99eed4c29a542284c1465cd713..6ea048d3e33e54bba3235b293d2bdf0448ef8838 100644 (file)
@@ -325,5 +325,51 @@ namespace MonoTests.System.Windows.Forms
                        
                        form.Close ();
                }
+
+               [Test]
+               public void InsertSelectedItem ()
+               {
+                       Form form = new Form ();
+                       form.ShowInTaskbar = false;
+
+                       ListView lvw = new ListView ();
+                       lvw.SelectedIndexChanged += new EventHandler (ListView_SelectedIndexChanged);
+                       form.Controls.Add (lvw);
+                       form.Show ();
+
+                       ListViewItem item = new ListViewItem ();
+                       item.Selected = true;
+                       Assert.AreEqual (0, selectedIndexChanged, "#A1");
+                       lvw.Items.Insert (0, item);
+                       Assert.AreEqual (1, selectedIndexChanged, "#A1");
+
+                       form.Close ();
+               }
+
+               [Test]
+               public void AddRangeSelectedItems ()
+               {
+                       Form form = new Form ();
+                       form.ShowInTaskbar = false;
+
+                       ListView lvw = new ListView ();
+                       lvw.SelectedIndexChanged += new EventHandler (ListView_SelectedIndexChanged);
+                       form.Controls.Add (lvw);
+                       form.Show ();
+
+                       ListViewItem [] items = new ListViewItem [] {
+                               new ListViewItem ("A"),
+                                   new ListViewItem ("B"),
+                                   new ListViewItem ("C")
+                       };
+                       foreach (ListViewItem item in items)
+                               item.Selected = true;
+
+                       Assert.AreEqual (0, selectedIndexChanged, "#A1");
+                       lvw.Items.AddRange (items);
+                       Assert.AreEqual (3, selectedIndexChanged, "#A1");
+
+                       form.Close ();
+               }
        }
 }
index 53571cd0f29c9bb08909bbca3cc0f15bd5d8ea7e..19c191499d05035d0c310eff12996c18d3dd2e03 100644 (file)
@@ -195,6 +195,29 @@ namespace MonoTests.System.Windows.Forms
                        Assert.IsNull(lv.StateImageList, "#B3");
                }
 
+               string dispose_log;
+
+               [Test]
+               public void DisposeLayoutTest ()
+               {
+                       Form f = new Form ();
+                       ListView lv = new ListView ();
+                       f.Controls.Add (lv);
+                       f.Show ();
+
+                       dispose_log = String.Empty;
+                       lv.Layout += DisposeOnLayout;
+                       lv.Dispose (); // just to be sure.
+                       f.Dispose ();
+
+                       Assert.AreEqual (0, dispose_log.Length, "#A0");
+               }
+
+               void DisposeOnLayout (object o, LayoutEventArgs args)
+               {
+                       dispose_log = "OnLayout";
+               }
+
                // Hey
                //[Test]
                public void EnsureVisibleTest ()
index bf2974593c5a26bb360e385be3994eedf9b9caf6..fe77ec59ac185006b6e30903593f295f5ab2ca44 100644 (file)
@@ -52,10 +52,11 @@ namespace Microsoft.Build.BuildEngine {
                                 type == typeof (uint) ||
                                 type == typeof (float) ||
                                 type == typeof (double) ||
-                                type == typeof (DateTime)) {
+                                type == typeof (DateTime) ||
+                                type.IsEnum)
                                output = o.ToString ();
-
-                       }
+                       else
+                               throw new Exception (String.Format ("Unsupported type : {0}", type));
                        return output;
                }
 
index 249abee1a0cdcf7cf8899628a617833903760be8..6f5f28020600c3096e4ba95be06542df862c222c 100644 (file)
@@ -55,6 +55,7 @@ namespace Microsoft.Build.BuildEngine {
                ConsoleColor errorColor, warningColor, eventColor, messageColor, highMessageColor;
                ColorSetter colorSet;
                ColorResetter colorReset;
+               IEventSource eventSource;
                bool no_message_color, use_colors;
                bool noItemAndPropertyList;
 
@@ -202,6 +203,8 @@ namespace Microsoft.Build.BuildEngine {
 
                public virtual void Initialize (IEventSource eventSource)
                {
+                       this.eventSource = eventSource;
+
                         eventSource.BuildStarted +=  new BuildStartedEventHandler (BuildStartedHandler);
                         eventSource.BuildFinished += new BuildFinishedEventHandler (BuildFinishedHandler);
                         eventSource.ProjectStarted += new ProjectStartedEventHandler (ProjectStartedHandler);
@@ -574,6 +577,20 @@ namespace Microsoft.Build.BuildEngine {
                
                public virtual void Shutdown ()
                {
+                       if (eventSource == null)
+                               return;
+
+                       eventSource.BuildStarted -=  BuildStartedHandler;
+                       eventSource.BuildFinished -= BuildFinishedHandler;
+                       eventSource.ProjectStarted -= ProjectStartedHandler;
+                       eventSource.ProjectFinished -= ProjectFinishedHandler;
+                       eventSource.TargetStarted -= TargetStartedHandler;
+                       eventSource.TargetFinished -= TargetFinishedHandler;
+                       eventSource.TaskStarted -= TaskStartedHandler;
+                       eventSource.TaskFinished -= TaskFinishedHandler;
+                       eventSource.MessageRaised -= MessageHandler;
+                       eventSource.WarningRaised -= WarningHandler;
+                       eventSource.ErrorRaised -= ErrorHandler;
                }
 
                static bool InEmacs = Environment.GetEnvironmentVariable ("EMACS") == "t";
index 8c8a03b6145a44f84d71384b201094ca182bccaf..fd675a7d752d458c50f863623c82bd77ec00af54 100644 (file)
@@ -226,11 +226,10 @@ namespace Microsoft.Build.BuildEngine {
                {
                        Project project;
 
-                       if (projects.ContainsKey (projectFile)) {
-                               project = (Project) projects [projectFile];
-                       } else {
+                       bool newProject = false;
+                       if (!projects.TryGetValue (projectFile, out project)) {
                                project = CreateNewProject ();
-                               project.Load (projectFile);
+                               newProject = true;
                        }
 
                        BuildPropertyGroup engine_old_grp = null;
@@ -243,9 +242,14 @@ namespace Microsoft.Build.BuildEngine {
                                // ones explicitlcur_y specified here
                                foreach (BuildProperty bp in globalProperties)
                                        project.GlobalProperties.AddProperty (bp);
-                               project.NeedToReevaluate ();
+
+                               if (!newProject)
+                                       project.NeedToReevaluate ();
                        }
 
+                       if (newProject)
+                               project.Load (projectFile);
+
                        try {
                                string oldProjectToolsVersion = project.ToolsVersion;
                                if (String.IsNullOrEmpty (toolsVersion) && defaultToolsVersion != null)
index ecb45ae5a6870a360194eb9b7949a1147fb790ba..620929985e88ead21bd2a0e39c44cebb1827fcc8 100644 (file)
@@ -56,10 +56,13 @@ namespace Microsoft.Build.BuildEngine {
 
                        if (ProjectPath == String.Empty)
                                throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
-                       evaluatedProjectPath = EvaluateProjectPath (ProjectPath);
-                       evaluatedProjectPath = GetFullPath ();
-                       if (EvaluatedProjectPath == String.Empty)
-                               throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
+
+                       if (ConditionParser.ParseAndEvaluate (Condition, project)) {
+                               evaluatedProjectPath = EvaluateProjectPath (ProjectPath);
+                               evaluatedProjectPath = GetFullPath ();
+                               if (EvaluatedProjectPath == String.Empty)
+                                       throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
+                       }
                }
 
                // FIXME: condition
@@ -87,42 +90,57 @@ namespace Microsoft.Build.BuildEngine {
 
                string EvaluateProjectPath (string file)
                {
-                       if (file.IndexOf ("$(MSBuildExtensionsPath)") >= 0) {
-                               // This is a *HACK* to support multiple paths for
-                               // MSBuildExtensionsPath property. Normally it would
-                               // get resolved to a single value, but here we special
-                               // case it and try ~/.config/xbuild/tasks and any
-                               // paths specified in the env var $MSBuildExtensionsPath .
-                               //
-                               // The property itself will resolve to the default
-                               // location though, so you get in any other part of the
-                               // project.
-
-                               string envvar = Environment.GetEnvironmentVariable ("MSBuildExtensionsPath");
-                               envvar = (envvar ?? String.Empty) + ":" + DotConfigExtensionsPath;
-
-                               string [] paths = envvar.Split (new char [] {':'}, StringSplitOptions.RemoveEmptyEntries);
-                               foreach (string path in paths) {
-                                       if (!Directory.Exists (path)) {
-                                               project.ParentEngine.LogMessage (MessageImportance.Low, "Extension path '{0}' not found, ignoring.", path);
-                                               continue;
-                                       }
-
-                                       string pfile = Path.GetFullPath (file.Replace ("\\", "/").Replace (
-                                                               "$(MSBuildExtensionsPath)", path + Path.DirectorySeparatorChar));
-
-                                       var evaluated_path = EvaluatePath (pfile);
-                                       if (File.Exists (evaluated_path)) {
-                                               project.ParentEngine.LogMessage (MessageImportance.Low,
-                                                       "{0}: Importing project {1} from extension path {2}", project.FullFileName, evaluated_path, path);
-                                               return pfile;
-                                       }
+                       string ret;
+                       if (EvaluateAsMSBuildExtensionsPath (file, "MSBuildExtensionsPath", out ret) ||
+                               EvaluateAsMSBuildExtensionsPath (file, "MSBuildExtensionsPath32", out ret) ||
+                               EvaluateAsMSBuildExtensionsPath (file, "MSBuildExtensionsPath64", out ret))
+                               return ret;
+
+                       return EvaluatePath (file);
+               }
+
+               bool EvaluateAsMSBuildExtensionsPath (string file, string property_name, out string epath)
+               {
+                       epath = null;
+                       string property_ref = String.Format ("$({0})", property_name);
+                       if (file.IndexOf (property_ref) < 0)
+                               return false;
+
+                       // This is a *HACK* to support multiple paths for
+                       // MSBuildExtensionsPath property. Normally it would
+                       // get resolved to a single value, but here we special
+                       // case it and try ~/.config/xbuild/tasks and any
+                       // paths specified in the env var $MSBuildExtensionsPath .
+                       //
+                       // The property itself will resolve to the default
+                       // location though, so you get in any other part of the
+                       // project.
+
+                       string envvar = Environment.GetEnvironmentVariable (property_name);
+                       envvar = (envvar ?? String.Empty) + ":" + DotConfigExtensionsPath;
+
+                       string [] paths = envvar.Split (new char [] {':'}, StringSplitOptions.RemoveEmptyEntries);
+                       foreach (string path in paths) {
+                               if (!Directory.Exists (path)) {
+                                       project.ParentEngine.LogMessage (MessageImportance.Low, "Extension path '{0}' not found, ignoring.", path);
+                                       continue;
+                               }
+
+                               string pfile = Path.GetFullPath (file.Replace ("\\", "/").Replace (
+                                                       property_ref, path + Path.DirectorySeparatorChar));
+
+                               var evaluated_path = EvaluatePath (pfile);
+                               if (File.Exists (evaluated_path)) {
                                        project.ParentEngine.LogMessage (MessageImportance.Low,
-                                                       "{0}: Couldn't find project {1} for extension path {2}", project.FullFileName, evaluated_path, path);
+                                               "{0}: Importing project {1} from extension path {2}", project.FullFileName, evaluated_path, path);
+                                       epath = pfile;
+                                       return true;
                                }
+                               project.ParentEngine.LogMessage (MessageImportance.Low,
+                                               "{0}: Couldn't find project {1} for extension path {2}", project.FullFileName, evaluated_path, path);
                        }
 
-                       return EvaluatePath (file);
+                       return false;
                }
 
                string EvaluatePath (string path)
index 4f7f90e377cbe65b0270b43f206cce2cc51d7277..cba8f82fc2fa4e0fa64ca7525d6827daa7d73da5 100644 (file)
@@ -946,6 +946,7 @@ namespace Microsoft.Build.BuildEngine {
                        EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildToolsVersion", effective_tools_version, PropertyType.Reserved));
                        EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildExtensionsPath", ExtensionsPath, PropertyType.Reserved));
                        EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildExtensionsPath32", ExtensionsPath, PropertyType.Reserved));
+                       EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildExtensionsPath64", ExtensionsPath, PropertyType.Reserved));
                        EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildProjectDefaultTargets", DefaultTargets, PropertyType.Reserved));
                        EvaluatedProperties.AddProperty (new BuildProperty ("OS", OS, PropertyType.Environment));
 
index 696ffbeedfbf9f646935fad6697756a372835d2b..e0ddc933326f20b74995ee09c666c0b8eecc7d9a 100644 (file)
@@ -198,7 +198,14 @@ namespace Microsoft.Build.BuildEngine {
                                              object o,
                                              string propertyName)
                {
-                       BuildProperty bp = ChangeType.ToBuildProperty (o, propertyInfo.PropertyType, propertyName);
+                       BuildProperty bp;
+                       try {
+                               bp = ChangeType.ToBuildProperty (o, propertyInfo.PropertyType, propertyName);
+                       } catch (Exception e) {
+                               throw new Exception (String.Format ("Error publishing Output from task property '{0} {1}' to property named '{2}' : {3}",
+                                                       propertyInfo.PropertyType, propertyInfo.Name, propertyName, e.Message),
+                                                       e);
+                       }
                        parentProject.EvaluatedProperties.AddProperty (bp);
                }
 
@@ -207,7 +214,15 @@ namespace Microsoft.Build.BuildEngine {
                                               object o,
                                               string itemName)
                {
-                       BuildItemGroup newItems = ChangeType.ToBuildItemGroup (o, propertyInfo.PropertyType, itemName);
+                       BuildItemGroup newItems;
+                       try {
+                               newItems = ChangeType.ToBuildItemGroup (o, propertyInfo.PropertyType, itemName);
+                       } catch (Exception e) {
+                               throw new Exception (String.Format ("Error publishing Output from task property '{0} {1}' to item named '{2}' : {3}",
+                                                       propertyInfo.PropertyType, propertyInfo.Name, itemName, e.Message),
+                                                       e);
+                       }
+
                        newItems.ParentProject = parentProject;
                        
                        if (parentProject.EvaluatedItemsByName.ContainsKey (itemName)) {
old mode 100644 (file)
new mode 100755 (executable)
index 49f229e..acec0e9
@@ -720,7 +720,73 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
                                        "(TargetB) foo: foofoo1 A:  External: ",
                                        "second"});
                }
+
+               // Check for global properties in case of Import
+
+               [Test]
+               public void TestGlobalPropertiesImport1 ()
+               {
+                       string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                               <Target Name=""main"">
+                                       <MSBuild Projects=""first.proj"" Targets = ""1"" Properties='Prop=test'/>
+                               </Target>
+                       </Project>";
+
+                       string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                               <Target Name = ""1"">
+                                       <Message Text='Prop: $(Prop)'/>
+                               </Target>
+                               <Import Project='$(Prop).proj'/>
+                       </Project>";
+
+                       CreateAndCheckGlobalPropertiesImportTest (mainProject, firstProject);
+               }
+
                [Test]
+               public void TestGlobalPropertiesImport2 ()
+               {
+                       string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                               <Target Name=""main"">
+                                       <MSBuild Projects=""first.proj"" Targets = ""1"" Properties='Prop=test'/>
+                               </Target>
+                       </Project>";
+
+                       string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                               <PropertyGroup>
+                                       <Prop>invalid</Prop>
+                               </PropertyGroup>
+                               <Target Name = ""1"">
+                                       <Message Text='Prop: $(Prop)'/>
+                               </Target>
+                               <Import Project='$(Prop).proj'/>
+                       </Project>";
+
+                       CreateAndCheckGlobalPropertiesImportTest (mainProject, firstProject);
+               }
+
+               [Test]
+               public void TestGlobalPropertiesImport3()
+               {
+                       string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                               <Target Name=""main"">
+                                       <MSBuild Projects=""first.proj"" Targets = ""1""/>
+                               </Target>
+                       </Project>";
+
+                       string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                               <PropertyGroup>
+                                       <Prop>test</Prop>
+                               </PropertyGroup>
+                               <Target Name = ""1"">
+                                       <Message Text='Prop: $(Prop)'/>
+                               </Target>
+                               <Import Project='$(Prop).proj'/>
+                       </Project>";
+
+                       CreateAndCheckGlobalPropertiesImportTest (mainProject, firstProject);
+               }
+
+               [Test]
                public void TestMSBuildOutputs ()
                {
                        string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">"
@@ -817,6 +883,41 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
                        Assert.IsNull(project);
                }
 
+               void CreateAndCheckGlobalPropertiesImportTest (string main, string first)
+               {
+                       string basePath = Path.Combine ("Test", "resources");
+
+                       string testProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+</Project>";
+
+                       File.WriteAllText (Path.Combine (basePath, "main.proj"), main);
+                       File.WriteAllText (Path.Combine (basePath, "first.proj"), first);
+                       File.WriteAllText (Path.Combine (basePath, "test.proj"), testProject);
+
+                       try {
+                               Engine engine = new Engine ();
+                               MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+                                       new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+                               engine.RegisterLogger (logger);
+
+                               Project project = engine.CreateNewProject ();
+                               project.Load (Path.Combine (basePath, "main.proj"));
+
+                               bool result = project.Build ();
+                               if (!result) {
+                                       logger.DumpMessages ();
+                                       Assert.Fail ("Build failed");
+                               }
+
+                               logger.CheckAny ("Prop: test", MessageImportance.Normal);
+                               Assert.AreEqual (0, logger.NormalMessageCount, "Unexpected extra messages found");
+                       } finally {
+                               File.Delete (Path.Combine (basePath, "main.proj"));
+                               File.Delete (Path.Combine (basePath, "first.proj"));
+                               File.Delete (Path.Combine (basePath, "test.proj"));
+                       }
+               }
+
                // Helper Methods for TestGlobalProperties*
 
                void CreateAndCheckGlobalPropertiesTest (string main, string first, string second,
index ae822e68864c2b670bcf142a5e0eb1fe282e7180..8c21891659c4da7501ca4bccfd032dcd282257e3 100644 (file)
@@ -385,10 +385,10 @@ namespace Microsoft.Build.Tasks {
                        search_log.Add (String.Format (msg, args));
                }
 
-               public void LogSearchLoggerMessages ()
+               public void LogSearchLoggerMessages (MessageImportance importance)
                {
                        foreach (string msg in search_log)
-                               log.LogMessage (msg);
+                               log.LogMessage (importance, msg);
                }
 
                public TaskLoggingHelper Log {
index e5b74c0ce0919fe866eb8312a62e8073f053e44e..9c1f6450fd09bf944aac6dc5cd911f639dad6a24 100644 (file)
@@ -291,13 +291,14 @@ namespace Microsoft.Build.Tasks {
                        if (UseSourcePath)
                                commandLine.AppendSwitch ("/useSourcePath");
 
-                       commandLine.AppendSwitch (String.Format ("/compile {0}{1}", SourceFile,
+                       commandLine.AppendSwitch (String.Format ("/compile \"{0}{1}\"", SourceFile,
                                                OutputFile != null ? "," + OutputFile : ""));
                }
 
                public override bool Execute ()
                {
-                       EnvironmentOverride ["MONO_IOMAP"] = "drive";
+                       if (String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_IOMAP")))
+                               EnvironmentOverride ["MONO_IOMAP"] = "drive";
                        return base.Execute ();
                }
 
index ee39d771589665062ed17a256e62bd66b180b67a..f83685f6b810c27695da8e65bd0a35c5dd05ac61 100644 (file)
@@ -154,12 +154,15 @@ namespace Microsoft.Build.Tasks {
                                        continue;
                                }
 
-                               Log.LogMessage (MessageImportance.Low, "Primary Reference {0}", item.ItemSpec);
+                               LogWithPrecedingNewLine (MessageImportance.Low, "Primary Reference {0}", item.ItemSpec);
                                ResolvedReference resolved_ref = ResolveReference (item, searchPaths, true);
                                if (resolved_ref == null) {
                                        Log.LogWarning ("Reference '{0}' not resolved", item.ItemSpec);
-                                       assembly_resolver.LogSearchLoggerMessages ();
+                                       assembly_resolver.LogSearchLoggerMessages (MessageImportance.Normal);
                                } else {
+                                       if (Environment.GetEnvironmentVariable ("XBUILD_LOG_REFERENCE_RESOLVER") != null)
+                                               assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
+
                                        Log.LogMessage (MessageImportance.Low,
                                                        "\tReference {0} resolved to {1}. CopyLocal = {2}",
                                                        item.ItemSpec, resolved_ref.TaskItem,
@@ -268,22 +271,25 @@ namespace Microsoft.Build.Tasks {
                                assembly_resolver.ResetSearchLogger ();
 
                                if (!File.Exists (item.ItemSpec)) {
-                                       Log.LogMessage (MessageImportance.Low,
+                                       LogWithPrecedingNewLine (MessageImportance.Low,
                                                        "Primary Reference from AssemblyFiles {0}, file not found. Ignoring",
                                                        item.ItemSpec);
                                        continue;
                                }
 
-                               Log.LogMessage (MessageImportance.Low, "Primary Reference from AssemblyFiles {0}", item.ItemSpec);
+                               LogWithPrecedingNewLine (MessageImportance.Low, "Primary Reference from AssemblyFiles {0}", item.ItemSpec);
                                string copy_local;
 
                                AssemblyName aname = assembly_resolver.GetAssemblyNameFromFile (item.ItemSpec);
                                if (aname == null) {
                                        Log.LogWarning ("Reference '{0}' not resolved", item.ItemSpec);
-                                       assembly_resolver.LogSearchLoggerMessages ();
+                                       assembly_resolver.LogSearchLoggerMessages (MessageImportance.Normal);
                                        continue;
                                }
 
+                               if (Environment.GetEnvironmentVariable ("XBUILD_LOG_REFERENCE_RESOLVER") != null)
+                                       assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
+
                                ResolvedReference rr = assembly_resolver.GetResolvedReference (item, item.ItemSpec, aname, true,
                                                SearchPath.RawFileName);
                                copy_local = rr.CopyLocal.ToString ();
@@ -347,7 +353,7 @@ namespace Microsoft.Build.Tasks {
                        if (TryGetResolvedReferenceByAssemblyName (aname, false, out resolved_ref))
                                return resolved_ref;
 
-                       Log.LogMessage (MessageImportance.Low, "Dependency {0}", aname);
+                       LogWithPrecedingNewLine (MessageImportance.Low, "Dependency {0}", aname);
                        Log.LogMessage (MessageImportance.Low, "\tRequired by {0}", parent_asm_name);
 
                        ITaskItem item = new TaskItem (aname.FullName);
@@ -355,6 +361,9 @@ namespace Microsoft.Build.Tasks {
                        resolved_ref = ResolveReference (item, dependency_search_paths, false);
 
                        if (resolved_ref != null) {
+                               if (Environment.GetEnvironmentVariable ("XBUILD_LOG_REFERENCE_RESOLVER") != null)
+                                               assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
+
                                Log.LogMessage (MessageImportance.Low, "\tReference {0} resolved to {1}.",
                                        aname, resolved_ref.TaskItem.ItemSpec);
 
@@ -384,7 +393,7 @@ namespace Microsoft.Build.Tasks {
                                }
                        } else {
                                Log.LogWarning ("Reference '{0}' not resolved", aname);
-                               assembly_resolver.LogSearchLoggerMessages ();
+                               assembly_resolver.LogSearchLoggerMessages (MessageImportance.Normal);
                        }
 
                        return resolved_ref;
@@ -491,6 +500,12 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
 
+               void LogWithPrecedingNewLine (MessageImportance importance, string format, params object [] args)
+               {
+                       Log.LogMessage (importance, String.Empty);
+                       Log.LogMessage (importance, format, args);
+               }
+
                // conflict b/w @main and @conflicting, picking @main
                void LogConflictWarning (string main, string conflicting)
                {
index 18f6ffab539c822d0f2e9f2f5cbe2810fea65812..1a781c4f39e8349f94f232ea95921d8039cd663b 100644 (file)
@@ -52,7 +52,7 @@ namespace Microsoft.Build.Tasks {
                        if (files.Length == 0)
                                return true;
 
-                       bool returnBoolean = false;
+                       bool returnBoolean = true;
                        List <ITaskItem> successfulFiles = new List <ITaskItem> ();
                        Stream stream = null;
                        
@@ -77,15 +77,15 @@ namespace Microsoft.Build.Tasks {
                                                File.SetLastAccessTime (fullname, time);
                                                File.SetLastWriteTime (fullname, time);
                                                successfulFiles.Add (file);
-                                               returnBoolean = true;
                                        } else {
-                                               ;
+                                               continue;
                                        }
 
                                        touchedFiles = successfulFiles.ToArray ();
                                }
                                catch (Exception ex) {
                                        Log.LogErrorFromException (ex);
+                                       returnBoolean = false;
                                }
                        }
                        return returnBoolean;
index de05e9c71fddcfde086c376ce694ea4a03e7dcb8..74e1b7610de0e8a4ffbb52542fd8515e508bdad4 100644 (file)
@@ -194,12 +194,14 @@ namespace Microsoft.Build.Utilities
 
                void ProcessLine (string line, MessageImportance importance)
                {
-                       toolOutput.AppendLine (line);
+                       foreach (string singleLine in line.Split (new string [] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)) {
+                               toolOutput.AppendLine (singleLine);
 
-                       // in case of typeLoadException, collect all the output
-                       // and then handle in ProcessTypeLoadException
-                       if (!typeLoadException)
-                               LogEventsFromTextOutput (line, importance);
+                               // in case of typeLoadException, collect all the output
+                               // and then handle in ProcessTypeLoadException
+                               if (!typeLoadException)
+                                       LogEventsFromTextOutput (singleLine, importance);
+                       }
                }
 
                protected virtual void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
index c14445abf756a9e2ae3da7385fcddcf1b132e586..b8ce85b4f4c932a5f656b9d2ab25aebb8eb7bd18 100644 (file)
@@ -42,7 +42,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        return new CSharpBinaryOperationBinder (operation, flags, context, argumentInfo);
                }
                
-               public static CallSiteBinder Convert (CSharpBinderFlags flags, Type context, Type type)
+               public static CallSiteBinder Convert (CSharpBinderFlags flags, Type type, Type context)
                {
                        return new CSharpConvertBinder (type, context, flags);
                }
index 44d57a8ecc0896393d3d2fc8c3a7a14007e60c52..a59a09c80c425a8d8b2eea680f715da791123456 100644 (file)
@@ -130,21 +130,22 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject FallbackBinaryOperation (DynamicMetaObject target, DynamicMetaObject arg, DynamicMetaObject errorSuggestion)
                {
-                       var left = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
-                       var right = CSharpBinder.CreateCompilerExpression (argumentInfo [1], arg);
+                       var ctx = DynamicContext.Create ();
+                       var left = ctx.CreateCompilerExpression (argumentInfo [0], target);
+                       var right = ctx.CreateCompilerExpression (argumentInfo [1], arg);
                        
                        bool is_compound;
                        var oper = GetOperator (out is_compound);
                        Compiler.Expression expr;
 
                        if (is_compound) {
-                               var target_expr = CSharpBinder.CreateCompilerExpression (argumentInfo[0], target);
+                               var target_expr = ctx.CreateCompilerExpression (argumentInfo[0], target);
                                expr = new Compiler.CompoundAssign (oper, target_expr, right, left, Compiler.Location.Null);
                        } else {
                                expr = new Compiler.Binary (oper, left, right, Compiler.Location.Null);
                        }
 
-                       expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                       expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
                        
                        if ((flags & CSharpBinderFlags.CheckedContext) != 0)
                                expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
@@ -153,7 +154,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        binder.AddRestrictions (target);
                        binder.AddRestrictions (arg);
 
-                       return binder.Bind (context);
+                       return binder.Bind (ctx, context);
                }
        }
 }
index 981252043cdc51339e5073c58bd16f8eb425cb94..d39e368e037cb84adbde2582a0762c8d4e43c8e1 100644 (file)
@@ -38,7 +38,6 @@ namespace Microsoft.CSharp.RuntimeBinder
        class CSharpBinder
        {
                static ConstructorInfo binder_exception_ctor;
-               static object compiler_initializer = new object ();
                static object resolver = new object ();
 
                DynamicMetaObjectBinder binder;
@@ -66,28 +65,11 @@ namespace Microsoft.CSharp.RuntimeBinder
                        restrictions = restrictions.Merge (CreateRestrictionsOnTarget (args));
                }
 
-               public DynamicMetaObject Bind (Type callingType, DynamicMetaObject target)
+               public DynamicMetaObject Bind (DynamicContext ctx, Type callingType)
                {
-                       if (target.Value == null) {
-                               if (errorSuggestion != null)
-                                       return errorSuggestion;
-
-                               var ex = CreateBinderException ("Cannot perform member binding on `null' value");
-                               return new DynamicMetaObject (ex, restrictions);
-                       }
-
-                       return Bind (callingType);
-               }
-
-               public DynamicMetaObject Bind (Type callingType)
-               {
-                       var ctx = CreateDefaultCompilerContext ();
-
-                       InitializeCompiler (ctx);
-
                        Expression res;
                        try {
-                               var rc = new Compiler.ResolveContext (new RuntimeBinderContext (ctx, TypeImporter.Import (callingType)), ResolveOptions);
+                               var rc = new Compiler.ResolveContext (new RuntimeBinderContext (ctx, ctx.ImportType (callingType)), ResolveOptions);
 
                                // Static typemanager and internal caches are not thread-safe
                                lock (resolver) {
@@ -124,69 +106,6 @@ namespace Microsoft.CSharp.RuntimeBinder
                        return Expression.Throw (Expression.New (binder_exception_ctor, Expression.Constant (message)), binder.ReturnType);
                }
 
-               //
-               // Creates mcs expression from dynamic method object
-               //
-               public static Compiler.Expression CreateCompilerExpression (CSharpArgumentInfo info, DynamicMetaObject value)
-               {
-                       if (value.Value == null) {
-                               if (value.LimitType == typeof (object))
-                                       return new Compiler.NullLiteral (Compiler.Location.Null);
-
-                               InitializeCompiler (null);
-                               return Compiler.Constant.CreateConstantFromValue (TypeImporter.Import (value.LimitType), null, Compiler.Location.Null);
-                       }
-
-                       bool is_compile_time;
-
-                       if (info != null) {
-                               if ((info.Flags & CSharpArgumentInfoFlags.Constant) != 0) {
-                                       InitializeCompiler (null);
-                                       return Compiler.Constant.CreateConstantFromValue (TypeImporter.Import (value.LimitType), value.Value, Compiler.Location.Null);
-                               }
-
-                               if ((info.Flags & CSharpArgumentInfoFlags.IsStaticType) != 0)
-                                       return new Compiler.TypeExpression (TypeImporter.Import ((Type) value.Value), Compiler.Location.Null);
-
-                               is_compile_time = (info.Flags & CSharpArgumentInfoFlags.UseCompileTimeType) != 0;
-                       } else {
-                               is_compile_time = false;
-                       }
-
-                       return new Compiler.RuntimeValueExpression (value, TypeImporter.Import (is_compile_time ? value.LimitType : value.RuntimeType));
-               }
-
-               public static Compiler.Arguments CreateCompilerArguments (IEnumerable<CSharpArgumentInfo> info, DynamicMetaObject[] args)
-               {
-                       var res = new Compiler.Arguments (args.Length);
-                       int pos = 0;
-
-                       // enumerates over args
-                       foreach (var item in info) {
-                               var expr = CreateCompilerExpression (item, args [pos++]);
-                               if (item.IsNamed) {
-                                       res.Add (new Compiler.NamedArgument (item.Name, Compiler.Location.Null, expr));
-                               } else {
-                                       res.Add (new Compiler.Argument (expr, item.ArgumentModifier));
-                               }
-
-                               if (pos == args.Length)
-                                       break;
-                       }
-
-                       return res;
-               }
-
-               public static Compiler.CompilerContext CreateDefaultCompilerContext ()
-               {
-                       return new Compiler.CompilerContext (
-                               new Compiler.Report (ErrorPrinter.Instance) {
-                                       WarningLevel = 0
-                               }) {
-                                       IsRuntimeBinder = true
-                               };
-               }
-
                static BindingRestrictions CreateRestrictionsOnTarget (DynamicMetaObject arg)
                {
                        return arg.HasValue && arg.Value == null ?
@@ -205,15 +124,42 @@ namespace Microsoft.CSharp.RuntimeBinder
 
                        return res;
                }
+       }
+
+       class DynamicContext
+       {
+               static DynamicContext dc;
+               static object compiler_initializer = new object ();
+               static object lock_object = new object ();
 
-               public static void InitializeCompiler (Compiler.CompilerContext ctx)
+               readonly Compiler.CompilerContext cc;
+
+               private DynamicContext (Compiler.CompilerContext cc)
+               {
+                       this.cc = cc;
+               }
+
+               public Compiler.CompilerContext CompilerContext {
+                       get {
+                               return cc;
+                       }
+               }
+
+               public static DynamicContext Create ()
                {
-                       if (TypeImporter.Predefined == null)
-                               return;
+                       if (dc != null)
+                               return dc;
 
                        lock (compiler_initializer) {
-                               if (TypeImporter.Predefined == null)
-                                       return;
+                               if (dc != null)
+                                       return dc;
+
+                               var importer = new Compiler.ReflectionMetaImporter () {
+                                       IgnorePrivateMembers = false
+                               };
+
+                               var core_types = Compiler.TypeManager.InitCoreTypes ();
+                               importer.Initialize ();
 
                                // I don't think dynamically loaded assemblies can be used as dynamic
                                // expression without static type to be loaded first
@@ -223,36 +169,90 @@ namespace Microsoft.CSharp.RuntimeBinder
                                var ns = Compiler.GlobalRootNamespace.Instance;
                                foreach (System.Reflection.Assembly a in AppDomain.CurrentDomain.GetAssemblies ()) {
                                        ns.AddAssemblyReference (a);
-                                       ns.ImportAssembly (a);
+                                       importer.ImportAssembly (a, ns);
                                }
 
-                               if (ctx == null)
-                                       ctx = CreateDefaultCompilerContext ();
+                               var reporter = new Compiler.Report (ErrorPrinter.Instance) {
+                                       WarningLevel = 0
+                               };
+
+                               var cc = new Compiler.CompilerContext (importer, reporter) {
+                                       IsRuntimeBinder = true
+                               };
 
-                               Compiler.TypeManager.InitCoreTypes (ctx, TypeImporter.Predefined);
-                               TypeImporter.Predefined = null;
+                               Compiler.TypeManager.InitCoreTypes (cc, core_types);
+                               Compiler.TypeManager.InitOptionalCoreTypes (cc);
 
-                               Compiler.TypeManager.InitOptionalCoreTypes (ctx);
+                               dc = new DynamicContext (cc);
                        }
+
+                       return dc;
                }
-       }
 
-       static class TypeImporter
-       {
-               static object lock_object;
-               public static IList<Compiler.PredefinedTypeSpec> Predefined;
+               //
+               // Creates mcs expression from dynamic object
+               //
+               public Compiler.Expression CreateCompilerExpression (CSharpArgumentInfo info, DynamicMetaObject value)
+               {
+                       if (value.Value == null) {
+                               if (value.LimitType == typeof (object))
+                                       return new Compiler.NullLiteral (Compiler.Location.Null);
+
+                               return Compiler.Constant.CreateConstantFromValue (ImportType (value.LimitType), null, Compiler.Location.Null);
+                       }
+
+                       //
+                       // No type details provider, go with runtime type
+                       //
+                       if (info == null)
+                               return new Compiler.RuntimeValueExpression (value, ImportType (value.RuntimeType));
+
+                       //
+                       // Value is known to be a type
+                       //
+                       if ((info.Flags & CSharpArgumentInfoFlags.IsStaticType) != 0)
+                               return new Compiler.TypeExpression (ImportType ((Type) value.Value), Compiler.Location.Null);
+
+                       //
+                       // Use compilation time type when type was known not to be dynamic during compilation
+                       //
+                       Type value_type = (info.Flags & CSharpArgumentInfoFlags.UseCompileTimeType) != 0 ? value.Expression.Type : value.LimitType;
+                       var type = ImportType (value_type);
 
-               static TypeImporter ()
+                       if ((info.Flags & CSharpArgumentInfoFlags.Constant) != 0)
+                               return Compiler.Constant.CreateConstantFromValue (type, value.Value, Compiler.Location.Null);
+
+                       return new Compiler.RuntimeValueExpression (value, type);
+               }
+
+               //
+               // Creates mcs arguments from dynamic argument info
+               //
+               public Compiler.Arguments CreateCompilerArguments (IEnumerable<CSharpArgumentInfo> info, DynamicMetaObject[] args)
                {
-                       lock_object = new object ();
-                       Predefined = Compiler.TypeManager.InitCoreTypes ();
-                       Compiler.Import.Initialize ();
+                       var res = new Compiler.Arguments (args.Length);
+                       int pos = 0;
+
+                       // enumerates over args
+                       foreach (var item in info) {
+                               var expr = CreateCompilerExpression (item, args[pos++]);
+                               if (item.IsNamed) {
+                                       res.Add (new Compiler.NamedArgument (item.Name, Compiler.Location.Null, expr));
+                               } else {
+                                       res.Add (new Compiler.Argument (expr, item.ArgumentModifier));
+                               }
+
+                               if (pos == args.Length)
+                                       break;
+                       }
+
+                       return res;
                }
 
-               public static Compiler.TypeSpec Import (Type type)
+               public Compiler.TypeSpec ImportType (Type type)
                {
                        lock (lock_object) {
-                               return Compiler.Import.ImportType (type);
+                               return cc.MetaImporter.ImportType (type);
                        }
                }
        }
index d46fd719c371e9598cb57aa7a578136938cc6c45..32fa4726b106ba991acd3a75afeaff5fc71051e2 100644 (file)
@@ -48,12 +48,13 @@ namespace Microsoft.CSharp.RuntimeBinder
 
                public override DynamicMetaObject FallbackConvert (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
                {
-                       var expr = CSharpBinder.CreateCompilerExpression (null, target);
+                       var ctx = DynamicContext.Create ();
+                       var expr = ctx.CreateCompilerExpression (null, target);
 
                        if (Explicit)
-                               expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (Type), Compiler.Location.Null), expr, Compiler.Location.Null);
+                               expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (Type), Compiler.Location.Null), expr, Compiler.Location.Null);
                        else
-                               expr = new Compiler.ImplicitCast (expr, TypeImporter.Import (Type), (flags & CSharpBinderFlags.ConvertArrayIndex) != 0);
+                               expr = new Compiler.ImplicitCast (expr, ctx.ImportType (Type), (flags & CSharpBinderFlags.ConvertArrayIndex) != 0);
 
                        if ((flags & CSharpBinderFlags.CheckedContext) != 0)
                                expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
@@ -61,7 +62,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
 
-                       return binder.Bind (context);
+                       return binder.Bind (ctx, context);
                }
        }
 }
index 966b15831d9c08bb3b702fc9fe975eae242f52f3..367cc22b70e1a63c50a50fc53a577e506f153cf3 100644 (file)
@@ -55,16 +55,17 @@ namespace Microsoft.CSharp.RuntimeBinder
                                return errorSuggestion;
                        }
 
-                       var expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
-                       var args = CSharpBinder.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
+                       var ctx = DynamicContext.Create ();
+                       var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
+                       var args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
                        expr = new Compiler.ElementAccess (expr, args, Compiler.Location.Null);
-                       expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                       expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
 
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
                        binder.AddRestrictions (indexes);
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
        }
 }
index 37ded7f382b2841b6c413ff226f61936a58dcc4c..790ed72f08d8554e91f4c67846c1c79b3e857bf6 100644 (file)
@@ -48,14 +48,16 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject FallbackGetMember (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
                {
-                       var expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
+                       var ctx = DynamicContext.Create ();
+
+                       var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
                        expr = new Compiler.MemberAccess (expr, Name);
-                       expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                       expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
 
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
        }
 }
index f805bbf520333ea5905e13798dfc6e52b3b8ca03..1f6b34a070d4b3c0e502216e3bbe32783074f8a7 100644 (file)
@@ -50,20 +50,21 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject FallbackInvoke (DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
                {
-                       var expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
-                       var c_args = CSharpBinder.CreateCompilerArguments (argumentInfo.Skip (1), args);
+                       var ctx = DynamicContext.Create ();
+                       var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
+                       var c_args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), args);
                        expr = new Compiler.Invocation (expr, c_args);
 
                        if ((flags & CSharpBinderFlags.ResultDiscarded) == 0)
-                               expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                               expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
                        else
-                               expr = new Compiler.DynamicResultCast (TypeImporter.Import (ReturnType), expr);
+                               expr = new Compiler.DynamicResultCast (ctx.ImportType (ReturnType), expr);
 
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
                        binder.AddRestrictions (args);
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
        }
 }
index b42cc43873d44d0e7eb729b3ade06f8a0d5bb8c9..b5f0b9f263c2166b6d754c020ada8a0618929624 100644 (file)
@@ -48,10 +48,12 @@ namespace Microsoft.CSharp.RuntimeBinder
 
                public override DynamicMetaObject Bind (DynamicMetaObject target, DynamicMetaObject[] args)
                {
-                       var type = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
+                       var ctx = DynamicContext.Create ();
+
+                       var type = ctx.CreateCompilerExpression (argumentInfo [0], target);
                        target_return_type = type.Type.GetMetaInfo ();
 
-                       var c_args = CSharpBinder.CreateCompilerArguments (argumentInfo.Skip (1), args);
+                       var c_args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), args);
 
                        var binder = new CSharpBinder (
                                this, new Compiler.New (type, c_args, Compiler.Location.Null), null);
@@ -59,7 +61,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        binder.AddRestrictions (target);
                        binder.AddRestrictions (args);
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
 
                public override Type ReturnType {
index 8b4a4999cd2f75eb9ae74d879076e97ecc59160c..d6fe5d4303f103c03fc62be1992df819f26d88cb 100644 (file)
@@ -60,12 +60,13 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject FallbackInvokeMember (DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
                {
-                       var c_args = CSharpBinder.CreateCompilerArguments (argumentInfo.Skip (1), args);
+                       var ctx = DynamicContext.Create ();
+                       var c_args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), args);
                        var t_args = typeArguments == null ?
                                null :
-                               new Compiler.TypeArguments (typeArguments.Select (l => new Compiler.TypeExpression (TypeImporter.Import (l), Compiler.Location.Null)).ToArray ());
+                               new Compiler.TypeArguments (typeArguments.Select (l => new Compiler.TypeExpression (ctx.ImportType (l), Compiler.Location.Null)).ToArray ());
 
-                       var expr = CSharpBinder.CreateCompilerExpression (argumentInfo[0], target);
+                       var expr = ctx.CreateCompilerExpression (argumentInfo[0], target);
 
                        //
                        // Simple name invocation is actually member access invocation
@@ -83,9 +84,9 @@ namespace Microsoft.CSharp.RuntimeBinder
                        expr = new Compiler.Invocation (expr, c_args);
 
                        if ((flags & CSharpBinderFlags.ResultDiscarded) == 0)
-                               expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                               expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
                        else
-                               expr = new Compiler.DynamicResultCast (TypeImporter.Import (ReturnType), expr);
+                               expr = new Compiler.DynamicResultCast (ctx.ImportType (ReturnType), expr);
 
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
@@ -94,7 +95,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        if ((flags & CSharpBinderFlags.InvokeSpecialName) != 0)
                                binder.ResolveOptions |= Compiler.ResolveContext.Options.InvokeSpecialName;
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
        }
 }
index 15a7841bd61822e538594e31a55b3d8c4b8ec612..58ab9425e772be186f1c1e8d3f8ed2cfbf6dec86 100644 (file)
@@ -47,18 +47,18 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject Bind (DynamicMetaObject target, DynamicMetaObject[] args)
                {
-                       var ctx = CSharpBinder.CreateDefaultCompilerContext ();
-                       CSharpBinder.InitializeCompiler (ctx);
-                       var context_type = TypeImporter.Import (callingContext);
+                       var ctx = DynamicContext.Create ();
+                       var context_type = ctx.ImportType (callingContext);
+                       var queried_type = ctx.ImportType (target.LimitType);
                        var rc = new Compiler.ResolveContext (new RuntimeBinderContext (ctx, context_type), 0);
 
-                       var expr = Compiler.Expression.MemberLookup (rc, context_type, context_type, name, 0, false, Compiler.Location.Null);
+                       var expr = Compiler.Expression.MemberLookup (rc, context_type, queried_type, name, 0, false, Compiler.Location.Null);
 
                        var binder = new CSharpBinder (
                                this, new Compiler.BoolConstant (expr is Compiler.EventExpr, Compiler.Location.Null), null);
 
                        binder.AddRestrictions (target);
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
 
                public override Type ReturnType {
index 1f1d6719215ae5bcfb9eea063227f02541fa6f04..a02ef82becb9ba3c948351a63db1fda723b8f47a 100644 (file)
@@ -55,20 +55,21 @@ namespace Microsoft.CSharp.RuntimeBinder
                                return errorSuggestion;
                        }
 
-                       var expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
-                       var args = CSharpBinder.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
+                       var ctx = DynamicContext.Create ();
+                       var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
+                       var args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
                        expr = new Compiler.ElementAccess (expr, args, Compiler.Location.Null);
 
-                       var source = CSharpBinder.CreateCompilerExpression (argumentInfo [indexes.Length + 1], value);
+                       var source = ctx.CreateCompilerExpression (argumentInfo [indexes.Length + 1], value);
                        expr = new Compiler.SimpleAssign (expr, source);
-                       expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                       expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
 
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
                        binder.AddRestrictions (value);
                        binder.AddRestrictions (indexes);
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
        }
 }
index f3a4ae489e630bd70d11df5781ade46b15b7638d..5add41be44699fb8bbe4e74e4e702eb5adf7c86d 100644 (file)
@@ -48,19 +48,20 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject FallbackSetMember (DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
                {
-                       var source = CSharpBinder.CreateCompilerExpression (argumentInfo [1], value);
-                       var expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
+                       var ctx = DynamicContext.Create ();
+                       var source = ctx.CreateCompilerExpression (argumentInfo [1], value);
+                       var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
 
                        // Field assignment
                        expr = new Compiler.MemberAccess (expr, Name);
                        expr = new Compiler.SimpleAssign (expr, source);
-                       expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                       expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
 
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
                        binder.AddRestrictions (value);
 
-                       return binder.Bind (callingContext, target);
+                       return binder.Bind (ctx, callingContext);
                }
        }
 }
index c116ff5c8c25987389f468ab4d1254869721e099..38dbf387f42d9b977423209910668d28d013fecd 100644 (file)
@@ -71,7 +71,8 @@ namespace Microsoft.CSharp.RuntimeBinder
                
                public override DynamicMetaObject FallbackUnaryOperation (DynamicMetaObject target, DynamicMetaObject errorSuggestion)
                {
-                       Compiler.Expression expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
+                       var ctx = DynamicContext.Create ();
+                       var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
 
                        if (Operation == ExpressionType.IsTrue) {
                                expr = new Compiler.BooleanExpression (expr);
@@ -83,7 +84,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                                else
                                        expr = new Compiler.Unary (GetOperator (), expr, Compiler.Location.Null);
 
-                               expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
+                               expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
 
                                if ((flags & CSharpBinderFlags.CheckedContext) != 0)
                                        expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);
@@ -92,7 +93,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        var binder = new CSharpBinder (this, expr, errorSuggestion);
                        binder.AddRestrictions (target);
 
-                       return binder.Bind (context);
+                       return binder.Bind (ctx, context);
                }
        }
 }
index ee3f7a48d19962a5ec2a54d581e53abebf77fe35..afdb7f17db27faa5b382a6d3d1928897db9a54a0 100644 (file)
@@ -27,6 +27,7 @@
 //
 
 using System;
+using System.Collections.Generic;
 using Compiler = Mono.CSharp;
 
 namespace Microsoft.CSharp.RuntimeBinder
@@ -36,9 +37,9 @@ namespace Microsoft.CSharp.RuntimeBinder
                readonly Compiler.CompilerContext ctx;
                readonly Compiler.TypeSpec currentType;
 
-               public RuntimeBinderContext (Compiler.CompilerContext ctx, Compiler.TypeSpec currentType)
+               public RuntimeBinderContext (DynamicContext ctx, Compiler.TypeSpec currentType)
                {
-                       this.ctx = ctx;
+                       this.ctx = ctx.CompilerContext;
                        this.currentType = currentType;
                }
 
@@ -88,7 +89,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                        throw new NotImplementedException ();
                }
 
-               public Compiler.ExtensionMethodGroupExpr LookupExtensionMethod (Compiler.TypeSpec extensionType, string name, int arity, Mono.CSharp.Location loc)
+               public IList<Compiler.MethodSpec> LookupExtensionMethod (Compiler.TypeSpec extensionType, string name, int arity, ref Compiler.NamespaceEntry scope)
                {
                        // No extension method lookup in this context
                        return null;
@@ -111,4 +112,4 @@ namespace Microsoft.CSharp.RuntimeBinder
 
                #endregion
        }
-}
\ No newline at end of file
+}
index 689f5d03ddf06c72c257c335730b40a73266c70a..ecb9bb41d834bde05644a3375205f0997ba535e4 100644 (file)
@@ -7,7 +7,7 @@ LIBRARY_PACKAGE = none
 
 CECIL = $(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll
 
-LIB_MCS_FLAGS = /r:$(corlib) /r:$(CECIL) /d:CECIL -keyfile:$(LIBRARY_SNK)
+LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:$(CECIL) /d:CECIL -keyfile:$(LIBRARY_SNK)
 
 NO_TEST = yes
 
index 93354565a9156f9d416c287850fd2642f801cd22..53cb186398aa970cbf2a8e32bbc15fe02b1f4fea 100644 (file)
@@ -367,7 +367,7 @@ namespace Mono.Cecil.Metadata {
                                m_root.Header.Version = "v2.0.50727";
                                break;
                        case TargetRuntime.NET_4_0 :
-                               m_root.Header.Version = "v4.0.21006";
+                               m_root.Header.Version = "v4.0.30319";
                                break;
                        }
 
diff --git a/mcs/class/Mono.CodeContracts/Assembly/AssemblyInfo.cs b/mcs/class/Mono.CodeContracts/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..a0bfcc8
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// AssemblyInfo.cs
+//
+// Authors:
+//     Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("Mono.CodeContracts.dll")]
+[assembly: AssemblyDescription ("Mono.CodeContracts.dll")]
+[assembly: AssemblyDefaultAlias ("Mono.CodeContracts.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile ("../mono.pub")]
+[assembly: SecurityCritical]
+
diff --git a/mcs/class/Mono.CodeContracts/Makefile b/mcs/class/Mono.CodeContracts/Makefile
new file mode 100644 (file)
index 0000000..b9ccfb0
--- /dev/null
@@ -0,0 +1,10 @@
+thisdir = class/Mono.CodeContracts
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = Mono.CodeContracts.dll
+
+LIB_MCS_FLAGS = -r:System -r:System.Core -r:Mono.Cecil.dll -r:Mono.Cecil.Mdb.dll 
+#-r:Mono.Cecil.Pdb.dll
+
+include ../../build/library.make
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/Expr.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/Expr.cs
new file mode 100644 (file)
index 0000000..8f557a4
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Expr.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       abstract class Expr {
+
+               protected Expr (MethodInfo methodInfo)
+               {
+                       this.MethodInfo = methodInfo;
+               }
+
+               public abstract ExprType ExprType { get; }
+               public abstract TypeReference ReturnType { get; }
+
+               public MethodInfo MethodInfo { get; private set; }
+
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprAdd.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprAdd.cs
new file mode 100644 (file)
index 0000000..8046647
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ExprAdd.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprAdd : ExprBinaryOpArithmetic {
+
+               public ExprAdd (MethodInfo methodInfo, Expr left, Expr right, Sn signage, bool overflow)
+                       : base (methodInfo, left, right, signage, overflow)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Add; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOp.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOp.cs
new file mode 100644 (file)
index 0000000..8b748e6
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// ExprBinaryOp.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       abstract class ExprBinaryOp : Expr {
+
+               public ExprBinaryOp (MethodInfo methodInfo, Expr left, Expr right, Sn signage)
+                       : base (methodInfo)
+               {
+                       this.Left = left;
+                       this.Right = right;
+                       this.Signage = signage;
+               }
+
+               public Expr Left { get; private set; }
+               public Expr Right { get; private set; }
+               public Sn Signage { get; private set; }
+
+               public bool IsSigned {
+                       get { return this.Signage == Sn.Signed; }
+               }
+
+               public bool IsUnsigned {
+                       get { return this.Signage == Sn.Unsigned; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpArithmetic.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpArithmetic.cs
new file mode 100644 (file)
index 0000000..cc9f2e9
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// ExprBinaryOpArithmetic.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       abstract class ExprBinaryOpArithmetic : ExprBinaryOp {
+
+               public ExprBinaryOpArithmetic (MethodInfo methodInfo, Expr left, Expr right, Sn signage, bool overflow)
+                       : base (methodInfo, left, right, signage)
+               {
+                       this.Overflow = overflow;
+               }
+
+               public bool Overflow { get; private set; }
+
+               public override TypeReference ReturnType {
+                       get {
+                               if (base.Left.ReturnType.FullName == "System.Int8" ||
+                                       base.Left.ReturnType.FullName == "System.Int16") {
+                                       return base.MethodInfo.TypeInt32;
+                               }
+                               if (base.Left.ReturnType.FullName == "System.Uint8" ||
+                                       base.Left.ReturnType.FullName == "System.Uint16") {
+                                       return base.MethodInfo.TypeUInt32;
+                               }
+                               return base.Left.ReturnType;
+                       }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpComparison.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpComparison.cs
new file mode 100644 (file)
index 0000000..34562eb
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// ExprBinaryOpComparison.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       abstract class ExprBinaryOpComparison : ExprBinaryOp {
+
+               public ExprBinaryOpComparison (MethodInfo methodInfo, Expr left, Expr right, Sn signage)
+                       : base (methodInfo, left, right, signage)
+               {
+               }
+
+               public override TypeReference ReturnType {
+                       get { return base.MethodInfo.TypeBoolean; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBlock.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBlock.cs
new file mode 100644 (file)
index 0000000..d09298e
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// ExprBlock.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprBlock : Expr {
+
+               public ExprBlock (MethodInfo methodInfo, IEnumerable<Expr> exprs)
+                       : base (methodInfo)
+               {
+                       this.Exprs = exprs;
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Block; }
+               }
+
+               public override TypeReference ReturnType {
+                       get { return base.MethodInfo.TypeVoid; }
+               }
+
+               public IEnumerable<Expr> Exprs { get; private set; }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBox.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprBox.cs
new file mode 100644 (file)
index 0000000..2950c4a
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// ExprBox.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprBox : Expr {
+
+               public ExprBox (MethodInfo methodInfo, Expr exprToBox)
+                       : base (methodInfo)
+               {
+                       this.ExprToBox = exprToBox;
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Box; }
+               }
+
+               public override Mono.Cecil.TypeReference ReturnType {
+                       get { return this.ExprToBox.ReturnType; }
+               }
+
+               public Expr ExprToBox { get; private set; }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCall.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCall.cs
new file mode 100644 (file)
index 0000000..d36a878
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// ExprCall.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprCall : Expr {
+
+               public ExprCall (MethodInfo methodInfo, MethodReference method, IEnumerable<Expr> parameters)
+                       : base (methodInfo)
+               {
+                       this.Method = method;
+                       this.Parameters = parameters;
+               }
+
+               public MethodReference Method { get; private set; }
+               public IEnumerable<Expr> Parameters { get; private set; }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Call; }
+               }
+
+               public override TypeReference ReturnType {
+                       get { return this.Method.ReturnType.ReturnType; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareEqual.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareEqual.cs
new file mode 100644 (file)
index 0000000..30241af
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ExprCompareEqual.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprCompareEqual : ExprBinaryOpComparison {
+
+               public ExprCompareEqual (MethodInfo methodInfo, Expr left, Expr right)
+                       : base (methodInfo, left, right, Sn.None)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.CompareEqual; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareGreaterThan.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareGreaterThan.cs
new file mode 100644 (file)
index 0000000..a942f5d
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ExprCompareGreaterThan.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprCompareGreaterThan : ExprBinaryOpComparison {
+
+               public ExprCompareGreaterThan (MethodInfo methodInfo, Expr left, Expr right, Sn signage)
+                       : base (methodInfo, left, right, signage)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.CompareGreaterThan; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareLessThan.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprCompareLessThan.cs
new file mode 100644 (file)
index 0000000..bcbf0d0
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ExprCompareLessThan.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprCompareLessThan : ExprBinaryOpComparison {
+
+               public ExprCompareLessThan (MethodInfo methodInfo, Expr left, Expr right, Sn signage)
+                       : base (methodInfo, left, right, signage)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.CompareLessThan; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprConv.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprConv.cs
new file mode 100644 (file)
index 0000000..bfcf84b
--- /dev/null
@@ -0,0 +1,66 @@
+//
+// ExprConv.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprConv : Expr {
+
+               public ExprConv (MethodInfo methodInfo, Expr exprToConvert, TypeCode convToType)
+                       : base (methodInfo)
+               {
+                       this.ExprToConvert = exprToConvert;
+                       this.ConvToType = convToType;
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Conv; }
+               }
+
+               public Expr ExprToConvert { get; private set; }
+               public TypeCode ConvToType { get; private set; }
+
+               public override TypeReference ReturnType {
+                       get {
+                               switch (this.ConvToType) {
+                               case TypeCode.Int32:
+                                       return base.MethodInfo.TypeInt32;
+                               case TypeCode.Int64:
+                                       return base.MethodInfo.TypeInt64;
+                               default:
+                                       throw new NotSupportedException ("Cannot conv to: " + this.ConvToType);
+                               }
+                       }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprLoadArg.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprLoadArg.cs
new file mode 100644 (file)
index 0000000..bba2de3
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// ExprLoadArg.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprLoadArg : Expr {
+
+               public ExprLoadArg (MethodInfo methodInfo, int index)
+                       : base (methodInfo)
+               {
+                       this.Index = index;
+               }
+
+               public int Index { get; private set; }
+
+               public override ExprType ExprType {
+                       get { return ExprType.LoadArg; }
+               }
+
+               public override TypeReference ReturnType {
+                       get {
+                               return base.MethodInfo.Method.Parameters [this.Index].ParameterType;
+                       }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprLoadConstant.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprLoadConstant.cs
new file mode 100644 (file)
index 0000000..6752f23
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// ExprLoadConstant.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprLoadConstant : Expr {
+
+               public ExprLoadConstant (MethodInfo methodInfo, object value)
+                       : base (methodInfo)
+               {
+                       this.Value = value;
+
+                       if (value == null) {
+                               this.returnType = methodInfo.TypeObject;
+                       } else {
+                               Type type = value.GetType();
+                               this.returnType = methodInfo.Module.Import (type);
+                       }
+               }
+
+               private TypeReference returnType;
+
+               public object Value { get; private set; }
+
+               public override ExprType ExprType {
+                       get { return ExprType.LoadConstant; }
+               }
+
+               public override TypeReference ReturnType {
+                       get { return this.returnType; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprNop.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprNop.cs
new file mode 100644 (file)
index 0000000..27d966a
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// ExprNop.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprNop : Expr {
+
+               public ExprNop (MethodInfo methodInfo)
+                       : base (methodInfo)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Nop; }
+               }
+
+               public override Mono.Cecil.TypeReference ReturnType {
+                       get { return base.MethodInfo.TypeVoid; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprReturn.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprReturn.cs
new file mode 100644 (file)
index 0000000..6bc31bb
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// ExprReturn.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprReturn : Expr {
+
+               public ExprReturn (MethodInfo methodInfo)
+                       : base (methodInfo)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Return; }
+               }
+
+               public override TypeReference ReturnType {
+                       get { return base.MethodInfo.TypeVoid; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprSub.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprSub.cs
new file mode 100644 (file)
index 0000000..356f962
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ExprSub.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       class ExprSub : ExprBinaryOpArithmetic {
+
+               public ExprSub (MethodInfo methodInfo, Expr left, Expr right, Sn signage, bool overflow)
+                       : base (methodInfo, left, right, signage, overflow)
+               {
+               }
+
+               public override ExprType ExprType {
+                       get { return ExprType.Sub; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprType.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/ExprType.cs
new file mode 100644 (file)
index 0000000..4805f85
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// ExprType.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       enum ExprType {
+
+               Unknown,
+
+               Block,
+
+               Nop,
+               LoadArg,
+               LoadConstant,
+               CompareLessThan,
+               CompareGreaterThan,
+               CompareEqual,
+               Call,
+               Return,
+               Box,
+               Conv,
+               Add,
+               Sub,
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/Sn.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.Ast/Sn.cs
new file mode 100644 (file)
index 0000000..98919fa
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Sn.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite.Ast {
+       enum Sn {
+               None,
+               Signed,
+               Unsigned
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/CompileVisitor.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/CompileVisitor.cs
new file mode 100644 (file)
index 0000000..130cfef
--- /dev/null
@@ -0,0 +1,260 @@
+//
+// CompileVisitor.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil.Cil;
+using Mono.CodeContracts.Rewrite.Ast;
+
+namespace Mono.CodeContracts.Rewrite.AstVisitors {
+       class CompileVisitor : ExprVisitor {
+
+               public CompileVisitor (CilWorker il, Dictionary<Expr, Instruction> instructionLookup)
+                       : this (il, instructionLookup, il.Append)
+               {
+               }
+
+               public CompileVisitor (CilWorker il, Dictionary<Expr, Instruction> instructionLookup, Action<Instruction> fnEmit)
+               {
+                       this.il = il;
+                       this.instructionLookup = instructionLookup;
+                       this.fnEmit = fnEmit;
+               }
+
+               private CilWorker il;
+               private Dictionary<Expr, Instruction> instructionLookup;
+               private Action<Instruction> fnEmit;
+
+               private void Emit (Expr originalExpr, Instruction inst)
+               {
+                       Instruction originalInst;
+                       if (this.instructionLookup != null) {
+                               // TODO: Doesn't handle inherited contracts - need to check what to do in this case.
+                               if (this.instructionLookup.TryGetValue (originalExpr, out originalInst)) {
+                                       inst.SequencePoint = originalInst.SequencePoint;
+                               }
+                       }
+                       this.fnEmit (inst);
+               }
+
+               private void Emit (Expr originalExpr, Func<Instruction> fnCreateInstruction)
+               {
+                       Instruction inst = fnCreateInstruction();
+                       this.Emit (originalExpr, inst);
+               }
+
+               private void Emit (Expr originalExpr, Func<IEnumerable<Instruction>> fnCreateInstruction)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               protected override Expr VisitNop (ExprNop e)
+               {
+                       var instNop = this.il.Create (OpCodes.Nop);
+                       this.Emit (e, instNop);
+                       return e;
+               }
+
+               protected override Expr VisitLoadArg (ExprLoadArg e)
+               {
+                       this.Emit (e, () => {
+                               int index = e.Index;
+                               switch (index) {
+                               case 0:
+                                       return this.il.Create (OpCodes.Ldarg_0);
+                               case 1:
+                                       return this.il.Create (OpCodes.Ldarg_1);
+                               case 2:
+                                       return this.il.Create (OpCodes.Ldarg_2);
+                               case 3:
+                                       return this.il.Create (OpCodes.Ldarg_3);
+                               default:
+                                       if (e.Index <= 255) {
+                                               return this.il.Create (OpCodes.Ldarg_S, (byte) index);
+                                       } else {
+                                               return this.il.Create (OpCodes.Ldarg, index);
+                                       }
+                               }
+                               // Required due to bug in compiler
+                               throw new NotSupportedException();
+                       });
+                       
+                       return e;
+               }
+
+               protected override Expr VisitLoadConstant (ExprLoadConstant e)
+               {
+                       this.Emit (e, () => {
+                               object v = e.Value;
+                               if (v == null) {
+                                       return this.il.Create (OpCodes.Ldnull);
+                               }
+                               Type vType = v.GetType ();
+                               TypeCode vTypeCode = Type.GetTypeCode (vType);
+                               switch (vTypeCode) {
+                               case TypeCode.Int32:
+                                       int value = (int) v;
+                                       switch (value) {
+                                       case -1:
+                                               return this.il.Create (OpCodes.Ldc_I4_M1);
+                                       case 0:
+                                               return this.il.Create (OpCodes.Ldc_I4_0);
+                                       case 1:
+                                               return this.il.Create (OpCodes.Ldc_I4_1);
+                                       case 2:
+                                               return this.il.Create (OpCodes.Ldc_I4_2);
+                                       case 3:
+                                               return this.il.Create (OpCodes.Ldc_I4_3);
+                                       case 4:
+                                               return this.il.Create (OpCodes.Ldc_I4_4);
+                                       case 5:
+                                               return this.il.Create (OpCodes.Ldc_I4_5);
+                                       case 6:
+                                               return this.il.Create (OpCodes.Ldc_I4_6);
+                                       case 7:
+                                               return this.il.Create (OpCodes.Ldc_I4_7);
+                                       case 8:
+                                               return this.il.Create (OpCodes.Ldc_I4_8);
+                                       default:
+                                               if (value >= -128 && value <= 127) {
+                                                       return this.il.Create (OpCodes.Ldc_I4_S, (sbyte) value);
+                                               } else {
+                                                       return this.il.Create (OpCodes.Ldc_I4, value);
+                                               }
+                                       }
+                                       // Required due to bug in compiler
+                                       throw new NotSupportedException();
+                               case TypeCode.Single:
+                                       return this.il.Create (OpCodes.Ldc_R4, (float) v);
+                               case TypeCode.Double:
+                                       return this.il.Create (OpCodes.Ldc_R8, (double) v);
+                               case TypeCode.String:
+                                       return this.il.Create (OpCodes.Ldstr, (string) v);
+                               default:
+                                       throw new NotSupportedException ("Cannot handle constant: " + vTypeCode);
+                               }
+                               // Required due to bug in compiler
+                               throw new NotSupportedException();
+                       });
+
+                       return e;
+               }
+
+               private Expr VisitBinary (ExprBinaryOp e, Func<Instruction> fnCreateIl)
+               {
+                       this.Visit (e.Left);
+                       this.Visit (e.Right);
+                       var inst = fnCreateIl ();
+                       this.Emit (e, inst);
+                       return e;
+               }
+
+               protected override Expr VisitCompareLessThan (ExprCompareLessThan e)
+               {
+                       return this.VisitBinary (e, () => this.il.Create (e.IsSigned ? OpCodes.Clt : OpCodes.Clt_Un));
+               }
+
+               protected override Expr VisitCompareGreaterThan (ExprCompareGreaterThan e)
+               {
+                       return this.VisitBinary (e, () => this.il.Create (e.IsSigned ? OpCodes.Cgt : OpCodes.Cgt_Un));
+               }
+
+               protected override Expr VisitCompareEqual (ExprCompareEqual e)
+               {
+                       return this.VisitBinary (e, () => this.il.Create (OpCodes.Ceq));
+               }
+
+               protected override Expr VisitAdd (ExprAdd e)
+               {
+                       return this.VisitBinary (e, () => {
+                               if (!e.Overflow) {
+                                       return this.il.Create (OpCodes.Add);
+                               } else {
+                                       return this.il.Create (e.IsSigned ? OpCodes.Add_Ovf : OpCodes.Add_Ovf_Un);
+                               }
+                       });
+               }
+
+               protected override Expr VisitSub (ExprSub e)
+               {
+                       return this.VisitBinary (e, () => {
+                               if (!e.Overflow) {
+                                       return this.il.Create (OpCodes.Sub);
+                               } else {
+                                       return this.il.Create (e.IsSigned ? OpCodes.Sub_Ovf : OpCodes.Sub_Ovf_Un);
+                               }
+                       });
+               }
+
+               protected override Expr VisitCall (ExprCall e)
+               {
+                       foreach (var param in e.Parameters) {
+                               this.Visit (param);
+                       }
+                       var instCall = this.il.Create (OpCodes.Call, e.Method);
+                       this.Emit (e, instCall);
+                       return e;
+               }
+
+               protected override Expr VisitReturn (ExprReturn e)
+               {
+                       var instReturn = this.il.Create (OpCodes.Ret);
+                       this.Emit (e, instReturn);
+                       return e;
+               }
+
+               protected override Expr VisitBox (ExprBox e)
+               {
+                       this.Visit (e.ExprToBox);
+                       var instBox = this.il.Create (OpCodes.Box, e.ReturnType);
+                       this.Emit (e, instBox);
+                       return e;
+               }
+
+               protected override Expr VisitConv (ExprConv e)
+               {
+                       this.Visit (e.ExprToConvert);
+                       Instruction instConv;
+                       switch (e.ConvToType) {
+                       case TypeCode.Int32:
+                               instConv = this.il.Create (OpCodes.Conv_I4);
+                               break;
+                       case TypeCode.Int64:
+                               instConv = this.il.Create (OpCodes.Conv_I8);
+                               break;
+                       default:
+                               throw new NotSupportedException ("Cannot conv to: " + e.ConvToType);
+                       }
+                       this.Emit (e, instConv);
+                       return e;
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/ExprVisitor.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/ExprVisitor.cs
new file mode 100644 (file)
index 0000000..522685f
--- /dev/null
@@ -0,0 +1,163 @@
+//
+// ExprVisitor.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.Ast;
+
+namespace Mono.CodeContracts.Rewrite.AstVisitors {
+       abstract class ExprVisitor {
+
+               public virtual Expr Visit (Expr e)
+               {
+                       switch (e.ExprType) {
+                       case ExprType.Block:
+                               return this.VisitBlock ((ExprBlock) e);
+                       case ExprType.Nop:
+                               return this.VisitNop ((ExprNop) e);
+                       case ExprType.Call:
+                               return this.VisitCall ((ExprCall) e);
+                       case ExprType.CompareEqual:
+                               return this.VisitCompareEqual ((ExprCompareEqual) e);
+                       case ExprType.CompareLessThan:
+                               return this.VisitCompareLessThan ((ExprCompareLessThan) e);
+                       case ExprType.CompareGreaterThan:
+                               return this.VisitCompareGreaterThan ((ExprCompareGreaterThan) e);
+                       case ExprType.Add:
+                               return this.VisitAdd ((ExprAdd) e);
+                       case ExprType.Sub:
+                               return this.VisitSub ((ExprSub) e);
+                       case ExprType.LoadArg:
+                               return this.VisitLoadArg ((ExprLoadArg) e);
+                       case ExprType.LoadConstant:
+                               return this.VisitLoadConstant ((ExprLoadConstant) e);
+                       case ExprType.Return:
+                               return this.VisitReturn ((ExprReturn) e);
+                       case ExprType.Box:
+                               return this.VisitBox ((ExprBox) e);
+                       case ExprType.Conv:
+                               return this.VisitConv ((ExprConv) e);
+                       default:
+                               throw new NotSupportedException ("Cannot handle: " + e.ExprType);
+                       }
+               }
+
+               protected virtual Expr VisitCollection (IEnumerable<Expr> collection, Expr e, Func<IEnumerable<Expr>, Expr> fnCreateNew)
+               {
+                       int index = 0;
+                       List<Expr> exprs = null;
+                       foreach (var expr in collection) {
+                               Expr exprVisited = this.Visit (expr);
+                               if (exprs != null || exprVisited != expr) {
+                                       if (exprs == null) {
+                                               exprs = new List<Expr> (collection.Take (index));
+                                       }
+                                       exprs.Add (exprVisited);
+                               }
+                               index++;
+                       }
+                       if (exprs == null) {
+                               return e;
+                       } else {
+                               return fnCreateNew(exprs);
+                       }
+               }
+
+               protected Expr VisitCollection (Expr e, Func<IEnumerable<Expr>, Expr> fnCreateNew, params Expr [] collection)
+               {
+                       return this.VisitCollection (collection, e, fnCreateNew);
+               }
+
+               protected virtual Expr VisitBlock (ExprBlock e)
+               {
+                       return this.VisitCollection (e.Exprs, e, exprs => new ExprBlock (e.MethodInfo, exprs));
+               }
+
+               protected virtual Expr VisitNop (ExprNop e)
+               {
+                       return e;
+               }
+
+               protected virtual Expr VisitLoadArg (ExprLoadArg e)
+               {
+                       return e;
+               }
+
+               protected virtual Expr VisitLoadConstant (ExprLoadConstant e)
+               {
+                       return e;
+               }
+
+               protected virtual Expr VisitCompareLessThan (ExprCompareLessThan e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprCompareLessThan (e.MethodInfo, exprs.First (), exprs.ElementAt (1), e.Signage), e.Left, e.Right);
+               }
+
+               protected virtual Expr VisitCompareGreaterThan (ExprCompareGreaterThan e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprCompareGreaterThan (e.MethodInfo, exprs.First (), exprs.ElementAt (1), e.Signage), e.Left, e.Right);
+               }
+
+               protected virtual Expr VisitCompareEqual (ExprCompareEqual e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprCompareEqual (e.MethodInfo, exprs.First (), exprs.ElementAt (1)), e.Left, e.Right);
+               }
+
+               protected virtual Expr VisitAdd (ExprAdd e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprAdd (e.MethodInfo, exprs.First (), exprs.ElementAt (1), e.Signage, e.Overflow), e.Left, e.Right);
+               }
+
+               protected virtual Expr VisitSub (ExprSub e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprSub (e.MethodInfo, exprs.First (), exprs.ElementAt (1), e.Signage, e.Overflow), e.Left, e.Right);
+               }
+
+               protected virtual Expr VisitCall (ExprCall e)
+               {
+                       return this.VisitCollection (e.Parameters, e, exprs => new ExprCall (e.MethodInfo, e.Method, exprs));
+               }
+
+               protected virtual Expr VisitReturn (ExprReturn e)
+               {
+                       return e;
+               }
+
+               protected virtual Expr VisitBox (ExprBox e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprBox (e.MethodInfo, exprs.First ()), e.ExprToBox);
+               }
+
+               protected virtual Expr VisitConv (ExprConv e)
+               {
+                       return this.VisitCollection (e, exprs => new ExprConv (e.MethodInfo, exprs.First (), e.ConvToType), e.ExprToConvert);
+               }
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/InstructionExtentVisitor.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/InstructionExtentVisitor.cs
new file mode 100644 (file)
index 0000000..64eebbd
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// InstructionExtentVisitor.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.Ast;
+using Mono.Cecil.Cil;
+
+namespace Mono.CodeContracts.Rewrite.AstVisitors {
+       class InstructionExtentVisitor : ExprVisitor {
+
+               public InstructionExtentVisitor (Dictionary<Expr, Instruction> instructionLookup)
+               {
+                       this.instructionLookup = instructionLookup;
+               }
+
+               private Dictionary<Expr, Instruction> instructionLookup;
+               private List<Instruction> instructions = new List<Instruction> ();
+
+               public IEnumerable<Instruction> Instructions {
+                       get {
+                               return this.instructions.OrderBy (x => x.Offset);
+                       }
+               }
+
+               public override Expr Visit (Expr e)
+               {
+                       Instruction inst;
+                       if (this.instructionLookup.TryGetValue (e, out inst)) {
+                               this.instructions.Add (inst);
+                       }
+                       return base.Visit (e);
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/SourcePositionVisitor.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite.AstVisitors/SourcePositionVisitor.cs
new file mode 100644 (file)
index 0000000..5db8ebd
--- /dev/null
@@ -0,0 +1,118 @@
+//
+// SourcePositionVisitor.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.Ast;
+using Mono.Cecil.Cil;
+
+namespace Mono.CodeContracts.Rewrite.AstVisitors {
+       class SourcePositionVisitor : ExprVisitor {
+
+               public struct CodePosition {
+
+                       public static readonly CodePosition Empty = new CodePosition ();
+
+                       public CodePosition (int line, int column)
+                               : this ()
+                       {
+                               this.Line = line;
+                               this.Column = column;
+                       }
+
+                       public int Line { get; private set; }
+                       public int Column { get; private set; }
+
+                       public bool IsEmpty {
+                               get {
+                                       return this.Line == 0 && this.Column == 0;
+                               }
+                       }
+
+                       public static bool operator < (CodePosition a, CodePosition b)
+                       {
+                               if (a.Line < b.Line) {
+                                       return true;
+                               }
+                               if (a.Line > b.Line) {
+                                       return false;
+                               }
+                               return a.Column < b.Column;
+                       }
+
+                       public static bool operator > (CodePosition a, CodePosition b)
+                       {
+                               if (a.Line > b.Line) {
+                                       return true;
+                               }
+                               if (a.Line < b.Line) {
+                                       return false;
+                               }
+                               return a.Column > b.Column;
+                       }
+
+               }
+
+               public SourcePositionVisitor (Dictionary<Expr, Instruction> instructionLookup)
+               {
+                       this.instructionLookup = instructionLookup;
+                       this.SourceCodeFileName = null;
+                       this.StartPosition = CodePosition.Empty;
+                       this.EndPosition = CodePosition.Empty;
+               }
+
+               private Dictionary<Expr, Instruction> instructionLookup;
+
+               public string SourceCodeFileName { get; private set; }
+               public CodePosition StartPosition { get; private set; }
+               public CodePosition EndPosition { get; private set; }
+
+               public override Expr Visit (Expr e)
+               {
+                       Instruction inst;
+                       if (this.instructionLookup.TryGetValue (e, out inst)) {
+                               var seq = inst.SequencePoint;
+                               if (seq != null) {
+                                       this.SourceCodeFileName = seq.Document.Url;
+                                       var instStart = new CodePosition(seq.StartLine, seq.StartColumn);
+                                       if (this.StartPosition.IsEmpty || instStart < this.StartPosition) {
+                                               this.StartPosition = instStart;
+                                       }
+                                       var instEnd = new CodePosition (seq.EndLine, seq.EndColumn);
+                                       if (this.EndPosition.IsEmpty || instEnd > this.EndPosition) {
+                                               this.EndPosition = instEnd;
+                                       }
+                               }
+                       }
+                       return base.Visit (e);
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/AssemblyRef.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/AssemblyRef.cs
new file mode 100644 (file)
index 0000000..e447a30
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// AssemblyRef.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.IO;
+
+namespace Mono.CodeContracts.Rewrite {
+       public struct AssemblyRef {
+
+               public struct TwoStreams {
+
+                       public TwoStreams (Stream assembly, Stream symbols)
+                               : this ()
+                       {
+                               this.Assembly = assembly;
+                               this.Symbols = symbols;
+                       }
+
+                       public Stream Assembly { get; private set; }
+                       public Stream Symbols { get; private set; }
+
+               }
+
+               public AssemblyRef (string filename)
+                       : this ()
+               {
+                       this.Filename = filename;
+               }
+
+               public AssemblyRef (TwoStreams streams)
+                       : this ()
+               {
+                       this.Streams = streams;
+               }
+
+               public string Filename { get; private set; }
+               public TwoStreams Streams { get; private set; }
+
+               public bool IsFilename {
+                       get {
+                               return this.Filename != null;
+                       }
+               }
+
+               public bool IsStream {
+                       get {
+                               return this.Streams.Assembly != null;
+                       }
+               }
+
+               public bool IsSet {
+                       get {
+                               return this.Filename != null || this.Streams.Assembly != null;
+                       }
+               }
+
+               public static implicit operator AssemblyRef (string filename)
+               {
+                       return new AssemblyRef (filename);
+               }
+
+               public static implicit operator AssemblyRef (Stream stream)
+               {
+                       return new AssemblyRef (new TwoStreams (stream, null));
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ConditionTextExtractor.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ConditionTextExtractor.cs
new file mode 100644 (file)
index 0000000..d913573
--- /dev/null
@@ -0,0 +1,152 @@
+//
+// ConditionTextExtractor.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.AstVisitors;
+using System.IO;
+
+namespace Mono.CodeContracts.Rewrite {
+       class ConditionTextExtractor {
+
+               public ConditionTextExtractor (string filename, SourcePositionVisitor.CodePosition start, SourcePositionVisitor.CodePosition end)
+               {
+                       this.filename = filename;
+                       this.start = start;
+                       this.end = end;
+               }
+
+               private string filename;
+               private SourcePositionVisitor.CodePosition start, end;
+
+               enum State {
+                       FunctionName,
+                       Parameters,
+               };
+
+               private State state;
+
+               public string GetConditionText ()
+               {
+                       if (this.filename == null || this.start.IsEmpty || this.end.IsEmpty){
+                               return "<unknown source code position>";
+                       }
+                       string[] lines;
+                       try {
+                               lines = File.ReadAllLines (this.filename);
+                       } catch {
+                               return "<cannot access source code>";
+                       }
+                       try {
+                               StringBuilder sb = new StringBuilder ();
+                               for (int i = this.start.Line; i <= this.end.Line; i++) {
+                                       string line = lines [i - 1];
+                                       if (i == this.end.Line && this.end.Column != 0) {
+                                               line = line.Substring (0, this.end.Column - 1);
+                                       }
+                                       if (i == this.start.Line && this.start.Column != 0) {
+                                               line = line.Substring (this.start.Column - 1);
+                                       }
+                                       sb.Append (line.Trim());
+                               }
+                               string cndStr = sb.ToString ();
+       
+                               this.state = State.FunctionName;
+       
+                               var cnd = this.RunStateMachine (cndStr);
+       
+                               return cnd.ToString ().Trim ();
+                       } catch {
+                               return "<source-code parse error>";
+                       }
+               }
+
+               private StringBuilder RunStateMachine (string line)
+               {
+                       StringBuilder cnd = new StringBuilder ();
+                       int inBrackets = 0;
+                       bool inDoubleQuotes = false;
+                       bool inSingleQuotes = false;
+                       bool inEscape = false;
+                       foreach (char c in line) {
+                               switch (this.state) {
+                               case State.FunctionName:
+                                       if (c == '(') {
+                                               this.state = State.Parameters;
+                                       }
+                                       break;
+                               case State.Parameters:
+                                       switch (c) {
+                                       case ',':
+                                               if (inBrackets == 0 && !inDoubleQuotes && !inSingleQuotes) {
+                                                       return cnd;
+                                               }
+                                               break;
+                                       case '(':
+                                               if (!inDoubleQuotes && !inSingleQuotes) {
+                                                       inBrackets++;
+                                               }
+                                               break;
+                                       case ')':
+                                               if (!inDoubleQuotes && !inSingleQuotes) {
+                                                       if (inBrackets == 0) {
+                                                               return cnd;
+                                                       }
+                                                       inBrackets--;
+                                               }
+                                               break;
+                                       case '"':
+                                               if (!inEscape) {
+                                                       inDoubleQuotes = !inDoubleQuotes;
+                                               }
+                                               break;
+                                       case '\'':
+                                               if (!inEscape) {
+                                                       inSingleQuotes = !inSingleQuotes;
+                                               }
+                                               break;
+                                       case '\\':
+                                               inEscape = true;
+                                               goto forceEscape;
+                                       }
+                                       inEscape = false;
+                               forceEscape:
+                                       cnd.Append (c);
+                                       break;
+                               default:
+                                       throw new NotSupportedException ("Cannot handle state: " + this.state);
+                               }
+                       }
+
+                       return new StringBuilder ("<bad source code>");
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractRequiresInfo.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractRequiresInfo.cs
new file mode 100644 (file)
index 0000000..64de50d
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// ContractRequiresInfo.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.Ast;
+
+namespace Mono.CodeContracts.Rewrite {
+       class ContractRequiresInfo {
+
+               public ContractRequiresInfo (Expr originalExpr, Expr rewrittenExpr)
+               {
+                       this.OriginalExpr = originalExpr;
+                       this.RewrittenExpr = rewrittenExpr;
+               }
+
+               public Expr OriginalExpr { get; private set; }
+               public Expr RewrittenExpr { get; private set; }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs
new file mode 100644 (file)
index 0000000..984e8bf
--- /dev/null
@@ -0,0 +1,290 @@
+//
+// ContractRuntime.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+using System.Diagnostics.Contracts;
+using Mono.Cecil.Cil;
+using System.Diagnostics.Contracts.Internal;
+using System.Diagnostics;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.CompilerServices;
+
+namespace Mono.CodeContracts.Rewrite {
+       class ContractsRuntime {
+
+               private const string Namespace = "System.Diagnostics.Contracts";
+
+               public ContractsRuntime (ModuleDefinition module, RewriterOptions options)
+               {
+                       this.module = module;
+                       this.options = options;
+               }
+
+               private ModuleDefinition module;
+               private RewriterOptions options;
+
+               private TypeDefinition typeContractsRuntime = null;
+               private TypeDefinition typeContractException = null;
+               private MethodDefinition methodContractExceptionCons = null;
+               private MethodDefinition methodTriggerFailure = null;
+               private MethodDefinition methodReportFailure = null;
+               private MethodDefinition methodRequires = null;
+
+               private void EnsureTypeContractRuntime ()
+               {
+                       if (this.typeContractsRuntime == null) {
+                               // namespace System.Diagnostics.Contracts {
+                               //     [CompilerGenerated]
+                               //     private static class __ContractsRuntime {
+                               //     }
+                               // }
+                               
+                               // Create type
+                               TypeReference typeObject = this.module.Import (typeof (object));
+                               TypeDefinition type = new TypeDefinition ("__ContractsRuntime", Namespace,
+                                       TypeAttributes.Abstract | TypeAttributes.Sealed | TypeAttributes.NotPublic | TypeAttributes.AnsiClass | TypeAttributes.AutoClass, // | TypeAttributes.BeforeFieldInit,
+                                       typeObject);
+                               this.module.Types.Add (type);
+                               // Attach custom attributes
+                               var attrCompilerGeneratedCons = typeof (CompilerGeneratedAttribute).GetConstructor (Type.EmptyTypes);
+                               CustomAttribute attrCompilerGenerated = new CustomAttribute (this.module.Import (attrCompilerGeneratedCons));
+                               type.CustomAttributes.Add (attrCompilerGenerated);
+                               // Store type
+                               this.typeContractsRuntime = type;
+                       }
+               }
+
+               private void EnsureTypeContractException ()
+               {
+                       if (this.options.ThrowOnFailure && this.typeContractException == null) {
+                               // [CompilerGenerated]
+                               // private class ContractException : Exception {
+                               //     internal ContractException(ContractFailureKind kind, string usermsg, string condition, Exception inner)
+                               //         : base(failure, inner)
+                               //     {
+                               //     }
+                               // }
+                               
+                               // Prepare type references
+                               TypeReference typeVoid = this.module.Import (typeof (void));
+                               TypeReference typeContractFailureKind = this.module.Import (typeof (ContractFailureKind));
+                               TypeReference typeString = this.module.Import (typeof (string));
+                               TypeReference typeException = this.module.Import (typeof (Exception));
+                               // Create type
+                               TypeDefinition type = new TypeDefinition ("ContractException", Namespace,
+                                       TypeAttributes.NestedPrivate | TypeAttributes.AnsiClass | TypeAttributes.AutoClass, typeException);
+                               //this.typeContractsRuntime.NestedTypes.Add (type);
+                               this.module.Types.Add(type);
+                               // Create constructor
+                               MethodDefinition cons = new MethodDefinition (".ctor",
+                                       MethodAttributes.Assem | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName, typeVoid);
+                               cons.Parameters.Add (new ParameterDefinition ("kind", 1, ParameterAttributes.None, typeContractFailureKind));
+                               cons.Parameters.Add (new ParameterDefinition ("failure", 2, ParameterAttributes.None, typeString));
+                               cons.Parameters.Add (new ParameterDefinition ("usermsg", 3, ParameterAttributes.None, typeString));
+                               cons.Parameters.Add (new ParameterDefinition ("condition", 4, ParameterAttributes.None, typeString));
+                               cons.Parameters.Add (new ParameterDefinition ("inner", 5, ParameterAttributes.None, typeException));
+                               var il = cons.Body.CilWorker;
+                               il.Emit (OpCodes.Ldarg_0);
+                               il.Emit (OpCodes.Ldarg_2);
+                               il.Emit (OpCodes.Ldarg_S, cons.Parameters [4]);
+                               MethodReference mExceptionCons = this.module.Import (typeof (Exception).GetConstructor (new [] { typeof (string), typeof (Exception) }));
+                               il.Emit (OpCodes.Call, mExceptionCons);
+                               il.Emit (OpCodes.Ret);
+                               type.Methods.Add (cons);
+                               // Attach custom attributes
+                               var attrCompilerGeneratedCons = typeof (CompilerGeneratedAttribute).GetConstructor (Type.EmptyTypes);
+                               CustomAttribute attrCompilerGenerated = new CustomAttribute (this.module.Import (attrCompilerGeneratedCons));
+                               type.CustomAttributes.Add (attrCompilerGenerated);
+                               // Store constructor and type
+                               this.methodContractExceptionCons = cons;
+                               this.typeContractException = type;
+                       }
+               }
+
+               private void EnsureMethodTriggerFailure ()
+               {
+                       if (this.methodTriggerFailure == null) {
+                               // if the ThrowOnFailure option is true, then:
+                               // internal static void TriggerFailure(ContractFailureKind kind, string message, string userMessage, string conditionText, Exception inner)
+                               // {
+                               //     throw new ContractException(kind, message, userMessage, conditionText, inner);
+                               // }
+                               
+                               // if the ThrowOnFailure option is false, then:
+                               // internal static void TriggerFailure(ContractFailureKind kind, string message, string userMessage, string conditionText, Exception inner)
+                               // {
+                               //     Debug.Fail(message, userMessage);
+                               // }
+                               
+                               // Prepare type references
+                               TypeReference typeVoid = this.module.Import (typeof (void));
+                               TypeReference typeContractFailureKind = this.module.Import (typeof (ContractFailureKind));
+                               TypeReference typeString = this.module.Import (typeof (string));
+                               TypeReference typeException = this.module.Import (typeof (Exception));
+                               // Create method
+                               MethodDefinition method = new MethodDefinition ("TriggerFailure",
+                                       MethodAttributes.Assem | MethodAttributes.Static, typeVoid);
+                               method.Parameters.Add (new ParameterDefinition ("kind", 1, ParameterAttributes.None, typeContractFailureKind));
+                               method.Parameters.Add (new ParameterDefinition ("message", 2, ParameterAttributes.None, typeString));
+                               method.Parameters.Add (new ParameterDefinition ("userMessage", 3, ParameterAttributes.None, typeString));
+                               method.Parameters.Add (new ParameterDefinition ("conditionText", 4, ParameterAttributes.None, typeString));
+                               method.Parameters.Add (new ParameterDefinition ("inner", 5, ParameterAttributes.None, typeException));
+                               var il = method.Body.CilWorker;
+                               if (this.options.ThrowOnFailure) {
+                                       il.Emit (OpCodes.Ldarg_0);
+                                       il.Emit (OpCodes.Ldarg_1);
+                                       il.Emit (OpCodes.Ldarg_2);
+                                       il.Emit (OpCodes.Ldarg_3);
+                                       il.Emit (OpCodes.Ldarg_S, method.Parameters [4]);
+                                       il.Emit (OpCodes.Newobj, this.methodContractExceptionCons);
+                                       il.Emit (OpCodes.Throw);
+                               } else {
+                                       var mDebugFail = typeof (Debug).GetMethod ("Fail", new [] { typeof (string), typeof(string) });
+                                       MethodReference methodDebugFail = this.module.Import (mDebugFail);
+                                       il.Emit (OpCodes.Ldarg_1);
+                                       il.Emit (OpCodes.Ldarg_2);
+                                       il.Emit (OpCodes.Call, methodDebugFail);
+                                       il.Emit (OpCodes.Ret);
+                               }
+                               this.typeContractsRuntime.Methods.Add (method);
+                               this.methodTriggerFailure = method;
+                       }
+               }
+
+               private void EnsureMethodReportFailure ()
+               {
+                       if (this.methodReportFailure == null) {
+                               // internal static void ReportFailure(ContractFailureKind kind, string message, string conditionText, Exception inner)
+                               // {
+                               //     string s = ContractHelper.RaiseContractFailedEvent(kind, message, conditionText, inner);
+                               //     if (s != null) {
+                               //         TriggerFailure(kind, s, message, conditionText, inner);
+                               //     }
+                               // }
+                               
+                               // Prepare type references
+                               TypeReference typeVoid = this.module.Import (typeof (void));
+                               TypeReference typeContractFailureKind = this.module.Import (typeof (ContractFailureKind));
+                               TypeReference typeString = this.module.Import (typeof (string));
+                               TypeReference typeException = this.module.Import (typeof (Exception));
+                               MethodReference mRaiseContractFailedEvent = this.module.Import (typeof (ContractHelper).GetMethod ("RaiseContractFailedEvent"));
+                               // Create method
+                               MethodDefinition method = new MethodDefinition ("ReportFailure",
+                                       MethodAttributes.Assem | MethodAttributes.Static, typeVoid);
+                               method.Parameters.Add (new ParameterDefinition ("kind", 1, ParameterAttributes.None, typeContractFailureKind));
+                               method.Parameters.Add (new ParameterDefinition ("message", 2, ParameterAttributes.None, typeString));
+                               method.Parameters.Add (new ParameterDefinition ("conditionText", 3, ParameterAttributes.None, typeString));
+                               method.Parameters.Add (new ParameterDefinition ("inner", 4, ParameterAttributes.None, typeException));
+                               VariableDefinition vMsg = new VariableDefinition ("sMsg", 0, method, typeString);
+                               method.Body.Variables.Add (vMsg);
+                               method.Body.InitLocals = true;
+                               var il = method.Body.CilWorker;
+                               il.Emit (OpCodes.Ldarg_0);
+                               il.Emit (OpCodes.Ldarg_1);
+                               il.Emit (OpCodes.Ldarg_2);
+                               il.Emit (OpCodes.Ldarg_3);
+                               il.Emit (OpCodes.Call, mRaiseContractFailedEvent);
+                               il.Emit (OpCodes.Stloc_0);
+                               il.Emit (OpCodes.Ldloc_0);
+                               var instRet = il.Create (OpCodes.Ret);
+                               il.Emit (OpCodes.Brfalse_S, instRet);
+                               il.Emit (OpCodes.Ldarg_0);
+                               il.Emit (OpCodes.Ldloc_0);
+                               il.Emit (OpCodes.Ldarg_1);
+                               il.Emit (OpCodes.Ldarg_2);
+                               il.Emit (OpCodes.Ldarg_3);
+                               il.Emit (OpCodes.Call, this.methodTriggerFailure);
+                               il.Append (instRet);
+                               this.typeContractsRuntime.Methods.Add (method);
+                               this.methodReportFailure = method;
+                       }
+               }
+
+               private void EnsureGlobal ()
+               {
+                       this.EnsureTypeContractRuntime ();
+                       this.EnsureTypeContractException ();
+                       this.EnsureMethodTriggerFailure ();
+                       this.EnsureMethodReportFailure ();
+               }
+
+               public MethodDefinition GetRequires ()
+               {
+                       this.EnsureGlobal ();
+                       if (this.methodRequires == null) {
+                               // [DebuggerNonUserCode]
+                               // [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
+                               // internal static void Requires(bool condition, string message, string conditionText)
+                               // {
+                               //     if (!condition) {
+                               //         ReportFailure(ContractFailureKind.Precondition, message, conditionText, null);
+                               //     }
+                               // }
+                               
+                               // Prepare type references
+                               TypeReference typeVoid = this.module.Import (typeof (void));
+                               TypeReference typeBoolean = this.module.Import (typeof (bool));
+                               TypeReference typeString = this.module.Import (typeof (string));
+                               // Create method
+                               MethodDefinition method = new MethodDefinition ("Requires",
+                                   MethodAttributes.Assem | MethodAttributes.Static, typeVoid);
+                               method.Parameters.Add (new ParameterDefinition ("condition", 1, ParameterAttributes.None, typeBoolean));
+                               method.Parameters.Add (new ParameterDefinition ("message", 2, ParameterAttributes.None, typeString));
+                               method.Parameters.Add (new ParameterDefinition ("conditionText", 3, ParameterAttributes.None, typeString));
+                               var il = method.Body.CilWorker;
+                               il.Emit (OpCodes.Ldarg_0);
+                               var instRet = il.Create(OpCodes.Ret);
+                               il.Emit (OpCodes.Brtrue_S, instRet);
+                               il.Emit (OpCodes.Ldc_I4_0); // Assumes ContractFailureKind.Precondition == 0
+                               il.Emit (OpCodes.Ldarg_1);
+                               il.Emit (OpCodes.Ldarg_2);
+                               il.Emit (OpCodes.Ldnull);
+                               il.Emit (OpCodes.Call, this.methodReportFailure);
+                               il.Append (instRet);
+                               this.typeContractsRuntime.Methods.Add (method);
+                               // Attach custom attributes
+                               var attrDebugNonUserCodeCons = typeof (DebuggerNonUserCodeAttribute).GetConstructor (Type.EmptyTypes);
+                               CustomAttribute attrDebugNonUserCode = new CustomAttribute (this.module.Import (attrDebugNonUserCodeCons));
+                               method.CustomAttributes.Add (attrDebugNonUserCode);
+                               var attrReliabilityContractCons = typeof (ReliabilityContractAttribute).GetConstructor (new [] { typeof (Consistency), typeof (Cer) });
+                               // Blob for attribute: new ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)
+                               byte [] blob = new byte [] { 1, 0, 3, 0, 0, 0, 1, 0, 0, 0 };
+                               CustomAttribute attrReliabilityContract = new CustomAttribute (this.module.Import (attrReliabilityContractCons), blob);
+                               method.CustomAttributes.Add (attrReliabilityContract);
+                               // Store method
+                               this.methodRequires = method;
+                       }
+                       return this.methodRequires;
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/Decompile.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/Decompile.cs
new file mode 100644 (file)
index 0000000..007a4fd
--- /dev/null
@@ -0,0 +1,188 @@
+//
+// Decompile.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.Ast;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+
+namespace Mono.CodeContracts.Rewrite {
+
+       class Decompile {
+
+               public Decompile (ModuleDefinition module, MethodDefinition method)
+               {
+                       this.method = method;
+                       this.exprs = new Stack<Expr> ();
+                       this.Instructions = new Dictionary<Expr, Instruction> ();
+                       this.methodInfo = new MethodInfo (module, method);
+                       this.gen = new ExprGen (this.methodInfo);
+               }
+
+               private MethodInfo methodInfo;
+               private MethodDefinition method;
+               private Stack<Expr> exprs;
+               private ExprGen gen;
+
+               public Dictionary<Expr, Instruction> Instructions { get; private set; }
+
+               public Expr Go (bool failQuietly = true)
+               {
+                       Instruction unknownInst = null;
+                       var insts = this.method.Body.Instructions;
+                       foreach (Instruction inst in insts) {
+                               if (failQuietly) {
+                                       if (unknownInst == null) {
+                                               try {
+                                                       Expr expr = this.ProcessInst (inst);
+                                                       this.Instructions.Add (expr, inst);
+                                                       this.exprs.Push (expr);
+                                               } catch (NotSupportedException) {
+                                                       unknownInst = inst;
+                                               }
+                                       } else {
+                                               // Met unknown instruction, so check that there are no more contracts
+                                               if (inst.OpCode.OperandType == OperandType.InlineMethod) {
+                                                       MethodReference method = (MethodReference) inst.Operand;
+                                                       if (method.DeclaringType.FullName == "System.Diagnostics.Contracts.Contract") {
+                                                               throw new NotSupportedException ("Unknown instruction in contract: " + unknownInst);
+                                                       }
+                                               }
+                                       }
+                               } else {
+                                       Expr expr = this.ProcessInst (inst);
+                                       this.Instructions.Add (expr, inst);
+                                       this.exprs.Push (expr);
+                               }
+                       }
+
+                       Expr decompiled = new ExprBlock (this.methodInfo, this.exprs.Reverse ().ToArray ());
+                       return decompiled;
+               }
+
+               private Expr ProcessInst (Instruction inst)
+               {
+                       var opcode = inst.OpCode.Code;
+                       switch (opcode) {
+                       case Code.Nop:
+                               return this.gen.Nop ();
+                       case Code.Ldarg_0:
+                       case Code.Ldarg_1:
+                       case Code.Ldarg_2:
+                       case Code.Ldarg_3:
+                               return this.gen.LoadArg ((int) (opcode - Code.Ldarg_0));
+                       case Code.Ldarg_S:
+                               return this.gen.LoadArg ((ParameterDefinition) inst.Operand);
+                       case Code.Ldnull:
+                               return this.gen.LoadConstant (null);
+                       case Code.Ldc_I4_M1:
+                       case Code.Ldc_I4_0:
+                       case Code.Ldc_I4_1:
+                       case Code.Ldc_I4_2:
+                       case Code.Ldc_I4_3:
+                       case Code.Ldc_I4_4:
+                       case Code.Ldc_I4_5:
+                       case Code.Ldc_I4_6:
+                       case Code.Ldc_I4_7:
+                       case Code.Ldc_I4_8:
+                               return this.gen.LoadConstant ((int) (opcode - Code.Ldc_I4_0));
+                       case Code.Ldc_I4_S:
+                               return this.gen.LoadConstant ((int) (sbyte) inst.Operand);
+                       case Code.Ldc_I4:
+                               return this.gen.LoadConstant ((int) inst.Operand);
+                       case Code.Ldc_R4:
+                       case Code.Ldc_R8:
+                       case Code.Ldstr:
+                               return this.gen.LoadConstant(inst.Operand);
+                       case Code.Clt:
+                       case Code.Clt_Un:
+                       case Code.Cgt:
+                       case Code.Cgt_Un:
+                       case Code.Ceq:
+                       case Code.Add:
+                       case Code.Sub:
+                               return this.ProcessBinaryOp (opcode);
+                       case Code.Call:
+                               return this.ProcessCall ((MethodReference) inst.Operand);
+                       case Code.Ret:
+                               return this.gen.Return ();
+                       case Code.Conv_I4:
+                               return this.ProcessConv (TypeCode.Int32);
+                       case Code.Conv_I8:
+                               return this.ProcessConv (TypeCode.Int64);
+                       default:
+                               throw new NotSupportedException ("Cannot handle opcode: " + inst.OpCode);
+                       }
+               }
+
+               private Expr ProcessBinaryOp (Code opcode)
+               {
+                       Expr right = this.exprs.Pop ();
+                       Expr left = this.exprs.Pop ();
+                       switch (opcode) {
+                       case Code.Ceq:
+                               return this.gen.CompareEqual (left, right);
+                       case Code.Clt:
+                               return this.gen.CompareLessThan (left, right, Sn.Signed);
+                       case Code.Clt_Un:
+                               return this.gen.CompareLessThan (left, right, Sn.Unsigned);
+                       case Code.Cgt:
+                               return this.gen.CompareGreaterThan (left, right, Sn.Signed);
+                       case Code.Cgt_Un:
+                               return this.gen.CompareGreaterThan (left, right, Sn.Unsigned);
+                       case Code.Add:
+                               return this.gen.Add (left, right, Sn.None, false);
+                       case Code.Sub:
+                               return this.gen.Sub (left, right, Sn.None, false);
+                       default:
+                               throw new NotSupportedException ("Unknown binary opcode: " + opcode);
+                       }
+               }
+
+               private Expr ProcessCall (MethodReference method)
+               {
+                       int paramCount = method.Parameters.Count;
+                       Expr [] parameterExprs = new Expr [paramCount];
+                       for (int i = 0; i < paramCount; i++) {
+                               Expr parameter = this.exprs.Pop ();
+                               parameterExprs [paramCount - i - 1] = parameter;
+                       }
+                       return this.gen.Call(method, parameterExprs);
+               }
+
+               private Expr ProcessConv (TypeCode convToType)
+               {
+                       Expr exprToConvert = this.exprs.Pop ();
+                       return this.gen.Conv(exprToConvert, convToType);
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ExprGen.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ExprGen.cs
new file mode 100644 (file)
index 0000000..e4399d6
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// ExprGen.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite.Ast;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite {
+       class ExprGen {
+
+               public ExprGen (MethodInfo methodInfo)
+               {
+                       this.methodInfo = methodInfo;
+               }
+
+               private MethodInfo methodInfo;
+
+               public ExprBlock Block (IEnumerable<Expr> exprs)
+               {
+                       return new ExprBlock (this.methodInfo, exprs);
+               }
+
+               public ExprReturn Return ()
+               {
+                       return new ExprReturn (this.methodInfo);
+               }
+
+               public ExprBox Box (Expr exprToBox)
+               {
+                       return new ExprBox (this.methodInfo, exprToBox);
+               }
+
+               public ExprNop Nop ()
+               {
+                       return new ExprNop (this.methodInfo);
+               }
+
+               public ExprLoadArg LoadArg (int index)
+               {
+                       return new ExprLoadArg (this.methodInfo, index);
+               }
+
+               public ExprLoadArg LoadArg (ParameterDefinition parameterDefinition)
+               {
+                       return this.LoadArg (parameterDefinition.Sequence);
+               }
+
+               public ExprLoadConstant LoadConstant (object value)
+               {
+                       return new ExprLoadConstant (this.methodInfo, value);
+               }
+
+               public ExprCall Call (MethodReference method, IEnumerable<Expr> parameters)
+               {
+                       return new ExprCall (this.methodInfo, method, parameters);
+               }
+
+               public ExprCompareEqual CompareEqual (Expr left, Expr right)
+               {
+                       return new ExprCompareEqual (this.methodInfo, left, right);
+               }
+
+               public ExprCompareLessThan CompareLessThan (Expr left, Expr right, Sn signage)
+               {
+                       return new ExprCompareLessThan (this.methodInfo, left, right, signage);
+               }
+
+               public ExprCompareGreaterThan CompareGreaterThan (Expr left, Expr right, Sn signage)
+               {
+                       return new ExprCompareGreaterThan (this.methodInfo, left, right, signage);
+               }
+
+               public ExprConv Conv (Expr exprToConvert, TypeCode convToType)
+               {
+                       return new ExprConv (this.methodInfo, exprToConvert, convToType);
+               }
+
+               public ExprAdd Add (Expr left, Expr right, Sn signage, bool overflow)
+               {
+                       return new ExprAdd (this.methodInfo, left, right, signage, overflow);
+               }
+
+               public ExprSub Sub (Expr left, Expr right, Sn signage, bool overflow)
+               {
+                       return new ExprSub (this.methodInfo, left, right, signage, overflow);
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/MethodInfo.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/MethodInfo.cs
new file mode 100644 (file)
index 0000000..177e7b2
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// MethodInfo.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+namespace Mono.CodeContracts.Rewrite {
+       class MethodInfo {
+
+               public MethodInfo (ModuleDefinition module, MethodDefinition method)
+               {
+                       this.Method = method;
+                       this.Module = module;
+
+                       this.typeVoid = new Lazy<TypeReference> (() => this.Module.Import (typeof (void)));
+                       this.typeObject = new Lazy<TypeReference> (() => this.Module.Import (typeof (object)));
+                       this.typeInt32 = new Lazy<TypeReference> (() => this.Module.Import (typeof (int)));
+                       this.typeInt64 = new Lazy<TypeReference> (() => this.Module.Import (typeof (long)));
+                       this.typeUInt32 = new Lazy<TypeReference> (() => this.Module.Import (typeof (uint)));
+                       this.typeBoolean = new Lazy<TypeReference> (() => this.Module.Import (typeof (bool)));
+                       this.typeString = new Lazy<TypeReference> (() => this.Module.Import (typeof (string)));
+               }
+
+               public MethodDefinition Method { get; private set; }
+               public ModuleDefinition Module { get; private set; }
+
+               private Lazy<TypeReference> typeVoid;
+               private Lazy<TypeReference> typeObject;
+               private Lazy<TypeReference> typeInt32;
+               private Lazy<TypeReference> typeInt64;
+               private Lazy<TypeReference> typeUInt32;
+               private Lazy<TypeReference> typeBoolean;
+               private Lazy<TypeReference> typeString;
+
+               public TypeReference TypeVoid {
+                       get { return this.typeVoid.Value; }
+               }
+
+               public TypeReference TypeObject {
+                       get { return this.typeObject.Value; }
+               }
+
+               public TypeReference TypeInt32 {
+                       get { return this.typeInt32.Value; }
+               }
+
+               public TypeReference TypeInt64 {
+                       get { return this.typeInt64.Value; }
+               }
+
+               public TypeReference TypeUInt32 {
+                       get { return this.typeUInt32.Value; }
+               }
+
+               public TypeReference TypeBoolean {
+                       get { return this.typeBoolean.Value; }
+               }
+
+               public TypeReference TypeString {
+                       get { return this.typeString.Value; }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/PerformRewrite.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/PerformRewrite.cs
new file mode 100644 (file)
index 0000000..dcba332
--- /dev/null
@@ -0,0 +1,174 @@
+//
+// PerformRewrite.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+using Mono.CodeContracts.Rewrite.Ast;
+using Mono.CodeContracts.Rewrite.AstVisitors;
+
+namespace Mono.CodeContracts.Rewrite {
+       class PerformRewrite {
+
+               public PerformRewrite (ISymbolWriter sym, RewriterOptions options)
+               {
+                       this.sym = sym;
+                       this.options = options;
+               }
+
+               private ISymbolWriter sym;
+               private RewriterOptions options;
+               private Dictionary<MethodDefinition, TransformContractsVisitor> rewrittenMethods = new Dictionary<MethodDefinition, TransformContractsVisitor> ();
+
+               public void Rewrite (AssemblyDefinition assembly)
+               {
+                       foreach (ModuleDefinition module in assembly.Modules) {
+                               ContractsRuntime contractsRuntime = new ContractsRuntime(module, this.options);
+
+                               var allMethods =
+                                       from type in module.Types.Cast<TypeDefinition> ()
+                                       from method in type.Methods.Cast<MethodDefinition> ()
+                                       select method;
+
+                               foreach (MethodDefinition method in allMethods.ToArray ()) {
+                                       this.RewriteMethod (module, method, contractsRuntime);
+                               }
+                       }
+               }
+
+               private void RewriteMethod (ModuleDefinition module, MethodDefinition method, ContractsRuntime contractsRuntime)
+               {
+                       if (this.rewrittenMethods.ContainsKey (method)) {
+                               return;
+                       }
+                       var overridden = this.GetOverriddenMethod (method);
+                       if (overridden != null) {
+                               this.RewriteMethod (module, overridden, contractsRuntime);
+                       }
+                       bool anyRewrites = false;
+                       var baseMethod = this.GetBaseOverriddenMethod (method);
+                       if (baseMethod != method) {
+                               // Contract inheritance must be used
+                               var vOverriddenTransform = this.rewrittenMethods [baseMethod];
+                               // Can be null if overriding an abstract method
+                               if (vOverriddenTransform != null) {
+                                       if (this.options.Level >= 2) {
+                                               // Only insert re-written contracts if level >= 2
+                                               foreach (var inheritedRequires in vOverriddenTransform.ContractRequiresInfo) {
+                                                       this.RewriteIL (method.Body, null, null, inheritedRequires.RewrittenExpr);
+                                                       anyRewrites = true;
+                                               }
+                                       }
+                               }
+                       }
+
+                       TransformContractsVisitor vTransform = null;
+                       if (method.HasBody) {
+                               vTransform = this.TransformContracts (module, method, contractsRuntime);
+                               if (this.sym != null) {
+                                       this.sym.Write (method.Body);
+                               }
+                               if (vTransform.ContractRequiresInfo.Any ()) {
+                                       anyRewrites = true;
+                               }
+                       }
+                       this.rewrittenMethods.Add (method, vTransform);
+
+                       if (anyRewrites) {
+                               Console.WriteLine (method);
+                       }
+               }
+
+               private TransformContractsVisitor TransformContracts (ModuleDefinition module, MethodDefinition method, ContractsRuntime contractsRuntime)
+               {
+                       var body = method.Body;
+                       Decompile decompile = new Decompile (module, method);
+                       var decomp = decompile.Go ();
+
+                       TransformContractsVisitor vTransform = new TransformContractsVisitor (module, method, decompile.Instructions, contractsRuntime);
+                       vTransform.Visit (decomp);
+
+                       foreach (var replacement in vTransform.ContractRequiresInfo) {
+                               // Only insert re-written contracts if level >= 2
+                               Expr rewritten = this.options.Level >= 2 ? replacement.RewrittenExpr : null;
+                               this.RewriteIL (body, decompile.Instructions, replacement.OriginalExpr, rewritten);
+                       }
+
+                       return vTransform;
+               }
+
+               private void RewriteIL (MethodBody body, Dictionary<Expr,Instruction> instructionLookup, Expr remove, Expr insert)
+               {
+                       var il = body.CilWorker;
+                       Instruction instInsertBefore;
+                       if (remove != null) {
+                               var vInstExtent = new InstructionExtentVisitor (instructionLookup);
+                               vInstExtent.Visit (remove);
+                               instInsertBefore = vInstExtent.Instructions.Last ().Next;
+                               foreach (var instRemove in vInstExtent.Instructions) {
+                                       il.Remove (instRemove);
+                               }
+                       } else {
+                               instInsertBefore = body.Instructions [0];
+                       }
+                       if (insert != null) {
+                               var compiler = new CompileVisitor (il, instructionLookup, inst => il.InsertBefore (instInsertBefore, inst));
+                               compiler.Visit (insert);
+                       }
+               }
+
+               private MethodDefinition GetOverriddenMethod (MethodDefinition method)
+               {
+                       if (method.IsNewSlot || !method.IsVirtual) {
+                               return null;
+                       }
+                       var baseType = method.DeclaringType.BaseType;
+                       if (baseType == null) {
+                               return null;
+                       }
+                       var overridden = baseType.Resolve ().Methods.Cast<MethodDefinition> ().FirstOrDefault (x => x.Name == method.Name);
+                       return overridden;
+               }
+
+               private MethodDefinition GetBaseOverriddenMethod (MethodDefinition method)
+               {
+                       var overridden = method;
+                       while (true) {
+                               var overriddenTemp = this.GetOverriddenMethod (overridden);
+                               if (overriddenTemp == null) {
+                                       return overridden;
+                               }
+                               overridden = overriddenTemp;
+                       }
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/Rewriter.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/Rewriter.cs
new file mode 100644 (file)
index 0000000..c2bd64c
--- /dev/null
@@ -0,0 +1,149 @@
+//
+// Rewriter.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.Cecil.Cil;
+using Mono.Cecil;
+using System.IO;
+using Mono.CompilerServices.SymbolWriter;
+
+namespace Mono.CodeContracts.Rewrite {
+       public class Rewriter {
+
+               public static RewriterResults Rewrite (RewriterOptions options)
+               {
+                       Rewriter rewriter = new Rewriter(options);
+                       return rewriter.RewriteImpl();
+               }
+               
+               private Rewriter(RewriterOptions options)
+               {
+                       this.options = options;
+               }
+               
+               private RewriterOptions options;
+               private List<string> warnings = new List<string> ();
+               private List<string> errors = new List<string> ();
+               private bool usingMdb = false;
+               private bool usingPdb = false;
+               
+               private void LoadSymbolReader (AssemblyDefinition assembly) {
+                       if (this.options.Assembly.IsStream && this.options.Assembly.Streams.Symbols == null) {
+                               this.warnings.Add ("-debug specified, but no symbol stream provided.");
+                       } else {
+                               try {
+                                       foreach (ModuleDefinition module in assembly.Modules) {
+                                               module.LoadSymbols ();
+                                       }
+                                       this.usingMdb = true;
+                               } catch {
+                               }
+                               if (!this.usingMdb && !this.usingPdb) {
+                                       this.warnings.Add ("-debug specified, but no MDB or PDB symbol file found.");
+                               }
+                       }
+               }
+               
+               private ISymbolWriter LoadSymbolWriter(AssemblyDefinition assembly, AssemblyRef output)
+               {
+                       // TODO: Get symbol writing to work.
+//                     ISymbolWriterProvider symProv = null;
+//                     if (this.usingMdb) {
+//                             symProv = new Mono.Cecil.Mdb.MdbWriterProvider ();
+//                     } else if (this.usingPdb) {
+//                             symProv = new Mono.Cecil.Pdb.PdbWriterProvider ();
+//                     } else {
+//                             this.warnings.Add ("-writePDBFile specified, but no symbol file found, cannot write symbols.");
+//                     }
+//                     if (symProv != null) {
+//                             return output.IsFilename ?
+//                                     symProv.GetSymbolWriter (assembly.MainModule, output.Filename) :
+//                                     symProv.GetSymbolWriter (assembly.MainModule, output.Streams.Symbols);
+//                     }
+                       return null;
+               }
+
+
+               private RewriterResults RewriteImpl ()
+               {
+                       if (!this.options.Rewrite) {
+                               return RewriterResults.Warning ("Not asked to rewrite");
+                       }
+
+                       if (!this.options.Assembly.IsSet) {
+                               return RewriterResults.Error ("No assembly given to rewrite");
+                       }
+                       AssemblyDefinition assembly = this.options.Assembly.IsFilename ?
+                               AssemblyFactory.GetAssembly (this.options.Assembly.Filename) :
+                               AssemblyFactory.GetAssembly (this.options.Assembly.Streams.Assembly);
+                       
+                       if (this.options.ForceAssemblyRename != null) {
+                               assembly.Name.Name = this.options.ForceAssemblyRename;
+                       } else if (this.options.OutputFile.IsSet && this.options.OutputFile.IsFilename) {
+                               assembly.Name.Name = Path.GetFileNameWithoutExtension(this.options.OutputFile.Filename);
+                       }
+
+                       if (options.Debug) {
+                               this.LoadSymbolReader (assembly);
+                       }
+
+                       var output = this.options.OutputFile.IsSet ? this.options.OutputFile : this.options.Assembly;
+                       ISymbolWriter symWriter = null;
+                       if (options.WritePdbFile) {
+                               if (!options.Debug) {
+                                       return RewriterResults.Error ("Must specify -debug if using -writePDBFile.");
+                               }
+                               if (output.IsStream && output.Streams.Symbols==null){
+                                       return RewriterResults.Error ("-writePDFFile specified, but no output symbol stream provided.");
+                               }
+                               symWriter = this.LoadSymbolWriter (assembly, output);
+                       }
+                       
+                       try {
+                               PerformRewrite rewriter = new PerformRewrite (symWriter, this.options);
+                               rewriter.Rewrite (assembly);
+
+                               if (output.IsFilename) {
+                                       AssemblyFactory.SaveAssembly(assembly, output.Filename);
+                               } else {
+                                       AssemblyFactory.SaveAssembly(assembly, output.Streams.Assembly);
+                               }
+                       } finally {
+                               if (symWriter != null) {
+                                       symWriter.Dispose ();
+                               }
+                       }
+
+                       return new RewriterResults (warnings, errors);
+               }
+               
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/RewriterOptions.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/RewriterOptions.cs
new file mode 100644 (file)
index 0000000..12df238
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// RewriterOptions.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite {
+       public class RewriterOptions {
+
+               public RewriterOptions ()
+               {
+                       // Initialise to defaults
+                       this.Debug = true;
+                       this.Level = 4;
+                       this.WritePdbFile = true;
+                       this.Rewrite = true;
+                       this.BreakIntoDebugger = false;
+                       this.ThrowOnFailure = false;
+                       
+                       this.ForceAssemblyRename = null;
+               }
+
+               public AssemblyRef Assembly { get; set; }
+               public bool Debug { get; set; }
+               public int Level { get; set; }
+               public bool WritePdbFile { get; set; }
+               public bool Rewrite { get; set; }
+               public bool BreakIntoDebugger { get; set; }
+               public bool ThrowOnFailure { get; set; }
+               public AssemblyRef OutputFile { get; set; }
+               
+               public string ForceAssemblyRename { get; set; }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/RewriterResults.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/RewriterResults.cs
new file mode 100644 (file)
index 0000000..6839681
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// RewriterResults.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Mono.CodeContracts.Rewrite {
+
+       public class RewriterResults {
+
+               internal static RewriterResults Warning (string warning)
+               {
+                       return new RewriterResults (new [] { warning }, null);
+               }
+
+               internal static RewriterResults Error (string error)
+               {
+                       return new RewriterResults (null, new [] { error });
+               }
+
+               internal RewriterResults (ICollection<string> warnings, ICollection<string> errors)
+               {
+                       this.warnings = warnings;
+                       this.errors = errors;
+               }
+
+               private ICollection<string> warnings, errors;
+
+               public bool AnyWarnings {
+                       get {
+                               return this.warnings != null && this.warnings.Count > 0;
+                       }
+               }
+
+               public bool AnyErrors {
+                       get {
+                               return this.errors != null && this.errors.Count > 0;
+                       }
+               }
+
+               public IEnumerable<string> Warnings {
+                       get {
+                               return this.warnings ?? Enumerable.Empty<string> ();
+                       }
+               }
+
+               public IEnumerable<string> Errors {
+                       get {
+                               return this.errors ?? Enumerable.Empty<string> ();
+                       }
+               }
+
+       }
+
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/TransformContractsVisitor.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/TransformContractsVisitor.cs
new file mode 100644 (file)
index 0000000..f4b7c14
--- /dev/null
@@ -0,0 +1,127 @@
+//
+// TransformContractsVisitor.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Mono.CodeContracts.Rewrite;
+using Mono.CodeContracts.Rewrite.Ast;
+using System.Diagnostics.Contracts;
+using Mono.Cecil;
+using Mono.CodeContracts.Rewrite.AstVisitors;
+using Mono.Cecil.Cil;
+
+namespace Mono.CodeContracts.Rewrite {
+       class TransformContractsVisitor : ExprVisitor {
+
+               public TransformContractsVisitor (ModuleDefinition module, MethodDefinition method, Dictionary<Expr, Instruction> instructionLookup, ContractsRuntime contractsRuntime)
+               {
+                       //this.module = method.Module;
+                       this.instructionLookup = instructionLookup;
+                       this.contractsRuntime = contractsRuntime;
+                       this.methodInfo = new MethodInfo (module, method);
+               }
+
+               //private ModuleDefinition module;
+               private Dictionary<Expr, Instruction> instructionLookup;
+               private ContractsRuntime contractsRuntime;
+               private MethodInfo methodInfo;
+
+               private List<ContractRequiresInfo> contractRequiresInfo = new List<ContractRequiresInfo> ();
+
+               public IEnumerable<ContractRequiresInfo> ContractRequiresInfo {
+                       get { return this.contractRequiresInfo; }
+               }
+
+               protected override Expr VisitCall (ExprCall e)
+               {
+                       var call = (ExprCall)base.VisitCall (e);
+
+                       var method = e.Method;
+                       if (method.DeclaringType.FullName == "System.Diagnostics.Contracts.Contract") {
+                               switch (method.Name) {
+                               case "Requires":
+                                       if (!method.HasGenericParameters) {
+                                               switch (method.Parameters.Count) {
+                                               case 1:
+                                                       return this.ProcessRequires1 (call);
+                                               case 2:
+                                                       return this.ProcessRequires2 (call);
+                                               default:
+                                                       throw new NotSupportedException ("Invalid number of parameters to Contract.Requires()");
+                                               }
+                                       } else {
+                                               goto default;
+                                       }
+                               default:
+                                       throw new NotSupportedException ("Cannot handle Contract." + e.Method.Name + "()");
+                               }
+                       }
+
+                       return call;
+               }
+
+               private string GetConditionString (Expr e)
+               {
+                       var vSource = new SourcePositionVisitor (this.instructionLookup);
+                       vSource.Visit (e);
+                       var extractor = new ConditionTextExtractor (vSource.SourceCodeFileName, vSource.StartPosition, vSource.EndPosition);
+                       return extractor.GetConditionText ();
+               }
+
+               private Expr ProcessRequires1 (ExprCall e)
+               {
+                       MethodDefinition mRequires = this.contractsRuntime.GetRequires ();
+                       Expr conditionExpr = e.Parameters.First ();
+                       Expr nullArgExpr = new ExprLoadConstant (this.methodInfo, null);
+                       string conditionText = this.GetConditionString (e);
+                       Expr conditionStringExpr = new ExprLoadConstant (this.methodInfo, conditionText);
+                       var call = new ExprCall (this.methodInfo, mRequires, new Expr [] { conditionExpr, nullArgExpr, conditionStringExpr });
+
+                       this.contractRequiresInfo.Add (new ContractRequiresInfo (e, call));
+
+                       return call;
+               }
+
+               private Expr ProcessRequires2 (ExprCall e)
+               {
+                       MethodDefinition mRequires = this.contractsRuntime.GetRequires ();
+                       Expr conditionExpr = e.Parameters.First ();
+                       Expr msgExpr = e.Parameters.ElementAt (1);
+                       string conditionText = this.GetConditionString (e);
+                       Expr conditionStringExpr = new ExprLoadConstant (this.methodInfo, conditionText);
+                       var call = new ExprCall (this.methodInfo, mRequires, new Expr [] { conditionExpr, msgExpr, conditionStringExpr });
+
+                       this.contractRequiresInfo.Add (new ContractRequiresInfo (e, call));
+
+                       return call;
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.dll.sources b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.dll.sources
new file mode 100644 (file)
index 0000000..e9ab18f
--- /dev/null
@@ -0,0 +1,38 @@
+../../build/common/Consts.cs
+Assembly/AssemblyInfo.cs
+Mono.CodeContracts.Rewrite/AssemblyRef.cs
+Mono.CodeContracts.Rewrite/ConditionTextExtractor.cs
+Mono.CodeContracts.Rewrite/ContractRequiresInfo.cs
+Mono.CodeContracts.Rewrite/ContractsRuntime.cs
+Mono.CodeContracts.Rewrite/Decompile.cs
+Mono.CodeContracts.Rewrite/ExprGen.cs
+Mono.CodeContracts.Rewrite/MethodInfo.cs
+Mono.CodeContracts.Rewrite/PerformRewrite.cs
+Mono.CodeContracts.Rewrite/Rewriter.cs
+Mono.CodeContracts.Rewrite/RewriterOptions.cs
+Mono.CodeContracts.Rewrite/RewriterResults.cs
+Mono.CodeContracts.Rewrite/TransformContractsVisitor.cs
+Mono.CodeContracts.Rewrite.Ast/ExprAdd.cs
+Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpArithmetic.cs
+Mono.CodeContracts.Rewrite.Ast/ExprBinaryOpComparison.cs
+Mono.CodeContracts.Rewrite.Ast/ExprBinaryOp.cs
+Mono.CodeContracts.Rewrite.Ast/ExprBlock.cs
+Mono.CodeContracts.Rewrite.Ast/ExprBox.cs
+Mono.CodeContracts.Rewrite.Ast/ExprCall.cs
+Mono.CodeContracts.Rewrite.Ast/ExprCompareEqual.cs
+Mono.CodeContracts.Rewrite.Ast/ExprCompareGreaterThan.cs
+Mono.CodeContracts.Rewrite.Ast/ExprCompareLessThan.cs
+Mono.CodeContracts.Rewrite.Ast/ExprConv.cs
+Mono.CodeContracts.Rewrite.Ast/Expr.cs
+Mono.CodeContracts.Rewrite.Ast/ExprLoadArg.cs
+Mono.CodeContracts.Rewrite.Ast/ExprLoadConstant.cs
+Mono.CodeContracts.Rewrite.Ast/ExprNop.cs
+Mono.CodeContracts.Rewrite.Ast/ExprReturn.cs
+Mono.CodeContracts.Rewrite.Ast/ExprSub.cs
+Mono.CodeContracts.Rewrite.Ast/ExprType.cs
+Mono.CodeContracts.Rewrite.Ast/Sn.cs
+Mono.CodeContracts.Rewrite.AstVisitors/CompileVisitor.cs
+Mono.CodeContracts.Rewrite.AstVisitors/ExprVisitor.cs
+Mono.CodeContracts.Rewrite.AstVisitors/InstructionExtentVisitor.cs
+Mono.CodeContracts.Rewrite.AstVisitors/SourcePositionVisitor.cs
+
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts_test.dll.sources b/mcs/class/Mono.CodeContracts/Mono.CodeContracts_test.dll.sources
new file mode 100644 (file)
index 0000000..9848091
--- /dev/null
@@ -0,0 +1,2 @@
+RewriteAndLoad.cs
+TestCCRewrite.cs
diff --git a/mcs/class/Mono.CodeContracts/Test/RewriteAndLoad.cs b/mcs/class/Mono.CodeContracts/Test/RewriteAndLoad.cs
new file mode 100644 (file)
index 0000000..c4a40bb
--- /dev/null
@@ -0,0 +1,132 @@
+//
+// RewriteAndLoad.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+using Mono.CodeContracts.Rewrite;
+using System.IO;
+using System.Linq.Expressions;
+
+namespace MonoTests.Mono.CodeContracts {
+       class RewriteAndLoad : IDisposable {
+
+               class Loader : MarshalByRefObject {
+
+                       private Assembly assembly;
+
+                       public void Load (byte [] rewrittenAssemblyBytes)
+                       {
+                               this.assembly = AppDomain.CurrentDomain.Load (rewrittenAssemblyBytes);
+                       }
+
+                       public object Call(string typeName, string methodName, object[] args)
+                       {
+                               Type type = this.assembly.GetType (typeName);
+                               if (type == null) {
+                                       Console.WriteLine ("Cannot get type: " + typeName);
+                               }
+                               var method = type.GetMethod (methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
+                               if (method == null) {
+                                       Console.WriteLine ("Cannot get method: " + methodName);
+                               }
+                               try {
+                                       return method.Invoke (null, args);
+                               } catch (TargetInvocationException e) {
+                                       throw new Exception(e.InnerException.Message);
+                               }
+                       }
+
+               }
+
+               private AppDomain testDomain = null;
+               private Loader loader = null;
+
+               public void Load ()
+               {
+                       Assembly assembly = Assembly.GetExecutingAssembly ();
+                       var appDomainSetup = new AppDomainSetup {
+                               ApplicationBase = Path.GetDirectoryName(assembly.Location)
+                       };
+                       this.testDomain = AppDomain.CreateDomain ("TestDomain", null, appDomainSetup);
+                       this.testDomain.AssemblyResolve += (s, e) => {
+                               return Assembly.LoadFrom (e.Name);
+                       };
+                       this.loader = (Loader) this.testDomain.CreateInstanceAndUnwrap (assembly.Location, typeof (Loader).FullName);
+
+                       using (var rewritten = new MemoryStream ()) {
+                               RewriterOptions options = new RewriterOptions {
+                                       ForceAssemblyRename = "RewrittenForTest",
+                                       Assembly = assembly.Location,
+                                       OutputFile = rewritten,
+                                       ThrowOnFailure = true,
+                                       WritePdbFile = false,
+                               };
+                               Rewriter.Rewrite (options);
+                               byte [] bytes = rewritten.ToArray ();
+                               this.loader.Load (bytes);
+                       }
+               }
+
+               public void Dispose ()
+               {
+                       this.loader = null;
+                       if (this.testDomain != null) {
+                               AppDomain.Unload (this.testDomain);
+                               this.testDomain = null;
+                       }
+               }
+
+               public void Call (Expression<Action> methodExpr)
+               {
+                       var e = (MethodCallExpression) methodExpr.Body;
+                       if (e.Object != null) {
+                               throw new ArgumentException ("Method must be static");
+                       }
+                       var m = e.Method;
+                       var args = e.Arguments.Select (a => {
+                               while (a.CanReduce) {
+                                       a = a.Reduce ();
+                               }
+                               switch (a.NodeType) {
+                               case ExpressionType.Constant:
+                                       return ((ConstantExpression) a).Value;
+                               case ExpressionType.MemberAccess:
+                                       return new object ();
+                               default:
+                                       throw new ArgumentException ("Cannot transfer argument");
+                               }
+                               throw new NotImplementedException();
+                       }).ToArray ();
+                       this.loader.Call (m.DeclaringType.FullName, m.Name, args);
+               }
+
+       }
+}
diff --git a/mcs/class/Mono.CodeContracts/Test/TestCCRewrite.cs b/mcs/class/Mono.CodeContracts/Test/TestCCRewrite.cs
new file mode 100644 (file)
index 0000000..9851c92
--- /dev/null
@@ -0,0 +1,426 @@
+//
+// TestCCRewrite.cs
+//
+// Authors:
+//     Chris Bacon (chrisbacon76@gmail.com)
+//
+// Copyright (C) 2010 Chris Bacon
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#define CONTRACTS_FULL
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework;
+using System.Diagnostics.Contracts;
+using System.Linq.Expressions;
+
+namespace MonoTests.Mono.CodeContracts {
+
+       [TestFixture]
+       public class TestCCRewrite {
+
+               private RewriteAndLoad ral = null;
+
+               [TestFixtureSetUp]
+               public void FixtureSetup ()
+               {
+                       this.ral = new RewriteAndLoad ();
+                       this.ral.Load ();
+               }
+
+               [TestFixtureTearDown]
+               public void FixtureTearDown ()
+               {
+                       if (this.ral != null) {
+                               this.ral.Dispose ();
+                       }
+               }
+
+               // ==
+
+               private static void TestEqualsByte (byte value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsSByte (sbyte value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsUShort (ushort value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsShort (short value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsUInt (uint value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsInt (int value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsULong (ulong value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsLong (long value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsFloat (float value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               private static void TestEqualsDouble (double value)
+               {
+                       Contract.Requires (value == 0);
+               }
+
+               // !=
+
+               private static void TestNotEqualsByte (byte value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsSByte (sbyte value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsUShort (ushort value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsShort (short value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsUInt (uint value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsInt (int value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsULong (ulong value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsLong (long value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsFloat (float value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               private static void TestNotEqualsDouble (double value)
+               {
+                       Contract.Requires (value != 0);
+               }
+
+               // <
+
+               private static void TestLessThanInt (int value)
+               {
+                       Contract.Requires (value < 10);
+               }
+
+               private static void TestLessThanUInt (uint value)
+               {
+                       Contract.Requires (value < 10);
+               }
+
+               private static void TestLessThanLong (long value)
+               {
+                       Contract.Requires (value < 10);
+               }
+
+               private static void TestLessThanULong (ulong value)
+               {
+                       Contract.Requires (value < 10);
+               }
+
+               private static void TestLessThanFloat (float value)
+               {
+                       Contract.Requires (value < 10);
+               }
+
+               private static void TestLessThanDouble (double value)
+               {
+                       Contract.Requires (value < 10);
+               }
+
+               // <=
+
+               private static void TestLessThanOrEqualInt (int value)
+               {
+                       Contract.Requires (value <= 10);
+               }
+
+               private static void TestLessThanOrEqualUInt (uint value)
+               {
+                       Contract.Requires (value <= 10);
+               }
+
+               private static void TestLessThanOrEqualLong (long value)
+               {
+                       Contract.Requires (value <= 10);
+               }
+
+               private static void TestLessThanOrEqualULong (ulong value)
+               {
+                       Contract.Requires (value <= 10);
+               }
+
+               private static void TestLessThanOrEqualFloat (float value)
+               {
+                       Contract.Requires (value <= 10);
+               }
+
+               private static void TestLessThanOrEqualDouble (double value)
+               {
+                       Contract.Requires (value <= 10);
+               }
+
+               // >
+
+               private static void TestGreaterThanInt (int value)
+               {
+                       Contract.Requires (value > 10);
+               }
+
+               private static void TestGreaterThanUInt (uint value)
+               {
+                       Contract.Requires (value > 10);
+               }
+
+               private static void TestGreaterThanLong (long value)
+               {
+                       Contract.Requires (value > 10);
+               }
+
+               private static void TestGreaterThanULong (ulong value)
+               {
+                       Contract.Requires (value > 10);
+               }
+
+               private static void TestGreaterThanFloat (float value)
+               {
+                       Contract.Requires (value > 10);
+               }
+
+               private static void TestGreaterThanDouble (double value)
+               {
+                       Contract.Requires (value > 10);
+               }
+
+               // >=
+
+               private static void TestGreaterThanOrEqualInt (int value)
+               {
+                       Contract.Requires (value >= 10);
+               }
+
+               private static void TestGreaterThanOrEqualUInt (uint value)
+               {
+                       Contract.Requires (value >= 10);
+               }
+
+               private static void TestGreaterThanOrEqualLong (long value)
+               {
+                       Contract.Requires (value >= 10);
+               }
+
+               private static void TestGreaterThanOrEqualULong (ulong value)
+               {
+                       Contract.Requires (value >= 10);
+               }
+
+               private static void TestGreaterThanOrEqualFloat (float value)
+               {
+                       Contract.Requires (value >= 10);
+               }
+
+               private static void TestGreaterThanOrEqualDouble (double value)
+               {
+                       Contract.Requires (value >= 10);
+               }
+
+               // object ==
+
+               private static void TestObjectEquals (object value)
+               {
+                       Contract.Requires (value == null);
+               }
+
+               // object !=
+
+               private static void TestObjectNotEquals (object value)
+               {
+                       Contract.Requires (value != null);
+               }
+
+
+
+               private void CheckException (Expression<Action> fnExpr, params string [] messageContains)
+               {
+                       try {
+                               this.ral.Call (fnExpr);
+                       } catch (Exception e) {
+                               string m = e.Message.Split ('\n', '\r') [0].Trim ();
+                               foreach (var contains in messageContains) {
+                                       StringAssert.Contains (contains, m);
+                               }
+                               return;
+                       }
+                       Assert.Fail ("Contract should have thrown an exception");
+               }
+
+               private void CheckTwice (Expression<Action> fnGood, Expression<Action> fnBad, string condition)
+               {
+                       const string PreFail = "Precondition failed";
+                       this.ral.Call (fnGood);
+                       this.CheckException (fnBad, PreFail, condition);
+               }
+
+               [Test]
+               public void TestTrivial_Equals ()
+               {
+                       const string CondEquals = "value == 0";
+
+                       this.CheckTwice (() => TestEqualsByte (0), () => TestEqualsByte (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsSByte (0), () => TestEqualsSByte (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsUShort (0), () => TestEqualsUShort (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsShort (0), () => TestEqualsShort (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsUInt (0), () => TestEqualsUInt (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsInt (0), () => TestEqualsInt (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsULong (0), () => TestEqualsULong (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsLong (0), () => TestEqualsLong (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsDouble (0), () => TestEqualsDouble (1), CondEquals);
+                       this.CheckTwice (() => TestEqualsFloat (0), () => TestEqualsFloat (1), CondEquals);
+               }
+
+               [Test]
+               public void TestTrivial_NotEquals()
+               {
+                       const string CondNotEquals = "value != 0";
+
+                       this.CheckTwice (() => TestNotEqualsByte (1), () => TestNotEqualsByte (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsSByte (1), () => TestNotEqualsSByte (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsUShort (1), () => TestNotEqualsUShort (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsShort (1), () => TestNotEqualsShort (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsUInt (1), () => TestNotEqualsUInt (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsInt (1), () => TestNotEqualsInt (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsULong (1), () => TestNotEqualsULong (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsLong (1), () => TestNotEqualsLong (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsDouble (1), () => TestNotEqualsDouble (0), CondNotEquals);
+                       this.CheckTwice (() => TestNotEqualsFloat (1), () => TestNotEqualsFloat (0), CondNotEquals);
+               }
+
+               [Test]
+               public void TestTrivial_LessThan()
+               {
+                       const string CondLessThan = "value < 10";
+
+                       this.CheckTwice (() => TestLessThanInt (9), () => TestLessThanInt (10), CondLessThan);
+                       this.CheckTwice (() => TestLessThanUInt (9), () => TestLessThanUInt (10), CondLessThan);
+                       this.CheckTwice (() => TestLessThanLong (9), () => TestLessThanLong (10), CondLessThan);
+                       this.CheckTwice (() => TestLessThanULong (9), () => TestLessThanULong (10), CondLessThan);
+                       this.CheckTwice (() => TestLessThanFloat (9.9f), () => TestLessThanFloat (10), CondLessThan);
+                       this.CheckTwice (() => TestLessThanDouble (9.9), () => TestLessThanDouble (10), CondLessThan);
+               }
+
+               [Test]
+               public void TestTrivial_LessThanOrEqual()
+               {
+                       const string CondLessThanOrEqual = "value <= 10";
+
+                       this.CheckTwice (() => TestLessThanOrEqualInt (10), () => TestLessThanOrEqualInt (11), CondLessThanOrEqual);
+                       this.CheckTwice (() => TestLessThanOrEqualUInt (10), () => TestLessThanOrEqualUInt (11), CondLessThanOrEqual);
+                       this.CheckTwice (() => TestLessThanOrEqualLong (10), () => TestLessThanOrEqualLong (11), CondLessThanOrEqual);
+                       this.CheckTwice (() => TestLessThanOrEqualULong (10), () => TestLessThanOrEqualULong (11), CondLessThanOrEqual);
+                       this.CheckTwice (() => TestLessThanOrEqualFloat (10.0f), () => TestLessThanOrEqualFloat (10.1f), CondLessThanOrEqual);
+                       this.CheckTwice (() => TestLessThanOrEqualDouble (10.0), () => TestLessThanOrEqualDouble (10.1), CondLessThanOrEqual);
+               }
+
+               [Test]
+               public void TestTrivial_GreaterThan()
+               {
+                       const string CondGreaterThan = "value > 10";
+
+                       this.CheckTwice (() => TestGreaterThanInt (11), () => TestGreaterThanInt (10), CondGreaterThan);
+                       this.CheckTwice (() => TestGreaterThanUInt (11), () => TestGreaterThanUInt (10), CondGreaterThan);
+                       this.CheckTwice (() => TestGreaterThanLong (11), () => TestGreaterThanLong (10), CondGreaterThan);
+                       this.CheckTwice (() => TestGreaterThanULong (11), () => TestGreaterThanULong (10), CondGreaterThan);
+                       this.CheckTwice (() => TestGreaterThanFloat (10.1f), () => TestGreaterThanFloat (10), CondGreaterThan);
+                       this.CheckTwice (() => TestGreaterThanDouble (10.1), () => TestGreaterThanDouble (10), CondGreaterThan);
+               }
+
+               [Test]
+               public void TestTrivial_GreaterThanOrEqual()
+               {
+                       const string CondGreaterThanOrEqual = "value >= 10";
+
+                       this.CheckTwice (() => TestGreaterThanOrEqualInt (10), () => TestGreaterThanOrEqualInt (9), CondGreaterThanOrEqual);
+                       this.CheckTwice (() => TestGreaterThanOrEqualUInt (10), () => TestGreaterThanOrEqualUInt (9), CondGreaterThanOrEqual);
+                       this.CheckTwice (() => TestGreaterThanOrEqualLong (10), () => TestGreaterThanOrEqualLong (9), CondGreaterThanOrEqual);
+                       this.CheckTwice (() => TestGreaterThanOrEqualULong (10), () => TestGreaterThanOrEqualULong (9), CondGreaterThanOrEqual);
+                       this.CheckTwice (() => TestGreaterThanOrEqualFloat (10.0f), () => TestGreaterThanOrEqualFloat (9.9f), CondGreaterThanOrEqual);
+                       this.CheckTwice (() => TestGreaterThanOrEqualDouble (10.0), () => TestGreaterThanOrEqualDouble (9.9), CondGreaterThanOrEqual);
+               }
+
+               [Test]
+               public void TestTrivial_ObjectEquality()
+               {
+                       object o = new object ();
+                       this.CheckTwice (() => TestObjectEquals (null), () => TestObjectEquals (o), "value == null");
+                       this.CheckTwice (() => TestObjectNotEquals (o), () => TestObjectNotEquals (null), "value != null");
+               }
+
+       }
+
+}
index df0f8337baee5bbc02c547090ebbb65786baf213..4e8f2ab38911416faf5a0cadbcf77531dc79f6a6 100644 (file)
@@ -5,7 +5,7 @@ include ../../build/rules.make
 LIBRARY = Mono.CompilerServices.SymbolWriter.dll
 LIBRARY_USE_INTERMEDIATE_FILE = yes
 
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll
 NO_TEST = yes
 
 ifneq (basic, $(PROFILE))
index 3f11a0f56c7a77a68fb31c7bc77615e83c6b0466..8c2ee40d926c533f19bf3bf86cdbd65d33436693 100644 (file)
@@ -31,7 +31,7 @@
 using System;
 using System.Reflection;
 using SRE = System.Reflection.Emit;
-using System.Collections;
+using System.Collections.Generic;
 using System.Text;
 using System.Threading;
 using System.IO;
@@ -163,11 +163,11 @@ namespace Mono.CompilerServices.SymbolWriter
 
        public class MonoSymbolFile : IDisposable
        {
-               ArrayList methods = new ArrayList ();
-               ArrayList sources = new ArrayList ();
-               ArrayList comp_units = new ArrayList ();
-               Hashtable type_hash = new Hashtable ();
-               Hashtable anonymous_scopes;
+               List<MethodEntry> methods = new List<MethodEntry> ();
+               List<SourceFileEntry> sources = new List<SourceFileEntry> ();
+               List<CompileUnitEntry> comp_units = new List<CompileUnitEntry> ();
+               Dictionary<Type, int> type_hash = new Dictionary<Type, int> ();
+               Dictionary<int, AnonymousScopeEntry> anonymous_scopes;
 
                OffsetTable ot;
                int last_type_index;
@@ -199,10 +199,11 @@ namespace Mono.CompilerServices.SymbolWriter
 
                internal int DefineType (Type type)
                {
-                       if (type_hash.Contains (type))
-                               return (int) type_hash [type];
+                       int index;
+                       if (type_hash.TryGetValue (type, out index))
+                               return index;
 
-                       int index = ++last_type_index;
+                       index = ++last_type_index;
                        type_hash.Add (type, index);
                        return index;
                }
@@ -234,7 +235,7 @@ namespace Mono.CompilerServices.SymbolWriter
                                throw new InvalidOperationException ();
 
                        if (anonymous_scopes == null)
-                               anonymous_scopes = new Hashtable ();
+                               anonymous_scopes = new Dictionary<int, AnonymousScopeEntry>  ();
 
                        anonymous_scopes.Add (id, new AnonymousScopeEntry (id));
                }
@@ -245,7 +246,7 @@ namespace Mono.CompilerServices.SymbolWriter
                        if (reader != null)
                                throw new InvalidOperationException ();
 
-                       AnonymousScopeEntry scope = (AnonymousScopeEntry) anonymous_scopes [scope_id];
+                       AnonymousScopeEntry scope = anonymous_scopes [scope_id];
                        scope.AddCapturedVariable (name, captured_name, kind);
                }
 
@@ -254,7 +255,7 @@ namespace Mono.CompilerServices.SymbolWriter
                        if (reader != null)
                                throw new InvalidOperationException ();
 
-                       AnonymousScopeEntry scope = (AnonymousScopeEntry) anonymous_scopes [scope_id];
+                       AnonymousScopeEntry scope = anonymous_scopes [scope_id];
                        scope.AddCapturedScope (id, captured_name);
                }
 
@@ -381,12 +382,12 @@ namespace Mono.CompilerServices.SymbolWriter
                }
 
                MyBinaryReader reader;
-               Hashtable source_file_hash;
-               Hashtable compile_unit_hash;
+               Dictionary<int, SourceFileEntry> source_file_hash;
+               Dictionary<int, CompileUnitEntry> compile_unit_hash;
 
-               ArrayList method_list;
-               Hashtable method_token_hash;
-               Hashtable source_name_hash;
+               List<MethodEntry> method_list;
+               Dictionary<int, MethodEntry> method_token_hash;
+               Dictionary<string, int> source_name_hash;
 
                Guid guid;
 
@@ -427,8 +428,8 @@ namespace Mono.CompilerServices.SymbolWriter
                                        "Cannot read symbol file `{0}'", filename);
                        }
 
-                       source_file_hash = new Hashtable ();
-                       compile_unit_hash = new Hashtable ();
+                       source_file_hash = new Dictionary<int, SourceFileEntry> ();
+                       compile_unit_hash = new Dictionary<int, CompileUnitEntry> ();
                }
 
                void CheckGuidMatch (Guid other, string filename, string assembly)
@@ -530,8 +531,8 @@ namespace Mono.CompilerServices.SymbolWriter
                                throw new InvalidOperationException ();
 
                        lock (this) {
-                               SourceFileEntry source = (SourceFileEntry) source_file_hash [index];
-                               if (source != null)
+                               SourceFileEntry source;
+                               if (source_file_hash.TryGetValue (index, out source))
                                        return source;
 
                                long old_pos = reader.BaseStream.Position;
@@ -566,8 +567,8 @@ namespace Mono.CompilerServices.SymbolWriter
                                throw new InvalidOperationException ();
 
                        lock (this) {
-                               CompileUnitEntry unit = (CompileUnitEntry) compile_unit_hash [index];
-                               if (unit != null)
+                               CompileUnitEntry unit;
+                               if (compile_unit_hash.TryGetValue (index, out unit))
                                        return unit;
 
                                long old_pos = reader.BaseStream.Position;
@@ -600,8 +601,8 @@ namespace Mono.CompilerServices.SymbolWriter
                                if (method_token_hash != null)
                                        return;
 
-                               method_token_hash = new Hashtable ();
-                               method_list = new ArrayList ();
+                               method_token_hash = new Dictionary<int, MethodEntry> ();
+                               method_list = new List<MethodEntry> ();
 
                                long old_pos = reader.BaseStream.Position;
                                reader.BaseStream.Position = ot.MethodTableOffset;
@@ -623,7 +624,9 @@ namespace Mono.CompilerServices.SymbolWriter
 
                        lock (this) {
                                read_methods ();
-                               return (MethodEntry) method_token_hash [token];
+                               MethodEntry me;
+                               method_token_hash.TryGetValue (token, out me);
+                               return me;
                        }
                }
 
@@ -661,7 +664,7 @@ namespace Mono.CompilerServices.SymbolWriter
 
                        lock (this) {
                                if (source_name_hash == null) {
-                                       source_name_hash = new Hashtable ();
+                                       source_name_hash = new Dictionary<string, int> ();
 
                                        for (int i = 0; i < ot.SourceCount; i++) {
                                                SourceFileEntry source = GetSourceFile (i + 1);
@@ -669,10 +672,10 @@ namespace Mono.CompilerServices.SymbolWriter
                                        }
                                }
 
-                               object value = source_name_hash [file_name];
-                               if (value == null)
+                               int value;
+                               if (!source_name_hash.TryGetValue (file_name, out value))
                                        return -1;
-                               return (int) value;
+                               return value;
                        }
                }
 
@@ -681,18 +684,21 @@ namespace Mono.CompilerServices.SymbolWriter
                        if (reader == null)
                                throw new InvalidOperationException ();
 
+                       AnonymousScopeEntry scope;
                        lock (this) {
-                               if (anonymous_scopes != null)
-                                       return (AnonymousScopeEntry) anonymous_scopes [id];
+                               if (anonymous_scopes != null) {
+                                       anonymous_scopes.TryGetValue (id, out scope);
+                                       return scope;
+                               }
 
-                               anonymous_scopes = new Hashtable ();
+                               anonymous_scopes = new Dictionary<int, AnonymousScopeEntry> ();
                                reader.BaseStream.Position = ot.AnonymousScopeTableOffset;
                                for (int i = 0; i < ot.AnonymousScopeCount; i++) {
-                                       AnonymousScopeEntry scope = new AnonymousScopeEntry (reader);
+                                       scope = new AnonymousScopeEntry (reader);
                                        anonymous_scopes.Add (scope.ID, scope);
                                }
 
-                               return (AnonymousScopeEntry) anonymous_scopes [id];
+                               return anonymous_scopes [id];
                        }
                }
 
index a044a60a2d13fb4a4ba8cb78e8aecb9fe97cb7af..5f30818ff626bf3ec23d046c9ee4e7f09cb5dc3b 100644 (file)
@@ -30,7 +30,7 @@
 
 using System;
 using System.Security.Cryptography;
-using System.Collections;
+using System.Collections.Generic;
 using System.Text;
 using System.IO;
 
@@ -202,13 +202,10 @@ namespace Mono.CompilerServices.SymbolWriter
 
                public static LineNumberEntry Null = new LineNumberEntry (0, 0, 0);
 
-               private class OffsetComparerClass : IComparer
+               private class OffsetComparerClass : IComparer<LineNumberEntry>
                {
-                       public int Compare (object a, object b)
+                       public int Compare (LineNumberEntry l1, LineNumberEntry l2)
                        {
-                               LineNumberEntry l1 = (LineNumberEntry) a;
-                               LineNumberEntry l2 = (LineNumberEntry) b;
-
                                if (l1.Offset < l2.Offset)
                                        return -1;
                                else if (l1.Offset > l2.Offset)
@@ -218,13 +215,10 @@ namespace Mono.CompilerServices.SymbolWriter
                        }
                }
 
-               private class RowComparerClass : IComparer
+               private class RowComparerClass : IComparer<LineNumberEntry>
                {
-                       public int Compare (object a, object b)
+                       public int Compare (LineNumberEntry l1, LineNumberEntry l2)
                        {
-                               LineNumberEntry l1 = (LineNumberEntry) a;
-                               LineNumberEntry l2 = (LineNumberEntry) b;
-
                                if (l1.Row < l2.Row)
                                        return -1;
                                else if (l1.Row > l2.Row)
@@ -234,8 +228,8 @@ namespace Mono.CompilerServices.SymbolWriter
                        }
                }
 
-               public static readonly IComparer OffsetComparer = new OffsetComparerClass ();
-               public static readonly IComparer RowComparer = new RowComparerClass ();
+               public static readonly IComparer<LineNumberEntry> OffsetComparer = new OffsetComparerClass ();
+               public static readonly IComparer<LineNumberEntry> RowComparer = new RowComparerClass ();
 
                public override string ToString ()
                {
@@ -453,8 +447,8 @@ namespace Mono.CompilerServices.SymbolWriter
                public readonly int ID;
                #endregion
 
-               ArrayList captured_vars = new ArrayList ();
-               ArrayList captured_scopes = new ArrayList ();
+               List<CapturedVariable> captured_vars = new List<CapturedVariable> ();
+               List<CapturedScope> captured_scopes = new List<CapturedScope> ();
 
                public AnonymousScopeEntry (int id)
                {
@@ -529,8 +523,8 @@ namespace Mono.CompilerServices.SymbolWriter
 
                MonoSymbolFile file;
                SourceFileEntry source;
-               ArrayList include_files;
-               ArrayList namespaces;
+               List<SourceFileEntry> include_files;
+               List<NamespaceEntry> namespaces;
 
                bool creating;
 
@@ -550,7 +544,7 @@ namespace Mono.CompilerServices.SymbolWriter
                        this.Index = file.AddCompileUnit (this);
 
                        creating = true;
-                       namespaces = new ArrayList ();
+                       namespaces = new List<NamespaceEntry> ();
                }
 
                public void AddFile (SourceFileEntry file)
@@ -559,7 +553,7 @@ namespace Mono.CompilerServices.SymbolWriter
                                throw new InvalidOperationException ();
 
                        if (include_files == null)
-                               include_files = new ArrayList ();
+                               include_files = new List<SourceFileEntry> ();
 
                        include_files.Add (file);
                }
@@ -635,13 +629,13 @@ namespace Mono.CompilerServices.SymbolWriter
 
                                int count_includes = reader.ReadLeb128 ();
                                if (count_includes > 0) {
-                                       include_files = new ArrayList ();
+                                       include_files = new List<SourceFileEntry> ();
                                        for (int i = 0; i < count_includes; i++)
                                                include_files.Add (file.GetSourceFile (reader.ReadLeb128 ()));
                                }
 
                                int count_ns = reader.ReadLeb128 ();
-                               namespaces = new ArrayList ();
+                               namespaces = new List<NamespaceEntry> ();
                                for (int i = 0; i < count_ns; i ++)
                                        namespaces.Add (new NamespaceEntry (file, reader));
 
@@ -913,7 +907,7 @@ namespace Mono.CompilerServices.SymbolWriter
 
                void DoRead (MonoSymbolFile file, MyBinaryReader br)
                {
-                       ArrayList lines = new ArrayList ();
+                       var lines = new List<LineNumberEntry> ();
 
                        bool is_hidden = false, modified = false;
                        int stm_line = 1, stm_offset = 0, stm_file = 1;
@@ -1118,9 +1112,9 @@ namespace Mono.CompilerServices.SymbolWriter
                        locals_check_done :
                                ;
                        } else {
-                               Hashtable local_names = new Hashtable ();
+                               var local_names = new Dictionary<string, LocalVariableEntry> ();
                                foreach (LocalVariableEntry local in locals) {
-                                       if (local_names.Contains (local.Name)) {
+                                       if (local_names.ContainsKey (local.Name)) {
                                                flags |= Flags.LocalNamesAmbiguous;
                                                break;
                                        }
index ae36bc6d727c5523c32b81f86ec1d003e17fd9e6..4d6d1f3d2db5a276423c659a5b5d4f3aac544860 100644 (file)
 
 using System;
 using System.Runtime.CompilerServices;
-using System.Collections;
+using System.Collections.Generic;
 using System.IO;
        
 namespace Mono.CompilerServices.SymbolWriter
 {
        public class MonoSymbolWriter
        {
-               ArrayList methods = null;
-               ArrayList sources = null;
-               ArrayList comp_units = null;
+               List<SourceMethodBuilder> methods;
+               List<SourceFileEntry> sources;
+               List<CompileUnitEntry> comp_units;
                protected readonly MonoSymbolFile file;
-               string filename = null;
+               string filename;
                
-               private SourceMethodBuilder current_method = null;
-               private Stack current_method_stack;
+               private SourceMethodBuilder current_method;
+#if NET_2_1
+               System.Collections.Stack current_method_stack = new System.Collections.Stack ();
+#else
+               Stack<SourceMethodBuilder> current_method_stack = new Stack<SourceMethodBuilder> ();
+#endif
 
                public MonoSymbolWriter (string filename)
                {
-                       this.methods = new ArrayList ();
-                       this.sources = new ArrayList ();
-                       this.comp_units = new ArrayList ();
-                       this.current_method_stack = new Stack ();
+                       this.methods = new List<SourceMethodBuilder> ();
+                       this.sources = new List<SourceFileEntry> ();
+                       this.comp_units = new List<CompileUnitEntry> ();
                        this.file = new MonoSymbolFile ();
 
                        this.filename = filename + ".mdb";
@@ -239,10 +242,14 @@ namespace Mono.CompilerServices.SymbolWriter
 
        public class SourceMethodBuilder
        {
-               ArrayList _locals;
-               ArrayList _blocks;
-               ArrayList _scope_vars;
-               Stack _block_stack;
+               List<LocalVariableEntry> _locals;
+               List<CodeBlockEntry> _blocks;
+               List<ScopeVariable> _scope_vars;
+#if NET_2_1
+               System.Collections.Stack _block_stack;
+#else          
+               Stack<CodeBlockEntry> _block_stack;
+#endif
                string _real_name;
                IMethodDef _method;
                ICompileUnit _comp_unit;
@@ -277,10 +284,16 @@ namespace Mono.CompilerServices.SymbolWriter
 
                public void StartBlock (CodeBlockEntry.Type type, int start_offset)
                {
-                       if (_block_stack == null)
-                               _block_stack = new Stack ();
+                       if (_block_stack == null) {
+#if NET_2_1
+                               _block_stack = new System.Collections.Stack ();
+#else                          
+                               _block_stack = new Stack<CodeBlockEntry> ();
+#endif
+                       }
+                       
                        if (_blocks == null)
-                               _blocks = new ArrayList ();
+                               _blocks = new List<CodeBlockEntry> ();
 
                        int parent = CurrentBlock != null ? CurrentBlock.Index : -1;
 
@@ -333,7 +346,7 @@ namespace Mono.CompilerServices.SymbolWriter
                public void AddLocal (int index, string name)
                {
                        if (_locals == null)
-                               _locals = new ArrayList ();
+                               _locals = new List<LocalVariableEntry> ();
                        int block_idx = CurrentBlock != null ? CurrentBlock.Index : 0;
                        _locals.Add (new LocalVariableEntry (index, name, block_idx));
                }
@@ -352,7 +365,7 @@ namespace Mono.CompilerServices.SymbolWriter
                public void AddScopeVariable (int scope, int index)
                {
                        if (_scope_vars == null)
-                               _scope_vars = new ArrayList ();
+                               _scope_vars = new List<ScopeVariable> ();
                        _scope_vars.Add (
                                new ScopeVariable (scope, index));
                }
index 11cd0fdd62c4f5a1f6259341641dc46dd37c9a67..4b5a1aa2a2a299f1c064ddc81ae221c0780c7699 100644 (file)
@@ -87,7 +87,11 @@ namespace Mono.Remoting.Channels.Unix
                                if (!isOneWay) 
                                {
                                        sinkStack.Push (this, connection);
-                                       ThreadPool.QueueUserWorkItem (new WaitCallback(ReadAsyncUnixMessage), sinkStack);
+                                       ThreadPool.QueueUserWorkItem (new WaitCallback(data => {
+                                               try {
+                                                       ReadAsyncUnixMessage (data);
+                                               } catch {}
+                                               }), sinkStack);
                                }
                                else
                                        connection.Release();
index 5e4d4e47c6b70b119ecce83dce9dd39d4073c4dd..35ecb480fd1e04e586f5589d0e434a53e838b4a2 100644 (file)
@@ -1,4 +1,7 @@
-2009-06-23  Marek Habersack  <mhabersack@novell.com>
+2010-08-29  David Stone      <david@gixug.com>
+       * Added DisplayAttribute
+
+2009-06-23  Marek Habersack  <mhabersack@novell.com
 
        * System.ComponentModel.DataAnnotations.dll.sources: added
        System.ComponentModel.DataAnnotations/AssociatedMetadataTypePropertyDescriptor.cs
index 47e24618b4c4d1c2795ef2b94c4e3340024d5cf6..5dda900890f0f5b8f5e9693b7c783f189f517a8c 100644 (file)
@@ -10,6 +10,7 @@ System.ComponentModel.DataAnnotations/ConcurrencyCheckAttribute.cs
 System.ComponentModel.DataAnnotations/CustomValidationAttribute.cs
 System.ComponentModel.DataAnnotations/DataType.cs
 System.ComponentModel.DataAnnotations/DataTypeAttribute.cs
+System.ComponentModel.DataAnnotations/DisplayAttribute.cs
 System.ComponentModel.DataAnnotations/DisplayColumnAttribute.cs
 System.ComponentModel.DataAnnotations/DisplayFormatAttribute.cs
 System.ComponentModel.DataAnnotations/EditableAttribute.cs
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DisplayAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DisplayAttribute.cs
new file mode 100644 (file)
index 0000000..98c9b89
--- /dev/null
@@ -0,0 +1,161 @@
+//
+// DisplayAttribute.cs
+//
+// Author:
+//     David Stone <david@gixug.com>
+//
+// Copyright (C) 2010 David Stone
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.ComponentModel;
+
+namespace System.ComponentModel.DataAnnotations
+{
+#if NET_4_0
+       [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Method, AllowMultiple = false)]
+       public sealed class DisplayAttribute : Attribute
+       {
+               public Type ResourceType { get; set; }
+
+               public string Description { get; set; }
+               public string GroupName { get; set; }
+               public string Name { get; set; }
+               public string ShortName { get; set; }
+               public string Prompt { get; set; }
+
+               const string property_not_set_message = "The {0} property has not been set.  Use the Get{0} method to get the value.";
+               const string localization_failed_message = "Cannot retrieve property '{0}' because localization failed. Type '{1} is not public or does not contain a public static string property with the name '{2}'.";
+
+               bool? _autoGenerateField;
+               public bool AutoGenerateField {
+                       get {
+                               if (!_autoGenerateField.HasValue) {
+                                       throw new InvalidOperationException (string.Format (property_not_set_message, "AutoGenerateField"));
+                               }
+                               
+                               return _autoGenerateField.Value;
+                       }
+                       set { _autoGenerateField = value; }
+               }
+
+               bool? _autoGenerateFilter;
+               public bool AutoGenerateFilter {
+                       get {
+                               if (_autoGenerateFilter == null) {
+                                       throw new InvalidOperationException (string.Format (property_not_set_message, "AutoGenerateFilter"));
+                               }
+                               
+                               return _autoGenerateFilter.Value;
+                       }
+                       set { _autoGenerateFilter = value; }
+               }
+
+               int? _order;
+               public int? Order {
+                       get {
+                               if (_order == null) {
+                                       throw new InvalidOperationException (string.Format (property_not_set_message, "Order"));
+                               }
+                               
+                               return _order.Value;
+                       }
+                       set { _order = value; }
+               }
+
+               private string GetLocalizedString (string propertyName, string key)
+               {
+                       // If we don't have a resource or a key, go ahead and fall back on the key
+                       if (ResourceType == null || key == null)
+                               return key;
+                       
+                       var property = ResourceType.GetProperty (key);
+                       
+                       // Strings are only valid if they are public static strings
+                       var isValid = false;
+                       if (ResourceType.IsVisible && property != null && property.PropertyType == typeof(string)) {
+                               var getter = property.GetGetMethod ();
+                               
+                               // Gotta have a public static getter on the property
+                               if (getter != null && getter.IsStatic && getter.IsPublic) {
+                                       isValid = true;
+                               }
+                       }
+                       
+                       // If it's not valid, go ahead and throw an InvalidOperationException
+                       if (!isValid) {
+                               var message = string.Format (localization_failed_message, propertyName, ResourceType.ToString (), key);
+                               throw new InvalidOperationException (message);
+                       }
+                       
+                       return (string)property.GetValue (null, null);
+                       
+               }
+
+               #region Consumer Methods
+               public bool? GetAutoGenerateField ()
+               {
+                       return _autoGenerateField;
+               }
+
+               public bool? GetAutoGenerateFilter ()
+               {
+                       return _autoGenerateFilter;
+               }
+               
+               public int? GetOrder ()
+               {
+                       return _order;
+               }
+
+               public string GetName ()
+               {
+                       return GetLocalizedString ("Name", Name);
+               }
+
+               public string GetShortName ()
+               {
+                       // Short name falls back on Name if the short name isn't set
+                       return GetLocalizedString ("ShortName", ShortName) ?? GetName ();
+               }
+
+               public string GetDescription ()
+               {
+                       return GetLocalizedString ("Description", Description);
+               }
+
+               public string GetPrompt ()
+               {
+                       return GetLocalizedString ("Prompt", Prompt);
+               }
+               
+               public string GetGroupName ()
+               {
+                       return GetLocalizedString ("GroupName", GroupName);
+               }
+               
+               #endregion
+               
+       }
+#endif
+}
+
index 770a8999e98b7117af6eabe349eaf36eaaa54f1c..dd0244df0fb472f29065af667c96d67310c90ce6 100644 (file)
@@ -35,39 +35,152 @@ namespace System.ComponentModel.DataAnnotations
        [AttributeUsage (AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
        public class RangeAttribute : ValidationAttribute
        {
-               public RangeAttribute (double minimum, double maximum)
+               Func <object, bool> comparer;
+               TypeConverter cvt;
+
+               public object Maximum { get; private set; }
+               public object Minimum { get; private set; }
+               public Type OperandType { get; private set; }
+
+               IComparable MaximumComparable {
+                       get { return Maximum as IComparable; }
+               }
+
+               IComparable MinimumComparable {
+                       get { return Minimum as IComparable; }
+               }
+               
+               RangeAttribute ()
+                       : base (GetDefaultErrorMessage)
+               {
+               }
+               
+               public RangeAttribute (double minimum, double maximum) : this ()
                {
                        Minimum = minimum;
                        Maximum = maximum;
+                       OperandType = typeof (double);
                }
 
-               public RangeAttribute (int minimum, int maximum)
+               public RangeAttribute (int minimum, int maximum) : this ()
                {
                        Minimum = minimum;
                        Maximum = maximum;
+                       OperandType = typeof (int);
                }
 
-               public RangeAttribute (Type type, string minimum, string maximum)
+               public RangeAttribute (Type type, string minimum, string maximum) : this ()
                {
+#if !NET_4_0
+                       if (type == null)
+                               throw new ArgumentNullException ("type");
+#endif
                        OperandType = type;
                        Minimum = minimum;
                        Maximum = maximum;
+#if !NET_4_0
+                       comparer = SetupComparer ();
+#endif
                }
 
-               public object Maximum { get; private set; }
-               public object Minimum { get; private set; }
-               public Type OperandType { get; private set; }
-
-               [MonoTODO]
+               string GetDefaultErrorMessage ()
+               {
+                       return "The field {0} must be between {1} and {2}.";
+               }
+               
                public override string FormatErrorMessage (string name)
                {
-                       throw new NotImplementedException ();
+                       if (comparer == null)
+                               comparer = SetupComparer ();
+
+                       return String.Format (ErrorMessageString, name, Minimum, Maximum);
                }
 
-               [MonoTODO]
+               // LAMESPEC: does not throw ValidationException when value is out of range
                public override bool IsValid (object value)
                {
-                       throw new NotImplementedException ();
+                       if (comparer == null)
+                               comparer = SetupComparer ();
+                       
+                       if (value == null)
+                               return true;
+
+                       string s = value as string;
+                       if (s != null && s.Length == 0)
+                               return true;
+                       
+                       try {
+                               if (comparer != null)
+                                       return comparer (value);
+
+                               return false;
+                       } catch (FormatException) {
+                               return false;
+                       } catch (InvalidCastException) {
+                               return false;
+                       }
+               }
+
+               Func <object, bool> SetupComparer ()
+               {
+                       Type ot = OperandType;
+
+                       object min = Minimum, max = Maximum;
+#if NET_4_0
+                       if (min == null || max == null)
+                               throw new InvalidOperationException ("The minimum and maximum values must be set.");
+#endif
+                       if (min is int)
+                               return new Func <object, bool> (CompareInt);
+
+                       if (min is double)
+                               return new Func <object, bool> (CompareDouble);
+                       
+                       if (ot == null)
+                               throw new InvalidOperationException ("The OperandType must be set when strings are used for minimum and maximum values.");
+                       
+                       if (!typeof(IComparable).IsAssignableFrom (ot)) {
+                               string message = String.Format ("The type {0} must implement System.IComparable", ot.FullName);
+#if NET_4_0
+                               throw new InvalidOperationException (message);
+#else
+                               throw new ArgumentException ("object");
+#endif
+                       }
+                       
+                       string smin = min as string, smax = max as string;
+                       cvt = TypeDescriptor.GetConverter (ot);
+                       Minimum = cvt.ConvertFromString (smin);
+                       Maximum = cvt.ConvertFromString (smax);
+
+                       return new Func <object, bool> (CompareArbitrary);
+               }
+
+               bool CompareInt (object value)
+               {
+                       int cv = Convert.ToInt32 (value);
+
+                       return MinimumComparable.CompareTo (cv) <= 0 && MaximumComparable.CompareTo (cv) >= 0;
+               }
+
+               bool CompareDouble (object value)
+               {
+                       double cv = Convert.ToDouble (value);
+                       
+                       return MinimumComparable.CompareTo (cv) <= 0 && MaximumComparable.CompareTo (cv) >= 0;
+               }
+
+               bool CompareArbitrary (object value)
+               {
+                       object cv;
+                       if (value != null && value.GetType () == OperandType)
+                               cv = value;
+                       else if (cvt != null)
+                               cv = cvt.ConvertFrom (value);
+                       else
+                               cv = null;
+                       
+                       return MinimumComparable.CompareTo (cv) <= 0 && MaximumComparable.CompareTo (cv) >= 0;
                }
        }
 }
index 4274c9f8c941c5de1f7706149a1c534575a9adfa..f6b2ae1a0cabcb51c29da6da5c9ab424bb970530 100644 (file)
@@ -3,8 +3,9 @@
 //
 // Author:
 //     Atsushi Enomoto <atsushi@ximian.com>
+//     Marek Habersack <grendel@twistedcode.net>
 //
-// Copyright (C) 2008 Novell Inc. http://novell.com
+// Copyright (C) 2008-2010 Novell Inc. http://novell.com
 //
 
 //
@@ -35,23 +36,55 @@ namespace System.ComponentModel.DataAnnotations
        [AttributeUsage (AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
        public class StringLengthAttribute : ValidationAttribute
        {
+               public int MaximumLength { get; private set; }
+#if NET_4_0
+               public int MinimumLength { get; set; }
+#endif
                public StringLengthAttribute (int maximumLength)
+                       : base (GetDefaultErrorMessage)
                {
+#if !NET_4_0
+                       if (maximumLength < 0)
+                               throw new ArgumentOutOfRangeException ("maximumLength", String.Format ("Actual value was {0}", maximumLength));
+#endif
                        MaximumLength = maximumLength;
                }
 
-               public int MaximumLength { get; private set; }
+               string GetDefaultErrorMessage ()
+               {
+                       return "The field {0} must be a string with a maximum length of {1}.";
+               }
 
-               [MonoTODO]
                public override string FormatErrorMessage (string name)
                {
-                       throw new NotImplementedException ();
+                       return String.Format (ErrorMessageString, name, MaximumLength);
                }
 
-               [MonoTODO]
                public override bool IsValid (object value)
                {
-                       throw new NotImplementedException ();
+                       if (value == null)
+                               return true;
+
+                       string str = (string)value;
+                       int max = MaximumLength;
+#if NET_4_0
+                       int min = MinimumLength;
+
+                       // LAMESPEC: documented to throw ArgumentOutOfRangeException
+                       if (max < 0)
+                               throw new InvalidOperationException ("The maximum length must be a nonnegative integer.");
+
+                       if (min > max)
+                               throw new InvalidOperationException (
+                                       String.Format ("The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.",
+                                                      max, min)
+                               );
+
+                       int len = str.Length;
+                       return len <= max && len >= min;
+#else                  
+                       return str.Length <= max;
+#endif
                }
        }
 }
index 8ae71c9f471c4283b16c35ce301271223546ceb4..e9bf5b13e9d2faabf1ad7684d13577eceed3a1e7 100644 (file)
@@ -38,11 +38,11 @@ namespace System.ComponentModel.DataAnnotations
        {
                const string DEFAULT_ERROR_MESSAGE = "The field {0} is invalid.";
 #if !NET_4_0
-               string errorMessage;
                string errorMessageResourceName;
                string errorMessageString;
                Type errorMessageResourceType;
 #endif
+               string errorMessage;
                string fallbackErrorMessage;
                Func <string> errorMessageAccessor;
                
@@ -69,7 +69,14 @@ namespace System.ComponentModel.DataAnnotations
                        return String.Format (ErrorMessageString, name);
                }
 #if NET_4_0
-               public string ErrorMessage { get; set; }
+               public string ErrorMessage {
+                       get { return errorMessage; }
+                       set {
+                               errorMessage = value;
+                               if (errorMessage != null)
+                                       errorMessageAccessor = null;
+                       }
+               }
                public string ErrorMessageResourceName { get; set; }
                public Type ErrorMessageResourceType { get; set; }
 #else
@@ -77,9 +84,10 @@ namespace System.ComponentModel.DataAnnotations
                        get { return errorMessage; }
 
                        set {
+#if !NET_4_0
                                if (errorMessage != null)
                                        throw new InvalidOperationException ("This property can be set only once.");
-
+#endif
                                if (String.IsNullOrEmpty (value))
                                        throw new ArgumentException ("Value cannot be null or empty.", "value");
 
@@ -116,13 +124,7 @@ namespace System.ComponentModel.DataAnnotations
                }
 #endif         
                protected string ErrorMessageString {
-                       get {
-#if NET_4_0
-                               return GetStringFromResourceAccessor ();
-#else
-                               return errorMessageString;
-#endif
-                       }
+                       get { return GetStringFromResourceAccessor (); }
                }
 #if NET_4_0
                public virtual bool IsValid (object value)
@@ -172,8 +174,7 @@ namespace System.ComponentModel.DataAnnotations
                        if (resourceType == null ^ resourceName == null)
                                throw new InvalidOperationException ("Both ErrorMessageResourceType and ErrorMessageResourceName must be set on this attribute.");
 
-                       if (errorMessageAccessor != null)
-                               return errorMessageAccessor ();
+                       
                        
                        if (resourceType != null) {
                                PropertyInfo pi = resourceType.GetProperty (resourceName, BindingFlags.Public | BindingFlags.Static);
@@ -192,12 +193,16 @@ namespace System.ComponentModel.DataAnnotations
                                return pi.GetValue (null, null) as string;
                        }
                        
-                       if (errorMessage == null)
+                       if (errorMessage == null) {
+                               if (errorMessageAccessor != null)
+                                       return errorMessageAccessor ();
+                               
                                if (fallbackErrorMessage != null)
                                        return fallbackErrorMessage;
                                else
                                        return DEFAULT_ERROR_MESSAGE;
-
+                       }
+                       
                        return errorMessage;
                }
 #if NET_4_0
index 170cff4263db000b44ae7d12e9105e9aa127ca17..dd44918cab0856fd1da0260690bb5d27be6b9d13 100644 (file)
@@ -1,7 +1,11 @@
+../../System.Web.DynamicData/Test/Common/AssertExtensions.cs
 System.ComponentModel.DataAnnotations/AssociatedMetadataTypeTypeDescriptionProviderTests.cs
 System.ComponentModel.DataAnnotations/AssociationAttributeTest.cs
+System.ComponentModel.DataAnnotations/DisplayAttributeTest.cs
 System.ComponentModel.DataAnnotations/EnumDataTypeAttributeTest.cs
+System.ComponentModel.DataAnnotations/RangeAttributeTest.cs
 System.ComponentModel.DataAnnotations/RequiredAttributeTest.cs
+System.ComponentModel.DataAnnotations/StringLengthAttributeTest.cs
 System.ComponentModel.DataAnnotations/ValidationAttributeTest.cs
 System.ComponentModel.DataAnnotations/ValidationContextTest.cs
 System.ComponentModel.DataAnnotations/ValidationResultTest.cs
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/DisplayAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/DisplayAttributeTest.cs
new file mode 100644 (file)
index 0000000..0753fde
--- /dev/null
@@ -0,0 +1,278 @@
+using System;
+using NUnit.Framework;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+#if NET_4_0
+       public class AttributeTargetValidation
+       {
+               [Display(ResourceType = typeof(GoodResources), Name = "NameKey")]
+               public string WorksOnProperty { get; set; }
+
+               [Display(ResourceType = typeof(GoodResources), Name = "NameKey")]
+               public string WorksOnMethod ()
+               {
+                       return "";
+               }
+
+               [Display(ResourceType = typeof(GoodResources), Name = "NameKey")]
+               public string worksOnField;
+
+               public string WorksOnParameter ([Display(ResourceType = typeof(GoodResources), Name = "NameKey")] string parameter1)
+               {
+                       return "";
+               }
+       }
+       
+       public class GoodResources
+       {
+               public static string Name {
+                       get { return "NameValue"; }
+               }
+               public static string ShortName {
+                       get { return "ShortNameValue"; }
+               }
+               public static string Prompt {
+                       get { return "PromptValue"; }
+               }
+               public static string Description {
+                       get { return "DescriptionValue"; }
+               }
+               public static string GroupName {
+                       get { return "GroupNameValue"; }
+               }
+               
+       }
+       public class BadResources
+       {
+               private static string PrivateString {
+                       get { return "Not a public string"; }
+               }
+               public string InstanceString {
+                       get { return "Not a static string"; }
+               }
+               public string WriteOnlyString {
+                       set { }
+               }
+       }
+       internal class InvisibleResources
+       {
+               public static string InvisibleResource {
+                       get { return "Not a visible string "; }
+               }
+       }
+       
+       [TestFixture]
+       public class DisplayAttributeTests
+       {
+               const string property_not_set_message = "The {0} property has not been set.  Use the Get{0} method to get the value.";
+               const string localization_failed_message = "Cannot retrieve property '{0}' because localization failed. Type '{1} is not public or does not contain a public static string property with the name '{2}'.";
+       
+               [Test]
+               public void StringProperties_ReturnLiteralValues_Success()
+               {
+                       var display = new DisplayAttribute()
+                       {
+                               Name = "Name",
+                               ShortName = "ShortName",
+                               Prompt = "Prompt",
+                               Description = "Description",
+                               GroupName = "GroupName"
+                       };
+                       
+                       Assert.AreEqual("Name", display.GetName());
+                       Assert.AreEqual("ShortName", display.GetShortName());
+                       Assert.AreEqual("Prompt", display.GetPrompt());
+                       Assert.AreEqual("Description", display.GetDescription());
+                       Assert.AreEqual("GroupName", display.GetGroupName());
+               }
+               [Test]
+               public void StringProperties_ReturnLocalizedValues_Success()
+               {
+                       var display = new DisplayAttribute()
+                       {
+                               ResourceType = typeof(GoodResources),
+                               Name = "Name",
+                               ShortName = "ShortName",
+                               Prompt = "Prompt",
+                               Description = "Description",
+                               GroupName = "GroupName"
+                       };
+                       
+                       Assert.AreEqual(GoodResources.Name, display.GetName());
+                       Assert.AreEqual(GoodResources.ShortName, display.GetShortName());
+                       Assert.AreEqual(GoodResources.Prompt, display.GetPrompt());
+                       Assert.AreEqual(GoodResources.Description, display.GetDescription());
+                       Assert.AreEqual(GoodResources.GroupName, display.GetGroupName());
+               }
+               
+               [Test]
+               public void ShortName_ReturnsName_WhenNotSet()
+               {
+                       var display = new DisplayAttribute()
+                       {
+                               Name = "Name"
+                       };
+                       
+                       Assert.AreEqual("Name", display.GetShortName());
+               }
+               
+               [Test]
+               public void OrderAndAutoGenerateProperties_Success()
+               {
+                       var display = new DisplayAttribute()
+                       {
+                               Order = 1,
+                               AutoGenerateField = true,
+                               AutoGenerateFilter = false
+                       };
+                       
+                       Assert.AreEqual(1, display.Order);
+                       Assert.AreEqual(1, display.GetOrder());
+                       
+                       Assert.AreEqual(true, display.AutoGenerateField);
+                       Assert.AreEqual(true, display.GetAutoGenerateField());
+                       
+                       Assert.AreEqual(false, display.AutoGenerateFilter);
+                       Assert.AreEqual(false, display.GetAutoGenerateFilter());
+               }
+               
+               [Test]
+               public void StringProperties_GetUnSetProperties_ReturnsNull ()
+               {
+                       var display = new DisplayAttribute ();
+                       Assert.IsNull (display.Name);
+                       Assert.IsNull (display.ShortName);
+                       Assert.IsNull (display.Prompt);
+                       Assert.IsNull (display.Description);
+                       Assert.IsNull (display.GroupName);
+                       
+                       Assert.IsNull (display.GetName ());
+                       Assert.IsNull (display.GetShortName ());
+                       Assert.IsNull (display.GetPrompt ());
+                       Assert.IsNull (display.GetDescription ());
+                       Assert.IsNull (display.GetGroupName ());
+               }
+               
+               [Test]
+               public void OrderAndAutoGeneratedProperties_GetUnSetProperties_ThrowsInvalidOperationException ()
+               {
+                       var display = new DisplayAttribute();
+                       
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.Order.ToString(), string.Format(property_not_set_message, "Order"));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.AutoGenerateField.ToString(), string.Format(property_not_set_message, "AutoGenerateField"));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.AutoGenerateFilter.ToString(), string.Format(property_not_set_message, "AutoGenerateFilter"));
+               }
+               
+               [Test]
+               public void AllProperties_InvisibleResource_ThrowsInvalidOperationException ()
+               {
+                       var resourceType = typeof(InvisibleResources);
+                       var resourceKey = "InvisibleResource";
+                       var display = new DisplayAttribute()
+                       {
+                               ResourceType = resourceType,
+                               Name = resourceKey,
+                               ShortName = resourceKey,
+                               Prompt = resourceKey,
+                               Description = resourceKey,
+                               GroupName = resourceKey
+                       };
+                       
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetName(), string.Format(localization_failed_message, "Name", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetShortName(), string.Format(localization_failed_message, "ShortName", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetPrompt(), string.Format(localization_failed_message, "Prompt", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetDescription(), string.Format(localization_failed_message, "Description", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetGroupName(), string.Format(localization_failed_message, "GroupName", resourceType, resourceKey));            
+               }
+               
+               [Test]
+               public void AllProperties_PrivateResource_ThrowsInvalidOperationException ()
+               {
+                       var resourceType = typeof(BadResources);
+                       var resourceKey = "InstanceString";
+                       var display = new DisplayAttribute()
+                       {
+                               ResourceType = resourceType,
+                               Name = resourceKey,
+                               ShortName = resourceKey,
+                               Prompt = resourceKey,
+                               Description = resourceKey,
+                               GroupName = resourceKey
+                       };
+                       
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetName(), string.Format(localization_failed_message, "Name", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetShortName(), string.Format(localization_failed_message, "ShortName", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetPrompt(), string.Format(localization_failed_message, "Prompt", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetDescription(), string.Format(localization_failed_message, "Description", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetGroupName(), string.Format(localization_failed_message, "GroupName", resourceType, resourceKey));            
+               }
+               
+               [Test]
+               public void AllProperties_InstanceResource_ThrowsInvalidOperationException ()
+               {
+                       var resourceType = typeof(BadResources);
+                       var resourceKey = "InstanceString";
+                       var display = new DisplayAttribute()
+                       {
+                               ResourceType = resourceType,
+                               Name = resourceKey,
+                               ShortName = resourceKey,
+                               Prompt = resourceKey,
+                               Description = resourceKey,
+                               GroupName = resourceKey
+                       };
+                       
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetName(), string.Format(localization_failed_message, "Name", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetShortName(), string.Format(localization_failed_message, "ShortName", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetPrompt(), string.Format(localization_failed_message, "Prompt", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetDescription(), string.Format(localization_failed_message, "Description", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetGroupName(), string.Format(localization_failed_message, "GroupName", resourceType, resourceKey));            
+               }
+               
+               [Test]
+               public void AllProperties_WriteOnlyResource_ThrowsInvalidOperationException ()
+               {
+                       var resourceType = typeof(BadResources);
+                       var resourceKey = "WriteOnlyString";
+                       var display = new DisplayAttribute()
+                       {
+                               ResourceType = resourceType,
+                               Name = resourceKey,
+                               ShortName = resourceKey,
+                               Prompt = resourceKey,
+                               Description = resourceKey,
+                               GroupName = resourceKey
+                       };
+                       
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetName(), string.Format(localization_failed_message, "Name", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetShortName(), string.Format(localization_failed_message, "ShortName", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetPrompt(), string.Format(localization_failed_message, "Prompt", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetDescription(), string.Format(localization_failed_message, "Description", resourceType, resourceKey));
+                       ExceptionAssert.Throws<InvalidOperationException>(() => display.GetGroupName(), string.Format(localization_failed_message, "GroupName", resourceType, resourceKey));            
+               }
+       }
+       public static class ExceptionAssert
+       {
+               public static void Throws<TException> (Action action, string expectedMessage) where TException : Exception
+               {
+                       try
+                       {
+                               action ();
+                       }
+                       catch (TException ex)
+                       {
+                               Assert.AreEqual (expectedMessage, ex.Message);
+                               return;
+                       }
+                       
+                       Assert.Fail();
+               }
+       }
+#endif
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/RangeAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/RangeAttributeTest.cs
new file mode 100644 (file)
index 0000000..b5d0241
--- /dev/null
@@ -0,0 +1,254 @@
+//
+// RequiredAttributeTest.cs
+//
+// Authors:
+//      Marek Habersack <mhabersack@novell.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+using DA = global::System.ComponentModel.DataAnnotations;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+       class RangeAttributePoker : DA.RangeAttribute
+       {
+               public RangeAttributePoker (double min, double max)
+                       : base (min, max)
+               { }
+
+               public string GetErrorMessageString ()
+               {
+                       return ErrorMessageString;
+               }
+       }
+
+       [TestFixture]
+       public class RangeAttributeTest
+       {
+               [Test]
+               public void ErrorMessage ()
+               {
+                       var attr = new RangeAttributePoker (-10.123D, 10.123D);
+
+                       Assert.IsNull (attr.ErrorMessage, "#A1-1");
+                       Assert.AreEqual ("The field {0} must be between {1} and {2}.", attr.GetErrorMessageString (), "#A1-2");
+               }
+
+               [Test]
+               public void Constructor_Double_Double ()
+               {
+                       var attr = new DA.RangeAttribute (-10.123D, 10.123D);
+
+                       Assert.IsNotNull (attr.Minimum, "#A1-1");
+                       Assert.IsNotNull (attr.Maximum, "#A1-2");
+
+                       Assert.AreEqual (typeof (double), attr.Minimum.GetType (), "#A2-1");
+                       Assert.AreEqual (typeof (double), attr.Maximum.GetType (), "#A2-2");
+
+                       Assert.AreEqual (-10.123D, attr.Minimum, "#A3-1");
+                       Assert.AreEqual (10.123D, attr.Maximum, "#A3-2");
+
+                       Assert.IsNotNull (attr.OperandType, "#A4-1");
+                       Assert.AreEqual (typeof (double), attr.OperandType, "#A4-2");
+               }
+
+               [Test]
+               public void Constructor_Int_Int ()
+               {
+                       var attr = new DA.RangeAttribute (-10, 10);
+
+                       Assert.IsNotNull (attr.Minimum, "#A1-1");
+                       Assert.IsNotNull (attr.Maximum, "#A1-2");
+
+                       Assert.AreEqual (typeof (int), attr.Minimum.GetType (), "#A2-1");
+                       Assert.AreEqual (typeof (int), attr.Maximum.GetType (), "#A2-2");
+
+                       Assert.AreEqual (-10, attr.Minimum, "#A3-1");
+                       Assert.AreEqual (10, attr.Maximum, "#A3-2");
+
+                       Assert.IsNotNull (attr.OperandType, "#A4-1");
+                       Assert.AreEqual (typeof (int), attr.OperandType, "#A4-2");
+               }
+
+               [Test]
+               public void Constructor_Type_String_String ()
+               {
+                       var attr = new DA.RangeAttribute (typeof (int), "-10", "10");
+
+                       Assert.IsNotNull (attr.Minimum, "#A1-1");
+                       Assert.IsNotNull (attr.Maximum, "#A1-2");
+#if NET_4_0
+                       Assert.AreEqual (typeof (string), attr.Minimum.GetType (), "#A2-1");
+                       Assert.AreEqual (typeof (string), attr.Maximum.GetType (), "#A2-2");
+                       Assert.AreEqual ("-10", attr.Minimum, "#A3-1");
+                       Assert.AreEqual ("10", attr.Maximum, "#A3-2");
+#else
+                       Assert.AreEqual (typeof (int), attr.Minimum.GetType (), "#A2-1");
+                       Assert.AreEqual (typeof (int), attr.Maximum.GetType (), "#A2-2");
+                       Assert.AreEqual (-10, attr.Minimum, "#A3-1");
+                       Assert.AreEqual (10, attr.Maximum, "#A3-2");
+#endif
+                       Assert.IsNotNull (attr.OperandType, "#A4-1");
+                       Assert.AreEqual (typeof (int), attr.OperandType, "#A4-2");
+               }
+
+               [Test]
+               //LAMESPEC: documented to throw
+#if !NET_4_0
+               [ExpectedException (typeof (ArgumentNullException))]
+#endif
+               public void Constructor_Type_String_String_Null_Type ()
+               {
+                       var attr = new DA.RangeAttribute (null, "-10", "10");
+
+                       Assert.IsNull (attr.OperandType, "#A1");
+               }
+
+               [Test]
+               public void IsValid ()
+               {
+                       var attr = new DA.RangeAttribute (typeof (int), "-10", "10");
+
+                       Assert.IsTrue (attr.IsValid ("0"), "#A1-1");
+                       Assert.IsFalse (attr.IsValid ("12"), "#A1-2");
+                       Assert.IsTrue (attr.IsValid (null), "#A1-3");
+                       Assert.IsTrue (attr.IsValid (String.Empty), "#A1-4");
+                       AssertExtensions.Throws <Exception> (() => {
+                               attr.IsValid ("zero");
+                       }, "#A1-5");
+                       Assert.IsTrue (attr.IsValid (null), "#A1-6");
+#if NET_4_0
+                       attr = new DA.RangeAttribute (typeof (int), "minus ten", "ten");
+                       AssertExtensions.Throws<Exception> (() => {
+                               attr.IsValid ("0");
+                       }, "#A2-1");
+                       AssertExtensions.Throws<Exception> (() => {
+                               attr.IsValid ("12");
+                       }, "#A2-2");
+                       AssertExtensions.Throws<Exception> (() => {
+                               attr.IsValid ("zero");
+                       }, "#A2-3");
+
+                       attr = new DA.RangeAttribute (typeof (RangeAttributeTest), "-10", "10");
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               attr.IsValid (null);
+                       }, "#A3-1");
+
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               attr.IsValid (String.Empty);
+                       }, "#A3-2");
+
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               // The type MonoTests.System.ComponentModel.DataAnnotations.RangeAttributeTest must implement System.IComparable.
+                               attr.IsValid ("10");
+                       }, "#A3-3");
+
+                       attr = new DA.RangeAttribute (null, "-10", "10");
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               // The OperandType must be set when strings are used for minimum and maximum values.
+                               attr.IsValid ("10");
+                       }, "#A4");
+
+                       attr = new DA.RangeAttribute (typeof (int), null, "10");
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               // The minimum and maximum values must be set.
+                               attr.IsValid (10);
+                       }, "#A5-1");
+
+                       attr = new DA.RangeAttribute (typeof (int), "10", null);
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               // The minimum and maximum values must be set.
+                               attr.IsValid (10);
+                       }, "#A5-2");
+
+                       attr = new DA.RangeAttribute (typeof (int), "-10", "10");
+                       Assert.AreEqual (typeof (string), attr.Minimum.GetType (), "#A6-1");
+                       Assert.AreEqual (typeof (string), attr.Maximum.GetType (), "#A6-2");
+
+                       // IsValid appears to reassign Minimum and Maximum with objects of the OperandType type, converted from the original strings
+                       attr.IsValid (12);
+                       Assert.AreEqual (typeof (int), attr.Minimum.GetType (), "#A7-1");
+                       Assert.AreEqual (typeof (int), attr.Maximum.GetType (), "#A7-2");
+#else
+                       AssertExtensions.Throws<Exception> (() => {
+                               attr = new DA.RangeAttribute (typeof (int), "minus ten", "ten");
+                       }, "#A2");
+
+                       AssertExtensions.Throws<ArgumentException> (() => {
+                               attr = new DA.RangeAttribute (typeof (RangeAttributeTest), "-10", "10");
+                       }, "#A3");
+
+                       AssertExtensions.Throws<ArgumentNullException> (() => {
+                               attr = new DA.RangeAttribute (null, "-10", "10");
+                       }, "#A4");
+
+                       AssertExtensions.Throws<NotSupportedException> (() => {
+                               attr = new DA.RangeAttribute (typeof (int), null, "10");
+                       }, "#A5-1");
+
+                       AssertExtensions.Throws<NotSupportedException> (() => {
+                               attr = new DA.RangeAttribute (typeof (int), "10", null);
+                       }, "#A5-2");
+
+                       attr = new DA.RangeAttribute (typeof (int), "-10", "10");
+                       Assert.AreEqual (typeof (int), attr.Minimum.GetType (), "#A6-1");
+                       Assert.AreEqual (typeof (int), attr.Maximum.GetType (), "#A6-2");
+#endif
+               }
+
+               [Test]
+               public void FormatMessageString ()
+               {
+                       var attr = new DA.RangeAttribute (-10, 10);
+
+                       Assert.AreEqual ("The field MyField must be between -10 and 10.", attr.FormatErrorMessage ("MyField"), "#A1");
+
+                       attr.ErrorMessage = "Param 0: {0}";
+                       Assert.AreEqual ("Param 0: MyField", attr.FormatErrorMessage ("MyField"), "#A2-1");
+#if !NET_4_0
+                       attr = new DA.RangeAttribute (-10, 10);
+#endif
+                       attr.ErrorMessage = "Param 0: {0}; Param 1: {1}";
+                       Assert.AreEqual ("Param 0: MyField; Param 1: -10", attr.FormatErrorMessage ("MyField"), "#A2-2");
+#if !NET_4_0
+                       attr = new DA.RangeAttribute (-10, 10);
+#endif
+                       attr.ErrorMessage = "Param 0: {0}; Param 1: {1}; Param 2: {2}";
+                       Assert.AreEqual ("Param 0: MyField; Param 1: -10; Param 2: 10", attr.FormatErrorMessage ("MyField"), "#A2-3");
+#if !NET_4_0
+                       attr = new DA.RangeAttribute (-10, 10);
+#endif
+                       attr.ErrorMessage = "Param 0: {0}; Param 1: {1}; Param 2: {2}; Param 3: {3}";
+                       AssertExtensions.Throws<FormatException> (() => {
+                               attr.FormatErrorMessage ("MyField");
+                       }, "#A2-1");
+               }
+       }
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/StringLengthAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/StringLengthAttributeTest.cs
new file mode 100644 (file)
index 0000000..664e440
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// StringLengthAttributeTest.cs
+//
+// Authors:
+//      Marek Habersack <mhabersack@novell.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+       [TestFixture]
+       public class StringLengthAttributeTest
+       {
+               class StringLengthAttributePoker : StringLengthAttribute
+               {
+                       public StringLengthAttributePoker (int maximumLength)
+                               : base (maximumLength)
+                       { }
+
+                       public string GetErrorMessageString ()
+                       {
+                               return ErrorMessageString;
+                       }
+               }
+
+               [Test]
+               public void Constructor ()
+               {
+                       var sla = new StringLengthAttributePoker (10);
+
+                       Assert.AreEqual (10, sla.MaximumLength, "#A1-1");
+                       Assert.AreEqual (null, sla.ErrorMessage, "#A1-2");
+                       Assert.AreEqual ("The field {0} must be a string with a maximum length of {1}.", sla.GetErrorMessageString (), "#A1-3");
+#if NET_4_0
+                       Assert.AreEqual (0, sla.MinimumLength, "#A1-4");
+
+                       sla = new StringLengthAttributePoker (-10);
+                       Assert.AreEqual (-10, sla.MaximumLength, "#B1");
+#else
+                       AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
+                               sla = new StringLengthAttributePoker (-10);
+                       }, "#B1");
+#endif
+                       sla = new StringLengthAttributePoker (0);
+                       Assert.AreEqual (0, sla.MaximumLength, "#C1");
+               }
+
+               [Test]
+               public void FormatMessageString ()
+               {
+                       var sla = new StringLengthAttributePoker (10);
+
+                       Assert.AreEqual ("The field MyField must be a string with a maximum length of 10.", sla.FormatErrorMessage ("MyField"), "#A1-1");
+#if !NET_4_0
+                       sla = new StringLengthAttributePoker (10);
+#endif
+                       sla.ErrorMessage = "Param 0: {0}";
+                       Assert.AreEqual ("Param 0: MyField", sla.FormatErrorMessage ("MyField"), "#A1-2");
+#if !NET_4_0
+                       sla = new StringLengthAttributePoker (10);
+#endif
+                       sla.ErrorMessage = "Param 0: {0}; Param 1: {1}";
+                       Assert.AreEqual ("Param 0: MyField; Param 1: 10", sla.FormatErrorMessage ("MyField"), "#A1-2");
+                       Assert.AreEqual ("Param 0: ; Param 1: 10", sla.FormatErrorMessage (null), "#A1-3");
+               }
+
+               [Test]
+               public void IsValid ()
+               {
+                       var sla = new StringLengthAttributePoker (10);
+
+                       Assert.IsTrue (sla.IsValid (null), "#A1-1");
+                       Assert.IsTrue (sla.IsValid (String.Empty), "#A1-2");
+                       Assert.IsTrue (sla.IsValid ("string"), "#A1-3");
+                       Assert.IsTrue (sla.IsValid ("0123456789"), "#A1-4");
+                       Assert.IsFalse (sla.IsValid ("0123456789A"), "#A1-5");
+                       AssertExtensions.Throws<InvalidCastException> (() => {
+                               sla.IsValid (123);
+                       }, "#A1-6");
+                       AssertExtensions.Throws<InvalidCastException> (() => {
+                               sla.IsValid (DateTime.Now);
+                       }, "#A1-7");
+
+                       sla = new StringLengthAttributePoker (0);
+                       Assert.IsTrue (sla.IsValid (null), "#B1-1");
+                       Assert.IsTrue (sla.IsValid (String.Empty), "#B1-2");
+                       Assert.IsFalse (sla.IsValid ("string"), "#B1-3");
+#if NET_4_0
+                       sla = new StringLengthAttributePoker (-10);
+                       AssertExtensions.Throws <InvalidOperationException> (() => {
+                               sla.IsValid ("123");
+                       }, "#C1-1");
+
+                       sla = new StringLengthAttributePoker (10);
+                       sla.MinimumLength = 20;
+                       AssertExtensions.Throws<InvalidOperationException> (() => {
+                               sla.IsValid ("123");
+                       }, "#C1-2");
+
+                       sla.MinimumLength = 5;
+                       Assert.IsFalse (sla.IsValid ("123"), "#C2-1");
+                       Assert.IsTrue (sla.IsValid ("12345"), "#C2-2");
+#endif
+               }
+       }
+}
index 95d2d60c4de49a1fcc6ccaa32d94638a6f71c081..b8a3df73219648564045eacbcb3829629744bb44 100644 (file)
@@ -470,7 +470,9 @@ namespace System.Configuration {
 
                        Stream stream = null;
                        try {
-                               stream = stream = system.Host.OpenStreamForRead (streamName);
+                               stream = system.Host.OpenStreamForRead (streamName);
+                               if (stream == null)
+                                       return false;
                        } catch {
                                return false;
                        }
index 309022e38b178262956ff45483f48169e4d94673..8831cb5539b941484aedd8f1da5c3a5bad62ebbe 100644 (file)
@@ -179,7 +179,8 @@ namespace System.Configuration
                                SectionInformation.ConfigSource = config_source;
                        
                        SectionInformation.SetRawXml (RawXml);
-                       DeserializeElement (reader, false);
+                       if (SectionHandler == null)
+                               DeserializeElement (reader, false);
                }
                
                [MonoInternalNote ("find the proper location for the decryption stuff")]
index 29985f54a5391517fd2e90294fa665ee9e3281ab..1219fcd99926776e632072f7c24381043c4b4d3a 100644 (file)
@@ -166,6 +166,9 @@ namespace System.Configuration
 #if !TARGET_JVM
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                extern private static string get_bundled_machine_config ();
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern private static string get_bundled_app_config ();
 #endif
                
                public virtual Stream OpenStreamForRead (string streamName)
@@ -180,8 +183,18 @@ namespace System.Configuration
 #endif
                        }
 
+                       if (String.CompareOrdinal (streamName, AppDomain.CurrentDomain.SetupInformation.ConfigurationFile) == 0) {
+#if TARGET_JVM
+                               throw new NotImplementedException();
+#else
+                               string bundle = get_bundled_app_config ();
+                               if (bundle != null)
+                                       return new MemoryStream (System.Text.Encoding.UTF8.GetBytes (bundle));
+#endif
+                       }
+
                        if (!File.Exists (streamName))
-                               throw new ConfigurationException ("File '" + streamName + "' not found");
+                               return null;
                                
                        return new FileStream (streamName, FileMode.Open, FileAccess.Read);
                }
index 157ca51fcb7f0b48d43fc754d1de552c88a3fa7c..c31134f7463e4a75414c9ed24b664b14fecc54f5 100644 (file)
@@ -359,17 +359,16 @@ namespace System.Collections.Generic {
 
                        int counter = 0;
 
-                       var copy = new T [count];
-                       CopyTo (copy, 0);
+                       var candidates = new List<T> ();
 
-                       foreach (var item in copy) {
-                               if (predicate (item)) {
-                                       Remove (item);
-                                       counter++;
-                               }
-                       }
+                       foreach (var item in this)
+                               if (predicate (item)) 
+                                       candidates.Add (item);
+
+                       foreach (var item in candidates)
+                               Remove (item);
 
-                       return counter;
+                       return candidates.Count;
                }
 
                public void TrimExcess ()
@@ -384,16 +383,9 @@ namespace System.Collections.Generic {
                        if (other == null)
                                throw new ArgumentNullException ("other");
 
-                       var copy = new T [count];
-                       CopyTo (copy, 0);
+                       var other_set = ToSet (other);
 
-                       foreach (var item in copy)
-                               if (!other.Contains (item))
-                                       Remove (item);
-
-                       foreach (var item in other)
-                               if (!Contains (item))
-                                       Remove (item);
+                       RemoveWhere (item => !other_set.Contains (item));
                }
 
                public void ExceptWith (IEnumerable<T> other)
@@ -422,11 +414,13 @@ namespace System.Collections.Generic {
                        if (other == null)
                                throw new ArgumentNullException ("other");
 
-                       if (count != other.Count ())
+                       var other_set = ToSet (other);
+
+                       if (count != other_set.Count)
                                return false;
 
                        foreach (var item in this)
-                               if (!other.Contains (item))
+                               if (!other_set.Contains (item))
                                        return false;
 
                        return true;
@@ -437,12 +431,18 @@ namespace System.Collections.Generic {
                        if (other == null)
                                throw new ArgumentNullException ("other");
 
-                       foreach (var item in other) {
-                               if (Contains (item))
+                       foreach (var item in ToSet (other))
+                               if (!Add (item))
                                        Remove (item);
-                               else
-                                       Add (item);
-                       }
+               }
+
+               HashSet<T> ToSet (IEnumerable<T> enumerable)
+               {
+                       var set = enumerable as HashSet<T>;
+                       if (set == null || !Comparer.Equals (set.Comparer))
+                               set = new HashSet<T> (enumerable);
+
+                       return set;
                }
 
                public void UnionWith (IEnumerable<T> other)
@@ -454,7 +454,7 @@ namespace System.Collections.Generic {
                                Add (item);
                }
 
-               bool CheckIsSubsetOf (IEnumerable<T> other)
+               bool CheckIsSubsetOf (HashSet<T> other)
                {
                        if (other == null)
                                throw new ArgumentNullException ("other");
@@ -474,10 +474,12 @@ namespace System.Collections.Generic {
                        if (count == 0)
                                return true;
 
-                       if (count > other.Count ())
+                       var other_set = ToSet (other);
+
+                       if (count > other_set.Count)
                                return false;
 
-                       return CheckIsSubsetOf (other);
+                       return CheckIsSubsetOf (other_set);
                }
 
                public bool IsProperSubsetOf (IEnumerable<T> other)
@@ -488,13 +490,15 @@ namespace System.Collections.Generic {
                        if (count == 0)
                                return true;
 
-                       if (count >= other.Count ())
+                       var other_set = ToSet (other);
+
+                       if (count >= other_set.Count)
                                return false;
 
-                       return CheckIsSubsetOf (other);
+                       return CheckIsSubsetOf (other_set);
                }
 
-               bool CheckIsSupersetOf (IEnumerable<T> other)
+               bool CheckIsSupersetOf (HashSet<T> other)
                {
                        if (other == null)
                                throw new ArgumentNullException ("other");
@@ -511,10 +515,12 @@ namespace System.Collections.Generic {
                        if (other == null)
                                throw new ArgumentNullException ("other");
 
-                       if (count < other.Count ())
+                       var other_set = ToSet (other);
+
+                       if (count < other_set.Count)
                                return false;
 
-                       return CheckIsSupersetOf (other);
+                       return CheckIsSupersetOf (other_set);
                }
 
                public bool IsProperSupersetOf (IEnumerable<T> other)
@@ -522,10 +528,12 @@ namespace System.Collections.Generic {
                        if (other == null)
                                throw new ArgumentNullException ("other");
 
-                       if (count <= other.Count ())
+                       var other_set = ToSet (other);
+
+                       if (count <= other_set.Count)
                                return false;
 
-                       return CheckIsSupersetOf (other);
+                       return CheckIsSupersetOf (other_set);
                }
 
                [MonoTODO]
index bf361a11d18f3c218b5144036015ff04d6f31a39..4a5fdbd61813eb194da56e2281847f75ade2af27 100644 (file)
@@ -84,6 +84,9 @@ System.Security.Cryptography/SHA512CryptoServiceProvider.cs
 System.Threading/LockRecursionException.cs
 System.Threading/LockRecursionPolicy.cs
 System.Threading/ReaderWriterLockSlim.cs
+../corlib/System.Threading/AtomicBoolean.cs
+System.Threading/ThreadLockState.cs
+System.Threading/ReaderWriterLockSlimExtensions.cs
 Microsoft.Win32.SafeHandles/SafePipeHandle.cs
 System.IO.Pipes/AnonymousPipeClientStream.cs
 System.IO.Pipes/AnonymousPipeServerStream.cs
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/ChangeLog b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/ChangeLog
new file mode 100644 (file)
index 0000000..e9e87fa
--- /dev/null
@@ -0,0 +1,27 @@
+2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
+
+       * QueryBaseNode.cs:
+       * QueryCastNode.cs:
+       * QueryChildNode.cs:
+       * QueryConcatNode.cs:
+       * QueryDefaultEmptyNode.cs:
+       * QueryGroupByNode.cs:
+       * QueryMuxNode.cs:
+       * QueryOptionNode.cs:
+       * QueryOrderByNode.cs:
+       * QueryOrderGuardNode.cs:
+       * QueryOrderedStreamNode.cs:
+       * QueryReverseNode.cs:
+       * QuerySelectManyNode.cs:
+       * QuerySelectNode.cs:
+       * QuerySetNode.cs:
+       * QueryStartNode.cs:
+       * QueryStreamNode.cs:
+       * QueryWhereNode.cs:
+       * QueryZipNode.cs:
+       * WrapHelper.cs: Initial check-in of PLinq
+
+2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
+
+       * SetInclusion.cs: Initial check-in of PLinq (enum)
+
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
new file mode 100644 (file)
index 0000000..ff326ec
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// QueryBaseNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal abstract class QueryBaseNode<T> : IVisitableNode
+       {
+               public virtual void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit<T> (this);
+               }
+
+               internal abstract IList<IEnumerable<T>> GetEnumerables (QueryOptions options);
+
+               internal abstract IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options);
+
+               internal abstract IEnumerable<T> GetSequential ();
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs
new file mode 100644 (file)
index 0000000..4dbb49b
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// QueryCastNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryCastNode<T> : QueryStreamNode<object, T>
+       {
+               public QueryCastNode (QueryBaseNode<T> source)
+                       : base (source, false)
+               {
+
+               }
+               
+               internal override IEnumerable<object> GetSequential ()
+               {
+                       return Parent.GetSequential ().Cast<object> ();
+               }
+               
+               internal override IList<IEnumerable<KeyValuePair<long, object>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => i.Select ((e) => new KeyValuePair<long, object> (e.Key, (object)e.Value)))
+                               .ToList ();
+               }
+               
+               internal override IList<IEnumerable<object>> GetEnumerables (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options)
+                               .Select ((i) => i.Cast<object> ())
+                               .ToList ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs
new file mode 100644 (file)
index 0000000..0b66d7b
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// QueryChildNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal abstract class QueryChildNode<T, TParent> : QueryBaseNode<T>
+       {
+               QueryBaseNode<TParent> parent;
+
+               internal QueryChildNode (QueryBaseNode<TParent> parent)
+               //      : base (isOrdered, true)
+               {
+                       this.parent = parent;
+               }
+
+               internal QueryBaseNode<TParent> Parent {
+                       get {
+                               return parent;
+                       }
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit<T, TParent> (this);
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
new file mode 100644 (file)
index 0000000..cada3e7
--- /dev/null
@@ -0,0 +1,78 @@
+//
+// QueryConcatNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryConcatNode<TSource> : QueryMuxNode<TSource, TSource, TSource>
+       {
+               public QueryConcatNode (QueryBaseNode<TSource> first, QueryBaseNode<TSource> second)
+                       : this (first, second)
+               {
+               }
+
+               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
+               {
+                       var second = Second.GetEnumerables (options);
+
+                       return Parent.GetEnumerables (options)
+                               .Select ((f, i) => CombineEnumerables (f, second[i]))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       var second = Second.GetOrderedEnumerables (options);
+
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((f, i) => CombineEnumerables (f, second[i]))
+                               .ToList ();
+               }
+
+               internal override IEnumerable<TSource> GetSequential ()
+               {
+                       IEnumerable<TSource> first = Parent.GetSequential ();
+                       IEnumerable<TSource> second = Second.GetSequential ();
+
+                       return first.Concat (second);
+               }
+
+               IEnumerable<TResult> CombineEnumerables<TResult> (IEnumerable<TResult> f, IEnumerable<TResult> s)
+               {
+                       foreach (var e in f)
+                               yield return e;
+                       foreach (var e in s)
+                               yield return e;
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
new file mode 100644 (file)
index 0000000..c3b766e
--- /dev/null
@@ -0,0 +1,91 @@
+//
+// QueryDefaultEmptyNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryDefaultEmptyNode<TSource> : QueryStreamNode<TSource, TSource>
+       {
+               TSource defaultValue;
+               
+               internal QueryDefaultEmptyNode (QueryBaseNode<TSource> parent, TSource defaultValue)
+                       : base (parent, false)
+               {
+                       this.defaultValue = defaultValue;
+               }
+               
+               internal override IEnumerable<TSource> GetSequential ()
+               {
+                       return Parent.GetSequential ().DefaultIfEmpty (defaultValue);
+               }
+               
+               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
+               {
+                       IList<IEnumerable<TSource>> enumerables = Parent.GetEnumerables (options);
+                       CountdownEvent evt = new CountdownEvent (enumerables.Count);
+
+                       return enumerables
+                               .Select ((e) => GetEnumerableInternal<TSource> (e,
+                                                                               evt,
+                                                                               (s) => s))
+                               .ToList ();
+               }
+               
+               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       IList<IEnumerable<KeyValuePair<long, TSource>>> enumerables = Parent.GetOrderedEnumerables (options);
+                       CountdownEvent evt = new CountdownEvent (enumerables.Count);
+
+                       return enumerables
+                               .Select ((e) => GetEnumerableInternal<KeyValuePair<long, TSource>> (e,
+                                                                                                   evt,
+                                                                                                   (s) => new KeyValuePair<long, TSource> (0, s)))
+                               .ToList ();
+               }
+               
+               IEnumerable<TSecond> GetEnumerableInternal<TSecond> (IEnumerable<TSecond> source, 
+                                                                    CountdownEvent evt,
+                                                                    Func<TSource, TSecond> converter)
+               {
+                       bool processed = false;
+                       
+                       foreach (TSecond second in source) {
+                               processed = true;
+                               yield return second;
+                       }
+                       
+                       if (!processed && evt.Signal ())
+                               yield return converter (defaultValue);
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
new file mode 100644 (file)
index 0000000..5c10aad
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// QueryOrderByNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryGroupByNode<TSource, TKey, TElement> : QueryStreamNode<IGrouping<TKey, TElement>, TSource>
+       {
+               Func<TSource, TKey> keySelector;
+               Func<TSource, TElement> elementSelector;
+               IEqualityComparer<TKey> comparer;
+               
+               public QueryGroupByNode (QueryBaseNode<TSource> parent,
+                                        Func<TSource, TKey> keySelector, 
+                                        Func<TSource, TElement> elementSelector,
+                                        IEqualityComparer<TKey> comparer)
+                       : base (parent, false)
+               {
+                       this.keySelector = keySelector;
+                       this.elementSelector = elementSelector;
+                       this.comparer = comparer;
+               }
+               
+               internal override IEnumerable<IGrouping<TKey, TElement>> GetSequential ()
+               {
+                       IEnumerable<TSource> src =  Parent.GetSequential ();
+                       
+                       return src.GroupBy (keySelector, elementSelector, comparer);
+               }
+
+               internal override IList<IEnumerable<IGrouping<TKey, TElement>>> GetEnumerables (QueryOptions options)
+               {                       
+                       return ParallelPartitioner.CreateForChunks (GetGroupedElements ()).GetPartitions (options.PartitionCount).Wrap ();
+               }
+               
+               internal override IList<IEnumerable<KeyValuePair<long, IGrouping<TKey, TElement>>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return ParallelPartitioner.CreateForChunks (GetGroupedElements ()).GetOrderablePartitions (options.PartitionCount).Wrap ();
+               }
+
+               internal IEnumerable<IGrouping<TKey, TElement>> GetGroupedElements ()
+               {
+                       return GetStore ().Select ((e) => new ConcurrentGrouping<TKey, TElement> (e.Key, e.Value));
+               }
+
+               internal ConcurrentDictionary<TKey, ConcurrentQueue<TElement>> GetStore ()
+               {
+                       var store = new ConcurrentDictionary<TKey, ConcurrentQueue<TElement>> ();
+
+                       ParallelExecuter.ProcessAndBlock (Parent, (e, c) => {
+                                       ConcurrentQueue<TElement> queue = store.GetOrAdd (keySelector (e), (_) => new ConcurrentQueue<TElement> ());
+                                       queue.Enqueue (elementSelector (e));
+                               });
+
+                       return store;
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
new file mode 100644 (file)
index 0000000..3545dc8
--- /dev/null
@@ -0,0 +1,147 @@
+//
+// QueryConcatNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       /* This is the QueryNode used by Take(While) operator
+        * it symbolize operators that are preferably working on the head elements of a query and can prematurely
+        * stop providing elements following the one they were processing is of a greater value in a specific 
+        * order to be defined by the instance (e.g. simple numerical order when working on indexes).
+        */
+       internal class QueryHeadWorkerNode<TSource> : QueryStreamNode<TSource, TSource>
+       {
+               /* This variable will receive an index value that represent the "stop point"
+                * when used with GetOrderedEnumerables i.e. values that are above the indexes are discarded
+                * (if the partitioner is ordered in a partition it even stop the processing) and value below are still tested just
+                * in case and can still lower this gap limit.
+                */
+               readonly int count;
+               readonly Func<TSource, int, bool> predicate;
+               
+               internal QueryHeadWorkerNode (QueryBaseNode<TSource> parent, int count)
+                       : base (parent, false)
+               {
+                       this.count = count;
+               }
+
+               internal QueryHeadWorkerNode (QueryBaseNode<TSource> parent, Func<TSource, int, bool> predicate, bool indexed)
+                       : base (parent, indexed)
+               {
+                       this.predicate = predicate;
+               }
+
+               internal int? Count {
+                       get {
+                               return predicate == null ? count : (int?)null;
+                       }
+               }
+
+               internal override IEnumerable<TSource> GetSequential ()
+               {
+                       IEnumerable<TSource> parent = Parent.GetSequential ();
+
+                       return predicate == null ? parent.Take (count) : parent.TakeWhile (predicate);
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit (this);
+               }
+
+               internal override IList<IEnumerable<TSource>> GetEnumerablesIndexed (QueryOptions options)
+               {       
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => i.TakeWhile ((e) => predicate (e.Value, (int)e.Key)).Select ((e) => e.Value))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<TSource>> GetEnumerablesNonIndexed (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options)
+                               .Select (GetSelector (count))
+                               .ToList ();
+               }
+
+               Func<IEnumerable<TSource>, IEnumerable<TSource>> GetSelector (int c)
+               {
+                       if (predicate == null)
+                               return (i) => i.TakeWhile ((e) => c > 0 && Interlocked.Decrement (ref c) >= 0);
+                       else
+                               return (i) => i.TakeWhile ((e) => predicate (e, -1));
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => GetEnumerableInternal (i, options))
+                               .ToList ();
+               }
+
+               IEnumerable<KeyValuePair<long, TSource>> GetEnumerableInternal (IEnumerable<KeyValuePair<long, TSource>> source, QueryOptions options)
+               {
+                       IEnumerator<KeyValuePair<long, TSource>> current = source.GetEnumerator ();
+                       long gapIndex = predicate == null ? count : long.MaxValue;
+                       Func<KeyValuePair<long, TSource>, bool> cond;
+                       if (predicate == null)
+                               cond = (kv) => kv.Key < count;
+                       else
+                               cond = (kv) => predicate (kv.Value, (int)kv.Key);
+                       
+                       try {
+                               while (current.MoveNext ()) {
+                                       KeyValuePair<long, TSource> kvp = current.Current;
+
+                                       /* When filtering is based on a predicate, this short-circuit is only valid 
+                                        * if the partitioner used ensure items are ordered in each partition 
+                                        * (valid w/ default partitioners)
+                                        */
+                                       if (kvp.Key >= gapIndex && options.PartitionerSettings.Item2)
+                                               break;
+
+                                       if (!cond (kvp)) {
+                                               if (gapIndex > kvp.Key && predicate != null)
+                                                       gapIndex = kvp.Key;
+
+                                               continue;
+                                       }
+                                       
+                                       yield return kvp;
+                               }
+                       } finally {
+                               current.Dispose ();
+                       }
+               }
+       }
+
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
new file mode 100644 (file)
index 0000000..dc96021
--- /dev/null
@@ -0,0 +1,163 @@
+//
+// QueryJoinNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryJoinNode<TFirst, TSecond, TKey, TResult> : QueryMuxNode<TFirst, TSecond, TResult>
+       {
+               struct VSlot<T>
+               {
+                       public readonly bool HasValue;
+                       public readonly T Value;
+
+                       public VSlot (T value)
+                       {
+                               HasValue = true;
+                               Value = value;
+                       }
+               }
+
+               Func<TFirst, TKey> firstKeySelector;
+               Func<TSecond, TKey> secondKeySelector;
+               Func<TFirst, TSecond, TResult> resultSelector;
+               IEqualityComparer<TKey> comparer;
+
+               internal QueryJoinNode (QueryBaseNode<TFirst> first,
+                                       QueryBaseNode<TSecond> second, 
+                                       Func<TFirst, TKey> firstKeySelector,
+                                       Func<TSecond, TKey> secondKeySelector,
+                                       Func<TFirst, TSecond, TResult> resultSelector,
+                                       IEqualityComparer<TKey> comparer) : base (first, second)
+               {
+                       this.firstKeySelector = firstKeySelector;
+                       this.secondKeySelector = secondKeySelector;
+                       this.resultSelector = resultSelector;
+                       this.comparer = comparer;
+               }
+
+               internal override IEnumerable<TResult> GetSequential ()
+               {
+                       return Parent.GetSequential ().Join (Second.GetSequential (), 
+                                                            firstKeySelector, 
+                                                            secondKeySelector, 
+                                                            resultSelector, 
+                                                            comparer);
+               }
+
+               internal override IList<IEnumerable<TResult>> GetEnumerables (QueryOptions options)
+               {
+                       var first = Parent.GetEnumerables (options);
+                       var second = Second.GetEnumerables (options);
+
+                       if (first.Count != second.Count)
+                               throw new InvalidOperationException ("Internal size mismatch");
+
+                       var store = new ConcurrentDictionary<TKey, Tuple<VSlot<TFirst>, VSlot<TSecond>>> (comparer);
+
+                       return first
+                               .Select ((f, i) => GetEnumerable (f, second[i], store, firstKeySelector, secondKeySelector, resultSelector))
+                               .ToList ();
+
+               }               
+
+               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       var first = Parent.GetOrderedEnumerables (options);
+                       var second = Second.GetOrderedEnumerables (options);
+
+                       if (first.Count != second.Count)
+                               throw new InvalidOperationException ("Internal size mismatch");
+
+                       var store = new ConcurrentDictionary<TKey, Tuple<VSlot<KeyValuePair<long, TFirst>>, VSlot<KeyValuePair<long, TSecond>>>> (comparer);
+                       
+                       return first
+                               .Select ((f, i) => GetEnumerable<KeyValuePair<long, TFirst>, KeyValuePair<long, TSecond>, KeyValuePair<long, TResult>> (f, 
+                                                                 second[i], 
+                                                                 store,
+                                                                 (e) => firstKeySelector (e.Value),
+                                                                 (e) => secondKeySelector (e.Value),
+                                                                 (e1, e2) => new KeyValuePair<long, TResult> (e1.Key, resultSelector (e1.Value, e2.Value))))
+                               .ToList ();
+               }
+
+               IEnumerable<T> GetEnumerable<U, V, T> (IEnumerable<U> first, 
+                                                      IEnumerable<V> second,
+                                                      ConcurrentDictionary<TKey, Tuple<VSlot<U>, VSlot<V>>> store,
+                                                      Func<U, TKey> fKeySelect,
+                                                      Func<V, TKey> sKeySelect,
+                                                      Func<U, V, T> resultor)
+               {
+                       IEnumerator<U> eFirst = first.GetEnumerator ();
+                       IEnumerator<V> eSecond = second.GetEnumerator ();
+
+                       try {
+                               while (eFirst.MoveNext ()) {
+                                       if (!eSecond.MoveNext ())
+                                               yield break;
+
+                                       U e1 = eFirst.Current;
+                                       V e2 = eSecond.Current;
+
+                                       TKey key1 = fKeySelect (e1);
+                                       TKey key2 = sKeySelect (e2);
+
+                                       if (comparer.Equals (key1, key2)) {
+                                               yield return resultor (e1, e2);
+                                               continue;
+                                       }
+                                       
+                                       Tuple<VSlot<U>, VSlot<V>> kvp;
+                                       
+                                       do {
+                                               if (store.TryRemove (key1, out kvp) && kvp.Item2.HasValue) {
+                                                       yield return resultor (e1, kvp.Item2.Value);
+                                                       break;
+                                               }
+                                       } while (!store.TryAdd (key1, Tuple.Create (new VSlot<U> (e1), new VSlot<V> ())));
+                                                       
+                                       do {
+                                               if (store.TryRemove (key2, out kvp) && kvp.Item1.HasValue) {
+                                                       yield return resultor (kvp.Item1.Value, e2);
+                                                       break;
+                                               }
+                                       } while (!store.TryAdd (key2, Tuple.Create (new VSlot<U> (), new VSlot<V> (e2))));
+                               }
+                       } finally {
+                               eFirst.Dispose ();
+                               eSecond.Dispose ();
+                       }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
new file mode 100644 (file)
index 0000000..62afb6b
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// QueryMuxNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal abstract class QueryMuxNode<TFirst, TSecond, TResult> : QueryChildNode<TResult, TFirst>
+       {
+               QueryBaseNode<TSecond> second;
+
+               internal QueryMuxNode (QueryBaseNode<TFirst> parent, QueryBaseNode<TSecond> second)
+                       : base (parent)
+               {
+                       this.second = second;
+               }
+
+               internal QueryBaseNode<TSecond> Second {
+                       get {
+                               return second;
+                       }
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit (this);
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
new file mode 100644 (file)
index 0000000..acfc389
--- /dev/null
@@ -0,0 +1,155 @@
+//
+// QueryOptionNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       // The first four elements correspond to the public operator With*
+       // Last CancellationToken parameter is used internally for ImplementerToken
+       using OptionsList = Tuple<ParallelMergeOptions?, ParallelExecutionMode?, CancellationToken?, int, CancellationTokenSource>;
+
+       internal class QueryOptionNode<T> : QueryChildNode<T, T>
+       {
+
+               public QueryOptionNode (QueryBaseNode<T> parent)
+                       : base (parent)
+               {
+
+               }
+
+               internal virtual OptionsList GetOptions ()
+               {
+                       return new OptionsList (null, null, null, -1, null);
+               }
+
+               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options);
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options);
+               }
+
+               internal override IEnumerable<T> GetSequential ()
+               {
+                       return Parent.GetSequential ();
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit<T> (this);
+               }
+       }
+
+       internal class ParallelExecutionModeNode<T> : QueryOptionNode<T>
+       {
+               ParallelExecutionMode mode;
+
+               internal ParallelExecutionModeNode (ParallelExecutionMode mode, QueryBaseNode<T> parent)
+                       : base (parent)
+               {
+                       this.mode = mode;
+               }
+
+               internal override OptionsList GetOptions ()
+               {
+                       return new OptionsList (null, mode, null, -1, null);
+               }
+       }
+
+
+       internal class ParallelMergeOptionsNode<T> : QueryOptionNode<T>
+       {
+               ParallelMergeOptions opts;
+
+               internal ParallelMergeOptionsNode (ParallelMergeOptions opts, QueryBaseNode<T> parent)
+                       : base (parent)
+               {
+                       this.opts = opts;
+               }
+
+               internal override OptionsList GetOptions ()
+               {
+                       return new OptionsList (opts, null, null, -1, null);
+               }
+       }
+
+
+       internal class CancellationTokenNode<T> : QueryOptionNode<T>
+       {
+               CancellationToken token;
+
+               internal CancellationTokenNode (CancellationToken token, QueryBaseNode<T> parent)
+                       : base (parent)
+               {
+                       this.token = token;
+               }
+
+               internal override OptionsList GetOptions ()
+               {
+                       return new OptionsList (null, null, token, -1, null);
+               }
+       }
+
+       internal class DegreeOfParallelismNode<T> : QueryOptionNode<T>
+       {
+               int degreeParallelism;
+
+               internal DegreeOfParallelismNode (int degreeParallelism, QueryBaseNode<T> parent)
+                       : base (parent)
+               {
+                       this.degreeParallelism = degreeParallelism;
+               }
+
+               internal override OptionsList GetOptions ()
+               {
+                       return new OptionsList (null, null, null, degreeParallelism, null);
+               }
+       }
+
+       internal class ImplementerTokenNode<T> : QueryOptionNode<T>
+       {
+               CancellationTokenSource source;
+
+               internal ImplementerTokenNode (CancellationTokenSource token, QueryBaseNode<T> parent)
+                       : base (parent)
+               {
+                       this.source = token;
+               }
+
+               internal override OptionsList GetOptions ()
+               {
+                       return new OptionsList (null, null, null, -1, source);
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
new file mode 100644 (file)
index 0000000..d3b7cae
--- /dev/null
@@ -0,0 +1,122 @@
+//
+// QueryOrderByNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryOrderByNode<T> : QueryOrderGuardNode<T>
+       {
+               Comparison<T> comparison;
+
+               public QueryOrderByNode (QueryBaseNode<T> parent, Comparison<T> comparison)
+                       : base (parent, true)
+               {
+                       this.comparison = comparison;
+               }
+
+
+               public QueryOrderByNode (QueryOrderByNode<T> parent, Comparison<T> comparison)
+                       : base (parent.Parent, true)
+               {
+                       this.comparison = MergeComparison (parent.ComparisonFunc, comparison);
+               }
+
+               public Comparison<T> ComparisonFunc {
+                       get {
+                               return comparison;
+                       }
+               }
+
+               internal override IEnumerable<T> GetSequential ()
+               {
+                       return Parent.GetSequential ().OrderBy ((e) => e, new ComparisonComparer (comparison));
+               }
+
+               private class ComparisonComparer : IComparer<T>
+               {
+                       Comparison<T> comparison;
+
+                       internal ComparisonComparer (Comparison<T> comparison)
+                       {
+                               this.comparison = comparison;
+                       }
+
+                       int IComparer<T>.Compare (T x, T y)
+                       {
+                               return comparison (x, y);
+                       }
+               }
+
+               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
+               {
+                       throw new InvalidOperationException ("Shouldn't be called");
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       int partitionCount;
+                       IList<T> aggregList = GetAggregatedList (out partitionCount);
+                       IList<T> result = ParallelQuickSort<T>.Sort (aggregList, comparison);
+
+                       OrderablePartitioner<T> partitioner = ParallelPartitioner.CreateForStrips (result, 1);
+
+                       return WrapHelper.Wrap (partitioner.GetOrderablePartitions (options.PartitionCount));
+               }
+
+               IList<T> GetAggregatedList (out int partitionCount)
+               {
+                       AggregationList<T> result = null;
+                       partitionCount = -1;
+
+                       ParallelExecuter.ProcessAndAggregate<T, IList<T>> (Parent, () => new List<T> (),
+                                                                          LocalCall,
+                                                                          (ls) => { result = new AggregationList<T> (ls); });
+
+                       return result;
+               }
+
+               IList<T> LocalCall (IList<T> list, T element)
+               {
+                       list.Add (element);
+                       return list;
+               }
+
+               static Comparison<T> MergeComparison (Comparison<T> source, Comparison<T> other)
+               {
+                       return (e1, e2) => {
+                               int result = source (e1, e2);
+                               return result == 0 ? other (e1, e2) : result;
+                       };
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
new file mode 100644 (file)
index 0000000..1ac477c
--- /dev/null
@@ -0,0 +1,99 @@
+// QueryOrderGuardNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal abstract class QueryOrderGuardNode<T> : QueryStreamNode<T, T>
+       {
+               bool ensureOrder;
+
+               internal QueryOrderGuardNode (QueryBaseNode<T> parent, bool ensureOrder)
+                       : base (parent, ensureOrder)
+               {
+                       this.ensureOrder = ensureOrder;
+               }
+
+               public bool EnsureOrder {
+                       get {
+                               return ensureOrder;
+                       }
+               }
+
+               internal override IEnumerable<T> GetSequential ()
+               {
+                       return Parent.GetSequential ();
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit<T> (this);
+               }
+       }
+
+       internal class QueryAsUnorderedNode<T> : QueryOrderGuardNode<T>
+       {
+               internal QueryAsUnorderedNode (QueryBaseNode<T> parent)
+                       : base (parent, false)
+               {
+
+               }
+
+               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options);
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options);
+               }
+
+       }
+
+       internal class QueryAsOrderedNode<T> : QueryOrderGuardNode<T>
+       {
+               internal QueryAsOrderedNode (QueryBaseNode<T> parent)
+                       : base (parent, true)
+               {
+
+               }
+
+               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options);
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options);
+               }
+
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
new file mode 100644 (file)
index 0000000..388ae95
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// QueryOrderedStreamNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal abstract class QueryOrderedStreamNode<T, TParent> : QueryStreamNode<T, TParent>
+       {
+               internal QueryOrderedStreamNode (QueryBaseNode<TParent> parent, bool isIndexed)
+                       : base (parent, isIndexed)
+               {
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
new file mode 100644 (file)
index 0000000..c712865
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// QueryReverseNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Threading;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryReverseNode<TSource> : QueryStreamNode<TSource, TSource>
+       {
+               ParallelQuery<TSource> source;
+
+               public QueryReverseNode (ParallelQuery<TSource> source)
+                       : base (source.Node, false)
+               {
+                       this.source = source;
+               }
+
+               internal override IEnumerable<TSource> GetSequential ()
+               {
+                       return Parent.GetSequential ().Reverse ();
+               }
+
+               // As stated in the doc, in this case we do nothing
+               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options);
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       ReverseList<TSource> reversed = new ReverseList<TSource> (source.ToListOrdered ());
+                       OrderablePartitioner<TSource> partitioner = ParallelPartitioner.CreateForStrips (reversed, 1);
+
+                       return WrapHelper.Wrap (partitioner.GetOrderablePartitions (options.PartitionCount));
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
new file mode 100644 (file)
index 0000000..5b1a555
--- /dev/null
@@ -0,0 +1,163 @@
+//
+// QueryConcatNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QuerySelectManyNode<TSource, TCollection, TResult> : QueryStreamNode<TResult, TSource>
+       {
+               Func<TSource, IEnumerable<TCollection>> collectionSelector;
+               Func<TSource, int, IEnumerable<TCollection>> collectionSelectorIndexed;
+               Func<TSource, TCollection, TResult> resultSelector;
+               
+               internal QuerySelectManyNode (QueryBaseNode<TSource> parent,
+                                             Func<TSource, int, IEnumerable<TCollection>> collectionSelectorIndexed,
+                                             Func<TSource, TCollection, TResult> resultSelector)
+                       : base (parent, true)
+               {
+                       this.collectionSelectorIndexed = collectionSelectorIndexed;
+                       this.resultSelector = resultSelector;
+               }
+               
+               internal QuerySelectManyNode (QueryBaseNode<TSource> parent,
+                                             Func<TSource, IEnumerable<TCollection>> collectionSelector,
+                                             Func<TSource, TCollection, TResult> resultSelector)
+                       : base (parent, false)
+               {
+                       this.collectionSelector = collectionSelector;
+                       this.resultSelector = resultSelector;
+               }
+               
+               internal override IEnumerable<TResult> GetSequential ()
+               {
+                       IEnumerable<TSource> source = Parent.GetSequential ();
+                       
+                       return IsIndexed ?
+                               source.SelectMany (collectionSelectorIndexed, resultSelector) :
+                               source.SelectMany (collectionSelector, resultSelector);
+               }
+               
+               internal override IList<IEnumerable<TResult>> GetEnumerablesIndexed (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => GetEnumerableInternal (i,
+                                                                      (kv) => collectionSelectorIndexed (kv.Value, (int)kv.Key),
+                                                                      (e, c) => resultSelector (e.Value, c)))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<TResult>> GetEnumerablesNonIndexed (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options)
+                               .Select ((i) => GetEnumerableInternal (i,
+                                                                      collectionSelector,
+                                                                      (e, c) => resultSelector (e, c)))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       var source = Parent.GetOrderedEnumerables (options);
+                       var sizeRequests = new Tuple<long, int, IEnumerable<TCollection>> [options.PartitionCount];
+                       if (collectionSelectorIndexed == null)
+                               collectionSelectorIndexed = (e, i) => collectionSelector (e);
+                       long deviation = 0;
+
+                       Barrier barrier = new Barrier (options.PartitionCount, delegate {
+                                       Array.Sort (sizeRequests, (e1, e2) => e1.Item1.CompareTo (e2.Item1));
+                                       long newDeviation = deviation;
+                                       for (int i = sizeRequests.Length - 1; i >= 0; i--) {
+                                               var reqi = sizeRequests[i];
+                                               long newIndex = reqi.Item1 + deviation;
+                                               newDeviation += reqi.Item2 - 1;
+                                               for (int j = i - 1; j >= 0; j--)
+                                                       newIndex += sizeRequests[j].Item2 - 1;
+                                               sizeRequests[i] = Tuple.Create (newIndex, reqi.Item2, reqi.Item3);
+                                       }
+                                       deviation = newDeviation;
+                               });
+
+                       return source
+                               .Select ((i, ind) => GetOrderedEnumerableInternal (i, sizeRequests, ind, barrier))
+                               .ToList ();
+               }
+               
+               IEnumerable<TResult> GetEnumerableInternal<T> (IEnumerable<T> source,
+                                                              Func<T, IEnumerable<TCollection>> collectionner,
+                                                              Func<T, TCollection, TResult> packer)
+               {
+                       foreach (T element in source)
+                               foreach (TCollection item in collectionner (element))
+                                       yield return packer (element, item);
+               }
+               
+               IEnumerable<KeyValuePair<long, TResult>> GetOrderedEnumerableInternal (IEnumerable<KeyValuePair<long, TSource>> source,
+                                                                                      Tuple<long, int, IEnumerable<TCollection>>[] sizeRequests,
+                                                                                      int index,
+                                                                                      Barrier barrier)
+               {
+                       try {
+                               foreach (KeyValuePair<long, TSource> element in source) {
+                                       IEnumerable<TCollection> collection = collectionSelectorIndexed (element.Value, (int)element.Key);
+                                       sizeRequests[index] = Tuple.Create (element.Key, GetCount (ref collection), collection);
+
+                                       barrier.SignalAndWait ();
+
+                                       long i = sizeRequests[index].Item1;
+                                       collection = sizeRequests[index].Item3;
+
+                                       foreach (TCollection item in collection)
+                                               yield return new KeyValuePair<long, TResult> (i++, resultSelector (element.Value, item));
+                               }
+                       } finally {
+                               barrier.RemoveParticipant ();
+                       }
+               }
+
+               /* If getting Count is a O(1) operation (i.e. actual is a ICollection) then return it immediatly
+                * if not process the IEnumerable into a List and return the Count from that (i.e. enumerable
+                * processing will only happen once in case of e.g. a Linq query)
+                */
+               static int GetCount<T> (ref IEnumerable<T> actual)
+               {
+                       ICollection coll = actual as ICollection;
+                       if (coll != null)
+                               return coll.Count;
+
+                       var foo = actual.ToList ();
+                       actual = foo;
+
+                       return foo.Count;
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
new file mode 100644 (file)
index 0000000..78ffd83
--- /dev/null
@@ -0,0 +1,84 @@
+//
+// QuerySelectNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QuerySelectNode<TResult, TSource> : QueryStreamNode<TResult, TSource>
+       {
+               Func<TSource, int, TResult> indexedSelector;
+               Func<TSource, TResult> selector;
+
+               internal QuerySelectNode (QueryBaseNode<TSource> parent, Func<TSource, TResult> selector)
+                       : base (parent, false)
+               {
+                       this.selector = selector;
+               }
+
+               internal QuerySelectNode (QueryBaseNode<TSource> parent, Func<TSource, int, TResult> selector)
+                       : base (parent, true)
+               {
+                       this.indexedSelector = selector;
+               }
+
+               internal override IEnumerable<TResult> GetSequential ()
+               {
+                       return IsIndexed ?
+                               Parent.GetSequential ().Select (indexedSelector) :
+                               Parent.GetSequential ().Select (selector);
+               }
+
+               internal override IList<IEnumerable<TResult>> GetEnumerablesIndexed (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => i.Select ((e) => indexedSelector (e.Value, (int)e.Key)))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<TResult>> GetEnumerablesNonIndexed (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options)
+                               .Select ((i) => i.Select (selector))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => 
+                                        IsIndexed ? 
+                                        i.Select ((e) => new KeyValuePair<long, TResult> (e.Key, indexedSelector (e.Value, (int)e.Key))) :
+                                        i.Select ((e) => new KeyValuePair<long, TResult> (e.Key, selector (e.Value))))
+                               .ToList ();
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs
new file mode 100644 (file)
index 0000000..66d5f16
--- /dev/null
@@ -0,0 +1,144 @@
+//
+// QueryMuxNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QuerySetNode<TSource> : QueryMuxNode<TSource, TSource, TSource>
+       {
+               readonly SetInclusion setInclusion;
+               readonly IEqualityComparer<TSource> comparer;
+
+               internal QuerySetNode (SetInclusion setInclusion, IEqualityComparer<TSource> comparer,
+                                      QueryBaseNode<TSource> first, QueryBaseNode<TSource> second)
+                       : base (first, second)
+               {
+                       this.setInclusion = setInclusion;
+                       this.comparer = comparer;
+               }
+
+               internal override IEnumerable<TSource> GetSequential ()
+               {
+                       var first = Parent.GetSequential ();
+                       var second = Second == null ? null : Second.GetSequential ();
+
+                       // We try to do some guessing based on the default
+                       switch (setInclusion) {
+                       case SetInclusionDefaults.Union:
+                               return first.Union (second, comparer);
+                       case SetInclusionDefaults.Intersect:
+                               return first.Intersect (second, comparer);
+                       case SetInclusionDefaults.Except:
+                               return first.Except (second, comparer);
+                       case SetInclusionDefaults.Distinct:
+                               return first.Distinct (comparer);
+                       }
+
+                       // Default is we return the bare source enumerable
+                       return first;
+               }
+
+               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
+               {
+                       var first = Parent.GetEnumerables (options);
+                       var second = Second.GetEnumerables (options);
+                       
+                       var checker = new ConcurrentSkipList<TSource> (comparer);
+                       InitConcurrentSkipList (checker, second, (e) => e);
+
+                       return first
+                               .Select ((f, i) => GetEnumerable<TSource> (f, second[i], checker, (e) => e))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       var first = Parent.GetOrderedEnumerables (options);
+                       var second = Second.GetOrderedEnumerables (options);
+
+                       var checker = new ConcurrentSkipList<TSource> (comparer);                       
+                       InitConcurrentSkipList (checker, second, (e) => e.Value);
+
+                       return first
+                               .Select ((f, i) => GetEnumerable<KeyValuePair<long, TSource>> (f, second[i], checker, (e) => e.Value))
+                               .ToList ();
+               }
+                               
+               void InitConcurrentSkipList<TExtract> (ConcurrentSkipList<TSource> checker,
+                                                      IList<IEnumerable<TExtract>> feeds,
+                                                      Func<TExtract, TSource> extractor)
+               {
+                       if ((setInclusion & SetInclusion.Preload) == 0)
+                               return;
+                       
+                       foreach (IEnumerable<TExtract> feed in feeds)
+                               foreach (TExtract item in feed)
+                                       checker.TryAdd (extractor (item));
+               }
+
+               IEnumerable<TExtract> GetEnumerable<TExtract> (IEnumerable<TExtract> first,
+                                                              IEnumerable<TExtract> second,
+                                                              ConcurrentSkipList<TSource> checker,
+                                                              Func<TExtract, TSource> extractor)
+               {
+                       IEnumerator<TExtract> eFirst = first.GetEnumerator ();
+                       IEnumerator<TExtract> eSecond = second == null ? null : second.GetEnumerator ();
+
+                       IEnumerator<TExtract> current = eFirst;
+                       bool outInclusion = (setInclusion & SetInclusion.Out) > 0;
+                       bool preload = (setInclusion & SetInclusion.Preload) > 0;
+                       bool relaxed = (setInclusion & SetInclusion.Relaxed) > 0;
+
+                       try {
+                               while (current != null) {
+                                       while (current.MoveNext ()) {
+                                               bool result = relaxed ?
+                                                       checker.Contains (extractor (current.Current)) : checker.TryAdd (extractor (current.Current));
+
+                                               if ((result && outInclusion)
+                                                   || (!result && !outInclusion))
+                                                       yield return current.Current;
+                                       }
+
+                                       if (current == eFirst && !preload)
+                                               current = eSecond;
+                                       else
+                                               break;
+                               }
+                       } finally {
+                               eFirst.Dispose ();
+                               eSecond.Dispose ();
+                       }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs
new file mode 100644 (file)
index 0000000..fe68467
--- /dev/null
@@ -0,0 +1,123 @@
+//
+// QueryStartNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryStartNode<T> : QueryBaseNode<T>
+       {
+               readonly IEnumerable<T> source;
+               readonly Partitioner<T> customPartitioner;
+
+               internal QueryStartNode (IEnumerable<T> source)
+               {
+                       if (source == null)
+                               throw new ArgumentNullException ("source");
+
+                       this.source = source;
+               }
+
+               internal QueryStartNode (Partitioner<T> custom)
+               {
+                       if (custom == null)
+                               throw new ArgumentNullException ("custom");
+
+                       this.customPartitioner = custom;
+               }
+
+               // If possible, this property will return the number of element the query
+               // is going to process. If that number if pretty low, executing the query
+               // sequentially is better
+               internal int Count {
+                       get {
+                               if (source == null)
+                                       return -1;
+
+                               ICollection coll = source as ICollection;
+                               return coll == null ? -1 : coll.Count;
+                       }
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit<T> (this);
+               }
+
+               internal override IEnumerable<T> GetSequential ()
+               {
+                       if (source != null)
+                               return source;
+
+                       return WrapHelper.Wrap (customPartitioner.GetPartitions (1))[0];
+               }
+
+               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
+               {
+                       if (customPartitioner != null) {
+                               return WrapHelper.Wrap (customPartitioner.GetPartitions (options.PartitionCount));
+                       }
+
+                       Partitioner<T> partitioner
+                               = (options.UseStrip) ? ParallelPartitioner.CreateForStrips (source, 1) : ParallelPartitioner.CreateBest (source);
+
+                       return WrapHelper.Wrap (partitioner.GetPartitions (options.PartitionCount));
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       OrderablePartitioner<T> partitioner = null;
+                       if (customPartitioner != null) {
+                               partitioner = customPartitioner as OrderablePartitioner<T>;
+                               if (partitioner == null)
+                                       throw new InvalidOperationException ("The partitionner you are using doesn't support ordered partitionning");
+                       } else {
+                               partitioner =
+                                       (options.UseStrip) ? ParallelPartitioner.CreateForStrips (source, 1) : ParallelPartitioner.CreateBest (source);
+                       }
+
+                       options.PartitionerSettings = Tuple.Create (partitioner.KeysOrderedAcrossPartitions,
+                                                                   partitioner.KeysOrderedInEachPartition,
+                                                                   partitioner.KeysNormalized);
+
+                       // We only support one style of partitioning at the moment.
+                       // Standard partitioners follow this style.
+                       if (options.UseStrip && (!partitioner.KeysOrderedInEachPartition || partitioner.KeysOrderedAcrossPartitions))
+                               throw new NotImplementedException ("Partitioner must have KeysOrderedInEachPartition "
+                                                                  + "and !KeysOrderedAcrossPartitions"
+                                                                  + "to be used with indexed operators");
+
+                       return WrapHelper.Wrap (partitioner.GetOrderablePartitions (options.PartitionCount));
+               }
+       }
+}
+#endif
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
new file mode 100644 (file)
index 0000000..d53e76f
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// QueryStreamNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal abstract class QueryStreamNode<T, TParent> : QueryChildNode<T, TParent>
+       {
+               bool isIndexed;
+
+               internal QueryStreamNode (QueryBaseNode<TParent> parent, bool isIndexed)
+                       : base (parent)
+               {
+                       this.isIndexed = isIndexed;
+               }
+
+               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
+               {
+                       if (IsIndexed)
+                               return GetEnumerablesIndexed (options);
+                       else
+                               return GetEnumerablesNonIndexed (options);
+               }
+
+               internal virtual IList<IEnumerable<T>> GetEnumerablesIndexed (QueryOptions options)
+               {
+                       return null;
+               }
+
+               internal virtual IList<IEnumerable<T>> GetEnumerablesNonIndexed (QueryOptions options)
+               {
+                       return null;
+               }
+
+               public override void Visit (INodeVisitor visitor)
+               {
+                       visitor.Visit<T, TParent> (this);
+               }
+
+               public bool IsIndexed {
+                       get {
+                               return isIndexed;
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
new file mode 100644 (file)
index 0000000..fc6e007
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// QueryWhereNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Threading;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+
+       internal class QueryWhereNode<TSource> : QueryStreamNode<TSource, TSource>
+       {
+               Func<TSource, int, bool> indexedPredicate;
+               Func<TSource, bool> predicate;
+
+               internal QueryWhereNode (QueryBaseNode<TSource> parent, Func<TSource, bool> predicate)
+                       : base (parent, false)
+               {
+                       this.predicate = predicate;
+               }
+
+               internal QueryWhereNode (QueryBaseNode<TSource> parent, Func<TSource, int, bool> predicate)
+                       : base (parent, true)
+               {
+                       this.indexedPredicate = predicate;
+               }
+
+               internal override IEnumerable<TSource> GetSequential ()
+               {
+                       IEnumerable<TSource> parent = Parent.GetSequential ();
+
+                       if (indexedPredicate != null)
+                               return parent.Where (indexedPredicate);
+                       else
+                               return parent.Where (predicate);
+               }
+
+               internal override IList<IEnumerable<TSource>> GetEnumerablesIndexed (QueryOptions options)
+               {
+                       return Parent.GetOrderedEnumerables (options)
+                               .Select ((i) => i.Where ((e) => indexedPredicate (e.Value, (int)e.Key)).Select ((e) => e.Value))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<TSource>> GetEnumerablesNonIndexed (QueryOptions options)
+               {
+                       return Parent.GetEnumerables (options)
+                               .Select ((i) => i.Where (predicate))
+                               .ToList ();
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       IList<IEnumerable<KeyValuePair<long, TSource>>> sources = Parent.GetOrderedEnumerables (options);
+
+                       Tuple<TSource, long, bool>[] store = new Tuple<TSource, long, bool>[sources.Count];
+                       long lastIndex = 0;
+
+                       Barrier barrier = new Barrier (sources.Count, delegate (Barrier b) {
+                               // Sort the store
+                               Array.Sort (store, ArraySortMethod);
+
+                               // Reassign a good index
+                               int i = 0;
+
+                               for (i = 0; i < store.Length && store[i].Item3; i++) {
+                                       Tuple<TSource, long, bool> old = store[i];
+                                       store[i] = Tuple.Create (old.Item1, lastIndex + i, old.Item3);
+                               }
+
+                               // Update lastIndex for next round
+                               lastIndex += i;
+                       });
+
+                       return sources
+                               .Select ((s, i) => GetEnumerator (s, barrier, options.MergedToken, store, i))
+                               .ToList ();
+               }
+
+               static int ArraySortMethod (Tuple<TSource, long, bool> lhs, Tuple<TSource, long, bool> rhs)
+               {
+                       if (lhs.Item3 && !rhs.Item3)
+                               return -1;
+                       if (!lhs.Item3 && rhs.Item3)
+                               return 1;
+                       if (!lhs.Item3 && !rhs.Item3)
+                               return 0;
+
+                       return (lhs.Item2 < rhs.Item2) ? -1 : 1;
+               }
+
+               IEnumerable<KeyValuePair<long, TSource>> GetEnumerator (IEnumerable<KeyValuePair<long, TSource>> source,
+                                                                       Barrier barrier,
+                                                                       CancellationToken token,
+                                                                       Tuple<TSource, long, bool>[] store, int index)
+               {
+                       IEnumerator<KeyValuePair<long, TSource>> current = source.GetEnumerator ();
+                       bool result;
+                       Tuple<TSource, long, bool> reset = Tuple.Create (default (TSource), long.MaxValue, false);
+
+                       try {
+                               while (current.MoveNext ()) {
+                                       KeyValuePair<long, TSource> curr = current.Current;
+
+                                       result = IsIndexed ? indexedPredicate (curr.Value, (int)curr.Key) : predicate (curr.Value);
+                                       store[index] = Tuple.Create (curr.Value, curr.Key, result);
+
+                                       barrier.SignalAndWait (token);
+
+                                       Tuple<TSource, long, bool> value = store [index];
+
+                                       if (value.Item3)
+                                               yield return new KeyValuePair<long, TSource> (value.Item2, value.Item1);
+
+                                       // Reset
+                                       store[index] = reset;
+                               }
+                       } finally {
+                               // Remove our participation
+                               barrier.RemoveParticipant ();
+                               current.Dispose ();
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs
new file mode 100644 (file)
index 0000000..6285677
--- /dev/null
@@ -0,0 +1,138 @@
+//
+// QueryZipNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Linq;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal class QueryZipNode<TFirst, TSecond, TResult> : QueryMuxNode<TFirst, TSecond, TResult>
+       {
+               Func<TFirst, TSecond, TResult> resultSelector;
+
+               public QueryZipNode (Func<TFirst, TSecond, TResult> resultSelector, QueryBaseNode<TFirst> first, QueryBaseNode<TSecond> second)
+                       : base (first, second)
+               {
+                       this.resultSelector = resultSelector;
+               }
+
+               internal override IEnumerable<TResult> GetSequential ()
+               {
+                       IEnumerable<TFirst> first = Parent.GetSequential ();
+                       IEnumerable<TSecond> second = Second.GetSequential ();
+
+                       return first.Zip (second, resultSelector);
+               }
+
+               internal override IList<IEnumerable<TResult>> GetEnumerables (QueryOptions options)
+               {
+                       var first = Parent.GetEnumerables (options);
+                       var second = Second.GetEnumerables (options);
+
+                       if (first.Count != second.Count)
+                               throw new InvalidOperationException ("Internal size mismatch");
+
+                       return first
+                               .Select ((f, i) => GetEnumerable (f, second[i]))
+                               .ToList ();
+               }
+
+               IEnumerable<TResult> GetEnumerable (IEnumerable<TFirst> first, IEnumerable<TSecond> second)
+               {
+                       IEnumerator<TFirst> eFirst = first.GetEnumerator ();
+                       IEnumerator<TSecond> eSecond = second.GetEnumerator ();
+
+                       try {
+                               while (eFirst.MoveNext ()) {
+                                       if (!eSecond.MoveNext ())
+                                               yield break;
+
+                                       yield return resultSelector (eFirst.Current, eSecond.Current);
+                               }
+                       } finally {
+                               eFirst.Dispose ();
+                               eSecond.Dispose ();
+                       }
+               }
+
+               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
+               {
+                       var first = Parent.GetOrderedEnumerables (options);
+                       var second = Second.GetOrderedEnumerables (options);
+
+                       if (first.Count != second.Count)
+                               throw new InvalidOperationException ("Internal size mismatch");
+
+                       var store1 = new KeyValuePair<long, TFirst>[first.Count];
+                       var store2 = new KeyValuePair<long, TSecond>[second.Count];
+
+                       var barrier = new Barrier (first.Count, delegate {
+                               Array.Sort (store1, (e1, e2) => e1.Key.CompareTo (e2.Key));
+                               Array.Sort (store2, (e1, e2) => e1.Key.CompareTo (e2.Key));
+                       });
+
+                       return first
+                               .Select ((f, i) => GetEnumerable (f, second[i], i , store1, store2, barrier))
+                               .ToList ();
+               }
+
+               IEnumerable<KeyValuePair<long, TResult>> GetEnumerable (IEnumerable<KeyValuePair<long, TFirst>> first,
+                                                                       IEnumerable<KeyValuePair<long, TSecond>> second,
+                                                                       int index,
+                                                                       KeyValuePair<long, TFirst>[] store1,
+                                                                       KeyValuePair<long, TSecond>[] store2,
+                                                                       Barrier barrier)
+               {
+                       var eFirst = first.GetEnumerator ();
+                       var eSecond = second.GetEnumerator ();
+
+                       try {
+                               while (eFirst.MoveNext ()) {
+                                       if (!eSecond.MoveNext ())
+                                               break;
+
+                                       store1[index] = eFirst.Current;
+                                       store2[index] = eSecond.Current;
+
+                                       barrier.SignalAndWait ();
+
+                                       yield return new KeyValuePair<long, TResult> (store1[index].Key,
+                                                                                     resultSelector (store1[index].Value, store2[index].Value));
+                               }
+                       } finally {
+                               barrier.RemoveParticipant ();
+                               eFirst.Dispose ();
+                               eSecond.Dispose ();
+                       }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs
new file mode 100644 (file)
index 0000000..8baf434
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// SetInclusion.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       [Flags]
+       internal enum SetInclusion {
+               In = 0, // Element should already be in checker
+               Out = 1, // Element shouldn't be already in checker
+               Preload = 2, // Preload second node content and only do real work on first node content
+               Relaxed = 4, // first node content isn't added to checker allowing duplicates
+       }
+
+       internal static class SetInclusionDefaults
+       {
+               public const SetInclusion Union = SetInclusion.Out;
+               public const SetInclusion Intersect = SetInclusion.In;
+               public const SetInclusion Except = SetInclusion.In | SetInclusion.Preload | SetInclusion.Relaxed;
+               public const SetInclusion Distinct = SetInclusion.Out | SetInclusion.Preload;
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs
new file mode 100644 (file)
index 0000000..f62ba19
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// WrapHelper.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel.QueryNodes
+{
+       internal static class WrapHelper
+       {
+               class EnumeratorWrapper<TEnum> : IEnumerable<TEnum>
+               {
+                       IEnumerator<TEnum> enumerator;
+
+                       public EnumeratorWrapper (IEnumerator<TEnum> enumerator)
+                       {
+                               this.enumerator = enumerator;
+                       }
+
+                       public IEnumerator<TEnum> GetEnumerator ()
+                       {
+                               return enumerator;
+                       }
+
+                       IEnumerator IEnumerable.GetEnumerator ()
+                       {
+                               return (IEnumerator)enumerator;
+                       }
+               }
+
+               internal static IList<IEnumerable<TEnum>> Wrap<TEnum> (this IList<IEnumerator<TEnum>> src)
+               {
+                       return src.Select ((e) => (IEnumerable<TEnum>)new EnumeratorWrapper<TEnum> (e)).ToArray ();
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs b/mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs
new file mode 100644 (file)
index 0000000..0d403ed
--- /dev/null
@@ -0,0 +1,135 @@
+//
+// AggregationList.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel
+{
+       internal class AggregationList<T> : IList<T>
+       {
+               readonly IList<IList<T>> listes;
+               readonly int count;
+
+               internal AggregationList (IList<IList<T>> listes)
+               {
+                       this.listes = listes;
+                       foreach (var l in listes)
+                               count += l.Count;
+               }
+
+               public int IndexOf (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Insert (int index, T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void RemoveAt (int index)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public T this[int index] {
+                       get {
+                               int listIndex, newIndex;
+                               GetModifiedIndexes (index, out listIndex, out newIndex);
+
+                               return listes[listIndex][newIndex];
+                       }
+                       set {
+                               throw new NotImplementedException();
+                       }
+               }
+
+               void GetModifiedIndexes (int index, out int listIndex, out int newIndex)
+               {
+                       listIndex = 0;
+                       newIndex = index;
+
+                       while (newIndex >= listes[listIndex].Count) {
+                               newIndex -= listes[listIndex].Count;
+                               listIndex++;
+
+                               if (listIndex > listes.Count)
+                                       throw new ArgumentOutOfRangeException ();
+                       }
+               }
+
+               public void Add (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Clear ()
+               {
+                       throw new NotImplementedException();
+               }
+
+               public bool Contains (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void CopyTo (T[] array, int arrayIndex)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public bool Remove (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public int Count {
+                       get {
+                               return count;
+                       }
+               }
+
+               public bool IsReadOnly {
+                       get {
+                               return true;
+                       }
+               }
+
+               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
+               {
+                       return null;
+               }
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return null;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ChangeLog b/mcs/class/System.Core/System.Linq.Parallel/ChangeLog
new file mode 100644 (file)
index 0000000..ac8daaa
--- /dev/null
@@ -0,0 +1,17 @@
+2010-04-29  Jérémie Laval  <jeremie.laval@gmail.com>
+
+       * OrderingEnumerator.cs: Use new non-blocking collection
+       for storing indexed elements.
+
+2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
+
+       * AggregationList.cs:
+       * ConcurrentGrouping.cs:
+       * ConcurrentLookup.cs:
+       * OrderingEnumerator.cs:
+       * ParallelQuickSort.cs:
+       * RangeList.cs:
+       * RepeatList.cs:
+       * ReverseList.cs:
+       * StripPartitioner.cs: Initial check-in of PLinq
+
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs b/mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs
new file mode 100644 (file)
index 0000000..3864b48
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// ConcurrentGrouping.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel
+{
+       internal class ConcurrentGrouping<TKey, TElement> : IGrouping<TKey, TElement>
+       {
+               TKey key;
+               IEnumerable<TElement> elements;
+
+               internal ConcurrentGrouping (TKey key, IEnumerable<TElement> elements)
+               {
+                       this.key = key;
+                       this.elements = elements;
+               }
+
+               public TKey Key {
+                       get {
+                               return key;
+                       }
+               }
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return ((IEnumerable)elements).GetEnumerator ();
+               }
+
+               IEnumerator<TElement> IEnumerable<TElement>.GetEnumerator ()
+               {
+                       return elements.GetEnumerator ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs b/mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs
new file mode 100644 (file)
index 0000000..0cf258e
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// ConcurrentLookup.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel
+{
+       internal class ConcurrentLookup<TKey, TElement> : ILookup<TKey, TElement>
+       {
+               ConcurrentDictionary<TKey, IEnumerable<TElement>> dictionary;
+
+               private class AddSlot
+               {
+                       TElement element;
+
+                       internal AddSlot (TElement element)
+                       {
+                               this.element = element;
+                       }
+
+                       internal IEnumerable<TElement> AddMethod (TKey key)
+                       {
+                               List<TElement> list = new List<TElement> ();
+                               list.Add (element);
+
+                               return list;
+                       }
+
+                       internal IEnumerable<TElement> UpdateMethod (TKey key, IEnumerable<TElement> old)
+                       {
+                               ICollection<TElement> coll = (ICollection<TElement>)old;
+                               coll.Add (element);
+
+                               return coll;
+                       }
+               }
+
+               internal ConcurrentLookup (IEqualityComparer<TKey> comparer)
+               {
+                       this.dictionary = new ConcurrentDictionary<TKey, IEnumerable<TElement>> (comparer);
+               }
+
+               internal void Add (TKey key, TElement element)
+               {
+                       AddSlot slot = new AddSlot (element);
+                       dictionary.AddOrUpdate (key, slot.AddMethod, slot.UpdateMethod);
+               }
+
+               public bool Contains (TKey key)
+               {
+                       return dictionary.ContainsKey (key);
+               }
+
+               public IEnumerable<TElement> this[TKey key] {
+                       get {
+                               return dictionary[key];
+                       }
+               }
+
+               public int Count {
+                       get {
+                               return dictionary.Count;
+                       }
+               }
+               
+               public IList<TKey> Keys {
+                       get {
+                               return (IList<TKey>)dictionary.Keys;
+                       }
+               }
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return (IEnumerator)GetEnumeratorInternal ();
+               }
+
+               IEnumerator<IGrouping<TKey, TElement>> IEnumerable<IGrouping<TKey, TElement>>.GetEnumerator ()
+               {
+                       return GetEnumeratorInternal ();
+               }
+
+               IEnumerator<IGrouping<TKey, TElement>> GetEnumeratorInternal ()
+               {
+                       return dictionary.Select ((pair) => new ConcurrentGrouping<TKey, TElement> (pair.Key, pair.Value)).GetEnumerator ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs b/mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs
new file mode 100644 (file)
index 0000000..0aad3ea
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// INodeVisitor.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq.Parallel.QueryNodes;
+
+namespace System.Linq.Parallel
+{
+       internal interface INodeVisitor
+       {
+               void Visit<T> (QueryBaseNode<T> node);
+               void Visit<U, V> (QueryChildNode<U, V> node);
+               void Visit<T> (QueryOptionNode<T> node);
+               void Visit<T> (QueryStartNode<T> node);
+               void Visit<T, TParent> (QueryStreamNode<T, TParent> node);
+               void Visit<T> (QueryOrderGuardNode<T> node);
+               void Visit<TFirst, TSecond, TResult> (QueryMuxNode<TFirst, TSecond, TResult> node);
+               void Visit<T> (QueryHeadWorkerNode<T> node);
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs b/mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs
new file mode 100644 (file)
index 0000000..013dc53
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// IVisitableNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+
+namespace System.Linq.Parallel
+{
+       internal interface IVisitableNode
+       {
+               void Visit (INodeVisitor visitor);
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs b/mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs
new file mode 100644 (file)
index 0000000..4ebbc49
--- /dev/null
@@ -0,0 +1,214 @@
+//
+// OrderingEnumerator.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel
+{
+       internal class OrderingEnumerator<T> : IEnumerator<T>
+       {
+               internal class SlotBucket
+               {
+                       ConcurrentDictionary<long, T> temporaryArea = new ConcurrentDictionary<long, T> ();
+                       KeyValuePair<long, T>?[] stagingArea;
+                       
+                       long currentIndex;
+                       readonly int count;
+                       CountdownEvent stagingCount;
+                       CountdownEvent participantCount;
+                       CancellationTokenSource src = new CancellationTokenSource ();
+                       CancellationToken mergedToken;
+
+                       public SlotBucket (int count, CancellationToken token)
+                       {
+                               this.count = count;
+                               stagingCount = new CountdownEvent (count);
+                               participantCount = new CountdownEvent (count);
+                               stagingArea = new KeyValuePair<long, T>?[count];
+                               currentIndex = -count;
+                               mergedToken = CancellationTokenSource.CreateLinkedTokenSource (src.Token, token).Token;
+                       }
+
+                       public void Add (KeyValuePair<long, T> value)
+                       {
+                               long index = value.Key;
+                               
+                               if (index >= currentIndex && index < currentIndex + count) {
+                                       stagingArea[index % count] = value;
+                                       stagingCount.Signal ();
+                               } else {
+                                       temporaryArea.TryAdd (index, value.Value);
+                                       if (index >= currentIndex && index < currentIndex + count) {
+                                               T dummy;
+                                               if (temporaryArea.TryRemove (index, out dummy)) {
+                                                       stagingArea[index % count] = value;
+                                                       stagingCount.Signal ();
+                                               }
+                                       }
+                               }
+                       }
+                       
+                       // Called by each worker's endAction
+                       public void EndParticipation ()
+                       {
+                               if (participantCount.Signal ())
+                                       src.Cancel ();
+                       }
+
+                       // Called at the end with ContinueAll
+                       public void Stop ()
+                       {
+                               src.Cancel ();
+                       }
+
+                       void Skim ()
+                       {
+                               for (int i = 0; i < count; i++) {
+                                       T temp;
+                                       int index = i + (int)currentIndex;
+                                       
+                                       if (stagingArea[index % count].HasValue)
+                                               continue;
+
+                                       if (!temporaryArea.TryRemove (index, out temp))
+                                               continue;
+                                       
+                                       stagingArea [index % count] = new KeyValuePair<long, T> (index, temp);
+                                       if (stagingCount.Signal ())
+                                               break;
+                               }
+                       }
+                       
+                       void Clean ()
+                       {
+                               for (int i = 0; i < stagingArea.Length; i++)
+                                       stagingArea[i] = new Nullable<KeyValuePair<long, T>> ();
+                       }
+
+                       public IEnumerator<KeyValuePair<long, T>?> Wait ()
+                       {
+                               Clean ();
+                               stagingCount.Reset ();
+                               
+                               Interlocked.Add (ref currentIndex, count);
+
+                               Skim ();
+
+                               while (!stagingCount.IsSet) {
+                                       if (!participantCount.IsSet)
+                                               try {
+                                                       stagingCount.Wait (mergedToken);
+                                               } catch {
+                                                       Skim ();
+                                               }
+
+                                       if (participantCount.IsSet) {
+                                               // Totally finished
+                                               if (stagingArea[0].HasValue)
+                                                       break;
+                                               else
+                                                       return null;
+                                       }
+                               }
+                               
+                               return ((IEnumerable<KeyValuePair<long, T>?>)stagingArea).GetEnumerator ();
+                       }
+               }
+
+               readonly int num;
+               SlotBucket slotBucket;
+               
+               IEnumerator<KeyValuePair<long, T>?> currEnum;
+               KeyValuePair<long, T> curr;
+
+               internal OrderingEnumerator (int num, CancellationToken token)
+               {
+                       this.num = num;
+                       slotBucket = new SlotBucket (num, token);
+               }
+
+               public void Dispose ()
+               {
+                       slotBucket.Stop ();
+               }
+
+               public void Reset ()
+               {
+
+               }
+
+               public bool MoveNext ()
+               {
+                       do {
+                               while (currEnum == null || !currEnum.MoveNext ()) {
+                                       if (currEnum != null)
+                                               currEnum.Dispose ();
+                                       if ((currEnum = slotBucket.Wait ()) == null)
+                                               return false;
+                               }
+                       } while (!currEnum.Current.HasValue);
+
+                       curr = currEnum.Current.Value;
+
+                       return true;
+               }
+
+               public T Current {
+                       get {
+                               return curr.Value;
+                       }
+               }
+
+               object IEnumerator.Current {
+                       get {
+                               return curr.Value;
+                       }
+               }
+               
+               public void Add (KeyValuePair<long, T> value, CancellationToken token)
+               {
+                       slotBucket.Add (value);
+               }
+                       
+               // Called by each worker's endAction
+               public void EndParticipation ()
+               {
+                       slotBucket.EndParticipation ();
+               }
+               
+               // Called at the end with ContinueAll
+               public void Stop ()
+               {
+                       slotBucket.Stop ();
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
new file mode 100644 (file)
index 0000000..4b53d91
--- /dev/null
@@ -0,0 +1,200 @@
+//
+// ParallelExecuter.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+using System.Linq.Parallel.QueryNodes;
+
+namespace System.Linq.Parallel
+{
+       internal static class ParallelExecuter
+       {
+               internal static QueryOptions CheckQuery<T> (QueryBaseNode<T> startingNode)
+               {
+                       return CheckQuery<T> (startingNode, false);
+               }
+
+               internal static QueryOptions CheckQuery<T> (QueryBaseNode<T> startingNode, bool blocking)
+               {
+                       return CheckQuery (startingNode, GetBestWorkerNumber (blocking));
+               }
+
+               internal static QueryOptions CheckQuery<T> (QueryBaseNode<T> startingNode, int partitionCount)
+               {
+                       QueryCheckerVisitor visitor = new QueryCheckerVisitor (partitionCount);
+                       startingNode.Visit (visitor);
+
+                       return visitor.Options;
+               }
+
+               internal static CancellationToken Chain (this CancellationToken self, CancellationTokenSource other)
+               {
+                       CancellationTokenSource linked = CancellationTokenSource.CreateLinkedTokenSource (self, other.Token);
+                       return linked.Token;
+               }
+
+               internal static bool IsOrdered<TSource> (this QueryBaseNode<TSource> source)
+               {
+                       QueryIsOrderedVisitor visitor = new QueryIsOrderedVisitor ();
+                       source.Visit (visitor);
+
+                       return visitor.BehindOrderGuard;
+               }
+
+               internal static int GetBestWorkerNumber ()
+               {
+                       return GetBestWorkerNumber (false);
+               }
+
+               internal static int GetBestWorkerNumber (bool blocking)
+               {
+                       return blocking ? Environment.ProcessorCount + 1 : Environment.ProcessorCount;
+               }
+
+               internal static Task[] Process<TSource, TElement> (QueryBaseNode<TSource> node,
+                                                                  Action<TElement, CancellationToken> call,
+                                                                  Func<QueryBaseNode<TSource>, QueryOptions, IList<IEnumerable<TElement>>> acquisitionFunc,
+                                                                  QueryOptions options)
+               {
+                       return Process<TSource, TElement> (node, call, acquisitionFunc, null, options);
+               }
+
+               internal static Task[] Process<TSource, TElement> (QueryBaseNode<TSource> node,
+                                                                  Action<TElement, CancellationToken> call,
+                                                                  Func<QueryBaseNode<TSource>, QueryOptions, IList<IEnumerable<TElement>>> acquisitionFunc,
+                                                                  Action endAction,
+                                                                  QueryOptions options)
+               {
+                       CancellationTokenSource src
+                               = CancellationTokenSource.CreateLinkedTokenSource (options.ImplementerToken, options.Token);
+
+                       IList<IEnumerable<TElement>> enumerables = acquisitionFunc (node, options);
+
+                       Task[] tasks = new Task[enumerables.Count];
+
+                       for (int i = 0; i < tasks.Length; i++) {
+                               int index = i;
+                               tasks[i] = Task.Factory.StartNew (() => {
+                                       foreach (TElement item in enumerables[index]) {
+                                               // This is from specific operators
+                                               if (options.ImplementerToken.IsCancellationRequested)
+                                                       break;
+                                               if (options.Token.IsCancellationRequested)
+                                                       throw new OperationCanceledException (options.Token);
+
+                                               call (item, src.Token);
+                                       }
+                                       if (endAction != null)
+                                               endAction ();
+                                 }, options.Token);
+                       }
+
+                       return tasks;
+               }
+
+               internal static void ProcessAndBlock<T> (QueryBaseNode<T> node, Action<T, CancellationToken> call)
+               {
+                       QueryOptions options = CheckQuery (node, true);
+
+                       Task[] tasks = Process (node, call, (n, o) => n.GetEnumerables (o), options);
+                       Task.WaitAll (tasks, options.Token);
+               }
+
+               internal static Action ProcessAndCallback<T> (QueryBaseNode<T> node, Action<T, CancellationToken> call,
+                                                             Action callback, QueryOptions options)
+               {
+                       Task[] tasks = Process (node, call, (n, o) => n.GetEnumerables (o), options);
+                       if (callback != null)
+                               Task.Factory.ContinueWhenAll (tasks,  (_) => callback ());
+
+                       return () => Task.WaitAll (tasks, options.Token);
+               }
+
+               internal static Action ProcessAndCallback<T> (QueryBaseNode<T> node, Action<KeyValuePair<long, T>, CancellationToken> call,
+                                                             Action endAction,
+                                                             Action callback, QueryOptions options)
+               {
+                       Task[] tasks = Process (node, call, (n, o) => n.GetOrderedEnumerables (o), endAction, options);
+                       if (callback != null)
+                               Task.Factory.ContinueWhenAll (tasks,  (_) => callback ());
+
+                       return () => Task.WaitAll (tasks, options.Token);
+               }
+
+               internal static void ProcessAndAggregate<T, U> (QueryBaseNode<T> node,
+                                                               Func<U> seedFunc,
+                                                               Func<U, T, U> localCall,
+                                                               Action<IList<U>> call)
+               {
+                       QueryOptions options = CheckQuery (node, true);
+
+                       IList<IEnumerable<T>> enumerables = node.GetEnumerables (options);
+                       U[] locals = new U[enumerables.Count];
+                       Task[] tasks = new Task[enumerables.Count];
+
+                       if (seedFunc != null) {
+                               for (int i = 0; i < locals.Length; i++)
+                                       locals[i] = seedFunc ();
+                       }
+
+                       for (int i = 0; i < tasks.Length; i++) {
+                               int index = i;
+                               bool firstRun = true;
+
+                               tasks[i] = Task.Factory.StartNew (() => {
+                                       foreach (T item in enumerables[index]) {
+                                               // This is from specific operators
+                                               if (options.ImplementerToken.IsCancellationRequested)
+                                                       break;
+                                               if (options.Token.IsCancellationRequested)
+                                                       throw new OperationCanceledException (options.Token);
+
+                                               if (firstRun && seedFunc == null) {
+                                                       firstRun = false;
+                                                       // HACK: TODO: omgwtfitsuckssomuch
+                                                       locals[index] = (U)(object)item;
+                                                       continue;
+                                               }
+                                               
+                                               U acc = locals[index];
+                                               locals[index] = localCall (acc, item);
+                                       }
+                               }, options.Token);
+                       }
+
+                       Task.WaitAll (tasks, options.Token);
+
+                       if (call != null)
+                               call (locals);
+               }
+       }
+}
+#endif
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs
new file mode 100644 (file)
index 0000000..8f182f2
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// ParallelPartitioner.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+#if NET_4_0
+
+namespace System.Linq.Parallel
+{
+       internal static class ParallelPartitioner
+       {
+               internal static OrderablePartitioner<T> CreateForChunks<T> (IEnumerable<T> source)
+               {
+                       return Partitioner.Create (source);
+               }
+
+               internal static OrderablePartitioner<T> CreateForRange<T> (IList<T> source)
+               {
+                       return Partitioner.Create (source, true);
+               }
+
+               internal static OrderablePartitioner<T> CreateBest<T> (IEnumerable<T> source)
+               {
+                       IList<T> temp = source as IList<T>;
+                       if (temp != null)
+                               return CreateForRange (temp);
+
+                       return CreateForChunks (source);
+               }
+
+               internal static OrderablePartitioner<T> CreateForStrips<T> (IEnumerable<T> source, int stripSize)
+               {
+                       IList<T> temp = source as IList<T>;
+                       if (temp != null)
+                               return new StripPartitioner<T> (temp);
+
+                       return new EnumerablePartitioner<T> (source, stripSize, 1);
+               }
+
+               internal static OrderablePartitioner<int> CreateForRange (int start, int count)
+               {
+                       return CreateForRange<int> (new RangeList (start, count));
+               }
+
+               internal static OrderablePartitioner<T> CreateForRepeat<T> (T obj, int count)
+               {
+                       return CreateForRange<T> (new RepeatList<T> (obj, count));
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs
new file mode 100644 (file)
index 0000000..a3d1752
--- /dev/null
@@ -0,0 +1,131 @@
+//
+// ParallelEnumerator.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+using System.Linq.Parallel.QueryNodes;
+
+namespace System.Linq.Parallel
+{
+       internal class ParallelQueryEnumerator<T> : IEnumerator<T>
+       {
+               readonly int DefaultBufferSize = ParallelExecuter.GetBestWorkerNumber () * 50;
+
+               BlockingCollection<T> buffer;
+               IEnumerator<T> loader;
+               QueryOptions options;
+               OrderingEnumerator<T> ordEnumerator;
+
+               T current;
+
+               Action waitAction;
+
+               internal ParallelQueryEnumerator (QueryBaseNode<T> node)
+               {
+                       this.options = ParallelExecuter.CheckQuery (node);
+
+                       if (options.ShouldBeSequential && options.Mode != ParallelExecutionMode.ForceParallelism) {
+                               IEnumerable<T> buffer = node.GetSequential ();
+                               loader = buffer.GetEnumerator ();
+                       } else {
+                               Setup ();
+
+                               // Launch adding to the buffer asynchronously via Tasks
+                               if (options.BehindOrderGuard.Value) {
+                                       waitAction = ParallelExecuter.ProcessAndCallback (node,
+                                                                                         ordEnumerator.Add,
+                                                                                         ordEnumerator.EndParticipation,
+                                                                                         ordEnumerator.Stop,
+                                                                                         options);
+                               } else {
+                                       waitAction = ParallelExecuter.ProcessAndCallback (node,
+                                                                                         buffer.Add,
+                                                                                         buffer.CompleteAdding,
+                                                                                         options);
+                               }
+
+                               if (options.Options.HasValue && options.Options.Value == ParallelMergeOptions.FullyBuffered)
+                                       waitAction ();
+                       }
+               }
+
+               void Setup ()
+               {
+                       if (!options.BehindOrderGuard.Value) {
+                               if (options.Options.HasValue && (options.Options.Value == ParallelMergeOptions.NotBuffered
+                                                                || options.Options.Value == ParallelMergeOptions.FullyBuffered)) {
+                                       buffer = new BlockingCollection<T> ();
+                               } else {
+                                       buffer = new BlockingCollection<T> (DefaultBufferSize);
+                               }
+
+                               IEnumerable<T> source = buffer.GetConsumingEnumerable (options.MergedToken);
+                               loader = source.GetEnumerator ();
+                       } else {
+                               loader = ordEnumerator = new OrderingEnumerator<T> (options.PartitionCount, options.MergedToken);
+                       }
+               }
+
+               public void Dispose ()
+               {
+
+               }
+
+               public void Reset ()
+               {
+                       throw new NotSupportedException ();
+               }
+
+               public bool MoveNext ()
+               {
+                       // If there are no stuff in the buffer
+                       // but CompleteAdding hasn't been called,
+                       // MoveNext blocks until further results are produced
+                       if (!loader.MoveNext ())
+                               return false;
+
+                       current = loader.Current;
+                       return true;
+               }
+
+               public T Current {
+                       get {
+                               return current;
+                       }
+               }
+
+               object IEnumerator.Current {
+                       get {
+                               return current;
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs
new file mode 100644 (file)
index 0000000..cb46dcc
--- /dev/null
@@ -0,0 +1,285 @@
+//
+// ParallelQuickSort.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Linq;
+using System.Collections;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel
+{
+       // HACK: ATM: parallelization of the sort is disabled as task
+       // add more overhead than gain
+       internal class ParallelQuickSort<T>
+       {
+               readonly Comparison<T> comparison;
+               readonly IList<T> list;
+               readonly int[] indexes;
+
+               class SortedCollection : IList<T>
+               {
+                       int[] indexes;
+                       IList<T> source;
+
+                       public SortedCollection (IList<T> source, int[] indexes)
+                       {
+                               this.indexes = indexes;
+                               this.source = source;
+                       }
+
+                       public int IndexOf (T item)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public void Insert (int index, T item)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public void RemoveAt (int index)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public T this[int index] {
+                               get {
+                                       return source[indexes[index]];
+                               }
+                               set {
+                                       throw new NotImplementedException();
+                               }
+                       }
+
+                       public void Add (T item)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public void Clear ()
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public bool Contains (T item)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public void CopyTo (T[] array, int arrayIndex)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public bool Remove (T item)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public int Count {
+                               get {
+                                       return source.Count;
+                               }
+                       }
+
+                       public bool IsReadOnly {
+                               get {
+                                       return true;
+                               }
+                       }
+
+                       IEnumerator<T> IEnumerable<T>.GetEnumerator ()
+                       {
+                               return null;
+                       }
+
+                       IEnumerator IEnumerable.GetEnumerator ()
+                       {
+                               return null;
+                       }
+               }
+
+               private ParallelQuickSort (IList<T> list, Comparison<T> comparison)
+               {
+                       this.comparison = comparison;
+                       this.list = list;
+                       this.indexes = CreateIndexes (list.Count);
+               }
+
+               static int[] CreateIndexes (int length)
+               {
+                       var indexes = new int[length];
+                       for (int i = 0; i < length; i++)
+                               indexes [i] = i;
+
+                       return indexes;
+               }
+
+               SortedCollection DoSort ()
+               {
+                       if (list.Count > 1) {
+                               if (list.Count < 5)
+                                       InsertionSort (0, list.Count - 1);
+                               else
+                                       Sort (0, list.Count - 1);
+                       }
+
+                       return new SortedCollection (list, indexes);
+               }
+
+               int Comparison (int index1, int index2)
+               {
+                       return comparison (list[index1], list[index2]);
+               }
+
+               void Sort (int left, int right)
+               {
+                       if (left + 3 <= right) {
+                               int l = left, r = right - 1, pivot = MedianOfThree (left, right);
+                               while (true) {
+                                       while (Comparison (indexes [++l], pivot) < 0) { }
+                                       while (Comparison (indexes [--r], pivot) > 0) { }
+                                       if (l < r)
+                                               Swap (l, r);
+                                       else
+                                               break;
+                               }
+
+                               // Restore pivot
+                               Swap (l, right - 1);
+                               // Partition and sort
+                               Sort (left, l - 1);
+                               Sort (l + 1, right);
+                       } else
+                               // If there are three items in the subarray, insertion sort is better
+                               InsertionSort (left, right);
+               }
+
+               /*void Sort (int left, int right, int depth)
+               {
+                       int l = left, r = right - 1, pivot = MedianOfThree (left, right);
+                       while (true) {
+                               while (Comparison (indexes[++l], pivot) < 0);
+                               while (Comparison (indexes[--r], pivot) > 0);
+                               if (l < r)
+                                       Swap (l, r);
+                               else
+                                       break;
+                       }
+
+                       // Restore pivot
+                       Swap (l, right - 1);
+
+                       // Partition and sort in parallel if appropriate
+                       /*if (depth < maxDepth) {
+                               depth <<= 1;
+                               Task t = Task.Factory.StartNew (() => Sort (left, l - 1, depth));
+                               Sort (l + 1, right, depth);
+
+                               t.Wait ();
+                       } else {*/
+                               // Sequential
+               /*              Sort (left, l - 1);
+                               Sort (l + 1, right);
+                       //}
+               }*/
+
+               /*void ShellSort (int left, int right)
+               {
+                       int[] gaps = new int[] { 4, 1};
+
+                       for (int ic = 0; ic < gaps.Length; ic++) {
+                               int inc = gaps[ic];
+                               int l = left + inc;
+                               for (int i = l; i <= right; i++) {
+                                       T temp = list[i];
+                                       int j = i;
+                                       for (; j >= l && comparison (list[j - inc], temp) > 1; j -= inc)
+                                               list[j] = list[j - inc];
+                                       list[j] = temp;
+                               }
+                       }
+               }*/
+
+               void InsertionSort (int left, int right)
+               {
+                       for (int i = left + 1; i <= right; i++) {
+                               int j, tmp = indexes [i];
+
+                               for (j = i; j > left && Comparison (tmp, indexes [j - 1]) < 0; j--)
+                                       indexes [j] = indexes [j - 1];
+
+                               indexes [j] = tmp;
+                       }
+               }
+
+               /*
+               void InsertionSort (int left, int right)
+               {
+                       for (int i = left + 1; i <= right; i++) {
+                               int j;
+                               T tmp = list[i];
+
+                               for (j = i; j > left && comparison (tmp, list [j - 1]) < 0; j--)
+                                       list [j] = list [j - 1];
+
+                               list [j] = tmp;
+                       }
+               }*/
+
+               void Swap (int left, int right)
+               {
+                       int temp = indexes [right];
+                       indexes [right] = indexes [left];
+                       indexes [left] = temp;
+               }
+
+               int MedianOfThree (int left, int right)
+               {
+                       int center = (left + right) >> 1;
+                       if (Comparison (indexes[center], indexes[left]) < 0)
+                               Swap (left, center);
+                       if (Comparison (indexes[right], indexes[left]) < 0)
+                               Swap (left, right);
+                       if (Comparison (indexes[right], indexes[center]) < 0)
+                               Swap (center, right);
+                       Swap (center, right - 1);
+
+                       return indexes[right - 1];
+               }
+
+               public static IList<T> Sort (IList<T> list, Comparison<T> comparison)
+               {
+                       ParallelQuickSort<T> qs = new ParallelQuickSort<T> (list, comparison);
+
+                       return qs.DoSort ();
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs b/mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs
new file mode 100644 (file)
index 0000000..ae175fa
--- /dev/null
@@ -0,0 +1,188 @@
+//
+// QueryCheckerVisitor.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Linq.Parallel.QueryNodes;
+
+namespace System.Linq.Parallel
+{
+       using OptionsList = Tuple<ParallelMergeOptions?, ParallelExecutionMode?, CancellationToken?, int, CancellationTokenSource>;
+
+       internal class QueryCheckerVisitor : INodeVisitor
+       {
+               const int minSequentialThreshold = 20;
+
+               // Information gathering
+               ParallelMergeOptions? options = null;
+               ParallelExecutionMode? mode = null;
+               CancellationToken? token = null;
+               int? degreeOfParallelism = null;
+               CancellationToken implementerToken = CancellationToken.None;
+
+               int partitionCount;
+               bool? behindOrderGuard = null;
+
+               internal QueryCheckerVisitor (int partitionCount)
+               {
+                       this.partitionCount = partitionCount;
+               }
+
+               #region INodeVisitor implementation
+               public void Visit<T> (QueryBaseNode<T> node)
+               {
+                       // Nothing to do atm. Later we can check if the node is a
+                       // Take or a Skip and set accordingly UseStrip
+               }
+
+               public void Visit<U, V> (QueryChildNode<U, V> node)
+               {
+                       node.Parent.Visit (this);
+               }
+
+               public void Visit<T> (QueryOptionNode<T> node)
+               {
+                       MergeOptions (node.GetOptions ());
+
+                       Visit<T, T> ((QueryChildNode<T, T>)node);
+               }
+
+               public void Visit<T> (QueryStartNode<T> node)
+               {
+                       if (behindOrderGuard == null)
+                               behindOrderGuard = false;
+                       if (degreeOfParallelism != null)
+                               partitionCount = degreeOfParallelism.Value;
+
+                       int count;
+                       if ((count = node.Count) != -1 && count < minSequentialThreshold)
+                               ShouldBeSequential = true;
+               }
+
+               public void Visit<T, TParent> (QueryStreamNode<T, TParent> node)
+               {
+                       if (node.IsIndexed)
+                               UseStrip = true;
+
+                       Visit<T, TParent> ((QueryChildNode<T, TParent>)node);
+               }
+
+               public void Visit<T> (QueryOrderGuardNode<T> node)
+               {
+                       if (behindOrderGuard == null) {
+                               if (node.EnsureOrder) {
+                                       behindOrderGuard = true;
+                                       //UseStrip = true;
+                               } else {
+                                       behindOrderGuard = false;
+                               }
+                       }
+
+                       Visit<T, T> ((QueryStreamNode<T, T>)node);
+               }
+
+               public void Visit<TFirst, TSecond, TResult> (QueryMuxNode<TFirst, TSecond, TResult> node)
+               {
+                       Visit<TResult, TFirst> ((QueryChildNode<TResult, TFirst>)node);
+               }
+
+               public void Visit<T> (QueryHeadWorkerNode<T> node)
+               {
+                       // Wouldn't it be better with standard Linq?
+                       if (node.Count.HasValue && node.Count < partitionCount)
+                               ShouldBeSequential = true;
+
+                       Visit<T, T> ((QueryStreamNode<T, T>)node);
+               }
+               #endregion
+
+               internal QueryOptions Options {
+                       get {
+                               return new QueryOptions (options, mode, token == null ? CancellationToken.None : token.Value,
+                                                        UseStrip, behindOrderGuard, partitionCount, implementerToken, ShouldBeSequential);
+                       }
+               }
+
+               internal bool UseStrip {
+                       get;
+                       private set;
+               }
+
+               internal bool BehindOrderGuard {
+                       get {
+                               return behindOrderGuard.Value;
+                       }
+               }
+
+               internal bool ShouldBeSequential {
+                       get;
+                       private set;
+               }
+
+               void MergeOptions (OptionsList list)
+               {
+                       if (list.Item1 != null) {
+                               if (options == null)
+                                       options = list.Item1;
+                               else
+                                       Throw ("WithMergeOptions");
+                       }
+
+                       if (list.Item2 != null) {
+                               if (mode == null)
+                                       mode = list.Item2;
+                               else
+                                       Throw ("WithExecutionMode");
+                       }
+
+                       if (list.Item3 != null) {
+                               if (token == null)
+                                       token = list.Item3;
+                               else
+                                       Throw ("WithCancellationToken");
+                       }
+
+                       if (list.Item4 != -1) {
+                               if (degreeOfParallelism == null)
+                                       degreeOfParallelism = list.Item4;
+                               else
+                                       Throw ("WithDegreeOfParallelism");
+                       }
+
+                       // That one is treated specially
+                       if (list.Item5 != null) {
+                               implementerToken = implementerToken.Chain (list.Item5);
+                       }
+               }
+
+               void Throw (string methName)
+               {
+                       throw new InvalidOperationException ("You can't have more than one " + methName + " node in a query");
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs b/mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs
new file mode 100644 (file)
index 0000000..54a300f
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// QueryIsOrderedVisitor.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Linq.Parallel.QueryNodes;
+
+namespace System.Linq.Parallel
+{
+       internal class QueryIsOrderedVisitor : INodeVisitor
+       {
+               internal bool BehindOrderGuard {
+                       get;
+                       private set;
+               }
+
+               #region INodeVisitor implementation
+               public void Visit<T> (QueryBaseNode<T> node)
+               {
+
+               }
+
+               public void Visit<U, V> (QueryChildNode<U, V> node)
+               {
+                       node.Parent.Visit (this);
+               }
+
+               public void Visit<T> (QueryOptionNode<T> node)
+               {
+                       Visit<T, T> ((QueryChildNode<T, T>)node);
+               }
+
+               public void Visit<T> (QueryStartNode<T> node)
+               {
+               }
+
+               public void Visit<T, TParent> (QueryStreamNode<T, TParent> node)
+               {
+                       Visit<T, TParent> ((QueryChildNode<T, TParent>)node);
+               }
+
+               public void Visit<T> (QueryOrderGuardNode<T> node)
+               {
+                       BehindOrderGuard = node.EnsureOrder;
+               }
+
+               public void Visit<TFirst, TSecond, TResult> (QueryMuxNode<TFirst, TSecond, TResult> node)
+               {
+                       Visit<TResult, TFirst> ((QueryChildNode<TResult, TFirst>)node);
+               }
+
+               public void Visit<T> (QueryHeadWorkerNode<T> node)
+               {
+                       Visit<T, T> ((QueryStreamNode<T, T>)node);
+               }
+               #endregion
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs b/mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs
new file mode 100644 (file)
index 0000000..7ca9a85
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// QueryOptions.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+
+namespace System.Linq.Parallel
+{
+       internal class QueryOptions
+       {
+               public ParallelMergeOptions? Options {
+                       get;
+                       private set;
+               }
+
+               public ParallelExecutionMode? Mode {
+                       get;
+                       private set;
+               }
+
+               public CancellationToken Token {
+                       get;
+                       private set;
+               }
+               /* This token is to be used by some operator (like Take) to tell that
+                * the execution of the query can be prematurly stopped
+                *
+                * It is set when passing QueryOptions to the different node's Get method
+                * and ParallelExecuter should check after the call to this method is this guy has been
+                * set. Operator may chain up multiple cancellation token that way.
+                * When checking for this token, the task body should simply return.
+                */
+               public CancellationToken ImplementerToken {
+                       get;
+                       private set;
+               }
+
+               public bool UseStrip {
+                       get;
+                       private set;
+               }
+
+               public bool? BehindOrderGuard {
+                       get;
+                       private set;
+               }
+
+               public int PartitionCount {
+                       get;
+                       private set;
+               }
+
+               public Tuple<bool, bool, bool> PartitionerSettings {
+                       get;
+                       internal set;
+               }
+
+               public CancellationToken MergedToken {
+                       get;
+                       private set;
+               }
+
+               public bool ShouldBeSequential {
+                       get;
+                       private set;
+               }
+
+               public QueryOptions (ParallelMergeOptions? options,
+                                    ParallelExecutionMode? mode,
+                                    CancellationToken token,
+                                    bool useStrip,
+                                    bool? behindOrderGuard,
+                                    int partitionCount,
+                                    CancellationToken implementerToken,
+                                    bool shouldBeSequential)
+               {
+                       Options = options;
+                       Mode = mode;
+                       Token = token;
+                       UseStrip = useStrip;
+                       BehindOrderGuard = behindOrderGuard;
+                       PartitionCount = partitionCount;
+                       PartitionerSettings = null;
+                       ImplementerToken = implementerToken;
+                       ShouldBeSequential = shouldBeSequential;
+
+                       MergeTokens (token, implementerToken);
+               }
+
+               void MergeTokens (CancellationToken token, CancellationToken implementerToken)
+               {
+                       bool implementedNone = implementerToken == CancellationToken.None;
+                       bool tokenNone = token == CancellationToken.None;
+                       if (!implementedNone && !tokenNone)
+                               MergedToken = CancellationTokenSource.CreateLinkedTokenSource (implementerToken, token).Token;
+                       else if (implementedNone && !tokenNone)
+                               MergedToken = token;
+                       else if (!implementedNone && tokenNone)
+                               MergedToken = implementerToken;
+                       else
+                               MergedToken = CancellationToken.None;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs b/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
new file mode 100644 (file)
index 0000000..5a8985b
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// RangeList.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel
+{
+       internal class RangeList : IList<int>
+       {
+               readonly int start;
+               readonly int count;
+
+               public RangeList (int start, int count)
+               {
+                       this.start = start;
+                       this.count = count;
+               }
+
+               public int IndexOf (int item)
+               {
+                       if (!Contains(item))
+                               return -1;
+
+                       return item - start;
+               }
+
+               public void Insert (int index, int item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void RemoveAt (int index)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public int this[int index] {
+                       get {
+                               if (start + index <= count)
+                                       return start + index;
+                               else
+                                       return -1;
+                       }
+                       set {
+                               throw new NotImplementedException();
+                       }
+               }
+
+               public void Add (int item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Clear ()
+               {
+                       throw new NotImplementedException();
+               }
+
+               public bool Contains (int item)
+               {
+                       return start <= item && item <= start + count - 1;
+               }
+
+               public void CopyTo (int[] array, int arrayIndex)
+               {
+                       int counter = start;
+                       for (int i = arrayIndex; i < array.Length && i < (i - arrayIndex) + count; i++)
+                               array[i] = counter++;
+               }
+
+               public bool Remove (int item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public int Count {
+                       get {
+                               return count;
+                       }
+               }
+
+               public bool IsReadOnly {
+                       get {
+                               return true;
+                       }
+               }
+
+               IEnumerator<int> IEnumerable<int>.GetEnumerator ()
+               {
+                       return null;
+               }
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return null;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs b/mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs
new file mode 100644 (file)
index 0000000..e2c99d2
--- /dev/null
@@ -0,0 +1,119 @@
+//
+// RepeatList.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel
+{
+       internal class RepeatList<T> : IList<T>
+       {
+               readonly int count;
+               readonly T element;
+
+               public RepeatList (T element, int count)
+               {
+                       this.element = element;
+                       this.count = count;
+               }
+
+               public int IndexOf (T item)
+               {
+                       // No real index, we may just be interested if the value is different from -1
+                       return Contains(item) ? 1 : -1;
+               }
+
+               public void Insert (int index, T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void RemoveAt (int index)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public T this[int index] {
+                       get {
+                               return index < count ? element : default(T);
+                       }
+                       set {
+                               throw new NotImplementedException();
+                       }
+               }
+
+               public void Add (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Clear ()
+               {
+                       throw new NotImplementedException();
+               }
+
+               public bool Contains (T item)
+               {
+                       return item.Equals(element);
+               }
+
+               public void CopyTo (T[] array, int arrayIndex)
+               {
+                       for (int i = arrayIndex; i < array.Length && i < (i - arrayIndex) + count; i++)
+                               array[i] = element;
+               }
+
+               public bool Remove (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public int Count {
+                       get {
+                               return count;
+                       }
+               }
+
+               public bool IsReadOnly {
+                       get {
+                               return true;
+                       }
+               }
+
+               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
+               {
+                       return null;
+               }
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return null;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs b/mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs
new file mode 100644 (file)
index 0000000..909de50
--- /dev/null
@@ -0,0 +1,119 @@
+//
+// QueryReverseNode.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System.Linq;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Linq.Parallel
+{
+       internal class ReverseList<T> : IList<T>
+       {
+               readonly IList<T> backend;
+               readonly int count;
+
+               internal ReverseList (IList<T> backend)
+               {
+                       this.backend = backend;
+                       this.count = backend.Count;
+               }
+
+               public int IndexOf (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Insert (int index, T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void RemoveAt (int index)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public T this[int index] {
+                       get {
+                               return backend[count - 1 - index];
+                       }
+                       set {
+                               throw new NotImplementedException();
+                       }
+               }
+
+               public void Add (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Clear ()
+               {
+                       throw new NotImplementedException();
+               }
+
+               public bool Contains (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void CopyTo (T[] array, int arrayIndex)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public bool Remove (T item)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public int Count {
+                       get {
+                               return count;
+                       }
+               }
+
+               public bool IsReadOnly {
+                       get {
+                               return true;
+                       }
+               }
+
+               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
+               {
+                       return null;
+               }
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return null;
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs b/mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs
new file mode 100644 (file)
index 0000000..8b4c412
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// StripPartitioner.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0
+using System;
+using System.Threading;
+using System.Collections.Generic;
+using System.Collections.Concurrent;
+
+namespace System.Linq.Parallel
+{
+       internal class StripPartitioner<T> : OrderablePartitioner<T>
+       {
+               IList<T> source;
+
+               public StripPartitioner (IList<T> source) : base (true, false, true)
+               {
+                       this.source = source;
+               }
+
+               public override IList<IEnumerator<KeyValuePair<long, T>>> GetOrderablePartitions (int partitionCount)
+               {
+                       IEnumerator<KeyValuePair<long, T>>[] array = new IEnumerator<KeyValuePair<long, T>>[partitionCount];
+                       for (int i = 0; i < array.Length; i++)
+                               array[i] = GetStripEnumerator (i, partitionCount);
+
+                       return array;
+               }
+
+               IEnumerator<KeyValuePair<long, T>> GetStripEnumerator (int start, int partitionCount)
+               {
+                       for (int i = start; i < source.Count; i += partitionCount) {
+                               //Console.WriteLine ("Num {0} yielding [{1} : {2}]", start, i, source[i]);
+                               yield return new KeyValuePair<long, T> (i, source [i]);
+                       }
+               }
+       }
+}
+#endif
index 7bbb71c46adb3c182d3ba3c6a6a4ad32c3710db6..5d8e892a335d901bacf20c5bc15c8652b03e3410 100644 (file)
@@ -795,7 +795,7 @@ namespace System.Linq
                {
                        var items = new HashSet<TSource> (second, comparer);
                        foreach (var element in first) {
-                               if (!items.Contains (element))
+                               if (items.Add (element))
                                        yield return element;
                        }
                }
diff --git a/mcs/class/System.Core/System.Linq/Internal/AggregationList.cs b/mcs/class/System.Core/System.Linq/Internal/AggregationList.cs
deleted file mode 100644 (file)
index 50bee2b..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-#if NET_4_0
-//
-// AggregationList.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class AggregationList<T> : IList<T>
-       {
-               readonly IList<IList<T>> listes;
-               readonly int count;
-
-               internal AggregationList (IList<IList<T>> listes)
-               {
-                       this.listes = listes;
-                       foreach (var l in listes)
-                               count += l.Count;
-               }
-
-               public int IndexOf (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void Insert (int index, T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void RemoveAt (int index)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public T this[int index] {
-                       get {
-                               int listIndex, newIndex;
-                               GetModifiedIndexes (index, out listIndex, out newIndex);
-
-                               return listes[listIndex][newIndex];
-                       }
-                       set {
-                               throw new NotImplementedException();
-                       }
-               }
-
-               void GetModifiedIndexes (int index, out int listIndex, out int newIndex)
-               {
-                       listIndex = 0;
-                       newIndex = index;
-
-                       while (newIndex >= listes[listIndex].Count) {
-                               newIndex -= listes[listIndex].Count;
-                               listIndex++;
-
-                               if (listIndex > listes.Count)
-                                       throw new ArgumentOutOfRangeException ();
-                       }
-               }
-
-               public void Add (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void Clear ()
-               {
-                       throw new NotImplementedException();
-               }
-
-               public bool Contains (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void CopyTo (T[] array, int arrayIndex)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public bool Remove (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public int Count {
-                       get {
-                               return count;
-                       }
-               }
-
-               public bool IsReadOnly {
-                       get {
-                               return true;
-                       }
-               }
-
-               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
-               {
-                       return null;
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return null;
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/ChangeLog b/mcs/class/System.Core/System.Linq/Internal/ChangeLog
deleted file mode 100644 (file)
index ac8daaa..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-2010-04-29  Jérémie Laval  <jeremie.laval@gmail.com>
-
-       * OrderingEnumerator.cs: Use new non-blocking collection
-       for storing indexed elements.
-
-2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
-
-       * AggregationList.cs:
-       * ConcurrentGrouping.cs:
-       * ConcurrentLookup.cs:
-       * OrderingEnumerator.cs:
-       * ParallelQuickSort.cs:
-       * RangeList.cs:
-       * RepeatList.cs:
-       * ReverseList.cs:
-       * StripPartitioner.cs: Initial check-in of PLinq
-
diff --git a/mcs/class/System.Core/System.Linq/Internal/ConcurrentGrouping.cs b/mcs/class/System.Core/System.Linq/Internal/ConcurrentGrouping.cs
deleted file mode 100644 (file)
index f1cdd3c..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#if NET_4_0
-//
-// ConcurrentGrouping.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class ConcurrentGrouping<TKey, TElement> : IGrouping<TKey, TElement>
-       {
-               TKey key;
-               IEnumerable<TElement> elements;
-
-               internal ConcurrentGrouping (TKey key, IEnumerable<TElement> elements)
-               {
-                       this.key = key;
-                       this.elements = elements;
-               }
-
-               public TKey Key {
-                       get {
-                               return key;
-                       }
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return ((IEnumerable)elements).GetEnumerator ();
-               }
-
-               IEnumerator<TElement> IEnumerable<TElement>.GetEnumerator ()
-               {
-                       return elements.GetEnumerator ();
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/ConcurrentLookup.cs b/mcs/class/System.Core/System.Linq/Internal/ConcurrentLookup.cs
deleted file mode 100644 (file)
index a39ccb2..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#if NET_4_0
-//
-// ConcurrentLookup.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class ConcurrentLookup<TKey, TElement> : ILookup<TKey, TElement>
-       {
-               ConcurrentDictionary<TKey, IEnumerable<TElement>> dictionary;
-
-               private class AddSlot
-               {
-                       TElement element;
-
-                       internal AddSlot (TElement element)
-                       {
-                               this.element = element;
-                       }
-
-                       internal IEnumerable<TElement> AddMethod (TKey key)
-                       {
-                               List<TElement> list = new List<TElement> ();
-                               list.Add (element);
-
-                               return list;
-                       }
-
-                       internal IEnumerable<TElement> UpdateMethod (TKey key, IEnumerable<TElement> old)
-                       {
-                               ICollection<TElement> coll = (ICollection<TElement>)old;
-                               coll.Add (element);
-
-                               return coll;
-                       }
-               }
-
-               internal ConcurrentLookup (IEqualityComparer<TKey> comparer)
-               {
-                       this.dictionary = new ConcurrentDictionary<TKey, IEnumerable<TElement>> (comparer);
-               }
-
-               internal void Add (TKey key, TElement element)
-               {
-                       AddSlot slot = new AddSlot (element);
-                       dictionary.AddOrUpdate (key, slot.AddMethod, slot.UpdateMethod);
-               }
-
-               public bool Contains (TKey key)
-               {
-                       return dictionary.ContainsKey (key);
-               }
-
-               public IEnumerable<TElement> this[TKey key] {
-                       get {
-                               return dictionary[key];
-                       }
-               }
-
-               public int Count {
-                       get {
-                               return dictionary.Count;
-                       }
-               }
-               
-               public IList<TKey> Keys {
-                       get {
-                               return (IList<TKey>)dictionary.Keys;
-                       }
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return (IEnumerator)GetEnumeratorInternal ();
-               }
-
-               IEnumerator<IGrouping<TKey, TElement>> IEnumerable<IGrouping<TKey, TElement>>.GetEnumerator ()
-               {
-                       return GetEnumeratorInternal ();
-               }
-
-               IEnumerator<IGrouping<TKey, TElement>> GetEnumeratorInternal ()
-               {
-                       return dictionary.Select ((pair) => new ConcurrentGrouping<TKey, TElement> (pair.Key, pair.Value)).GetEnumerator ();
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/OrderingEnumerator.cs b/mcs/class/System.Core/System.Linq/Internal/OrderingEnumerator.cs
deleted file mode 100644 (file)
index 055a5c8..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-#if NET_4_0
-//
-// OrderingEnumerator.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class OrderingEnumerator<T> : IEnumerator<T>
-       {
-               internal class SlotBucket
-               {
-                       ConcurrentDictionary<long, T> temporaryArea = new ConcurrentDictionary<long, T> ();
-                       KeyValuePair<long, T>?[] stagingArea;
-                       
-                       long currentIndex;
-                       readonly int count;
-                       CountdownEvent stagingCount;
-                       CountdownEvent participantCount;
-
-                       public SlotBucket (int count)
-                       {
-                               this.count = count;
-                               stagingCount = new CountdownEvent (count);
-                               participantCount = new CountdownEvent (count);
-                               stagingArea = new KeyValuePair<long, T>?[count];
-                               currentIndex = -count;
-                       }
-
-                       public void Add (KeyValuePair<long, T> value)
-                       {
-                               long index = value.Key;
-                               
-                               if (index >= currentIndex && index < currentIndex + count) {
-                                       stagingArea [index % count] = value;
-                                       stagingCount.Signal ();
-                               } else {
-                                       temporaryArea.TryAdd (value.Key, value.Value);
-                               }
-                       }
-                       
-                       // Called by each worker's endAction
-                       public void EndParticipation ()
-                       {
-                               participantCount.Signal ();
-                       }
-
-                       // Called at the end with ContinueAll
-                       public void Stop ()
-                       {
-                               
-                       }
-
-                       void Skim ()
-                       {
-                               for (int i = 0; i < count; i++) {
-                                       T temp;
-                                       int index = i + (int)currentIndex;
-                                       
-                                       if (stagingArea[index % count].HasValue)
-                                               continue;
-
-                                       if (!temporaryArea.TryRemove (index, out temp))
-                                               continue;
-                                       
-                                       stagingArea [index % count] = new KeyValuePair<long, T> (index, temp);
-                                       //Console.WriteLine ("staged from Skim ({0}, {1})", index, temp);
-                                       stagingCount.Signal ();
-                               }
-                       }
-                       
-                       void Clean ()
-                       {
-                               for (int i = 0; i < stagingArea.Length; i++)
-                                       stagingArea[i] = new Nullable<KeyValuePair<long, T>> ();
-                       }
-
-                       public IEnumerator<KeyValuePair<long, T>?> Wait ()
-                       {
-                               Clean ();
-                               stagingCount.Reset ();
-                               
-                               Interlocked.Add (ref currentIndex, count);
-                               
-                               SpinWait sw = new SpinWait ();
-
-                               while (!stagingCount.IsSet) {
-                                       if (participantCount.IsSet && temporaryArea.IsEmpty) {
-                                               // Totally finished
-                                               if (stagingCount.CurrentCount == count)
-                                                       return null;
-                                               else 
-                                                       break;
-                                       }
-                                       Skim ();
-                                       
-                                       if (!stagingCount.IsSet)
-                                               sw.SpinOnce ();
-                               }
-                               
-                               return ((IEnumerable<KeyValuePair<long, T>?>)stagingArea).GetEnumerator ();
-                       }
-               }
-
-               readonly int num;
-               SlotBucket slotBucket;
-               
-               IEnumerator<KeyValuePair<long, T>?> currEnum;
-               KeyValuePair<long, T> curr;
-
-               internal OrderingEnumerator (int num)
-               {
-                       this.num = num;
-                       slotBucket = new SlotBucket (num);
-               }
-
-               public void Dispose ()
-               {
-
-               }
-
-               public void Reset ()
-               {
-
-               }
-
-               public bool MoveNext ()
-               {
-                       while (currEnum == null || !currEnum.MoveNext ())
-                               if ((currEnum = slotBucket.Wait ()) == null)
-                                       return false;
-                       
-                       while (!currEnum.Current.HasValue)
-                               if (!currEnum.MoveNext ())
-                                       if ((currEnum = slotBucket.Wait ()) == null)
-                                               return false;
-
-                       curr = currEnum.Current.Value;
-
-                       return true;
-               }
-
-               public T Current {
-                       get {
-                               return curr.Value;
-                       }
-               }
-
-               object IEnumerator.Current {
-                       get {
-                               return curr.Value;
-                       }
-               }
-               
-               public void Add (KeyValuePair<long, T> value)
-               {
-                       slotBucket.Add (value);
-               }
-                       
-               // Called by each worker's endAction
-               public void EndParticipation ()
-               {
-                       slotBucket.EndParticipation ();
-               }
-               
-               // Called at the end with ContinueAll
-               public void Stop ()
-               {
-                       slotBucket.Stop ();
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/ParallelQuickSort.cs b/mcs/class/System.Core/System.Linq/Internal/ParallelQuickSort.cs
deleted file mode 100644 (file)
index 52d841b..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-#if NET_4_0
-//
-// ParallelQuickSort.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Collections;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       // HACK: ATM: parallelization of the sort is disabled as task
-       // add more overhead than gain
-       internal class ParallelQuickSort<T>
-       {
-               readonly Comparison<T> comparison;
-               readonly IList<T> list;
-               readonly int[] indexes;
-
-               class SortedCollection : IList<T>
-               {
-                       int[] indexes;
-                       IList<T> source;
-
-                       public SortedCollection (IList<T> source, int[] indexes)
-                       {
-                               this.indexes = indexes;
-                               this.source = source;
-                       }
-
-                       public int IndexOf (T item)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public void Insert (int index, T item)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public void RemoveAt (int index)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public T this[int index] {
-                               get {
-                                       return source[indexes[index]];
-                               }
-                               set {
-                                       throw new NotImplementedException();
-                               }
-                       }
-
-                       public void Add (T item)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public void Clear ()
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public bool Contains (T item)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public void CopyTo (T[] array, int arrayIndex)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public bool Remove (T item)
-                       {
-                               throw new NotImplementedException();
-                       }
-
-                       public int Count {
-                               get {
-                                       return source.Count;
-                               }
-                       }
-
-                       public bool IsReadOnly {
-                               get {
-                                       return true;
-                               }
-                       }
-
-                       IEnumerator<T> IEnumerable<T>.GetEnumerator ()
-                       {
-                               return null;
-                       }
-
-                       IEnumerator IEnumerable.GetEnumerator ()
-                       {
-                               return null;
-                       }
-               }
-
-               private ParallelQuickSort (IList<T> list, Comparison<T> comparison)
-               {
-                       this.comparison = comparison;
-                       this.list = list;
-                       this.indexes = CreateIndexes (list.Count);
-               }
-
-               static int[] CreateIndexes (int length)
-               {
-                       var indexes = new int[length];
-                       for (int i = 0; i < length; i++)
-                               indexes [i] = i;
-
-                       return indexes;
-               }
-
-               SortedCollection DoSort ()
-               {
-                       if (list.Count > 1) {
-                               if (list.Count < 5)
-                                       InsertionSort (0, list.Count - 1);
-                               else
-                                       Sort (0, list.Count - 1);
-                       }
-
-                       return new SortedCollection (list, indexes);
-               }
-
-               int Comparison (int index1, int index2)
-               {
-                       return comparison (list[index1], list[index2]);
-               }
-
-               void Sort (int left, int right)
-               {
-                       if (left + 3 <= right) {
-                               int l = left, r = right - 1, pivot = MedianOfThree (left, right);
-                               while (true) {
-                                       while (Comparison (indexes [++l], pivot) < 0) { }
-                                       while (Comparison (indexes [--r], pivot) > 0) { }
-                                       if (l < r)
-                                               Swap (l, r);
-                                       else
-                                               break;
-                               }
-
-                               // Restore pivot
-                               Swap (l, right - 1);
-                               // Partition and sort
-                               Sort (left, l - 1);
-                               Sort (l + 1, right);
-                       } else
-                               // If there are three items in the subarray, insertion sort is better
-                               InsertionSort (left, right);
-               }
-
-               /*void Sort (int left, int right, int depth)
-               {
-                       int l = left, r = right - 1, pivot = MedianOfThree (left, right);
-                       while (true) {
-                               while (Comparison (indexes[++l], pivot) < 0);
-                               while (Comparison (indexes[--r], pivot) > 0);
-                               if (l < r)
-                                       Swap (l, r);
-                               else
-                                       break;
-                       }
-
-                       // Restore pivot
-                       Swap (l, right - 1);
-
-                       // Partition and sort in parallel if appropriate
-                       /*if (depth < maxDepth) {
-                               depth <<= 1;
-                               Task t = Task.Factory.StartNew (() => Sort (left, l - 1, depth));
-                               Sort (l + 1, right, depth);
-
-                               t.Wait ();
-                       } else {*/
-                               // Sequential
-               /*              Sort (left, l - 1);
-                               Sort (l + 1, right);
-                       //}
-               }*/
-
-               /*void ShellSort (int left, int right)
-               {
-                       int[] gaps = new int[] { 4, 1};
-
-                       for (int ic = 0; ic < gaps.Length; ic++) {
-                               int inc = gaps[ic];
-                               int l = left + inc;
-                               for (int i = l; i <= right; i++) {
-                                       T temp = list[i];
-                                       int j = i;
-                                       for (; j >= l && comparison (list[j - inc], temp) > 1; j -= inc)
-                                               list[j] = list[j - inc];
-                                       list[j] = temp;
-                               }
-                       }
-               }*/
-
-               void InsertionSort (int left, int right)
-               {
-                       for (int i = left + 1; i <= right; i++) {
-                               int j, tmp = indexes [i];
-
-                               for (j = i; j > left && Comparison (tmp, indexes [j - 1]) < 0; j--)
-                                       indexes [j] = indexes [j - 1];
-
-                               indexes [j] = tmp;
-                       }
-               }
-
-               /*
-               void InsertionSort (int left, int right)
-               {
-                       for (int i = left + 1; i <= right; i++) {
-                               int j;
-                               T tmp = list[i];
-
-                               for (j = i; j > left && comparison (tmp, list [j - 1]) < 0; j--)
-                                       list [j] = list [j - 1];
-
-                               list [j] = tmp;
-                       }
-               }*/
-
-               void Swap (int left, int right)
-               {
-                       int temp = indexes [right];
-                       indexes [right] = indexes [left];
-                       indexes [left] = temp;
-               }
-
-               int MedianOfThree (int left, int right)
-               {
-                       int center = (left + right) >> 1;
-                       if (Comparison (indexes[center], indexes[left]) < 0)
-                               Swap (left, center);
-                       if (Comparison (indexes[right], indexes[left]) < 0)
-                               Swap (left, right);
-                       if (Comparison (indexes[right], indexes[center]) < 0)
-                               Swap (center, right);
-                       Swap (center, right - 1);
-
-                       return indexes[right - 1];
-               }
-
-               public static IList<T> Sort (IList<T> list, Comparison<T> comparison)
-               {
-                       ParallelQuickSort<T> qs = new ParallelQuickSort<T> (list, comparison);
-
-                       return qs.DoSort ();
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/ChangeLog b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/ChangeLog
deleted file mode 100644 (file)
index e9e87fa..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
-
-       * QueryBaseNode.cs:
-       * QueryCastNode.cs:
-       * QueryChildNode.cs:
-       * QueryConcatNode.cs:
-       * QueryDefaultEmptyNode.cs:
-       * QueryGroupByNode.cs:
-       * QueryMuxNode.cs:
-       * QueryOptionNode.cs:
-       * QueryOrderByNode.cs:
-       * QueryOrderGuardNode.cs:
-       * QueryOrderedStreamNode.cs:
-       * QueryReverseNode.cs:
-       * QuerySelectManyNode.cs:
-       * QuerySelectNode.cs:
-       * QuerySetNode.cs:
-       * QueryStartNode.cs:
-       * QueryStreamNode.cs:
-       * QueryWhereNode.cs:
-       * QueryZipNode.cs:
-       * WrapHelper.cs: Initial check-in of PLinq
-
-2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
-
-       * SetInclusion.cs: Initial check-in of PLinq (enum)
-
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryBaseNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryBaseNode.cs
deleted file mode 100644 (file)
index 14c1455..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#if NET_4_0
-//
-// QueryBaseNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal abstract class QueryBaseNode<T> : IVisitableNode
-       {
-               public virtual void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit<T> (this);
-               }
-
-               internal abstract IList<IEnumerable<T>> GetEnumerables (QueryOptions options);
-
-               internal abstract IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options);
-
-               internal abstract IEnumerable<T> GetSequential ();
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryCastNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryCastNode.cs
deleted file mode 100644 (file)
index 1bb6f29..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#if NET_4_0
-//
-// QueryCastNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class QueryCastNode<T> : QueryStreamNode<object, T>
-       {
-               public QueryCastNode (QueryBaseNode<T> source)
-                       : base (source, false)
-               {
-
-               }
-               
-               internal override IEnumerable<object> GetSequential ()
-               {
-                       return Parent.GetSequential ().Cast<object> ();
-               }
-               
-               internal override IList<IEnumerable<KeyValuePair<long, object>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, T>>> src = Parent.GetOrderedEnumerables (options);
-                       IEnumerable<KeyValuePair<long, object>>[] result = new IEnumerable<KeyValuePair<long, object>> [src.Count];
-                       
-                       for (int i = 0; i < src.Count; i++)
-                               result[i] = src[i].Select ((e) => new KeyValuePair<long, object> (e.Key, (object)e.Value));
-                       
-                       return result;
-               }
-               
-               internal override IList<IEnumerable<object>> GetEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<T>> src = Parent.GetEnumerables (options);
-                       IEnumerable<object>[] result = new IEnumerable<object> [src.Count];
-                       
-                       for (int i = 0; i < src.Count; i++)
-                               result[i] = src[i].Cast<object> ();
-                       
-                       return result;
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryChildNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryChildNode.cs
deleted file mode 100644 (file)
index c58834a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#if NET_4_0
-//
-// QueryChildNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace System.Linq
-{
-       internal abstract class QueryChildNode<T, TParent> : QueryBaseNode<T>
-       {
-               QueryBaseNode<TParent> parent;
-
-               internal QueryChildNode (QueryBaseNode<TParent> parent)
-               //      : base (isOrdered, true)
-               {
-                       this.parent = parent;
-               }
-
-               internal QueryBaseNode<TParent> Parent {
-                       get {
-                               return parent;
-                       }
-               }
-
-               public override void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit<T, TParent> (this);
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryConcatNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryConcatNode.cs
deleted file mode 100644 (file)
index 16a0e77..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#if NET_4_0
-//
-// QueryConcatNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class QueryConcatNode<TSource> : QueryMuxNode<TSource, TSource, TSource>
-       {
-               public QueryConcatNode (QueryBaseNode<TSource> first, QueryBaseNode<TSource> second)
-                       : this (first, second)
-               {
-               }
-
-               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<TSource>> first = Parent.GetEnumerables (options);
-                       IList<IEnumerable<TSource>> second = Second.GetEnumerables (options);
-
-                       IEnumerable<TSource>[] result = new IEnumerable<TSource>[first.Count];
-
-                       for (int i = 0; i < result.Length; i++)
-                               result[i] = CombineEnumerables (first[i], second[i]);
-
-                       return result;
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> first = Parent.GetOrderedEnumerables (options);
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> second = Second.GetOrderedEnumerables (options);
-
-                       IEnumerable<KeyValuePair<long, TSource>>[] result = new IEnumerable<KeyValuePair<long, TSource>>[first.Count];
-
-                       for (int i = 0; i < result.Length; i++)
-                               result[i] = CombineEnumerables (first[i], second[i]);
-
-                       return result;
-               }
-
-               internal override IEnumerable<TSource> GetSequential ()
-               {
-                       IEnumerable<TSource> first = Parent.GetSequential ();
-                       IEnumerable<TSource> second = Second.GetSequential ();
-
-                       return first.Concat (second);
-               }
-
-               IEnumerable<TResult> CombineEnumerables<TResult> (IEnumerable<TResult> f, IEnumerable<TResult> s)
-               {
-                       foreach (var e in f)
-                               yield return e;
-                       foreach (var e in s)
-                               yield return e;
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryDefaultEmptyNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryDefaultEmptyNode.cs
deleted file mode 100644 (file)
index e5463d0..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#if NET_4_0
-//
-// QueryDefaultEmptyNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class QueryDefaultEmptyNode<TSource> : QueryStreamNode<TSource, TSource>
-       {
-               TSource defaultValue;
-               
-               internal QueryDefaultEmptyNode (QueryBaseNode<TSource> parent, TSource defaultValue)
-                       : base (parent, false)
-               {
-                       this.defaultValue = defaultValue;
-               }
-               
-               internal override IEnumerable<TSource> GetSequential ()
-               {
-                       return Parent.GetSequential ().DefaultIfEmpty (defaultValue);
-               }
-               
-               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<TSource>> enumerables = Parent.GetEnumerables (options);
-                       CountdownEvent evt = new CountdownEvent (enumerables.Count);
-                       IEnumerable<TSource>[] result = new IEnumerable<TSource>[enumerables.Count];
-                       
-                       for (int i = 0; i < enumerables.Count; i++)
-                               result[i] = GetEnumerableInternal<TSource> (enumerables[i], evt, 
-                                                                           (s) => s);
-                       
-                       return result;
-               }
-               
-               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> enumerables = Parent.GetOrderedEnumerables (options);
-                       CountdownEvent evt = new CountdownEvent (enumerables.Count);
-                       IEnumerable<KeyValuePair<long, TSource>>[] result = new IEnumerable<KeyValuePair<long, TSource>>[enumerables.Count];
-                       
-                       for (int i = 0; i < enumerables.Count; i++)
-                               result[i] = GetEnumerableInternal<KeyValuePair<long, TSource>> (enumerables[i], evt, 
-                                                                                               (s) => new KeyValuePair<long, TSource> (0, s));
-                       
-                       return result;
-               }
-               
-               IEnumerable<TSecond> GetEnumerableInternal<TSecond> (IEnumerable<TSecond> source, 
-                                                                    CountdownEvent evt,
-                                                                    Func<TSource, TSecond> converter)
-               {
-                       bool processed = false;
-                       
-                       foreach (TSecond second in source) {
-                               processed = true;
-                               yield return second;
-                       }
-                       
-                       if (!processed && evt.Signal ())
-                               yield return converter (defaultValue);
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryGroupByNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryGroupByNode.cs
deleted file mode 100644 (file)
index 4ccaac9..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#if NET_4_0
-//
-// QueryOrderByNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class QueryGroupByNode<TSource, TKey, TElement> : QueryStreamNode<IGrouping<TKey, TElement>, TSource>
-       {
-               Func<TSource, TKey> keySelector;
-               Func<TSource, TElement> elementSelector;
-               IEqualityComparer<TKey> comparer;
-               
-               public QueryGroupByNode (QueryBaseNode<TSource> parent,
-                                        Func<TSource, TKey> keySelector, 
-                                        Func<TSource, TElement> elementSelector,
-                                        IEqualityComparer<TKey> comparer)
-                       : base (parent, false)
-               {
-                       this.keySelector = keySelector;
-                       this.elementSelector = elementSelector;
-                       this.comparer = comparer;
-               }
-               
-               internal override IEnumerable<IGrouping<TKey, TElement>> GetSequential ()
-               {
-                       IEnumerable<TSource> src =  Parent.GetSequential ();
-                       
-                       return src.GroupBy (keySelector, elementSelector, comparer);
-               }
-               
-               internal override IList<IEnumerable<KeyValuePair<long, IGrouping<TKey, TElement>>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       //ConcurrentLookup<TKey, TElement> lookup = new ConcurrentLookup<TKey, TElement> ();
-                       
-                       //ParallelExecuter.ProcessAndBlock (Parent, (e) => lookup.Add (keySelector (e), elementSelector (e)));
-                       
-                       throw new System.NotImplementedException();
-               }
-               
-               internal override IList<IEnumerable<IGrouping<TKey, TElement>>> GetEnumerables (QueryOptions options)
-               {
-                       throw new System.NotImplementedException();
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryMuxNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryMuxNode.cs
deleted file mode 100644 (file)
index 49fbab6..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#if NET_4_0
-//
-// QueryMuxNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal abstract class QueryMuxNode<TFirst, TSecond, TResult> : QueryChildNode<TResult, TFirst>
-       {
-               QueryBaseNode<TSecond> second;
-
-               internal QueryMuxNode (QueryBaseNode<TFirst> parent, QueryBaseNode<TSecond> second)
-                       : base (parent)
-               {
-                       this.second = second;
-               }
-
-               internal QueryBaseNode<TSecond> Second {
-                       get {
-                               return second;
-                       }
-               }
-
-               public override void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit (this);
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOptionNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOptionNode.cs
deleted file mode 100644 (file)
index ac096c1..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-#if NET_4_0
-//
-// QueryOptionNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       // The first four elements correspond to the public operator With*
-       // Last CancellationToken parameter is used internally for ImplementerToken
-       using OptionsList = Tuple<ParallelMergeOptions?, ParallelExecutionMode?, CancellationToken?, int, CancellationTokenSource>;
-
-       internal class QueryOptionNode<T> : QueryChildNode<T, T>
-       {
-
-               public QueryOptionNode (QueryBaseNode<T> parent)
-                       : base (parent)
-               {
-
-               }
-
-               internal virtual OptionsList GetOptions ()
-               {
-                       return new OptionsList (null, null, null, -1, null);
-               }
-
-               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
-               {
-                       return Parent.GetEnumerables (options);
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       return Parent.GetOrderedEnumerables (options);
-               }
-
-               internal override IEnumerable<T> GetSequential ()
-               {
-                       return Parent.GetSequential ();
-               }
-
-               public override void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit<T> (this);
-               }
-       }
-
-       internal class ParallelExecutionModeNode<T> : QueryOptionNode<T>
-       {
-               ParallelExecutionMode mode;
-
-               internal ParallelExecutionModeNode (ParallelExecutionMode mode, QueryBaseNode<T> parent)
-                       : base (parent)
-               {
-                       this.mode = mode;
-               }
-
-               internal override OptionsList GetOptions ()
-               {
-                       return new OptionsList (null, mode, null, -1, null);
-               }
-       }
-
-
-       internal class ParallelMergeOptionsNode<T> : QueryOptionNode<T>
-       {
-               ParallelMergeOptions opts;
-
-               internal ParallelMergeOptionsNode (ParallelMergeOptions opts, QueryBaseNode<T> parent)
-                       : base (parent)
-               {
-                       this.opts = opts;
-               }
-
-               internal override OptionsList GetOptions ()
-               {
-                       return new OptionsList (opts, null, null, -1, null);
-               }
-       }
-
-
-       internal class CancellationTokenNode<T> : QueryOptionNode<T>
-       {
-               CancellationToken token;
-
-               internal CancellationTokenNode (CancellationToken token, QueryBaseNode<T> parent)
-                       : base (parent)
-               {
-                       this.token = token;
-               }
-
-               internal override OptionsList GetOptions ()
-               {
-                       return new OptionsList (null, null, token, -1, null);
-               }
-       }
-
-       internal class DegreeOfParallelismNode<T> : QueryOptionNode<T>
-       {
-               int degreeParallelism;
-
-               internal DegreeOfParallelismNode (int degreeParallelism, QueryBaseNode<T> parent)
-                       : base (parent)
-               {
-                       this.degreeParallelism = degreeParallelism;
-               }
-
-               internal override OptionsList GetOptions ()
-               {
-                       return new OptionsList (null, null, null, degreeParallelism, null);
-               }
-       }
-
-       internal class ImplementerTokenNode<T> : QueryOptionNode<T>
-       {
-               CancellationTokenSource source;
-
-               internal ImplementerTokenNode (CancellationTokenSource token, QueryBaseNode<T> parent)
-                       : base (parent)
-               {
-                       this.source = token;
-               }
-
-               internal override OptionsList GetOptions ()
-               {
-                       return new OptionsList (null, null, null, -1, source);
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderByNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderByNode.cs
deleted file mode 100644 (file)
index 6261003..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-#if NET_4_0
-//
-// QueryOrderByNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class QueryOrderByNode<T> : QueryOrderGuardNode<T>
-       {
-               Comparison<T> comparison;
-
-               public QueryOrderByNode (QueryBaseNode<T> parent, Comparison<T> comparison)
-                       : base (parent, true)
-               {
-                       this.comparison = comparison;
-               }
-
-
-               public QueryOrderByNode (QueryOrderByNode<T> parent, Comparison<T> comparison)
-                       : base (parent.Parent, true)
-               {
-                       this.comparison = MergeComparison (parent.ComparisonFunc, comparison);
-               }
-
-               public Comparison<T> ComparisonFunc {
-                       get {
-                               return comparison;
-                       }
-               }
-
-               internal override IEnumerable<T> GetSequential ()
-               {
-                       return Parent.GetSequential ().OrderBy ((e) => e, new ComparisonComparer (comparison));
-               }
-
-               private class ComparisonComparer : IComparer<T>
-               {
-                       Comparison<T> comparison;
-
-                       internal ComparisonComparer (Comparison<T> comparison)
-                       {
-                               this.comparison = comparison;
-                       }
-
-                       int IComparer<T>.Compare (T x, T y)
-                       {
-                               return comparison (x, y);
-                       }
-               }
-
-               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
-               {
-                       throw new InvalidOperationException ("Shouldn't be called");
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       int partitionCount;
-                       IList<T> aggregList = GetAggregatedList (out partitionCount);
-                       IList<T> result = ParallelQuickSort<T>.Sort (aggregList, comparison);
-
-                       OrderablePartitioner<T> partitioner = ParallelPartitioner.CreateForStrips (result, 1);
-
-                       return WrapHelper.Wrap (partitioner.GetOrderablePartitions (options.PartitionCount));
-               }
-
-               IList<T> GetAggregatedList (out int partitionCount)
-               {
-                       AggregationList<T> result = null;
-                       partitionCount = -1;
-
-                       ParallelExecuter.ProcessAndAggregate<T, IList<T>> (Parent, () => new List<T> (),
-                                                                          LocalCall,
-                                                                          (ls) => { result = new AggregationList<T> (ls); });
-
-                       return result;
-               }
-
-               IList<T> LocalCall (IList<T> list, T element)
-               {
-                       list.Add (element);
-                       return list;
-               }
-
-               static Comparison<T> MergeComparison (Comparison<T> source, Comparison<T> other)
-               {
-                       return (e1, e2) => {
-                               int result = source (e1, e2);
-                               return result == 0 ? other (e1, e2) : result;
-                       };
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderGuardNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderGuardNode.cs
deleted file mode 100644 (file)
index 8224460..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#if NET_4_0
-// QueryOrderGuardNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal abstract class QueryOrderGuardNode<T> : QueryStreamNode<T, T>
-       {
-               bool ensureOrder;
-
-               internal QueryOrderGuardNode (QueryBaseNode<T> parent, bool ensureOrder)
-                       : base (parent, ensureOrder)
-               {
-                       this.ensureOrder = ensureOrder;
-               }
-
-               public bool EnsureOrder {
-                       get {
-                               return ensureOrder;
-                       }
-               }
-
-               internal override IEnumerable<T> GetSequential ()
-               {
-                       return Parent.GetSequential ();
-               }
-
-               public override void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit<T> (this);
-               }
-       }
-
-       internal class QueryAsUnorderedNode<T> : QueryOrderGuardNode<T>
-       {
-               internal QueryAsUnorderedNode (QueryBaseNode<T> parent)
-                       : base (parent, false)
-               {
-
-               }
-
-               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
-               {
-                       return Parent.GetEnumerables (options);
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       return Parent.GetOrderedEnumerables (options);
-               }
-
-       }
-
-       internal class QueryAsOrderedNode<T> : QueryOrderGuardNode<T>
-       {
-               internal QueryAsOrderedNode (QueryBaseNode<T> parent)
-                       : base (parent, true)
-               {
-
-               }
-
-               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
-               {
-                       return Parent.GetEnumerables (options);
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       return Parent.GetOrderedEnumerables (options);
-               }
-
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderedStreamNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryOrderedStreamNode.cs
deleted file mode 100644 (file)
index 50203fb..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#if NET_4_0
-//
-// QueryOrderedStreamNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace System.Linq
-{
-       internal abstract class QueryOrderedStreamNode<T, TParent> : QueryStreamNode<T, TParent>
-       {
-               internal QueryOrderedStreamNode (QueryBaseNode<TParent> parent, bool isIndexed)
-                       : base (parent, isIndexed)
-               {
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryReverseNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryReverseNode.cs
deleted file mode 100644 (file)
index c8b87cd..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#if NET_4_0
-//
-// QueryReverseNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Threading;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class QueryReverseNode<TSource> : QueryStreamNode<TSource, TSource>
-       {
-               ParallelQuery<TSource> source;
-
-               public QueryReverseNode (ParallelQuery<TSource> source)
-                       : base (source.Node, true)
-               {
-                       this.source = source;
-               }
-
-               internal override IEnumerable<TSource> GetSequential ()
-               {
-                       return Parent.GetSequential ().Reverse ();
-               }
-
-               // As stated in the doc, in this case we do nothing
-               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
-               {
-                       return Parent.GetEnumerables (options);
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       ReverseList<TSource> reversed = new ReverseList<TSource> (source.ToArray ());
-                       OrderablePartitioner<TSource> partitioner = ParallelPartitioner.CreateForStrips (reversed, 1);
-
-                       return WrapHelper.Wrap (partitioner.GetOrderablePartitions (options.PartitionCount));
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySelectManyNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySelectManyNode.cs
deleted file mode 100644 (file)
index 6c189ad..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-#if NET_4_0
-//
-// QueryConcatNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class QuerySelectManyNode<TSource, TCollection, TResult> : QueryStreamNode<TResult, TSource>
-       {
-               Func<TSource, IEnumerable<TCollection>> collectionSelector;
-               Func<TSource, int, IEnumerable<TCollection>> collectionSelectorIndexed;
-               Func<TSource, TCollection, TResult> resultSelector;
-               
-               internal QuerySelectManyNode (QueryBaseNode<TSource> parent,
-                                             Func<TSource, int, IEnumerable<TCollection>> collectionSelectorIndexed,
-                                             Func<TSource, TCollection, TResult> resultSelector)
-                       : base (parent, true)
-               {
-                       this.collectionSelectorIndexed = collectionSelectorIndexed;
-                       this.resultSelector = resultSelector;
-               }
-               
-               internal QuerySelectManyNode (QueryBaseNode<TSource> parent,
-                                             Func<TSource, IEnumerable<TCollection>> collectionSelector,
-                                             Func<TSource, TCollection, TResult> resultSelector)
-                       : base (parent, false)
-               {
-                       this.collectionSelector = collectionSelector;
-                       this.resultSelector = resultSelector;
-               }
-               
-               internal override IEnumerable<TResult> GetSequential ()
-               {
-                       IEnumerable<TSource> source = Parent.GetSequential ();
-                       
-                       if (IsIndexed)
-                               return source.SelectMany (collectionSelectorIndexed, resultSelector);
-                       else
-                               return source.SelectMany (collectionSelector, resultSelector);
-               }
-               
-               internal override IList<IEnumerable<TResult>> GetEnumerables (QueryOptions options)
-               {
-                       IEnumerable<TResult>[] result = null;
-                       
-                       if (IsIndexed) {
-                               IList<IEnumerable<KeyValuePair<long, TSource>>> enumerables = Parent.GetOrderedEnumerables (options);
-                               result = new IEnumerable<TResult>[enumerables.Count];
-                               
-                               for (int i = 0; i < enumerables.Count; i++)
-                                       result[i] = GetEnumerableInternal<KeyValuePair<long, TSource>> (enumerables[i],
-                                                                                                       (kv) => collectionSelectorIndexed (kv.Value, (int)kv.Key),
-                                                                                                       (e, c) => resultSelector (e.Value, c));
-                       } else {
-                               IList<IEnumerable<TSource>> enumerables = Parent.GetEnumerables (options);
-                               result = new IEnumerable<TResult>[enumerables.Count];
-                               
-                               for (int i = 0; i < enumerables.Count; i++)
-                                       result[i] = GetEnumerableInternal<TSource> (enumerables[i],
-                                                                                   collectionSelector,
-                                                                                   (e, c) => resultSelector (e, c));
-                       }
-                       
-                       return result;
-               }
-               
-               // This one is gonna be tricky
-               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       throw new NotImplementedException ();
-               }
-               
-               IEnumerable<TResult> GetEnumerableInternal<T> (IEnumerable<T> source,
-                                                              Func<T, IEnumerable<TCollection>> collectionner,
-                                                              Func<T, TCollection, TResult> packer)
-               {
-                       foreach (T element in source)
-                               foreach (TCollection item in collectionner (element))
-                                       yield return packer (element, item);
-               }
-               
-               IEnumerable<KeyValuePair<long, TResult>> GetOrderedEnumerableInternal (IEnumerable<KeyValuePair<long, TSource>> source,
-                                                                                      Barrier barrier)
-               {
-                       foreach (KeyValuePair<long, TSource> element in source) {
-                               IEnumerable<TCollection> collection = collectionSelectorIndexed (element.Value, (int)element.Key);
-                               
-                               foreach (TCollection item in collection)
-                                       yield return new KeyValuePair<long, TResult> (-1, resultSelector (element.Value, item));
-                       }
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySelectNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySelectNode.cs
deleted file mode 100644 (file)
index defbcbe..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#if NET_4_0
-//
-// QuerySelectNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class QuerySelectNode<TResult, TSource> : QueryStreamNode<TResult, TSource>
-       {
-               Func<TSource, int, TResult> indexedSelector;
-               Func<TSource, TResult> selector;
-
-               internal QuerySelectNode (QueryBaseNode<TSource> parent, Func<TSource, TResult> selector)
-                       : base (parent, false)
-               {
-                       this.selector = selector;
-               }
-
-               internal QuerySelectNode (QueryBaseNode<TSource> parent, Func<TSource, int, TResult> selector)
-                       : base (parent, true)
-               {
-                       this.indexedSelector = selector;
-               }
-
-               internal override IEnumerable<TResult> GetSequential ()
-               {
-                       if (IsIndexed)
-                               return Parent.GetSequential ().Select (indexedSelector);
-                       else
-                               return Parent.GetSequential ().Select (selector);
-               }
-
-               internal override IList<IEnumerable<TResult>> GetEnumerables (QueryOptions options)
-               {
-                       if (IsIndexed) {
-                               IList<IEnumerable<KeyValuePair<long, TSource>>> sources = Parent.GetOrderedEnumerables (options);
-                               IEnumerable<TResult>[] results = new IEnumerable<TResult>[sources.Count];
-                               for (int i = 0; i < results.Length; i++)
-                                       results[i] = sources[i].Select ((e) => indexedSelector (e.Value, (int)e.Key));
-                               return results;
-                       } else {
-                               IList<IEnumerable<TSource>> sources = Parent.GetEnumerables (options);
-                               IEnumerable<TResult>[] results = new IEnumerable<TResult>[sources.Count];
-
-                               for (int i = 0; i < results.Length; i++)
-                                       results[i] = sources[i].Select (selector);
-                               return results;
-                       }
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> sources = Parent.GetOrderedEnumerables (options);
-                       IEnumerable<KeyValuePair<long, TResult>>[] results = new IEnumerable<KeyValuePair<long, TResult>>[sources.Count];
-
-                       if (IsIndexed) {
-                               for (int i = 0; i < results.Length; i++)
-                                       results[i] = sources[i].
-                                               Select ((e) => new KeyValuePair<long, TResult> (e.Key, indexedSelector (e.Value, (int)e.Key)));
-                       } else {
-                               for (int i = 0; i < results.Length; i++)
-                                       results[i] = sources[i].
-                                               Select ((e) => new KeyValuePair<long, TResult> (e.Key, selector (e.Value)));
-                       }
-
-                       return results;
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySetNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QuerySetNode.cs
deleted file mode 100644 (file)
index 4ea309a..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-#if NET_4_0
-//
-// QueryMuxNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class QuerySetNode<TSource> : QueryMuxNode<TSource, TSource, TSource>
-       {
-               readonly SetInclusion setInclusion;
-               readonly IEqualityComparer<TSource> comparer;
-
-               internal QuerySetNode (SetInclusion setInclusion, IEqualityComparer<TSource> comparer,
-                                      QueryBaseNode<TSource> first, QueryBaseNode<TSource> second)
-                       : base (first, second)
-               {
-                       this.setInclusion = setInclusion;
-                       this.comparer = comparer;
-               }
-
-               internal override IEnumerable<TSource> GetSequential ()
-               {
-                       IEnumerable<TSource> first = Parent.GetSequential ();
-                       IEnumerable<TSource> second = Second == null ? null : Second.GetSequential ();
-
-                       // We try to do some guessing based on the default
-                       switch (setInclusion) {
-                       case SetInclusionDefaults.Union:
-                               return first.Union (second, comparer);
-                       case SetInclusionDefaults.Intersect:
-                               return first.Intersect (second, comparer);
-                       case SetInclusionDefaults.Except:
-                               return first.Except (second, comparer);
-                       case SetInclusionDefaults.Distinct:
-                               return first.Distinct (comparer);
-                       }
-
-                       // Default is we return the bare source enumerable
-                       return first;
-               }
-
-               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<TSource>> first = Parent.GetEnumerables (options);
-                       IList<IEnumerable<TSource>> second = Second.GetEnumerables (options);
-                       
-                       IEnumerable<TSource>[] result = new IEnumerable<TSource>[first.Count];
-                       ConcurrentSkipList<TSource> checker = new ConcurrentSkipList<TSource> (comparer);
-                       
-                       InitConcurrentSkipList (checker, second, (e) => e);
-
-                       for (int i = 0; i < result.Length; i++)
-                               result[i] = GetEnumerable<TSource> (first[i], second[i], checker, (e) => e);
-
-                       return result;
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> first = Parent.GetOrderedEnumerables (options);
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> second = Second.GetOrderedEnumerables (options);
-
-                       IEnumerable<KeyValuePair<long, TSource>>[] result = new IEnumerable<KeyValuePair<long, TSource>>[first.Count];
-                       ConcurrentSkipList<TSource> checker = new ConcurrentSkipList<TSource> (comparer);
-                       
-                       InitConcurrentSkipList (checker, second, (e) => e.Value);
-
-                       for (int i = 0; i < result.Length; i++)
-                               result[i] = GetEnumerable<KeyValuePair<long, TSource>> (first[i], second[i], checker, (e) => e.Value);
-
-                       return result;
-               }
-                               
-               void InitConcurrentSkipList<TExtract> (ConcurrentSkipList<TSource> checker,
-                                                      IList<IEnumerable<TExtract>> feeds,
-                                                      Func<TExtract, TSource> extractor)
-               {
-                       if ((setInclusion & SetInclusion.Preload) == 0)
-                               return;
-                       
-                       foreach (IEnumerable<TExtract> feed in feeds)
-                               foreach (TExtract item in feed)
-                                       checker.TryAdd (extractor (item));
-               }
-
-               IEnumerable<TExtract> GetEnumerable<TExtract> (IEnumerable<TExtract> first,
-                                                              IEnumerable<TExtract> second,
-                                                              ConcurrentSkipList<TSource> checker,
-                                                              Func<TExtract, TSource> extractor)
-               {
-                       IEnumerator<TExtract> eFirst = first.GetEnumerator ();
-                       IEnumerator<TExtract> eSecond = second == null ? null : second.GetEnumerator ();
-
-                       IEnumerator<TExtract> current = eFirst;
-                       bool outInclusion = (setInclusion & SetInclusion.Out) > 0;
-                       bool preload = (setInclusion & SetInclusion.Preload) > 0;
-                       bool relaxed = (setInclusion & SetInclusion.Relaxed) > 0;
-
-                       while (current != null) {
-                               while (current.MoveNext ()) {
-                                       bool result = relaxed ?
-                                               checker.Contains (extractor (current.Current)) : checker.TryAdd (extractor (current.Current));
-
-                                       if ((result && outInclusion)
-                                           || (!result && !outInclusion))
-                                               yield return current.Current;
-                               }
-
-                               if (current == eFirst && !preload)
-                                       current = eSecond;
-                               else
-                                       break;
-                       }
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryStartNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryStartNode.cs
deleted file mode 100644 (file)
index 58ac27e..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#if NET_4_0
-//
-// QueryStartNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Linq
-{
-       internal class QueryStartNode<T> : QueryBaseNode<T>
-       {
-               readonly IEnumerable<T> source;
-               readonly Partitioner<T> customPartitioner;
-
-               internal QueryStartNode (IEnumerable<T> source)
-               {
-                       if (source == null)
-                               throw new ArgumentNullException ("source");
-
-                       this.source = source;
-               }
-
-               internal QueryStartNode (Partitioner<T> custom)
-               {
-                       if (custom == null)
-                               throw new ArgumentNullException ("custom");
-
-                       this.customPartitioner = custom;
-               }
-
-               public override void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit<T> (this);
-               }
-
-               internal override IEnumerable<T> GetSequential ()
-               {
-                       if (source != null)
-                               return source;
-
-                       return WrapHelper.Wrap (customPartitioner.GetPartitions (1))[0];
-               }
-
-               internal override IList<IEnumerable<T>> GetEnumerables (QueryOptions options)
-               {
-                       if (customPartitioner != null) {
-                               return WrapHelper.Wrap (customPartitioner.GetPartitions (options.PartitionCount));
-                       }
-
-                       Partitioner<T> partitioner
-                               = (options.UseStrip) ? ParallelPartitioner.CreateForStrips (source, 1) : ParallelPartitioner.CreateBest (source);
-
-                       return WrapHelper.Wrap (partitioner.GetPartitions (options.PartitionCount));
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, T>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       OrderablePartitioner<T> partitioner = null;
-                       if (customPartitioner != null) {
-                               partitioner = customPartitioner as OrderablePartitioner<T>;
-                               if (partitioner == null)
-                                       throw new InvalidOperationException ("The partitionner you are using doesn't support ordered partitionning");
-                       } else {
-                               partitioner =
-                                       (options.UseStrip) ? ParallelPartitioner.CreateForStrips (source, 1) : ParallelPartitioner.CreateBest (source);
-                       }
-
-                       options.PartitionerSettings = Tuple.Create (partitioner.KeysOrderedAcrossPartitions,
-                                                                   partitioner.KeysOrderedInEachPartition,
-                                                                   partitioner.KeysNormalized);
-
-                       // We only support one style of partitioning at the moment.
-                       // Standard partitioners follow this style.
-                       if (options.UseStrip && (!partitioner.KeysOrderedInEachPartition || partitioner.KeysOrderedAcrossPartitions))
-                               throw new NotImplementedException ("Partitioner must have KeysOrderedInEachPartition "
-                                                                  + "and !KeysOrderedAcrossPartitions"
-                                                                  + "to be used with indexed operators");
-
-                       return WrapHelper.Wrap (partitioner.GetOrderablePartitions (options.PartitionCount));
-               }
-       }
-}
-#endif
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryStreamNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryStreamNode.cs
deleted file mode 100644 (file)
index 572b2c5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#if NET_4_0
-//
-// QueryStreamNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal abstract class QueryStreamNode<T, TParent> : QueryChildNode<T, TParent>
-       {
-               bool isIndexed;
-
-               internal QueryStreamNode (QueryBaseNode<TParent> parent, bool isIndexed)
-                       : base (parent)
-               {
-                       this.isIndexed = isIndexed;
-               }
-
-               public override void Visit (INodeVisitor visitor)
-               {
-                       visitor.Visit<T, TParent> (this);
-               }
-
-               public bool IsIndexed {
-                       get {
-                               return isIndexed;
-                       }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryWhereNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryWhereNode.cs
deleted file mode 100644 (file)
index 74f09d6..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-#if NET_4_0
-//
-// QueryWhereNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Threading;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-
-       internal class QueryWhereNode<TSource> : QueryStreamNode<TSource, TSource>
-       {
-               Func<TSource, int, bool> indexedPredicate;
-               Func<TSource, bool> predicate;
-
-               internal QueryWhereNode (QueryBaseNode<TSource> parent, Func<TSource, bool> predicate)
-                       : base (parent, false)
-               {
-                       this.predicate = predicate;
-               }
-
-               internal QueryWhereNode (QueryBaseNode<TSource> parent, Func<TSource, int, bool> predicate)
-                       : base (parent, true)
-               {
-                       this.indexedPredicate = predicate;
-               }
-
-               internal override IEnumerable<TSource> GetSequential ()
-               {
-                       IEnumerable<TSource> parent = Parent.GetSequential ();
-
-                       if (indexedPredicate != null)
-                               return parent.Where (indexedPredicate);
-                       else
-                               return parent.Where (predicate);
-               }
-
-               internal override IList<IEnumerable<TSource>> GetEnumerables (QueryOptions options)
-               {
-                       if (IsIndexed) {
-                               IList<IEnumerable<KeyValuePair<long, TSource>>> sources = Parent.GetOrderedEnumerables (options);
-                               IEnumerable<TSource>[] results = new IEnumerable<TSource>[sources.Count];
-
-                               for (int i = 0; i < results.Length; i++)
-                                       results[i] =
-                                               sources[i].Where ((e) => indexedPredicate (e.Value, (int)e.Key)).Select ((e) => e.Value);
-                               return results;
-                       } else {
-                               IList<IEnumerable<TSource>> sources = Parent.GetEnumerables (options);
-                               IEnumerable<TSource>[] results = new IEnumerable<TSource>[sources.Count];
-
-                               for (int i = 0; i < results.Length; i++)
-                                       results[i] = sources[i].Where (predicate);
-                               return results;
-                       }
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, TSource>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, TSource>>> sources = Parent.GetOrderedEnumerables (options);
-                       IEnumerable<KeyValuePair<long, TSource>>[] results = new IEnumerable<KeyValuePair<long, TSource>>[sources.Count];
-
-                       Tuple<TSource, long, bool>[] store = new Tuple<TSource, long, bool>[results.Length];
-                       long lastIndex = 0;
-
-                       Barrier barrier = new Barrier (results.Length, delegate (Barrier b) {
-                               // Sort the store
-                               Array.Sort (store, ArraySortMethod);
-
-                               // Reassign a good index
-                               int i = 0;
-
-                               for (i = 0; i < store.Length && store[i].Item3; i++) {
-                                       Tuple<TSource, long, bool> old = store[i];
-                                       store[i] = Tuple.Create (old.Item1, lastIndex + i, old.Item3);
-                               }
-
-                               // Update lastIndex for next round
-                               lastIndex += i;
-                       });
-
-                       for (int j = 0; j < results.Length; j++)
-                               results[j] = GetEnumerator (sources[j], barrier, store, j);
-
-                       return results;
-               }
-
-               static int ArraySortMethod (Tuple<TSource, long, bool> lhs, Tuple<TSource, long, bool> rhs)
-               {
-                       if (lhs.Item3 && !rhs.Item3)
-                               return -1;
-                       if (!lhs.Item3 && rhs.Item3)
-                               return 1;
-                       if (!lhs.Item3 && !rhs.Item3)
-                               return 0;
-
-                       return (lhs.Item2 < rhs.Item2) ? -1 : 1;
-               }
-
-               IEnumerable<KeyValuePair<long, TSource>> GetEnumerator (IEnumerable<KeyValuePair<long, TSource>> source,
-                                                                       Barrier barrier,
-                                                                       Tuple<TSource, long, bool>[] store, int index)
-               {
-                       IEnumerator<KeyValuePair<long, TSource>> current = source.GetEnumerator ();
-                       bool result;
-
-                       while (current.MoveNext ()) {
-                               KeyValuePair<long, TSource> curr = current.Current;
-
-                               if (IsIndexed)
-                                       result = indexedPredicate (curr.Value, (int)curr.Key);
-                               else
-                                       result = predicate (curr.Value);
-
-                               store[index] = Tuple.Create (curr.Value, curr.Key, result);
-                               barrier.SignalAndWait ();
-
-                               Tuple<TSource, long, bool> value = store [index];
-
-                               if (value.Item3)
-                                       yield return new KeyValuePair<long, TSource> (value.Item2, value.Item1);
-
-                               // Reset
-                               store[index] = Tuple.Create (default (TSource), long.MaxValue, false);
-                       }
-
-                       // Remove our participation
-                       barrier.RemoveParticipant ();
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryZipNode.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/QueryZipNode.cs
deleted file mode 100644 (file)
index 8268db5..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-#if NET_4_0
-//
-// QueryZipNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class QueryZipNode<TFirst, TSecond, TResult> : QueryMuxNode<TFirst, TSecond, TResult>
-       {
-               Func<TFirst, TSecond, TResult> resultSelector;
-
-               public QueryZipNode (Func<TFirst, TSecond, TResult> resultSelector, QueryBaseNode<TFirst> first, QueryBaseNode<TSecond> second)
-                       : base (first, second)
-               {
-                       this.resultSelector = resultSelector;
-               }
-
-               internal override IEnumerable<TResult> GetSequential ()
-               {
-                       IEnumerable<TFirst> first = Parent.GetSequential ();
-                       IEnumerable<TSecond> second = Second.GetSequential ();
-
-                       return first.Zip (second, resultSelector);
-               }
-
-               internal override IList<IEnumerable<TResult>> GetEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<TFirst>> first = Parent.GetEnumerables (options);
-                       IList<IEnumerable<TSecond>> second = Second.GetEnumerables (options);
-
-                       if (first.Count != second.Count)
-                               throw new InvalidOperationException ("Internal size mismatch");
-
-                       IEnumerable<TResult>[] result = new IEnumerable<TResult>[first.Count];
-
-                       for (int i = 0; i < result.Length; i++)
-                               result[i] = GetEnumerable (first[i], second[i]);
-
-                       return result;
-               }
-
-               IEnumerable<TResult> GetEnumerable (IEnumerable<TFirst> first, IEnumerable<TSecond> second)
-               {
-                       IEnumerator<TFirst> eFirst = first.GetEnumerator ();
-                       IEnumerator<TSecond> eSecond = second.GetEnumerator ();
-
-                       while (eFirst.MoveNext ()) {
-                               if (!eSecond.MoveNext ())
-                                       yield break;
-
-                               yield return resultSelector (eFirst.Current, eSecond.Current);
-                       }
-               }
-
-               internal override IList<IEnumerable<KeyValuePair<long, TResult>>> GetOrderedEnumerables (QueryOptions options)
-               {
-                       IList<IEnumerable<KeyValuePair<long, TFirst>>> first = Parent.GetOrderedEnumerables (options);
-                       IList<IEnumerable<KeyValuePair<long, TSecond>>> second = Second.GetOrderedEnumerables (options);
-
-                       if (first.Count != second.Count)
-                               throw new InvalidOperationException ("Internal size mismatch");
-
-                       IEnumerable<KeyValuePair<long, TResult>>[] result = new IEnumerable<KeyValuePair<long, TResult>>[first.Count];
-
-                       KeyValuePair<long, TFirst>[] store1 = new KeyValuePair<long, TFirst>[result.Length];
-                       KeyValuePair<long, TSecond>[] store2 = new KeyValuePair<long, TSecond>[result.Length];
-
-                       Barrier barrier = new Barrier (result.Length, delegate {
-                               Array.Sort (store1, (e1, e2) => e1.Key.CompareTo (e2.Key));
-                               Array.Sort (store2, (e1, e2) => e1.Key.CompareTo (e2.Key));
-                       });
-
-                       for (int i = 0; i < result.Length; i++)
-                               result[i] = GetEnumerable (first[i], second[i], i, store1, store2, barrier);
-
-                       return result;
-               }
-
-               IEnumerable<KeyValuePair<long, TResult>> GetEnumerable (IEnumerable<KeyValuePair<long, TFirst>> first,
-                                                                       IEnumerable<KeyValuePair<long, TSecond>> second,
-                                                                       int index,
-                                                                       KeyValuePair<long, TFirst>[] store1,
-                                                                       KeyValuePair<long, TSecond>[] store2,
-                                                                       Barrier barrier)
-               {
-                       IEnumerator<KeyValuePair<long, TFirst>> eFirst = first.GetEnumerator ();
-                       IEnumerator<KeyValuePair<long, TSecond>> eSecond = second.GetEnumerator ();
-
-                       while (eFirst.MoveNext ()) {
-                               if (!eSecond.MoveNext ())
-                                       break;
-
-                               store1[index] = eFirst.Current;
-                               store2[index] = eSecond.Current;
-
-                               barrier.SignalAndWait ();
-
-                               yield return new KeyValuePair<long, TResult> (store1[index].Key,
-                                                                                resultSelector (store1[index].Value, store2[index].Value));
-                       }
-
-                       barrier.RemoveParticipant ();
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/SetInclusion.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/SetInclusion.cs
deleted file mode 100644 (file)
index a1ef21c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#if NET_4_0
-//
-// SetInclusion.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       [Flags]
-       internal enum SetInclusion {
-               In = 0, // Element should already be in checker
-               Out = 1, // Element shouldn't be already in checker
-               Preload = 2, // Preload second node content and only do real work on first node content
-               Relaxed = 4, // first node content isn't added to checker allowing duplicates
-       }
-
-       internal static class SetInclusionDefaults
-       {
-               public const SetInclusion Union = SetInclusion.Out;
-               public const SetInclusion Intersect = SetInclusion.In;
-               public const SetInclusion Except = SetInclusion.In | SetInclusion.Preload | SetInclusion.Relaxed;
-               public const SetInclusion Distinct = SetInclusion.Out | SetInclusion.Preload;
-       }
-}
-
-#endif
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq/Internal/QueryNodes/WrapHelper.cs b/mcs/class/System.Core/System.Linq/Internal/QueryNodes/WrapHelper.cs
deleted file mode 100644 (file)
index a44d61a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#if NET_4_0
-//
-// WrapHelper.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class WrapHelper
-       {
-               class EnumeratorWrapper<TEnum> : IEnumerable<TEnum>
-               {
-                       IEnumerator<TEnum> enumerator;
-
-                       public EnumeratorWrapper (IEnumerator<TEnum> enumerator)
-                       {
-                               this.enumerator = enumerator;
-                       }
-
-                       public IEnumerator<TEnum> GetEnumerator ()
-                       {
-                               return enumerator;
-                       }
-
-                       IEnumerator IEnumerable.GetEnumerator ()
-                       {
-                               return (IEnumerator)enumerator;
-                       }
-               }
-
-               internal static IList<IEnumerable<TEnum>> Wrap<TEnum> (IList<IEnumerator<TEnum>> src)
-               {
-                       return src.Select ((e) => (IEnumerable<TEnum>)new EnumeratorWrapper<TEnum> (e)).ToArray ();
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/RangeList.cs b/mcs/class/System.Core/System.Linq/Internal/RangeList.cs
deleted file mode 100644 (file)
index 43e7ed2..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#if NET_4_0
-//
-// RangeList.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class RangeList : IList<int>
-       {
-               readonly int start;
-               readonly int count;
-
-               public RangeList (int start, int count)
-               {
-                       this.start = start;
-                       this.count = count;
-               }
-
-               public int IndexOf (int item)
-               {
-                       if (!Contains(item))
-                               return -1;
-
-                       return item - start;
-               }
-
-               public void Insert (int index, int item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void RemoveAt (int index)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public int this[int index] {
-                       get {
-                               if (start + index <= count)
-                                       return start + index;
-                               else
-                                       return -1;
-                       }
-                       set {
-                               throw new NotImplementedException();
-                       }
-               }
-
-               public void Add (int item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void Clear ()
-               {
-                       throw new NotImplementedException();
-               }
-
-               public bool Contains (int item)
-               {
-                       return start <= item && item <= start + count - 1;
-               }
-
-               public void CopyTo (int[] array, int arrayIndex)
-               {
-                       int counter = start;
-                       for (int i = arrayIndex; i < array.Length && i < (i - arrayIndex) + count; i++)
-                               array[i] = counter++;
-               }
-
-               public bool Remove (int item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public int Count {
-                       get {
-                               return count;
-                       }
-               }
-
-               public bool IsReadOnly {
-                       get {
-                               return true;
-                       }
-               }
-
-               IEnumerator<int> IEnumerable<int>.GetEnumerator ()
-               {
-                       return null;
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return null;
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/RepeatList.cs b/mcs/class/System.Core/System.Linq/Internal/RepeatList.cs
deleted file mode 100644 (file)
index 35bbd10..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-#if NET_4_0
-//
-// RepeatList.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class RepeatList<T> : IList<T>
-       {
-               readonly int count;
-               readonly T element;
-
-               public RepeatList (T element, int count)
-               {
-                       this.element = element;
-                       this.count = count;
-               }
-
-               public int IndexOf (T item)
-               {
-                       // No real index, we may just be interested if the value is different from -1
-                       return Contains(item) ? 1 : -1;
-               }
-
-               public void Insert (int index, T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void RemoveAt (int index)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public T this[int index] {
-                       get {
-                               return index < count ? element : default(T);
-                       }
-                       set {
-                               throw new NotImplementedException();
-                       }
-               }
-
-               public void Add (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void Clear ()
-               {
-                       throw new NotImplementedException();
-               }
-
-               public bool Contains (T item)
-               {
-                       return item.Equals(element);
-               }
-
-               public void CopyTo (T[] array, int arrayIndex)
-               {
-                       for (int i = arrayIndex; i < array.Length && i < (i - arrayIndex) + count; i++)
-                               array[i] = element;
-               }
-
-               public bool Remove (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public int Count {
-                       get {
-                               return count;
-                       }
-               }
-
-               public bool IsReadOnly {
-                       get {
-                               return true;
-                       }
-               }
-
-               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
-               {
-                       return null;
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return null;
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/ReverseList.cs b/mcs/class/System.Core/System.Linq/Internal/ReverseList.cs
deleted file mode 100644 (file)
index b5ca7d0..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-#if NET_4_0
-//
-// QueryReverseNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System.Linq;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Linq
-{
-       internal class ReverseList<T> : IList<T>
-       {
-               readonly IList<T> backend;
-               readonly int count;
-
-               internal ReverseList (IList<T> backend)
-               {
-                       this.backend = backend;
-                       this.count = backend.Count;
-               }
-
-               public int IndexOf (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void Insert (int index, T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void RemoveAt (int index)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public T this[int index] {
-                       get {
-                               return backend[count - 1 - index];
-                       }
-                       set {
-                               throw new NotImplementedException();
-                       }
-               }
-
-               public void Add (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void Clear ()
-               {
-                       throw new NotImplementedException();
-               }
-
-               public bool Contains (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public void CopyTo (T[] array, int arrayIndex)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public bool Remove (T item)
-               {
-                       throw new NotImplementedException();
-               }
-
-               public int Count {
-                       get {
-                               return count;
-                       }
-               }
-
-               public bool IsReadOnly {
-                       get {
-                               return true;
-                       }
-               }
-
-               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
-               {
-                       return null;
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return null;
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/StripPartitioner.cs b/mcs/class/System.Core/System.Linq/Internal/StripPartitioner.cs
deleted file mode 100644 (file)
index 699cb09..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#if NET_4_0
-//
-// StripPartitioner.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       internal class StripPartitioner<T> : OrderablePartitioner<T>
-       {
-               IList<T> source;
-
-               public StripPartitioner (IList<T> source) : base (true, false, true)
-               {
-                       this.source = source;
-               }
-
-               public override IList<IEnumerator<KeyValuePair<long, T>>> GetOrderablePartitions (int partitionCount)
-               {
-                       IEnumerator<KeyValuePair<long, T>>[] array = new IEnumerator<KeyValuePair<long, T>>[partitionCount];
-                       for (int i = 0; i < array.Length; i++)
-                               array[i] = GetStripEnumerator (i, partitionCount);
-
-                       return array;
-               }
-
-               IEnumerator<KeyValuePair<long, T>> GetStripEnumerator (int start, int partitionCount)
-               {
-                       for (int i = start; i < source.Count; i += partitionCount) {
-                               //Console.WriteLine ("Num {0} yielding [{1} : {2}]", start, i, source[i]);
-                               yield return new KeyValuePair<long, T> (i, source [i]);
-                       }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/Visitors/ChangeLog b/mcs/class/System.Core/System.Linq/Internal/Visitors/ChangeLog
deleted file mode 100644 (file)
index 55e3ece..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-2010-04-15  Jérémie Laval  <jeremie.laval@gmail.com>
-
-       * INodeVisitor.cs:
-       * IVisitableNode.cs:
-       * QueryCheckerVisitor.cs:
-       * QueryOptions.cs: First check-in of PLinq
-
diff --git a/mcs/class/System.Core/System.Linq/Internal/Visitors/INodeVisitor.cs b/mcs/class/System.Core/System.Linq/Internal/Visitors/INodeVisitor.cs
deleted file mode 100644 (file)
index 1b056fd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#if NET_4_0
-//
-// INodeVisitor.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace System.Linq
-{
-       internal interface INodeVisitor
-       {
-               void Visit<T> (QueryBaseNode<T> node);
-               void Visit<U, V> (QueryChildNode<U, V> node);
-               void Visit<T> (QueryOptionNode<T> node);
-               void Visit<T> (QueryStartNode<T> node);
-               void Visit<T, TParent> (QueryStreamNode<T, TParent> node);
-               void Visit<T> (QueryOrderGuardNode<T> node);
-               void Visit<TFirst, TSecond, TResult> (QueryMuxNode<TFirst, TSecond, TResult> node);
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/Visitors/IVisitableNode.cs b/mcs/class/System.Core/System.Linq/Internal/Visitors/IVisitableNode.cs
deleted file mode 100644 (file)
index 5d7326f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#if NET_4_0
-//
-// IVisitableNode.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace System.Linq
-{
-       internal interface IVisitableNode
-       {
-               void Visit (INodeVisitor visitor);
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/Visitors/QueryCheckerVisitor.cs b/mcs/class/System.Core/System.Linq/Internal/Visitors/QueryCheckerVisitor.cs
deleted file mode 100644 (file)
index df5660f..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-#if NET_4_0
-//
-// QueryCheckerVisitor.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-
-namespace System.Linq
-{
-       using OptionsList = Tuple<ParallelMergeOptions?, ParallelExecutionMode?, CancellationToken?, int, CancellationTokenSource>;
-
-       internal class QueryCheckerVisitor : INodeVisitor
-       {
-               // Information gathering
-               ParallelMergeOptions? options = null;
-               ParallelExecutionMode? mode = null;
-               CancellationToken? token = null;
-               int? degreeOfParallelism = null;
-               bool useStrip;
-               CancellationToken implementerToken = CancellationToken.None;
-
-               int partitionCount;
-               bool? behindOrderGuard = null;
-
-               internal QueryCheckerVisitor (int partitionCount)
-               {
-                       this.partitionCount = partitionCount;
-               }
-
-               #region INodeVisitor implementation
-               public void Visit<T> (QueryBaseNode<T> node)
-               {
-                       // Nothing to do atm. Later we can check if the node is a
-                       // Take or a Skip and set accordingly useStrip
-               }
-
-               public void Visit<U, V> (QueryChildNode<U, V> node)
-               {
-                       node.Parent.Visit (this);
-               }
-
-               public void Visit<T> (QueryOptionNode<T> node)
-               {
-                       MergeOptions (node.GetOptions ());
-
-                       Visit<T, T> ((QueryChildNode<T, T>)node);
-               }
-
-               public void Visit<T> (QueryStartNode<T> node)
-               {
-                       if (behindOrderGuard == null)
-                               behindOrderGuard = false;
-                       if (degreeOfParallelism != null)
-                               partitionCount = degreeOfParallelism.Value;
-               }
-
-               public void Visit<T, TParent> (QueryStreamNode<T, TParent> node)
-               {
-                       if (node.IsIndexed)
-                               useStrip = true;
-
-                       Visit<T, TParent> ((QueryChildNode<T, TParent>)node);
-               }
-
-               public void Visit<T> (QueryOrderGuardNode<T> node)
-               {
-                       if (node.EnsureOrder && behindOrderGuard == null)
-                               behindOrderGuard = true;
-               }
-
-               public void Visit<TFirst, TSecond, TResult> (QueryMuxNode<TFirst, TSecond, TResult> node)
-               {
-
-                       Visit<TResult, TFirst> ((QueryChildNode<TResult, TFirst>)node);
-               }
-               #endregion
-
-               internal QueryOptions Options {
-                       get {
-                               return new QueryOptions (options, mode, token == null ? CancellationToken.None : token.Value,
-                                                        useStrip, behindOrderGuard, partitionCount, implementerToken);
-                       }
-               }
-
-               internal bool UseStrip {
-                       get {
-                               return useStrip;
-                       }
-               }
-
-               internal bool BehindOrderGuard {
-                       get {
-                               return behindOrderGuard.Value;
-                       }
-               }
-
-               void MergeOptions (OptionsList list)
-               {
-                       if (list.Item1 != null) {
-                               if (options == null)
-                                       options = list.Item1;
-                               else
-                                       Throw ("WithMergeOptions");
-                       }
-
-                       if (list.Item2 != null) {
-                               if (mode == null)
-                                       mode = list.Item2;
-                               else
-                                       Throw ("WithExecutionMode");
-                       }
-
-                       if (list.Item3 != null) {
-                               if (token == null)
-                                       token = list.Item3;
-                               else
-                                       Throw ("WithCancellationToken");
-                       }
-
-                       if (list.Item4 != -1) {
-                               if (degreeOfParallelism == null)
-                                       degreeOfParallelism = list.Item4;
-                               else
-                                       Throw ("WithDegreeOfParallelism");
-                       }
-
-                       // That one is treated specially
-                       if (list.Item5 != null) {
-                               implementerToken = implementerToken.Chain (list.Item5);
-                       }
-               }
-
-               void Throw (string methName)
-               {
-                       throw new InvalidOperationException ("You can't have more than one " + methName + " node in a query");
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Internal/Visitors/QueryOptions.cs b/mcs/class/System.Core/System.Linq/Internal/Visitors/QueryOptions.cs
deleted file mode 100644 (file)
index f6d0702..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#if NET_4_0
-//
-// QueryOptions.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-
-namespace System.Linq
-{
-       internal class QueryOptions
-       {
-               public ParallelMergeOptions? Options;
-               public ParallelExecutionMode? Mode;
-               public CancellationToken Token;
-               /* This token is to be used by some operator (like Take) to tell that
-                * the execution of the query can be prematurly stopped
-                *
-                * It is set when passing QueryOptions to the different node's Get method
-                * and ParallelExecuter should check after the call to this method is this guy has been
-                * set. Operator may chain up multiple cancellation token that way.
-                * When checking for this token, the task body should simply return.
-                */
-               public CancellationToken ImplementerToken;
-               public bool UseStrip;
-               public bool? BehindOrderGuard;
-               public int PartitionCount;
-               public Tuple<bool, bool, bool> PartitionerSettings;
-
-               public QueryOptions (ParallelMergeOptions? options,
-                                    ParallelExecutionMode? mode,
-                                    CancellationToken token,
-                                    bool useStrip,
-                                    bool? behindOrderGuard,
-                                    int partitionCount,
-                                    CancellationToken implementerToken)
-               {
-                       Options = options;
-                       Mode = mode;
-                       Token = token;
-                       UseStrip = useStrip;
-                       BehindOrderGuard = behindOrderGuard;
-                       PartitionCount = partitionCount;
-                       PartitionerSettings = null;
-                       ImplementerToken = implementerToken;
-               }
-       }
-}
-#endif
index a8b80b78d65135da81abec27ce345fee29ad7d0d..842555c4c4b77ce44bd69bc969ee80bf19bd7420 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 //
 // ParallelQuery.cs
 //
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.Threading;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Concurrent;
+using System.Linq.Parallel.QueryNodes;
 
 namespace System.Linq
 {
@@ -49,6 +50,11 @@ namespace System.Linq
                                return node;
                        }
                }
+
+               public override IEnumerator<TSource> GetEnumerator ()
+               {
+                       return base.GetEnumerator ();
+               }
        }
 }
 #endif
index 5c33a10137dda7e22b05c7485d9aa6df69b90c57..0f02818bebc95d73dd1880787a62bd28ad23ad67 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 //
 // ParallelEnumerable.cs
 //
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.Threading;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Concurrent;
+using System.Linq.Parallel;
+using System.Linq.Parallel.QueryNodes;
 
 namespace System.Linq
 {
@@ -95,7 +97,7 @@ namespace System.Linq
                        return source.AsSequential ();
                }
 
-               public static IEnumerable<TSource> AsSequential<TSource> (      this ParallelQuery<TSource> source)
+               public static IEnumerable<TSource> AsSequential<TSource> (this ParallelQuery<TSource> source)
                {
                        if (source == null)
                                throw new ArgumentNullException ("source");
@@ -353,7 +355,7 @@ namespace System.Linq
                        if (action == null)
                                throw new ArgumentNullException ("action");
 
-                       ParallelExecuter.ProcessAndBlock (source.Node, action);
+                       ParallelExecuter.ProcessAndBlock (source.Node, (e, c) => action (e));
                }
                #endregion
 
@@ -367,7 +369,7 @@ namespace System.Linq
                        if (keySelector == null)
                                throw new ArgumentNullException ("keySelector");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = Comparer<TKey>.Default;
 
                        Comparison<TSource> comparison = (e1, e2) => -comparer.Compare (keySelector (e1), keySelector (e2));
 
@@ -395,7 +397,7 @@ namespace System.Linq
                        if (keySelector == null)
                                throw new ArgumentNullException ("keySelector");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = Comparer<TKey>.Default;
 
                        Comparison<TSource> comparison = (e1, e2) => comparer.Compare (keySelector (e1), keySelector (e2));
 
@@ -419,7 +421,7 @@ namespace System.Linq
                        if (keySelector == null)
                                throw new ArgumentNullException ("keySelector");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = Comparer<TKey>.Default;
 
                        Comparison<TSource> comparison = (e1, e2) => comparer.Compare (keySelector (e1), keySelector (e2));
 
@@ -441,7 +443,7 @@ namespace System.Linq
                        if (keySelector == null)
                                throw new ArgumentNullException ("keySelector");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = Comparer<TKey>.Default;
 
                        Comparison<TSource> comparison = (e1, e2) => -comparer.Compare (keySelector (e1), keySelector (e2));
 
@@ -461,12 +463,17 @@ namespace System.Linq
                        ParallelQuery<TSource> innerQuery = source.WithImplementerToken (src);
 
                        bool result = true;
-                       innerQuery.ForAll ((e) => {
-                               if (!predicate (e)) {
-                                       result = false;
-                                       src.Cancel ();
-                               }
-                       });
+                       try {
+                               innerQuery.ForAll ((e) => {
+                                               if (!predicate (e)) {
+                                                       result = false;
+                                                       src.Cancel ();
+                                               }
+                                       });
+                       } catch (OperationCanceledException e) {
+                               if (e.CancellationToken != src.Token)
+                                       throw e;
+                       }
 
                        return result;
                }
@@ -500,7 +507,7 @@ namespace System.Linq
                        if (source == null)
                                throw new ArgumentNullException ("source");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TSource>.Default;
 
                        return Any<TSource> (source, (e) => comparer.Equals (value));
                }
@@ -527,7 +534,7 @@ namespace System.Linq
                        if (second == null)
                                throw new ArgumentNullException ("second");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TSource>.Default;
 
                        CancellationTokenSource source = new CancellationTokenSource ();
                        ParallelQuery<bool> innerQuery
@@ -535,10 +542,15 @@ namespace System.Linq
 
                        bool result = true;
 
-                       innerQuery.ForAll ((value) => {
-                               result = false;
-                               source.Cancel ();
-                       });
+                       try {
+                               innerQuery.ForAll ((value) => {
+                                               result = false;
+                                               source.Cancel ();
+                                       });
+                       } catch (OperationCanceledException e) {
+                               if (e.CancellationToken != source.Token)
+                                       throw e;
+                       }
 
                        return result;
                }
@@ -564,13 +576,13 @@ namespace System.Linq
                #endregion
                
                #region GroupBy
-               public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey> (  this ParallelQuery<TSource> source,
+               public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey> (this ParallelQuery<TSource> source,
                                                                                              Func<TSource, TKey> keySelector)
                {
                        return source.GroupBy (keySelector, EqualityComparer<TKey>.Default);
                }
                
-               public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey> (  this ParallelQuery<TSource> source,
+               public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey> (this ParallelQuery<TSource> source,
                                                                                              Func<TSource, TKey> keySelector,
                                                                                              IEqualityComparer<TKey> comparer)
                {
@@ -597,7 +609,16 @@ namespace System.Linq
                                                                                                         Func<TSource, TElement> elementSelector,
                                                                                                         IEqualityComparer<TKey> comparer)
                {
-                       throw new NotImplementedException ();
+                       if (source == null)
+                               throw new ArgumentNullException ("source");
+                       if (keySelector == null)
+                               throw new ArgumentNullException ("keySelector");
+                       if (elementSelector == null)
+                               throw new ArgumentNullException ("elementSelector");
+                       if (comparer == null)
+                               comparer = EqualityComparer<TKey>.Default;
+
+                       return new ParallelQuery<IGrouping<TKey, TElement>> (new QueryGroupByNode<TSource, TKey, TElement> (source.Node, keySelector, elementSelector, comparer));
                }
                
                public static ParallelQuery<TResult> GroupBy<TSource, TKey, TElement, TResult> (this ParallelQuery<TSource> source,
@@ -609,7 +630,7 @@ namespace System.Linq
                                .Select ((g) => resultSelector (g.Key, (IEnumerable<TElement>)g));
                }
                
-               public static ParallelQuery<TResult> GroupBy<TSource, TKey, TResult> (  this ParallelQuery<TSource> source,
+               public static ParallelQuery<TResult> GroupBy<TSource, TKey, TResult> (this ParallelQuery<TSource> source,
                                                                                      Func<TSource, TKey> keySelector,
                                                                                      Func<TKey, IEnumerable<TSource>, TResult> resultSelector,
                                                                                      IEqualityComparer<TKey> comparer)
@@ -646,7 +667,7 @@ namespace System.Linq
                                                                                               Func<TOuter, IEnumerable<TInner>, TResult> resultSelector,
                                                                                               IEqualityComparer<TKey> comparer)
                {
-                       throw new NotImplementedException ();
+                       return outer.Join (inner.GroupBy (innerKeySelector, (e) => e), outerKeySelector, (e) => e.Key, (e1, e2) => resultSelector (e1, e2), comparer);
                }
                
                [ObsoleteAttribute("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather "
@@ -671,12 +692,12 @@ namespace System.Linq
                                                                                               Func<TOuter, IEnumerable<TInner>, TResult> resultSelector,
                                                                                               IEqualityComparer<TKey> comparer)
                {
-                       throw new NotImplementedException ();
+                       throw new NotSupportedException ();
                }
                #endregion
 
                #region ElementAt
-               public static TSource ElementAt<TSource> (      this ParallelQuery<TSource> source, int index)
+               public static TSource ElementAt<TSource> (this ParallelQuery<TSource> source, int index)
                {
                        if (source == null)
                                throw new ArgumentNullException ("source");
@@ -732,7 +753,7 @@ namespace System.Linq
                        if (second == null)
                                throw new ArgumentNullException ("second");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TSource>.Default;
 
                        return new ParallelQuery<TSource> (new QuerySetNode<TSource> (SetInclusionDefaults.Intersect, comparer, first.Node, second.Node));
                }
@@ -757,7 +778,7 @@ namespace System.Linq
                #endregion
 
                #region Join
-               public static ParallelQuery<TResult> Join<TOuter, TInner, TKey, TResult> (      this ParallelQuery<TOuter> outer,
+               public static ParallelQuery<TResult> Join<TOuter, TInner, TKey, TResult> (this ParallelQuery<TOuter> outer,
                                                                                          ParallelQuery<TInner> inner,
                                                                                          Func<TOuter, TKey> outerKeySelector,
                                                                                          Func<TInner, TKey> innerKeySelector,
@@ -766,20 +787,20 @@ namespace System.Linq
                        return outer.Join (inner, outerKeySelector, innerKeySelector, resultSelector, EqualityComparer<TKey>.Default);
                }
                
-               public static ParallelQuery<TResult> Join<TOuter, TInner, TKey, TResult> (      this ParallelQuery<TOuter> outer,
+               public static ParallelQuery<TResult> Join<TOuter, TInner, TKey, TResult> (this ParallelQuery<TOuter> outer,
                                                                                          ParallelQuery<TInner> inner,
                                                                                          Func<TOuter, TKey> outerKeySelector,
                                                                                          Func<TInner, TKey> innerKeySelector,
                                                                                          Func<TOuter, TInner, TResult> resultSelector,
                                                                                          IEqualityComparer<TKey> comparer)
                {
-                       throw new NotImplementedException ();
+                       return new ParallelQuery<TResult> (new QueryJoinNode<TOuter, TInner, TKey, TResult> (outer.Node, inner.Node, outerKeySelector, innerKeySelector, resultSelector, comparer));
                }
                
                [ObsoleteAttribute("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather "
                                   + "than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() "
                                   + "extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
-               public static ParallelQuery<TResult> Join<TOuter, TInner, TKey, TResult> (      this ParallelQuery<TOuter> outer,
+               public static ParallelQuery<TResult> Join<TOuter, TInner, TKey, TResult> (this ParallelQuery<TOuter> outer,
                                                                                          IEnumerable<TInner> inner,
                                                                                          Func<TOuter, TKey> outerKeySelector,
                                                                                          Func<TInner, TKey> innerKeySelector,
@@ -803,13 +824,13 @@ namespace System.Linq
                #endregion
 
                #region Except
-               public static ParallelQuery<TSource> Except<TSource> (  this ParallelQuery<TSource> first,
+               public static ParallelQuery<TSource> Except<TSource> (this ParallelQuery<TSource> first,
                                                                      ParallelQuery<TSource> second)
                {
                        return Except<TSource> (first, second, EqualityComparer<TSource>.Default);
                }
 
-               public static ParallelQuery<TSource> Except<TSource> (  this ParallelQuery<TSource> first,
+               public static ParallelQuery<TSource> Except<TSource> (this ParallelQuery<TSource> first,
                                                                      ParallelQuery<TSource> second,
                                                                      IEqualityComparer<TSource> comparer)
                {
@@ -818,7 +839,7 @@ namespace System.Linq
                        if (second == null)
                                throw new ArgumentNullException ("second");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TSource>.Default;
 
                        return new ParallelQuery<TSource> (new QuerySetNode<TSource> (SetInclusionDefaults.Except,
                                                                                      comparer, first.Node, second.Node));
@@ -836,7 +857,7 @@ namespace System.Linq
                [ObsoleteAttribute("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather "
                                   + "than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() "
                                   + "extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
-               public static ParallelQuery<TSource> Except<TSource> (  this ParallelQuery<TSource> first,
+               public static ParallelQuery<TSource> Except<TSource> (this ParallelQuery<TSource> first,
                                                                      IEnumerable<TSource> second,
                                                                      IEqualityComparer<TSource> comparer)
                {
@@ -855,7 +876,7 @@ namespace System.Linq
                        if (source == null)
                                throw new ArgumentNullException ("source");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TSource>.Default;
 
                        return new ParallelQuery<TSource> (new QuerySetNode<TSource> (SetInclusionDefaults.Distinct, comparer,
                                                                                      source.Node, null));
@@ -897,20 +918,19 @@ namespace System.Linq
                        if (second == null)
                                throw new ArgumentNullException ("second");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TSource>.Default;
 
                        return new ParallelQuery<TSource> (new QuerySetNode<TSource> (SetInclusionDefaults.Union, comparer, first.Node, second.Node));
                }
                #endregion
 
                #region Take
-               // TODO : introduce some early break up here, use ImplementerToken
                public static ParallelQuery<TSource> Take<TSource> (this ParallelQuery<TSource> source, int count)
                {
                        if (source == null)
                                throw new ArgumentNullException ("source");
 
-                       return source.Where ((e, i) => i < count);
+                       return new ParallelQuery<TSource> (new QueryHeadWorkerNode<TSource> (source.Node, count));
                }
 
                public static ParallelQuery<TSource> TakeWhile<TSource> (this ParallelQuery<TSource> source,
@@ -921,7 +941,7 @@ namespace System.Linq
                        if (predicate == null)
                                throw new ArgumentNullException ("predicate");
 
-                       return source.Where ((e) => predicate (e));
+                       return new ParallelQuery<TSource> (new QueryHeadWorkerNode<TSource> (source.Node, (e, _) => predicate (e), false));
                }
 
                public static ParallelQuery<TSource> TakeWhile<TSource> (this ParallelQuery<TSource> source,
@@ -932,7 +952,7 @@ namespace System.Linq
                        if (predicate == null)
                                throw new ArgumentNullException ("predicate");
 
-                       return source.Where ((e, i) => predicate (e, i));
+                       return new ParallelQuery<TSource> (new QueryHeadWorkerNode<TSource> (source.Node, predicate, true));
                }
                #endregion
 
@@ -942,7 +962,10 @@ namespace System.Linq
                        if (source == null)
                                throw new ArgumentNullException ("source");
 
-                       return source.Where ((e, i) => i >= count);
+                       return source.Node.IsOrdered () ?
+                               source.Where ((e, i) => i >= count) :
+                               source.Where ((e) => count < 0 || Interlocked.Decrement (ref count) < 0);
+
                }
 
                public static ParallelQuery<TSource> SkipWhile<TSource> (this ParallelQuery<TSource> source,
@@ -953,7 +976,9 @@ namespace System.Linq
                        if (predicate == null)
                                throw new ArgumentNullException ("predicate");
 
-                       return source.Where ((e) => !predicate (e));
+                       return source.Node.IsOrdered () ?
+                               source.SkipWhile ((e, i) => predicate (e)) :
+                               source.Where ((e) => !predicate (e));
                }
 
                public static ParallelQuery<TSource> SkipWhile<TSource> (this ParallelQuery<TSource> source,
@@ -964,7 +989,9 @@ namespace System.Linq
                        if (predicate == null)
                                throw new ArgumentNullException ("predicate");
 
-                       return source.Where ((e, i) => !predicate (e, i));
+                       int indexCache = int.MaxValue;
+
+                       return source.Where ((e, i) => i >= indexCache || (!predicate (e, i) && (indexCache = i) == i));
                }
                #endregion
 
@@ -1867,9 +1894,8 @@ namespace System.Linq
                        if (source == null)
                                throw new ArgumentNullException ("source");
 
-                       OrderedParallelQuery<TSource> ordered = null;
-                       if ((ordered = source as OrderedParallelQuery<TSource>) != null)
-                               return ToListOrdered (ordered);
+                       if (source.Node.IsOrdered ())
+                               return ToListOrdered (source);
 
                        List<TSource> temp = source.Aggregate (() => new List<TSource>(50),
                                                               (list, e) => { list.Add (e); return list; },
@@ -1878,7 +1904,7 @@ namespace System.Linq
                        return temp;
                }
 
-               static List<TSource> ToListOrdered<TSource> (this OrderedParallelQuery<TSource> source)
+               internal static List<TSource> ToListOrdered<TSource> (this ParallelQuery<TSource> source)
                {
                        List<TSource> result = new List<TSource> ();
 
@@ -1893,6 +1919,9 @@ namespace System.Linq
                        if (source == null)
                                throw new ArgumentNullException ("source");
 
+                       if (source.Node.IsOrdered ())
+                               return ToListOrdered (source).ToArray ();
+
                        TSource[] result = null;
 
                        Func<List<TSource>, TSource, List<TSource>> intermediate = (list, e) => {
@@ -1951,7 +1980,7 @@ namespace System.Linq
                        if (keySelector == null)
                                throw new ArgumentNullException ("keySelector");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TKey>.Default;
                        if (elementSelector == null)
                                throw new ArgumentNullException ("elementSelector");
 
@@ -1961,13 +1990,13 @@ namespace System.Linq
                                                  (d) => d);
                }
 
-               public static ILookup<TKey, TSource> ToLookup<TSource, TKey> (  this ParallelQuery<TSource> source,
+               public static ILookup<TKey, TSource> ToLookup<TSource, TKey> (this ParallelQuery<TSource> source,
                                                                              Func<TSource, TKey> keySelector)
                {
                        return ToLookup<TSource, TKey, TSource> (source, keySelector, (e) => e, EqualityComparer<TKey>.Default);
                }
 
-               public static ILookup<TKey, TSource> ToLookup<TSource, TKey> (  this ParallelQuery<TSource> source,
+               public static ILookup<TKey, TSource> ToLookup<TSource, TKey> (this ParallelQuery<TSource> source,
                                                                              Func<TSource, TKey> keySelector,
                                                                              IEqualityComparer<TKey> comparer)
                {
@@ -1991,7 +2020,7 @@ namespace System.Linq
                        if (keySelector == null)
                                throw new ArgumentNullException ("keySelector");
                        if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
+                               comparer = EqualityComparer<TKey>.Default;
                        if (elementSelector == null)
                                throw new ArgumentNullException ("elementSelector");
 
@@ -2012,26 +2041,26 @@ namespace System.Linq
                        throw new NotSupportedException ();
                }
 
-               public static ParallelQuery<TSource> Concat<TSource> (  this ParallelQuery<TSource> first, ParallelQuery<TSource> second)
+               public static ParallelQuery<TSource> Concat<TSource> (this ParallelQuery<TSource> first, ParallelQuery<TSource> second)
                {
                        return new ParallelQuery<TSource> (new QueryConcatNode<TSource> (first.Node, second.Node));
                }
                #endregion
                
                #region DefaultIfEmpty
-               public static ParallelQuery<TSource> DefaultIfEmpty<TSource> (  this ParallelQuery<TSource> source)
+               public static ParallelQuery<TSource> DefaultIfEmpty<TSource> (this ParallelQuery<TSource> source)
                {
                        return source.DefaultIfEmpty (default (TSource));
                }
                
-               public static ParallelQuery<TSource> DefaultIfEmpty<TSource> (  this ParallelQuery<TSource> source, TSource defaultValue)
+               public static ParallelQuery<TSource> DefaultIfEmpty<TSource> (this ParallelQuery<TSource> source, TSource defaultValue)
                {
                        return new ParallelQuery<TSource> (new QueryDefaultEmptyNode<TSource> (source.Node, defaultValue));
                }
                #endregion
                
                #region First
-               public static TSource First<TSource> (  this ParallelQuery<TSource> source)
+               public static TSource First<TSource> (this ParallelQuery<TSource> source)
                {
                        CancellationTokenSource src = new CancellationTokenSource ();
                        IEnumerator<TSource> enumerator = source.WithImplementerToken (src).GetEnumerator ();
@@ -2041,11 +2070,12 @@ namespace System.Linq
                        
                        TSource result = enumerator.Current;
                        src.Cancel ();
+                       enumerator.Dispose ();
                        
                        return result;
                }
                
-               public static TSource First<TSource> (  this ParallelQuery<TSource> source, Func<TSource, bool> predicate)
+               public static TSource First<TSource> (this ParallelQuery<TSource> source, Func<TSource, bool> predicate)
                {
                        return source.Where (predicate).First ();
                }
@@ -2067,7 +2097,7 @@ namespace System.Linq
                        return source.Reverse ().First ();
                }
                
-               public static TSource Last<TSource> (   this ParallelQuery<TSource> source, Func<TSource, bool> predicate)
+               public static TSource Last<TSource> (this ParallelQuery<TSource> source, Func<TSource, bool> predicate)
                {
                        return source.Reverse ().First (predicate);
                }
diff --git a/mcs/class/System.Core/System.Linq/ParallelExecuter.cs b/mcs/class/System.Core/System.Linq/ParallelExecuter.cs
deleted file mode 100644 (file)
index 22b5f4b..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-#if NET_4_0
-//
-// ParallelExecuter.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-namespace System.Linq
-{
-       // TODO: Refactory each of the Process method into one big entity
-       // Check CancellationToken.Canceled parameter in the Task's action body too
-       internal static class ParallelExecuter
-       {
-               internal static QueryOptions CheckQuery<T> (QueryBaseNode<T> startingNode)
-               {
-                       return CheckQuery<T> (startingNode, false);
-               }
-
-               internal static QueryOptions CheckQuery<T> (QueryBaseNode<T> startingNode, bool blocking)
-               {
-                       return CheckQuery (startingNode, GetBestWorkerNumber (blocking));
-               }
-
-               internal static QueryOptions CheckQuery<T> (QueryBaseNode<T> startingNode, int partitionCount)
-               {
-                       QueryCheckerVisitor visitor = new QueryCheckerVisitor (partitionCount);
-                       startingNode.Visit (visitor);
-
-                       return visitor.Options;
-               }
-
-               // QueryOptions.ImplementerToken = QueryOptions.ImplementerToken.Chain (myOperatorSource);
-               internal static CancellationToken Chain (this CancellationToken self, CancellationTokenSource other)
-               {
-                       CancellationTokenSource linked = CancellationTokenSource.CreateLinkedTokenSource (self, other.Token);
-                       return linked.Token;
-               }
-
-               internal static int GetBestWorkerNumber ()
-               {
-                       return GetBestWorkerNumber (false);
-               }
-
-               internal static int GetBestWorkerNumber (bool blocking)
-               {
-                       return blocking ? Environment.ProcessorCount + 1 : Environment.ProcessorCount;
-               }
-
-               internal static Task[] Process<TSource, TElement> (QueryBaseNode<TSource> node, Action<TElement> call,
-                                                                  Func<QueryBaseNode<TSource>, QueryOptions, IList<IEnumerable<TElement>>> acquisitionFunc,
-                                                                  QueryOptions options)
-               {
-                       return Process<TSource, TElement> (node, call, acquisitionFunc, null, options);
-               }
-               
-               internal static Task[] Process<TSource, TElement> (QueryBaseNode<TSource> node, Action<TElement> call,
-                                                                  Func<QueryBaseNode<TSource>, QueryOptions, IList<IEnumerable<TElement>>> acquisitionFunc,
-                                                                  Action endAction,
-                                                                  QueryOptions options)
-               {
-                       return Process<TSource, TElement> (node,
-                                                          (e, i) => call (e),
-                                                          acquisitionFunc,
-                                                          endAction == null ? ((Action<int>)null) : (i) => endAction (),
-                                                          options);
-               }
-
-               internal static Task[] Process<TSource, TElement> (QueryBaseNode<TSource> node, Action<TElement, int> call,
-                                                                  Func<QueryBaseNode<TSource>, QueryOptions, IList<IEnumerable<TElement>>> acquisitionFunc,
-                                                                  Action<int> endAction,
-                                                                  QueryOptions options)
-               {
-                       IList<IEnumerable<TElement>> enumerables = acquisitionFunc (node, options);
-
-                       Task[] tasks = new Task[enumerables.Count];
-                       
-                       for (int i = 0; i < tasks.Length; i++) {
-                               int index = i;
-                               tasks[i] = Task.Factory.StartNew (() => {
-                                       foreach (TElement item in enumerables[index]) {
-                                               // This is from specific operators
-                                               if (options.ImplementerToken.IsCancellationRequested)
-                                                       break;
-                                               if (options.Token.IsCancellationRequested)
-                                                       throw new OperationCanceledException (options.Token);
-
-                                               call (item, index);
-                                       }
-                                       if (endAction != null)
-                                               endAction (index);
-                                 }, options.Token);
-                       }
-
-                       return tasks;
-               }
-
-               internal static void ProcessAndBlock<T> (QueryBaseNode<T> node, Action<T> call)
-               {
-                       QueryOptions options = CheckQuery (node, true);
-
-                       Task[] tasks = Process (node, call, (n, o) => n.GetEnumerables (o), options);
-                       Task.WaitAll (tasks, options.Token);
-               }
-
-               internal static Action ProcessAndCallback<T> (QueryBaseNode<T> node, Action<T> call,
-                                                             Action callback, QueryOptions options)
-               {
-                       Task[] tasks = Process (node, call, (n, o) => n.GetEnumerables (o), options);
-                       if (callback != null)
-                               Task.Factory.ContinueWhenAll (tasks,  (_) => callback ());
-
-                       return () => Task.WaitAll (tasks, options.Token);
-               }
-
-               internal static Action ProcessAndCallback<T> (QueryBaseNode<T> node, Action<KeyValuePair<long, T>, int> call,
-                                                             Action callback, QueryOptions options)
-               {
-                       return ProcessAndCallback<T> (node, call, null, callback, options);
-               }
-
-               internal static Action ProcessAndCallback<T> (QueryBaseNode<T> node, Action<KeyValuePair<long, T>, int> call,
-                                                             Action<int> endAction,
-                                                             Action callback, QueryOptions options)
-               {
-                       Task[] tasks = Process (node, call, (n, o) => n.GetOrderedEnumerables (o), endAction, options);
-                       if (callback != null)
-                               Task.Factory.ContinueWhenAll (tasks,  (_) => callback ());
-
-                       return () => Task.WaitAll (tasks, options.Token);
-               }
-
-               internal static void ProcessAndAggregate<T, U> (QueryBaseNode<T> node,
-                                                   Func<U> seedFunc,
-                                                   Func<U, T, U> localCall,
-                                                   Action<IList<U>> call)
-               {
-                       QueryOptions options = CheckQuery (node, true);
-
-                       IList<IEnumerable<T>> enumerables = node.GetEnumerables (options);
-                       U[] locals = new U[enumerables.Count];
-                       Task[] tasks = new Task[enumerables.Count];
-
-                       bool init = false;
-                       if (seedFunc != null) {
-                               for (int i = 0; i < locals.Length; i++)
-                                       locals[i] = seedFunc ();
-                               init = true;
-                       }
-
-                       for (int i = 0; i < tasks.Length; i++) {
-                               int index = i;
-                               tasks[i] = Task.Factory.StartNew (() => {
-                                       foreach (T item in enumerables[index]) {
-                                               // This is from specific operators
-                                               if (options.ImplementerToken.IsCancellationRequested)
-                                                       break;
-                                               if (options.Token.IsCancellationRequested)
-                                                       throw new OperationCanceledException (options.Token);
-
-                                               if (!init) {
-                                                       init = true;
-                                                       // HACK: TODO: omfwtfitsomuchsucks
-                                                       locals[index] = (U)(object)item;
-                                                       continue;
-                                               }
-                                               
-                                               U acc = locals[index];
-                                               locals[index] = localCall (acc, item);
-                                       }
-                               }, options.Token);
-                       }
-
-                       Task.WaitAll (tasks, options.Token);
-
-                       if (call != null)
-                               call (locals);
-               }
-       }
-}
-#endif
\ No newline at end of file
index b3c51f70eb64aad61caffa429a601b070d84e1a5..7b6687cfd749c90878d9b1cf6de81f45dab86af9 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 //
 // ParallelExecutionMode.cs
 //
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 
 namespace System.Linq
index 0adea44bc85d470fd1b4b88869cf92b0797a0792..f40defc99f0bc7f513cdcf2c12b6cbab772f7c7f 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 //
 // ParallelMergeOptions.cs
 //
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 
 namespace System.Linq
diff --git a/mcs/class/System.Core/System.Linq/ParallelPartitioner.cs b/mcs/class/System.Core/System.Linq/ParallelPartitioner.cs
deleted file mode 100644 (file)
index 50d6235..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// ParallelPartitioner.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-#if NET_4_0
-
-namespace System.Linq
-{
-       internal static class ParallelPartitioner
-       {
-               internal static OrderablePartitioner<T> CreateForChunks<T> (IEnumerable<T> source)
-               {
-                       return Partitioner.Create (source);
-               }
-
-               internal static OrderablePartitioner<T> CreateForRange<T> (IList<T> source)
-               {
-                       return Partitioner.Create (source, true);
-               }
-
-               internal static OrderablePartitioner<T> CreateBest<T> (IEnumerable<T> source)
-               {
-                       IList<T> temp = source as IList<T>;
-                       if (temp != null)
-                               return CreateForRange (temp);
-
-                       return CreateForChunks (source);
-               }
-
-               internal static OrderablePartitioner<T> CreateForStrips<T> (IEnumerable<T> source, int stripSize)
-               {
-                       IList<T> temp = source as IList<T>;
-                       if (temp != null)
-                               return new StripPartitioner<T> (temp);
-
-                       return new EnumerablePartitioner<T> (source, stripSize, 1);
-               }
-
-               internal static OrderablePartitioner<int> CreateForRange (int start, int count)
-               {
-                       return CreateForRange<int> (new RangeList (start, count));
-               }
-
-               internal static OrderablePartitioner<T> CreateForRepeat<T> (T obj, int count)
-               {
-                       return CreateForRange<T> (new RepeatList<T> (obj, count));
-               }
-       }
-}
-#endif
index 6d99813c02624e93cea9414dcfc491758a7d24eb..c5ea95e41b04eee69cc640a60da115bb4dd74402 100644 (file)
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
+
 using System;
 using System.Threading;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Concurrent;
-
-#if NET_4_0
+using System.Linq.Parallel;
+using System.Linq.Parallel.QueryNodes;
 
 namespace System.Linq
 {
diff --git a/mcs/class/System.Core/System.Linq/ParallelQueryEnumerator.cs b/mcs/class/System.Core/System.Linq/ParallelQueryEnumerator.cs
deleted file mode 100644 (file)
index d250b8b..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// ParallelEnumerator.cs
-//
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-
-#if NET_4_0
-
-namespace System.Linq
-{
-       internal class ParallelQueryEnumerator<T> : IEnumerator<T>
-       {
-               readonly int DefaultBufferSize = ParallelExecuter.GetBestWorkerNumber () * 50;
-
-               BlockingCollection<T> buffer;
-               IEnumerator<T> loader;
-               QueryOptions options;
-               OrderingEnumerator<T> ordEnumerator;
-
-               T current;
-
-               Action waitAction;
-
-               internal ParallelQueryEnumerator (QueryBaseNode<T> node)
-               {
-                       this.options = ParallelExecuter.CheckQuery (node);
-                       Setup ();
-
-                       // Launch adding to the buffer asynchronously via Tasks
-                       if (options.BehindOrderGuard.Value) {
-                               waitAction = ParallelExecuter.ProcessAndCallback (node,
-                                                                                 (e, i) => ordEnumerator.Add (e),
-                                                                                 (i) => ordEnumerator.EndParticipation (),
-                                                                                 ordEnumerator.Stop,
-                                                                                 options);
-                       } else {
-                               waitAction = ParallelExecuter.ProcessAndCallback (node,
-                                                                                 buffer.Add,
-                                                                                 buffer.CompleteAdding,
-                                                                                 options);
-                       }
-
-                       if (options.Options.HasValue && options.Options.Value == ParallelMergeOptions.FullyBuffered)
-                               waitAction ();
-               }
-
-               void Setup ()
-               {
-                       if (!options.BehindOrderGuard.Value) {
-                               if (options.Options.HasValue && (options.Options.Value == ParallelMergeOptions.NotBuffered
-                                                                || options.Options.Value == ParallelMergeOptions.FullyBuffered)) {
-                                       buffer = new BlockingCollection<T> ();
-                               } else {
-                                       buffer = new BlockingCollection<T> (DefaultBufferSize);
-                               }
-
-                               IEnumerable<T> source = buffer.GetConsumingEnumerable (options.Token);
-
-                               loader = source.GetEnumerator ();
-                       } else {
-                               loader = ordEnumerator = new OrderingEnumerator<T> (options.PartitionCount);
-                       }
-               }
-
-               public void Dispose ()
-               {
-
-               }
-
-               public void Reset ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public bool MoveNext ()
-               {
-                       // If there are no stuff in the buffer
-                       // but CompleteAdding hasn't been called,
-                       // MoveNext blocks until further results are produced
-                       if (!loader.MoveNext ())
-                               return false;
-
-                       current = loader.Current;
-                       return true;
-               }
-
-               public T Current {
-                       get {
-                               return current;
-                       }
-               }
-
-               object IEnumerator.Current {
-                       get {
-                               return current;
-                       }
-               }
-       }
-}
-#endif
index 4745bc9dc46d73728c8418f315e86d479073c732..eb42055eda9fcfa54e24274b981e3a38e0b4ef8d 100644 (file)
@@ -1,21 +1,11 @@
 //
 // System.Threading.ReaderWriterLockSlim.cs
 //
-// Authors:
-//   Miguel de Icaza (miguel@novell.com) 
-//   Dick Porter (dick@ximian.com)
-//   Jackson Harper (jackson@ximian.com)
-//   Lluis Sanchez Gual (lluis@ximian.com)
-//   Marek Safar (marek.safar@gmail.com)
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
 //
-// Copyright 2004-2008 Novell, Inc (http://www.novell.com)
-// Copyright 2003, Ximian, Inc.
+// Copyright (c) 2010 Jérémie "Garuma" Laval
 //
-// NoRecursion code based on the blog post from Vance Morrison:
-//   http://blogs.msdn.com/vancem/archive/2006/03/28/563180.aspx
-//
-// Recursion code based on Mono's implementation of ReaderWriterLock.
-// 
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
@@ -45,73 +35,51 @@ using System.Threading;
 
 namespace System.Threading {
 
-       //
-       // This implementation is based on the light-weight
-       // Reader/Writer lock sample from Vance Morrison's blog:
-       //
-       // http://blogs.msdn.com/vancem/archive/2006/03/28/563180.aspx
-       //
-       // And in Mono's ReaderWriterLock
-       //
        [HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
        [HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, ExternalThreading = true)]
-       public class ReaderWriterLockSlim : IDisposable {
-               sealed class LockDetails
-               {
-                       public int ThreadId;
-                       public int ReadLocks;
-               }
-
-               // Are we on a multiprocessor?
-               static readonly bool smp;
-               
-               // Lock specifiation for myLock:  This lock protects exactly the local fields associted
-               // instance of MyReaderWriterLock.  It does NOT protect the memory associted with the
-               // the events that hang off this lock (eg writeEvent, readEvent upgradeEvent).
-               int myLock;
-
-               // Who owns the lock owners > 0 => readers
-               // owners = -1 means there is one writer, Owners must be >= -1.  
-               int owners;
-               Thread upgradable_thread;
-               Thread write_thread;
+       public class ReaderWriterLockSlim : IDisposable
+       {
+               /* Position of each bit isn't really important 
+                * but their relative order is
+                */
+               const int RwReadBit = 3;
+
+               const int RwWait = 1;
+               const int RwWaitUpgrade = 2;
+               const int RwWrite = 4;
+               const int RwRead = 8;
+
+               int rwlock;
                
-               // These variables allow use to avoid Setting events (which is expensive) if we don't have to. 
-               uint numWriteWaiters;        // maximum number of threads that can be doing a WaitOne on the writeEvent 
-               uint numReadWaiters;         // maximum number of threads that can be doing a WaitOne on the readEvent
-               uint numUpgradeWaiters;      // maximum number of threads that can be doing a WaitOne on the upgradeEvent (at most 1). 
-               
-               // conditions we wait on. 
-               EventWaitHandle writeEvent;    // threads waiting to aquire a write lock go here.
-               EventWaitHandle readEvent;     // threads waiting to aquire a read lock go here (will be released in bulk)
-               EventWaitHandle upgradeEvent;  // thread waiting to upgrade a read lock to a write lock go here (at most one)
+               readonly LockRecursionPolicy recursionPolicy;
 
-               //int lock_owner;
+               AtomicBoolean upgradableTaken = new AtomicBoolean ();
+#if NET_4_0
+               ManualResetEventSlim upgradableEvent = new ManualResetEventSlim (true);
+               ManualResetEventSlim writerDoneEvent = new ManualResetEventSlim (true);
+               ManualResetEventSlim readerDoneEvent = new ManualResetEventSlim (true);
+#else
+               ManualResetEvent upgradableEvent = new ManualResetEvent (true);
+               ManualResetEvent writerDoneEvent = new ManualResetEvent (true);
+               ManualResetEvent readerDoneEvent = new ManualResetEvent (true);
+#endif
 
-               // Only set if we are a recursive lock
-               //Dictionary<int,int> reader_locks;
+               int numReadWaiters, numUpgradeWaiters, numWriteWaiters;
+               bool disposed;
 
-               readonly LockRecursionPolicy recursionPolicy;
-               LockDetails[] read_locks = new LockDetails [8];
-               
-               static ReaderWriterLockSlim ()
-               {
-                       smp = Environment.ProcessorCount > 1;
-               }
-               
-               public ReaderWriterLockSlim ()
+               static int idPool = int.MinValue;
+               readonly int id = Interlocked.Increment (ref idPool);
+
+               [ThreadStatic]
+               static IDictionary<int, ThreadLockState> currentThreadState;
+
+               public ReaderWriterLockSlim () : this (LockRecursionPolicy.NoRecursion)
                {
-                       // NoRecursion (0) is the default value
                }
 
                public ReaderWriterLockSlim (LockRecursionPolicy recursionPolicy)
                {
                        this.recursionPolicy = recursionPolicy;
-                       
-                       if (recursionPolicy != LockRecursionPolicy.NoRecursion){
-                               //reader_locks = new Dictionary<int,int> ();
-                               throw new NotImplementedException ("recursionPolicy != NoRecursion not currently implemented");
-                       }
                }
 
                public void EnterReadLock ()
@@ -121,51 +89,52 @@ namespace System.Threading {
 
                public bool TryEnterReadLock (int millisecondsTimeout)
                {
-                       if (millisecondsTimeout < Timeout.Infinite)
-                               throw new ArgumentOutOfRangeException ("millisecondsTimeout");
-                       
-                       if (read_locks == null)
-                               throw new ObjectDisposedException (null);
-
-                       if (Thread.CurrentThread == write_thread)
-                               throw new LockRecursionException ("Read lock cannot be acquired while write lock is held");
+                       ThreadLockState ctstate = CurrentThreadState;
 
-                       EnterMyLock ();
+                       if (CheckState (millisecondsTimeout, LockState.Read)) {
+                               ctstate.ReaderRecursiveCount++;
+                               return true;
+                       }
 
-                       LockDetails ld = GetReadLockDetails (Thread.CurrentThread.ManagedThreadId, true);
-                       if (ld.ReadLocks != 0) {
-                               ExitMyLock ();
-                               throw new LockRecursionException ("Recursive read lock can only be aquired in SupportsRecursion mode");
+                       // This is downgrading from upgradable, no need for check since
+                       // we already have a sort-of read lock that's going to disappear
+                       // after user calls ExitUpgradeableReadLock.
+                       // Same idea when recursion is allowed and a write thread wants to
+                       // go for a Read too.
+                       if (CurrentLockState.Has (LockState.Upgradable)
+                           || recursionPolicy == LockRecursionPolicy.SupportsRecursion) {
+                               Interlocked.Add (ref rwlock, RwRead);
+                               ctstate.LockState ^= LockState.Read;
+                               ctstate.ReaderRecursiveCount++;
+
+                               return true;
                        }
-                       ++ld.ReadLocks;
                        
-                       while (true){
-                               // Easy case, no contention
-                               // owners >= 0 means there might be readers (but no writer)
-                               if (owners >= 0 && numWriteWaiters == 0){
-                                       owners++;
-                                       break;
-                               }
-                               
-                               // If the request is to probe.
-                               if (millisecondsTimeout == 0){
-                                       ExitMyLock ();
-                                       return false;
-                               }
+                       Stopwatch sw = Stopwatch.StartNew ();
+                       Interlocked.Increment (ref numReadWaiters);
 
-                               // We need to wait.  Mark that we have waiters and wait.  
-                               if (readEvent == null) {
-                                       LazyCreateEvent (ref readEvent, false);
-                                       // since we left the lock, start over. 
+                       while (millisecondsTimeout == -1 || sw.ElapsedMilliseconds < millisecondsTimeout) {
+                               if ((rwlock & 0x7) > 0) {
+                                       writerDoneEvent.Wait (ComputeTimeout (millisecondsTimeout, sw));
                                        continue;
                                }
 
-                               if (!WaitOnEvent (readEvent, ref numReadWaiters, millisecondsTimeout))
-                                       return false;
+                               if ((Interlocked.Add (ref rwlock, RwRead) & 0x7) == 0) {
+                                       ctstate.LockState ^= LockState.Read;
+                                       ctstate.ReaderRecursiveCount++;
+                                       Interlocked.Decrement (ref numReadWaiters);
+                                       if (readerDoneEvent.IsSet ())
+                                               readerDoneEvent.Reset ();
+                                       return true;
+                               }
+
+                               Interlocked.Add (ref rwlock, -RwRead);
+
+                               writerDoneEvent.Wait (ComputeTimeout (millisecondsTimeout, sw));
                        }
-                       ExitMyLock ();
-                       
-                       return true;
+
+                       Interlocked.Decrement (ref numReadWaiters);
+                       return false;
                }
 
                public bool TryEnterReadLock (TimeSpan timeout)
@@ -173,22 +142,17 @@ namespace System.Threading {
                        return TryEnterReadLock (CheckTimeout (timeout));
                }
 
-               //
-               // TODO: What to do if we are releasing a ReadLock and we do not own it?
-               //
                public void ExitReadLock ()
                {
-                       EnterMyLock ();
+                       ThreadLockState ctstate = CurrentThreadState;
 
-                       if (owners < 1) {
-                               ExitMyLock ();
-                               throw new SynchronizationLockException ("Releasing lock and no read lock taken");
-                       }
-
-                       --owners;
-                       --GetReadLockDetails (Thread.CurrentThread.ManagedThreadId, false).ReadLocks;
+                       if (!ctstate.LockState.Has (LockState.Read))
+                               throw new SynchronizationLockException ("The current thread has not entered the lock in read mode");
 
-                       ExitAndWakeUpAppropriateWaiters ();
+                       ctstate.LockState ^= LockState.Read;
+                       ctstate.ReaderRecursiveCount--;
+                       if (Interlocked.Add (ref rwlock, -RwRead) >> RwReadBit == 0)
+                               readerDoneEvent.Set ();
                }
 
                public void EnterWriteLock ()
@@ -198,79 +162,48 @@ namespace System.Threading {
                
                public bool TryEnterWriteLock (int millisecondsTimeout)
                {
-                       if (millisecondsTimeout < Timeout.Infinite)
-                               throw new ArgumentOutOfRangeException ("millisecondsTimeout");
-
-                       if (read_locks == null)
-                               throw new ObjectDisposedException (null);
-
-                       if (IsWriteLockHeld)
-                               throw new LockRecursionException ();
-
-                       EnterMyLock ();
+                       ThreadLockState ctstate = CurrentThreadState;
 
-                       LockDetails ld = GetReadLockDetails (Thread.CurrentThread.ManagedThreadId, false);
-                       if (ld != null && ld.ReadLocks > 0) {
-                               ExitMyLock ();
-                               throw new LockRecursionException ("Write lock cannot be acquired while read lock is held");
+                       if (CheckState (millisecondsTimeout, LockState.Write)) {
+                               ctstate.WriterRecursiveCount++;
+                               return true;
                        }
 
-                       while (true){
-                               // There is no contention, we are done
-                               if (owners == 0){
-                                       // Indicate that we have a writer
-                                       owners = -1;
-                                       write_thread = Thread.CurrentThread;
-                                       break;
-                               }
-
-                               // If we are the thread that took the Upgradable read lock
-                               if (owners == 1 && upgradable_thread == Thread.CurrentThread){
-                                       owners = -1;
-                                       write_thread = Thread.CurrentThread;
-                                       break;
-                               }
+                       Stopwatch sw = Stopwatch.StartNew ();
+                       Interlocked.Increment (ref numWriteWaiters);
+                       bool isUpgradable = ctstate.LockState.Has (LockState.Upgradable);
 
-                               // If the request is to probe.
-                               if (millisecondsTimeout == 0){
-                                       ExitMyLock ();
-                                       return false;
-                               }
+                       // If the code goes there that means we had a read lock beforehand
+                       if (isUpgradable && rwlock >= RwRead)
+                               Interlocked.Add (ref rwlock, -RwRead);
 
-                               // We need to wait, figure out what kind of waiting.
-                               
-                               if (upgradable_thread == Thread.CurrentThread){
-                                       // We are the upgradable thread, register our interest.
-                                       
-                                       if (upgradeEvent == null){
-                                               LazyCreateEvent (ref upgradeEvent, false);
+                       int stateCheck = isUpgradable ? RwWaitUpgrade : RwWait;
+                       int appendValue = RwWait | (isUpgradable ? RwWaitUpgrade : 0);
 
-                                               // since we left the lock, start over.
-                                               continue;
-                                       }
+                       while (millisecondsTimeout < 0 || sw.ElapsedMilliseconds < millisecondsTimeout) {
+                               int state = rwlock;
 
-                                       if (numUpgradeWaiters > 0){
-                                               ExitMyLock ();
-                                               throw new ApplicationException ("Upgrading lock to writer lock already in process, deadlock");
-                                       }
-                                       
-                                       if (!WaitOnEvent (upgradeEvent, ref numUpgradeWaiters, millisecondsTimeout))
-                                               return false;
-                               } else {
-                                       if (writeEvent == null){
-                                               LazyCreateEvent (ref writeEvent, true);
-
-                                               // since we left the lock, retry
-                                               continue;
+                               if (state <= stateCheck) {
+                                       if (Interlocked.CompareExchange (ref rwlock, RwWrite, state) == state) {
+                                               ctstate.LockState ^= LockState.Write;
+                                               ctstate.WriterRecursiveCount++;
+                                               Interlocked.Decrement (ref numWriteWaiters);
+                                               if (writerDoneEvent.IsSet ())
+                                                       writerDoneEvent.Reset ();
+                                               return true;
                                        }
-                                       if (!WaitOnEvent (writeEvent, ref numWriteWaiters, millisecondsTimeout))
-                                               return false;
+                                       state = rwlock;
                                }
+
+                               while ((state & RwWait) == 0 && Interlocked.CompareExchange (ref rwlock, state | appendValue, state) == state)
+                                       state = rwlock;
+
+                               while (rwlock > stateCheck && (millisecondsTimeout < 0 || sw.ElapsedMilliseconds < millisecondsTimeout))
+                                       readerDoneEvent.Wait (ComputeTimeout (millisecondsTimeout, sw));
                        }
 
-                       Debug.Assert (owners == -1, "Owners is not -1");
-                       ExitMyLock ();
-                       return true;
+                       Interlocked.Decrement (ref numWriteWaiters);
+                       return false;
                }
 
                public bool TryEnterWriteLock (TimeSpan timeout)
@@ -280,20 +213,15 @@ namespace System.Threading {
 
                public void ExitWriteLock ()
                {
-                       EnterMyLock ();
-
-                       if (owners != -1) {
-                               ExitMyLock ();
-                               throw new SynchronizationLockException ("Calling ExitWriterLock when no write lock is held");
-                       }
+                       ThreadLockState ctstate = CurrentThreadState;
 
-                       //Debug.Assert (numUpgradeWaiters > 0);
-                       if (upgradable_thread == Thread.CurrentThread)
-                               owners = 1;
-                       else
-                               owners = 0;
-                       write_thread = null;
-                       ExitAndWakeUpAppropriateWaiters ();
+                       if (!ctstate.LockState.Has (LockState.Write))
+                               throw new SynchronizationLockException ("The current thread has not entered the lock in write mode");
+                       
+                       ctstate.LockState ^= LockState.Write;
+                       ctstate.WriterRecursiveCount--;
+                       Interlocked.Add (ref rwlock, -RwWrite);
+                       writerDoneEvent.Set ();
                }
 
                public void EnterUpgradeableReadLock ()
@@ -307,44 +235,44 @@ namespace System.Threading {
                //
                public bool TryEnterUpgradeableReadLock (int millisecondsTimeout)
                {
-                       if (millisecondsTimeout < Timeout.Infinite)
-                               throw new ArgumentOutOfRangeException ("millisecondsTimeout");
+                       ThreadLockState ctstate = CurrentThreadState;
 
-                       if (read_locks == null)
-                               throw new ObjectDisposedException (null);
-
-                       if (IsUpgradeableReadLockHeld)
-                               throw new LockRecursionException ();
+                       if (CheckState (millisecondsTimeout, LockState.Upgradable)) {
+                               ctstate.UpgradeableRecursiveCount++;
+                               return true;
+                       }
 
-                       if (IsWriteLockHeld)
-                               throw new LockRecursionException ();
+                       if (ctstate.LockState.Has (LockState.Read))
+                               throw new LockRecursionException ("The current thread has already entered read mode");
 
-                       EnterMyLock ();
-                       while (true){
-                               if (owners == 0 && numWriteWaiters == 0 && upgradable_thread == null){
-                                       owners++;
-                                       upgradable_thread = Thread.CurrentThread;
-                                       break;
-                               }
+                       Stopwatch sw = Stopwatch.StartNew ();
+                       Interlocked.Increment (ref numUpgradeWaiters);
 
-                               // If the request is to probe
-                               if (millisecondsTimeout == 0){
-                                       ExitMyLock ();
+                       while (!upgradableEvent.IsSet () || !upgradableTaken.TryRelaxedSet ()) {
+                               if (millisecondsTimeout != -1 && sw.ElapsedMilliseconds > millisecondsTimeout) {
+                                       Interlocked.Decrement (ref numUpgradeWaiters);
                                        return false;
                                }
 
-                               if (readEvent == null){
-                                       LazyCreateEvent (ref readEvent, false);
-                                       // since we left the lock, start over.
-                                       continue;
-                               }
+                               upgradableEvent.Wait (ComputeTimeout (millisecondsTimeout, sw));
+                       }
 
-                               if (!WaitOnEvent (readEvent, ref numReadWaiters, millisecondsTimeout))
-                                       return false;
+                       upgradableEvent.Reset ();
+
+                       if (TryEnterReadLock (ComputeTimeout (millisecondsTimeout, sw))) {
+                               ctstate.LockState = LockState.Upgradable;
+                               Interlocked.Decrement (ref numUpgradeWaiters);
+                               ctstate.ReaderRecursiveCount--;
+                               ctstate.UpgradeableRecursiveCount++;
+                               return true;
                        }
 
-                       ExitMyLock ();
-                       return true;
+                       upgradableTaken.Value = false;
+                       upgradableEvent.Set ();
+
+                       Interlocked.Decrement (ref numUpgradeWaiters);
+
+                       return false;
                }
 
                public bool TryEnterUpgradeableReadLock (TimeSpan timeout)
@@ -354,211 +282,156 @@ namespace System.Threading {
               
                public void ExitUpgradeableReadLock ()
                {
-                       EnterMyLock ();
-                       Debug.Assert (owners > 0, "Releasing an upgradable lock, but there was no reader!");
-                       --owners;
-                       upgradable_thread = null;
-                       ExitAndWakeUpAppropriateWaiters ();
+                       ThreadLockState ctstate = CurrentThreadState;
+
+                       if (!ctstate.LockState.Has (LockState.Upgradable | LockState.Read))
+                               throw new SynchronizationLockException ("The current thread has not entered the lock in upgradable mode");
+                       
+                       upgradableTaken.Value = false;
+                       upgradableEvent.Set ();
+
+                       ctstate.LockState ^= LockState.Upgradable;
+                       ctstate.UpgradeableRecursiveCount--;
+                       Interlocked.Add (ref rwlock, -RwRead);
                }
 
                public void Dispose ()
                {
-                       read_locks = null;
+                       disposed = true;
                }
 
                public bool IsReadLockHeld {
-                       get { return RecursiveReadCount != 0; }
+                       get {
+                               return rwlock >= RwRead;
+                       }
                }
                
                public bool IsWriteLockHeld {
-                       get { return RecursiveWriteCount != 0; }
+                       get {
+                               return (rwlock & RwWrite) > 0;
+                       }
                }
                
                public bool IsUpgradeableReadLockHeld {
-                       get { return RecursiveUpgradeCount != 0; }
+                       get {
+                               return upgradableTaken.Value;
+                       }
                }
 
                public int CurrentReadCount {
-                       get { return owners & 0xFFFFFFF; }
+                       get {
+                               return (rwlock >> RwReadBit) - (IsUpgradeableReadLockHeld ? 1 : 0);
+                       }
                }
                
                public int RecursiveReadCount {
                        get {
-                               EnterMyLock ();
-                               LockDetails ld = GetReadLockDetails (Thread.CurrentThread.ManagedThreadId, false);
-                               int count = ld == null ? 0 : ld.ReadLocks;
-                               ExitMyLock ();
-                               return count;
+                               return CurrentThreadState.ReaderRecursiveCount;
                        }
                }
 
                public int RecursiveUpgradeCount {
-                       get { return upgradable_thread == Thread.CurrentThread ? 1 : 0; }
+                       get {
+                               return CurrentThreadState.UpgradeableRecursiveCount;
+                       }
                }
 
                public int RecursiveWriteCount {
-                       get { return write_thread == Thread.CurrentThread ? 1 : 0; }
+                       get {
+                               return CurrentThreadState.WriterRecursiveCount;
+                       }
                }
 
                public int WaitingReadCount {
-                       get { return (int) numReadWaiters; }
+                       get {
+                               return numReadWaiters;
+                       }
                }
 
                public int WaitingUpgradeCount {
-                       get { return (int) numUpgradeWaiters; }
+                       get {
+                               return numUpgradeWaiters;
+                       }
                }
 
                public int WaitingWriteCount {
-                       get { return (int) numWriteWaiters; }
+                       get {
+                               return numWriteWaiters;
+                       }
                }
 
                public LockRecursionPolicy RecursionPolicy {
-                       get { return recursionPolicy; }
+                       get {
+                               return recursionPolicy;
+                       }
                }
-               
-#region Private methods
-               void EnterMyLock ()
-               {
-                       if (Interlocked.CompareExchange(ref myLock, 1, 0) != 0)
-                               EnterMyLockSpin ();
+
+               LockState CurrentLockState {
+                       get {
+                               return CurrentThreadState.LockState;
+                       }
+                       set {
+                               CurrentThreadState.LockState = value;
+                       }
                }
 
-               void EnterMyLockSpin ()
-               {
+               ThreadLockState CurrentThreadState {
+                       get {
+                               if (currentThreadState == null)
+                                       currentThreadState = new Dictionary<int, ThreadLockState> ();
 
-                       for (int i = 0; ;i++) {
-                               if (i < 3 && smp)
-                                       Thread.SpinWait (20);    // Wait a few dozen instructions to let another processor release lock. 
-                               else 
-                                       Thread.Sleep (0);        // Give up my quantum.  
+                               ThreadLockState state;
+                               if (!currentThreadState.TryGetValue (id, out state))
+                                       currentThreadState[id] = state = new ThreadLockState ();
 
-                               if (Interlocked.CompareExchange(ref myLock, 1, 0) == 0)
-                                       return;
+                               return state;
                        }
                }
 
-               void ExitMyLock()
+               bool CheckState (int millisecondsTimeout, LockState validState)
                {
-                       Debug.Assert (myLock != 0, "Exiting spin lock that is not held");
-                       myLock = 0;
-               }
-
-               bool MyLockHeld { get { return myLock != 0; } }
+                       if (disposed)
+                               throw new ObjectDisposedException ("ReaderWriterLockSlim");
 
-               /// <summary>
-               /// Determines the appropriate events to set, leaves the locks, and sets the events. 
-               /// </summary>
-               private void ExitAndWakeUpAppropriateWaiters()
-               {
-                       Debug.Assert (MyLockHeld);
-
-                       // First a writing thread waiting on being upgraded
-                       if (owners == 1 && numUpgradeWaiters != 0){
-                               // Exit before signaling to improve efficiency (wakee will need the lock)
-                               ExitMyLock ();
-                               // release all upgraders (however there can be at most one). 
-                               upgradeEvent.Set ();
-                               //
-                               // TODO: What does the following comment mean?
-                               // two threads upgrading is a guarenteed deadlock, so we throw in that case. 
-                       } else if (owners == 0 && numWriteWaiters > 0) {
-                               // Exit before signaling to improve efficiency (wakee will need the lock)
-                               ExitMyLock ();
-                               // release one writer. 
-                               writeEvent.Set ();
-                       }
-                       else if (owners >= 0 && numReadWaiters != 0) {
-                               // Exit before signaling to improve efficiency (wakee will need the lock)
-                               ExitMyLock ();
-                               // release all readers.
-                               readEvent.Set();
-                       } else
-                               ExitMyLock();
-               }
-
-               /// <summary>
-               /// A routine for lazily creating a event outside the lock (so if errors
-               /// happen they are outside the lock and that we don't do much work
-               /// while holding a spin lock).  If all goes well, reenter the lock and
-               /// set 'waitEvent' 
-               /// </summary>
-               void LazyCreateEvent(ref EventWaitHandle waitEvent, bool makeAutoResetEvent)
-               {
-                       Debug.Assert (MyLockHeld);
-                       Debug.Assert (waitEvent == null);
-                       
-                       ExitMyLock ();
-                       EventWaitHandle newEvent;
-                       if (makeAutoResetEvent) 
-                               newEvent = new AutoResetEvent (false);
-                       else 
-                               newEvent = new ManualResetEvent (false);
+                       if (millisecondsTimeout < Timeout.Infinite)
+                               throw new ArgumentOutOfRangeException ("millisecondsTimeout");
 
-                       EnterMyLock ();
+                       // Detect and prevent recursion
+                       LockState ctstate = CurrentLockState;
 
-                       // maybe someone snuck in. 
-                       if (waitEvent == null)
-                               waitEvent = newEvent;
-               }
+                       if (recursionPolicy == LockRecursionPolicy.NoRecursion)
+                               if ((ctstate != LockState.None && ctstate != LockState.Upgradable)
+                                   || (ctstate == LockState.Upgradable && validState == LockState.Upgradable))
+                                       throw new LockRecursionException ("The current thread has already a lock and recursion isn't supported");
 
-               /// <summary>
-               /// Waits on 'waitEvent' with a timeout of 'millisceondsTimeout.  
-               /// Before the wait 'numWaiters' is incremented and is restored before leaving this routine.
-               /// </summary>
-               bool WaitOnEvent (EventWaitHandle waitEvent, ref uint numWaiters, int millisecondsTimeout)
-               {
-                       Debug.Assert (MyLockHeld);
+                       // If we already had right lock state, just return
+                       if (ctstate.Has (validState))
+                               return true;
 
-                       waitEvent.Reset ();
-                       numWaiters++;
+                       CheckRecursionAuthorization (ctstate, validState);
 
-                       bool waitSuccessful = false;
+                       return false;
+               }
 
-                       // Do the wait outside of any lock 
-                       ExitMyLock();      
-                       try {
-                               waitSuccessful = waitEvent.WaitOne (millisecondsTimeout, false);
-                       } finally {
-                               EnterMyLock ();
-                               --numWaiters;
-                               if (!waitSuccessful)
-                                       ExitMyLock ();
-                       }
-                       return waitSuccessful;
+               static void CheckRecursionAuthorization (LockState ctstate, LockState desiredState)
+               {
+                       // In read mode you can just enter Read recursively
+                       if (ctstate == LockState.Read)
+                               throw new LockRecursionException ();                            
                }
-               
+
                static int CheckTimeout (TimeSpan timeout)
                {
                        try {
-                               return checked((int) timeout.TotalMilliseconds);
+                               return checked ((int)timeout.TotalMilliseconds);
                        } catch (System.OverflowException) {
-                               throw new ArgumentOutOfRangeException ("timeout");                              
+                               throw new ArgumentOutOfRangeException ("timeout");
                        }
                }
 
-               LockDetails GetReadLockDetails (int threadId, bool create)
+               static int ComputeTimeout (int millisecondsTimeout, Stopwatch sw)
                {
-                       int i;
-                       LockDetails ld;
-                       for (i = 0; i < read_locks.Length; ++i) {
-                               ld = read_locks [i];
-                               if (ld == null)
-                                       break;
-
-                               if (ld.ThreadId == threadId)
-                                       return ld;
-                       }
-
-                       if (!create)
-                               return null;
-
-                       if (i == read_locks.Length)
-                               Array.Resize (ref read_locks, read_locks.Length * 2);
-                               
-                       ld = read_locks [i] = new LockDetails ();
-                       ld.ThreadId = threadId;
-                       return ld;
+                       return millisecondsTimeout == -1 ? -1 : (int)Math.Max (sw.ElapsedMilliseconds - millisecondsTimeout, 1);
                }
-#endregion
        }
 }
diff --git a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs
new file mode 100644 (file)
index 0000000..b7d8524
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// ReaderWriterLockSlimExtensions.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Threading
+{
+       internal static class ReaderWriterLockSlimExtensions
+       {
+               internal static bool Has (this LockState state, LockState value)
+               {
+                       return (state & value) > 0;
+               }
+
+#if !NET_4_0 && !NET_4_0_BOOTSTRAP
+               internal static bool Wait (this ManualResetEvent self, int timeout)
+               {
+                       return self.WaitOne (timeout);
+               }
+
+               internal static bool IsSet (this ManualResetEvent self)
+               {
+                       return self.WaitOne (0);
+               }
+#else
+               internal static bool IsSet (this ManualResetEventSlim self)
+               {
+                       return self.IsSet;
+               }
+#endif
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Threading/ThreadLockState.cs b/mcs/class/System.Core/System.Threading/ThreadLockState.cs
new file mode 100644 (file)
index 0000000..f4dacc9
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// ThreadLockState.cs
+//
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace System.Threading
+{
+       [Flags]
+       internal enum LockState
+       {
+               None = 0,
+               Read = 1,
+               Write = 2,
+               Upgradable = 4,
+               UpgradedRead = Upgradable | Read,
+               UpgradedWrite = Upgradable | Write
+       }
+
+       internal class ThreadLockState
+       {
+               public LockState LockState;
+               public int ReaderRecursiveCount;
+               public int WriterRecursiveCount;
+               public int UpgradeableRecursiveCount;
+       }
+}
\ No newline at end of file
index 5dc1c2581264677c675fc3a53d645944a6af144c..69b3458a7d559a4bb5b1d09ead68d64a1b6978aa 100644 (file)
@@ -58,7 +58,7 @@ namespace System
                T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13);
 
        public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14> (
-               T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T4 arg14);
+               T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14);
 
        public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15> (
                T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15);
index 1d60e07e6d17e4707f3cb801992e4691b91f3d10..6be3f8f8aeea342de94dde0b0b3f5f92795bdd6e 100644 (file)
@@ -770,6 +770,18 @@ namespace System
                        return new DateTime (year, transition.Month, day) + transition.TimeOfDay.TimeOfDay;
                }
 
+               static List<AdjustmentRule> ValidateRules (List<AdjustmentRule> adjustmentRules)
+               {
+                       AdjustmentRule prev = null;
+                       foreach (AdjustmentRule current in adjustmentRules.ToArray ()) {
+                               if (prev != null && prev.DateEnd > current.DateStart) {
+                                       adjustmentRules.Remove (current);
+                               }
+                               prev = current;
+                       }
+                       return adjustmentRules;
+               }
+
 #if LIBC
                private static bool ValidTZFile (byte [] buffer, int length)
                {
@@ -916,18 +928,6 @@ namespace System
                        }
                }
 
-               static List<AdjustmentRule> ValidateRules (List<AdjustmentRule> adjustmentRules)
-               {
-                       AdjustmentRule prev = null;
-                       foreach (AdjustmentRule current in adjustmentRules.ToArray ()) {
-                               if (prev != null && prev.DateEnd > current.DateStart) {
-                                       adjustmentRules.Remove (current);
-                               }
-                               prev = current;
-                       }
-                       return adjustmentRules;
-               }
-
                static Dictionary<int, string> ParseAbbreviations (byte [] buffer, int index, int count)
                {
                        var abbrevs = new Dictionary<int, string> ();
index 5cb8a7e7387418f5aed46116fee2e16d6cf4f1a6..7b0972fd0b1c11753a27005463562b447ebe9c41 100644 (file)
@@ -202,7 +202,7 @@ namespace MonoTests.System.Collections.Generic {
                public void TestSymmetricExceptWith ()
                {
                        var data = new [] {1, 2, 3, 4, 5};
-                       var other = new [] {4, 5, 6, 7, 8, 9};
+                       var other = new [] {4, 5, 6, 7, 8, 9, 9};
                        var result = new [] {1, 2, 3, 6, 7, 8, 9};
 
                        var set = new HashSet<int> (data);
index 0cd94b1e766413ba858c1f6405a12d23688f4246..30b6738d4474aaa837dc2f242582b00c6800cd67 100644 (file)
@@ -2314,5 +2314,14 @@ namespace MonoTests.System.Linq {
                        AssertException<ArgumentOutOfRangeException> (delegate () { Enumerable.Range (int.MaxValue - 5, 7); });
                        Enumerable.Range (int.MaxValue - 5, 6);
                }
+
+               [Test]
+               public void ExceptMultipleItems ()
+               {
+                       var data = new [] { 1, 2, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10 };
+                       var expected = new [] { 2, 4, 6, 8, 10 };
+
+                       AssertAreSame (expected, data.Except (new [] { 1, 3, 5, 7, 9 }));
+               }
        }
 }
index 38edd4e6474196714e7f81a65c06ed04cc7e3b26..df458bea7861438580c224c0e739b083bf588019 100644 (file)
@@ -37,6 +37,14 @@ using NUnit.Framework;
 
 namespace MonoTests.System.Linq
 {
+       internal static class AsParallelHelper
+       {
+               internal static ParallelQuery<T> AsReallyParallel<T> (this IEnumerable<T> source)
+               {
+                       return source.AsParallel ().WithExecutionMode (ParallelExecutionMode.ForceParallelism);
+               }
+       }
+
        [TestFixtureAttribute]
        public class ParallelEnumerableTests
        {
@@ -76,13 +84,14 @@ namespace MonoTests.System.Linq
                        }
 
                        Assert.IsNotNull (actual);
+                       int index = -1;
 
                        IEnumerator<T> ee = expected.GetEnumerator ();
                        IEnumerator<T> ea = actual.GetEnumerator ();
 
                        while (ee.MoveNext ()) {
-                               Assert.IsTrue (ea.MoveNext (), "'" + ee.Current + "' expected.");
-                               Assert.AreEqual (ee.Current, ea.Current);
+                               Assert.IsTrue (ea.MoveNext (), "'" + ee.Current + "' expected at index '"+ ++index + "'.");
+                               Assert.AreEqual (ee.Current, ea.Current, "at index '" + index + "'");
                        }
 
                        if (ea.MoveNext ())
@@ -242,7 +251,7 @@ namespace MonoTests.System.Linq
                                int [] second = {2, 4, 6};
                                int [] result = {0, 1, 3, 5};
        
-                               AreEquivalent (result, first.AsParallel ().Except (second.AsParallel ()), 1);
+                               AreEquivalent (result, first.AsReallyParallel ().Except (second.AsParallel ()), 1);
                        });
                }
 
@@ -254,7 +263,7 @@ namespace MonoTests.System.Linq
                                int [] second = {2, 4, 6};
                                int [] result = {2, 4};
        
-                               AreEquivalent (result, first.AsParallel ().Intersect (second.AsParallel ()), 1);
+                               AreEquivalent (result, first.AsReallyParallel ().Intersect (second.AsParallel ()), 1);
                        });
                }
 
@@ -266,7 +275,7 @@ namespace MonoTests.System.Linq
                                int [] second = {2, 4, 6};
                                int [] result = {0, 1, 2, 3, 4, 5, 6};
                                
-                               AreEquivalent (result, first.AsParallel ().Union (second.AsParallel ()), 1);
+                               AreEquivalent (result, first.AsReallyParallel ().Union (second.AsParallel ()), 1);
                        });
                }
                
@@ -283,7 +292,7 @@ namespace MonoTests.System.Linq
                        Foo [] foos = new Foo [] {a, b, c};
                        Bar [] result = new Bar [] {a, b, c};
 
-                       AreEquivalent (result, foos.AsParallel ().Cast<Bar> (), 1);
+                       AreEquivalent (result, foos.AsReallyParallel ().Cast<Bar> (), 1);
                }
                
                [Test]
@@ -292,7 +301,7 @@ namespace MonoTests.System.Linq
                        int [] data = {0, 1, 2, 3, 4, 5};
                        int [] result = {3, 4, 5};
 
-                       AssertAreSame (result, data.AsParallel ().AsOrdered ().Skip (3).ToArray ());
+                       AssertAreSame (result, data.AsReallyParallel ().AsOrdered ().Skip (3).ToArray ());
                }
                
                [Test]
@@ -301,66 +310,90 @@ namespace MonoTests.System.Linq
                        int [] data = {0, 1, 2, 3, 4, 5};
                        int [] result = {3, 4, 5};
 
-                       AssertAreSame (result, data.AsParallel ().AsOrdered ().Skip (3));
+                       AssertAreSame (result, data.AsReallyParallel ().AsOrdered ().Skip (3));
                }
 
-               [Test, Ignore]
+               [Test]
                public void TestSkipWhile ()
                {
                        int [] data = {0, 1, 2, 3, 4, 5};
                        int [] result = {3, 4, 5};
 
-                       AssertAreSame (result, data.AsParallel ().AsOrdered ().SkipWhile (i => i < 3));
+                       AssertAreSame (result, data.AsReallyParallel ().AsOrdered ().SkipWhile (i => i < 3));
                }
 
-               [Test, Ignore]
+               [Test]
                public void TestTake ()
                {
                        int [] data = {0, 1, 2, 3, 4, 5};
                        int [] result = {0, 1, 2};
 
-                       AssertAreSame (result, data.AsParallel ().AsOrdered ().Take (3));
+                       AssertAreSame (result, data.AsReallyParallel ().AsOrdered ().Take (3));
                }
 
-               [Test, Ignore]
+               [Test]
                public void TestTakeWhile ()
                {
                        int [] data = {0, 1, 2, 3, 4, 5};
                        int [] result = {0, 1, 2};
 
-                       AssertAreSame (result, data.AsParallel ().AsOrdered ().TakeWhile (i => i < 3));
+                       AssertAreSame (result, data.AsReallyParallel ().AsOrdered ().TakeWhile (i => i < 3));
+               }
+
+               [Test]
+               public void SelectManyTest ()
+               {
+                       IEnumerable<int> initial = Enumerable.Range (1, 50);
+                       IEnumerable<int> expected = initial.SelectMany ((i) => Enumerable.Range (1, i));
+
+                       ParallelTestHelper.Repeat (() => {
+                                       var actual = initial.AsReallyParallel ().SelectMany ((i) => Enumerable.Range (1, i));
+                                       AreEquivalent (expected, actual, 1);
+                               });
+               }
+
+               [Test]
+               public void SelectManyOrderedTest ()
+               {
+                       IEnumerable<int> initial = Enumerable.Range (1, 50);
+                       IEnumerable<int> expected = initial.SelectMany ((i) => Enumerable.Range (1, i));
+
+                       ParallelTestHelper.Repeat (() => {
+                                       var actual = initial.AsReallyParallel ().AsOrdered ().SelectMany ((i) => Enumerable.Range (1, i));
+                                       AssertAreSame (expected, actual);
+                               });
                }
                
-               [Test, Ignore]
+               [Test]
                public void TestLast ()
                {
                        int [] data = {1, 2, 3};
 
-                       Assert.AreEqual (3, data.AsParallel ().Last ());
+                       Assert.AreEqual (3, data.AsReallyParallel ().AsOrdered ().Last ());
                }
 
-               [Test, Ignore]
+               [Test]
                public void TestLastOrDefault ()
                {
                        int [] data = {};
 
-                       Assert.AreEqual (default (int), data.AsParallel ().LastOrDefault ());
+                       Assert.AreEqual (default (int), data.AsReallyParallel ().AsOrdered ().LastOrDefault ());
                }
 
-               [Test, Ignore]
+               [Test]
                public void TestFirst ()
                {
                        int [] data = {1, 2, 3};
 
-                       Assert.AreEqual (1, data.AsParallel ().First ());
+                       Assert.AreEqual (1, data.AsReallyParallel ().AsOrdered ().First ());
                }
 
-               [Test, Ignore]
+               [Test]
                public void TestFirstOrDefault ()
                {
                        int [] data = {};
 
-                       Assert.AreEqual (default (int), data.AsParallel ().FirstOrDefault ());
+                       Assert.AreEqual (default (int), data.AsReallyParallel ().AsOrdered ().FirstOrDefault ());
                }
                
                [Test]
@@ -369,8 +402,8 @@ namespace MonoTests.System.Linq
                        int [] data = {0, 1, 2, 3, 4};
                        int [] result = {4, 3, 2, 1, 0};
 
-                       AssertAreSame (result, data.AsParallel ().AsOrdered ().Reverse ());
-                       AssertAreSame (result, ParallelEnumerable.Range (0, 5).AsOrdered ().Reverse ());
+                       AssertAreSame (result, ((IEnumerable<int>)data).Select ((i) => i).AsReallyParallel ().AsOrdered ().Reverse ());
+                       AssertAreSame (result, ParallelEnumerable.Range (0, 5).WithExecutionMode (ParallelExecutionMode.ForceParallelism).AsOrdered ().Reverse ());
                }
                
                [Test]
@@ -379,7 +412,7 @@ namespace MonoTests.System.Linq
                        ParallelTestHelper.Repeat (() => {
                                int [] array = { 14, 53, 3, 9, 11, 14, 5, 32, 2 };
                                
-                               var q = array.AsParallel ().OrderBy ((i) => i);
+                               var q = array.AsReallyParallel ().OrderBy ((i) => i);
                                AssertIsOrdered (q, array.Length);
                        });
                }
@@ -444,10 +477,9 @@ namespace MonoTests.System.Linq
                public void TestOrderByAgeAscendingTheByNameDescending ()
                {
                        ParallelTestHelper.Repeat (() => {
-                               var q = from b in CreateBazCollection ().AsParallel()
+                               var q = from b in CreateBazCollection ().AsReallyParallel ()
                                                orderby b.Age ascending, b.Name descending
                                                select b;
-                               //var q = CreateBazCollection ().AsParallel ().OrderBy ((b) => b.Age).ThenByDescending ((b) => b.Name);
        
                                var expected = new [] {
                                        new Baz ("jb", 7),
@@ -456,11 +488,7 @@ namespace MonoTests.System.Linq
                                        new Baz ("jb", 25),
                                        new Baz ("reg", 28),
                                };
-                               
-                               foreach (Baz b in q) {
-                                       Console.Write(b.Name + ", " + b.Age + "; ");
-                               }
-       
+
                                AssertAreSame (expected, q);
                        });
                }
@@ -489,7 +517,7 @@ namespace MonoTests.System.Linq
                public void TestOrderByIdDescendingThenByNameAscending ()
                {
                        ParallelTestHelper.Repeat (() => {
-                               var q = from d in CreateData ().AsParallel()
+                               var q = from d in CreateData ().AsReallyParallel ()
                                        orderby d.ID descending, d.Name ascending
                                                select d;
                                
@@ -517,42 +545,99 @@ namespace MonoTests.System.Linq
                }
                
                
-               [TestAttribute, Ignore]
+               [TestAttribute]
                public void ElementAtTestCase()
                {
+                       //ParallelTestHelper.Repeat (() => {
+                                       Assert.AreEqual(1, baseEnumerable.AsReallyParallel ().AsOrdered ().ElementAt(0), "#1");
+                                       Assert.AreEqual(51, baseEnumerable.AsReallyParallel ().AsOrdered ().ElementAt(50), "#2");
+                                       Assert.AreEqual(489, baseEnumerable.AsReallyParallel ().AsOrdered ().ElementAt(488), "#3");
+                       //});
+               }
+
+               [Test]
+               public void TestJoin ()
+               {
+                       int num = 100;
+                       Tuple<int, int>[] outer = Enumerable.Range (1, 50).Select ((i) => Tuple.Create (i, num - 2 * i)).ToArray ();
+                       Tuple<int, int>[] inner = Enumerable.Range (1, 50).Reverse ().Select ((i) => Tuple.Create (i, 2 * i)).ToArray ();
+
+                       IEnumerable<int> expected = outer.Join (inner, (e) => e.Item1, (e) => e.Item1, (e1, e2) => e1.Item2 + e2.Item2, EqualityComparer<int>.Default);
+
                        ParallelTestHelper.Repeat (() => {
-                               Assert.AreEqual(1, baseEnumerable.ElementAt(0), "#1");
-                               Assert.AreEqual(51, baseEnumerable.ElementAt(50), "#2");
-                               Assert.AreEqual(489, baseEnumerable.ElementAt(488), "#3");
-                       });
+                                       ParallelQuery<int> actual = outer.AsReallyParallel ().Join (inner.AsParallel (), (e) => e.Item1, (e) => e.Item1, (e1, e2) => e1.Item2 + e2.Item2, EqualityComparer<int>.Default);
+
+                                       AreEquivalent (expected, actual, 1);
+                               });
+               }
+
+               [Test]
+               public void TestGroupBy ()
+               {
+                       int num = 100;
+                       Tuple<int, int>[] source = Enumerable.Range (0, num).Select ((i) => Tuple.Create (i / 10, i)).ToArray ();
+
+                       ParallelTestHelper.Repeat (() => {
+                                       ParallelQuery<IGrouping<int, int>> actual = source.AsReallyParallel ().GroupBy ((e) => e.Item1, (e) => e.Item2, EqualityComparer<int>.Default);
+
+                                       foreach (var group in actual) {
+                                               Assert.GreaterOrEqual (group.Key, 0);
+                                               Assert.Less (group.Key, num / 10);
+
+                                               int count = 0;
+                                               foreach (var e in group) {
+                                                       count++;
+                                                       Assert.GreaterOrEqual (e, group.Key * 10);
+                                                       Assert.Less (e, (group.Key + 1) * 10);
+                                               }
+
+                                               Assert.AreEqual (10, count, "count");
+                                       }
+                               });
                }
                
-               [TestAttribute, Ignore]
+               [TestAttribute]
                public void TakeTestCase()
                {
                        ParallelTestHelper.Repeat (() => {
-                               ParallelQuery<int> async = baseEnumerable.AsParallel().Take(2000);
-                               IEnumerable<int> sync = baseEnumerable.Take(2000);
-                               
-                               AreEquivalent(sync, async, 1);
-                               
-                               async = baseEnumerable.AsParallel().Take(100);
-                               sync = baseEnumerable.Take(100);
-                       
-                               AreEquivalent(sync, async, 2);
-                       }, 20);
+                                       ParallelQuery<int> async = baseEnumerable.AsReallyParallel ().AsOrdered ().Take(2000);
+                                       IEnumerable<int> sync = baseEnumerable.Take(2000);
+
+                                       AreEquivalent(sync, async, 1);
+
+                                       async = baseEnumerable.AsReallyParallel ().AsOrdered ().Take(100);
+                                       sync = baseEnumerable.Take(100);
+
+                                       AreEquivalent(sync, async, 2);
+                               }, 20);
+               }
+
+               [TestAttribute]
+               public void UnorderedTakeTestCase()
+               {
+                       ParallelTestHelper.Repeat (() => {
+                                       ParallelQuery<int> async = baseEnumerable.AsReallyParallel ().Take(2000);
+                                       IEnumerable<int> sync = baseEnumerable.Take (2000);
+
+                                       Assert.AreEqual (sync.Count (), async.Count (), "#1");
+
+                                       async = baseEnumerable.AsReallyParallel ().Take(100);
+                                       sync = baseEnumerable.Take(100);
+
+                                       Assert.AreEqual (sync.Count (), async.Count (), "#2");
+                               }, 20);
                }
                
                [Test]
                public void SkipTestCase()
                {
                        ParallelTestHelper.Repeat (() => {
-                               ParallelQuery<int> async = baseEnumerable.AsParallel().AsOrdered().Skip(2000);
+                               ParallelQuery<int> async = baseEnumerable.AsReallyParallel ().AsOrdered().Skip(2000);
                                IEnumerable<int> sync = baseEnumerable.Skip(2000);
                                
                                AreEquivalent(sync, async, 1);
                                
-                               async = baseEnumerable.AsParallel().Skip(100);
+                               async = baseEnumerable.AsReallyParallel ().Skip(100);
                                sync = baseEnumerable.Skip(100);
                                
                                Assert.AreEqual(sync.Count(), async.Count(), "#2");
@@ -598,7 +683,7 @@ namespace MonoTests.System.Linq
                {
                        int [] data = {1, 2, 3, 4};
 
-                       Assert.AreEqual (10, data.AsParallel().Sum ());
+                       Assert.AreEqual (10, data.AsReallyParallel ().Sum ());
                }
 
                [Test]
@@ -606,7 +691,7 @@ namespace MonoTests.System.Linq
                {
                        int [] data = {};
 
-                       Assert.AreEqual (0, data.AsParallel().Sum ());
+                       Assert.AreEqual (0, data.AsReallyParallel ().Sum ());
                }
 
                [Test]
@@ -614,7 +699,7 @@ namespace MonoTests.System.Linq
                {
                        int [] data = {1, 3, 5, 2};
 
-                       Assert.AreEqual (5, data.AsParallel().Max ());
+                       Assert.AreEqual (5, data.AsReallyParallel ().Max ());
                }
 
                [Test]
@@ -622,7 +707,7 @@ namespace MonoTests.System.Linq
                {
                        int [] data = {3, 5, 2, 6, 1, 7};
 
-                       Assert.AreEqual (1, data.AsParallel().Min ());
+                       Assert.AreEqual (1, data.AsReallyParallel ().Min ());
                }
                
                [Test]
@@ -630,7 +715,7 @@ namespace MonoTests.System.Linq
                {
                        int [] data = { 2, 3, 5 };
 
-                       var list = data.AsParallel().AsOrdered().ToList ();
+                       var list = data.AsParallel().AsOrdered().WithExecutionMode (ParallelExecutionMode.ForceParallelism).ToList ();
 
                        AssertAreSame (data, list);
                        AssertIsOrdered (list, data.Length);
@@ -648,12 +733,21 @@ namespace MonoTests.System.Linq
 
                        int [] result = {0, 1, 2};
 
-                       var array = coll.AsParallel().AsOrdered().ToArray ();
+                       var array = coll.AsReallyParallel ().AsOrdered().ToArray ();
+
+                       AssertAreSame (result, array);
+                       AssertIsOrdered (array, result.Length);
+
+                       Assert.AreEqual (typeof (int []), array.GetType ());
+
+                       array = Enumerable.Range (1, 100).Select ((i) => i).AsReallyParallel ().AsOrdered().ToArray ();
+                       result = Enumerable.Range (1, 100).ToArray ();
 
                        AssertAreSame (result, array);
                        AssertIsOrdered (array, result.Length);
 
                        Assert.AreEqual (typeof (int []), array.GetType ());
+
                }
 
                [Test]
@@ -661,7 +755,7 @@ namespace MonoTests.System.Linq
                {
                        int [] data = {3, 5, 2};
 
-                       var list = data.AsParallel().ToList ();
+                       var list = data.AsReallyParallel ().ToList ();
 
                        CollectionAssert.AreEquivalent (data, list);
 
@@ -678,7 +772,7 @@ namespace MonoTests.System.Linq
 
                        int [] result = {0, 1, 2};
 
-                       var array = coll.AsParallel().ToArray ();
+                       var array = coll.AsReallyParallel ().ToArray ();
 
                        CollectionAssert.AreEquivalent (result, array);
 
@@ -706,11 +800,11 @@ namespace MonoTests.System.Linq
 
 
                        // Any<TSource> ()
-                       AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).AsParallel ().Any (); });
+                       AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).AsReallyParallel ().Any (); });
 
                        // Any<TSource> (Func<TSource, bool>)
-                       AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).AsParallel ().Any (x => true); });
-                       AssertException<ArgumentNullException> (delegate () { data.AsParallel ().Any ((Func<string, bool>) null); });
+                       AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).AsReallyParallel ().Any (x => true); });
+                       AssertException<ArgumentNullException> (delegate () { data.AsReallyParallel ().Any ((Func<string, bool>) null); });
                }
 
                [Test]
@@ -721,13 +815,13 @@ namespace MonoTests.System.Linq
 
 
                        // Any<TSource> ()
-                       Assert.IsTrue (data.AsParallel ().Any ());
-                       Assert.IsFalse (empty.AsParallel ().Any ());
+                       Assert.IsTrue (data.AsReallyParallel ().Any ());
+                       Assert.IsFalse (empty.AsReallyParallel ().Any ());
 
                        // Any<TSource> (Func<TSource, bool>)
-                       Assert.IsTrue (data.AsParallel ().Any (x => x == 5));
-                       Assert.IsFalse (data.AsParallel ().Any (x => x == 9));
-                       Assert.IsFalse (empty.AsParallel ().Any (x => true));
+                       Assert.IsTrue (data.AsReallyParallel ().Any (x => x == 5));
+                       Assert.IsFalse (data.AsReallyParallel ().Any (x => x == 9));
+                       Assert.IsFalse (empty.AsReallyParallel ().Any (x => true));
                }
 
                
@@ -736,8 +830,8 @@ namespace MonoTests.System.Linq
                {
                        string [] data = { "2", "1", "5", "3", "4" };
 
-                       AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).AsParallel ().All (x => true); });
-                       AssertException<ArgumentNullException> (delegate () { data.AsParallel ().All ((Func<string, bool>) null); });
+                       AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).AsReallyParallel ().All (x => true); });
+                       AssertException<ArgumentNullException> (delegate () { data.AsReallyParallel ().All ((Func<string, bool>) null); });
                }
 
                [Test]
@@ -746,9 +840,9 @@ namespace MonoTests.System.Linq
                        int [] data = { 5, 2, 3, 1, 6 };
                        int [] empty = { };
 
-                       Assert.IsTrue (data.AsParallel ().All (x => true));
-                       Assert.IsFalse (data.AsParallel ().All (x => x != 1));
-                       Assert.IsTrue (empty.AsParallel ().All (x => false));
+                       Assert.IsTrue (data.AsReallyParallel ().All (x => true));
+                       Assert.IsFalse (data.AsReallyParallel ().All (x => x != 1));
+                       Assert.IsTrue (empty.AsReallyParallel ().All (x => false));
                }
        }
 }
index af605f783fad805001211cb794073dbb61f173a1..497b806e722944b3622c68f415d7a2b3e49f5ad3 100644 (file)
@@ -292,16 +292,17 @@ namespace MonoTests.System.Threading
                        Assert.AreEqual (0, v.WaitingWriteCount, "B6");
 
                        v.EnterReadLock ();
+                       v.ExitUpgradeableReadLock ();
+
                        Assert.IsTrue (v.IsReadLockHeld, "C");
                        Assert.AreEqual (0, v.RecursiveWriteCount, "C1");
                        Assert.AreEqual (1, v.RecursiveReadCount, "C2");
-                       Assert.AreEqual (1, v.RecursiveUpgradeCount, "C3");
+                       Assert.AreEqual (0, v.RecursiveUpgradeCount, "C3");
                        Assert.AreEqual (0, v.WaitingReadCount, "C4");
                        Assert.AreEqual (0, v.WaitingUpgradeCount, "C5");
                        Assert.AreEqual (0, v.WaitingWriteCount, "C6");
-                       v.ExitReadLock ();
 
-                       v.ExitUpgradeableReadLock ();
+                       v.ExitReadLock ();
                }
 
                [Test]
@@ -350,10 +351,9 @@ namespace MonoTests.System.Threading
                        ev2.WaitOne ();
 
                        Assert.IsFalse (v.TryEnterWriteLock (100));
-                       Assert.IsTrue (v.TryEnterReadLock (100));
+                       Assert.IsFalse (v.TryEnterReadLock (100));
                        ev.Set ();
 
-                       v.ExitReadLock ();
                        Assert.IsTrue (v.TryEnterWriteLock (100));
                }
 
@@ -363,7 +363,7 @@ namespace MonoTests.System.Threading
                        var v = new ReaderWriterLockSlim ();
                        int local = 10;
 
-                       var r = from i in Enumerable.Range (1, 30) select new Thread (() => {
+                       var r = from i in Enumerable.Range (1, 10) select new Thread (() => {
                                v.EnterReadLock ();
 
                                Assert.AreEqual (11, local);
@@ -380,9 +380,8 @@ namespace MonoTests.System.Threading
                        local = 11;
 
                        // FIXME: Don't rely on Thread.Sleep (200)
-                       Assert.AreEqual (30, v.WaitingReadCount, "in waiting read");
-
                        Assert.AreEqual (0, v.WaitingWriteCount, "in waiting write");
+                       Assert.AreEqual (10, v.WaitingReadCount, "in waiting read");
                        Assert.AreEqual (0, v.WaitingUpgradeCount, "in waiting upgrade");
                        v.ExitWriteLock ();
 
@@ -404,5 +403,91 @@ namespace MonoTests.System.Threading
                        Assert.IsTrue (v.TryEnterWriteLock (100));
                        v.ExitWriteLock ();
                }
+
+               [Test]
+               public void RecursiveReadLockTest ()
+               {
+                       var v = new ReaderWriterLockSlim (LockRecursionPolicy.SupportsRecursion);
+
+                       Assert.IsTrue (v.TryEnterReadLock (100), "#1");
+                       Assert.IsTrue (v.TryEnterReadLock (100), "#2");
+                       Assert.IsTrue (v.TryEnterReadLock (100), "#3");
+
+                       Assert.AreEqual (3, v.RecursiveReadCount);
+               }
+
+               [Test]
+               public void RecursiveReadPlusWriteLockTest ()
+               {
+                       var v = new ReaderWriterLockSlim (LockRecursionPolicy.SupportsRecursion);
+
+                       try {
+                               v.EnterReadLock ();
+                               v.EnterWriteLock ();
+                               Assert.Fail ("1");
+                       } catch (LockRecursionException ex) {
+                               Assert.IsNotNull (ex, "#1");
+                       }
+               }
+
+               [Test]
+               public void RecursiveReadPlusUpgradeableLockTest ()
+               {
+                       var v = new ReaderWriterLockSlim (LockRecursionPolicy.SupportsRecursion);
+
+                       try {
+                               v.EnterReadLock ();
+                               v.EnterUpgradeableReadLock ();
+                               Assert.Fail ("1");
+                       } catch (LockRecursionException ex) {
+                               Assert.IsNotNull (ex, "#1");
+                       }
+               }
+
+               [Test]
+               public void RecursiveWriteLockTest ()
+               {
+                       var v = new ReaderWriterLockSlim (LockRecursionPolicy.SupportsRecursion);
+
+                       Assert.IsTrue (v.TryEnterWriteLock (100), "#1");
+                       Assert.IsTrue (v.TryEnterWriteLock (100), "#2");
+                       Assert.IsTrue (v.TryEnterWriteLock (100), "#3");
+
+                       Assert.AreEqual (3, v.RecursiveWriteCount);
+               }
+
+               [Test]
+               public void RecursiveWritePlusReadLockTest ()
+               {
+                       var v = new ReaderWriterLockSlim (LockRecursionPolicy.SupportsRecursion);
+
+                       Assert.IsTrue (v.TryEnterWriteLock (100), "#1");
+                       Assert.AreEqual (1, v.RecursiveWriteCount, "1b");
+                       Assert.AreEqual (0, v.RecursiveReadCount, "1c");
+
+                       Assert.IsTrue (v.TryEnterReadLock (100), "#2");
+                       Assert.AreEqual (1, v.RecursiveWriteCount, "2b");
+                       Assert.AreEqual (1, v.RecursiveReadCount, "2c");
+
+                       Assert.IsTrue (v.TryEnterReadLock (100), "#3");
+                       Assert.AreEqual (1, v.RecursiveWriteCount, "3b");
+                       Assert.AreEqual (2, v.RecursiveReadCount, "3c");
+
+                       v.ExitReadLock ();
+                       Assert.AreEqual (1, v.RecursiveWriteCount, "4b");
+                       Assert.AreEqual (1, v.RecursiveReadCount, "4c");
+               }
+
+               [Test]
+               public void RecursiveUpgradeableReadLockTest ()
+               {
+                       var v = new ReaderWriterLockSlim (LockRecursionPolicy.SupportsRecursion);
+
+                       Assert.IsTrue (v.TryEnterUpgradeableReadLock (100), "#1");
+                       Assert.IsTrue (v.TryEnterUpgradeableReadLock (100), "#2");
+                       Assert.IsTrue (v.TryEnterUpgradeableReadLock (100), "#3");
+
+                       Assert.AreEqual (3, v.RecursiveUpgradeCount);
+               }
        }
 }
index 5908496e253713a3a609bea6016f10b0a7654955..f867c7fc7ac0b1026477e312970131b7735593fc 100644 (file)
@@ -77,3 +77,6 @@ System.Linq.jvm/Math.cs
 System.Threading/LockRecursionException.cs
 System.Threading/LockRecursionPolicy.cs
 System.Threading/ReaderWriterLockSlim.cs
+System.Threading/ThreadLockState.cs
+System.Threading/ReaderWriterLockSlimExtensions.cs
+../corlib/System.Threading/AtomicBoolean.cs
index 220ab49fbca08b40211efa83e6a5e2adee86fd31..601ef4a5b289235a8354bda629f519b992e581de 100644 (file)
@@ -66,6 +66,8 @@ System.Security.Cryptography/SHA512CryptoServiceProvider.cs
 System.Threading/LockRecursionException.cs
 System.Threading/LockRecursionPolicy.cs
 System.Threading/ReaderWriterLockSlim.cs
+System.Threading/ThreadLockState.cs
+System.Threading/ReaderWriterLockSlimExtensions.cs
 
 System.Linq.Expressions/Extensions.cs
 System.Linq.Expressions/ExpressionTransformer.cs
@@ -209,48 +211,52 @@ System.IO/HandleInheritability.cs
 ../dlr/Runtime/Microsoft.Scripting.Core/Utils/ReferenceEqualityComparer.cs
 ../dlr/Runtime/Microsoft.Scripting.Core/Utils/TrueReadOnlyCollection.cs
 ../dlr/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs
-System.Linq/ParallelQueryEnumerator.cs
+System.Linq.Parallel/ParallelQueryEnumerator.cs
 System.Linq/OrderedParallelQuery.cs
 System.Linq/ParallelMergeOptions.cs
 System.Linq/ParallelExecutionMode.cs
 System.Linq/ParallelEnumerable.cs
-System.Linq/ParallelPartitioner.cs
-System.Linq/Internal/RangeList.cs
-System.Linq/Internal/StripPartitioner.cs
-System.Linq/Internal/RepeatList.cs
-System.Linq/Internal/ParallelQuickSort.cs
-System.Linq/Internal/OrderingEnumerator.cs
-System.Linq/Internal/AggregationList.cs
-System.Linq/Internal/ConcurrentLookup.cs
-System.Linq/Internal/ConcurrentGrouping.cs
-System.Linq/Internal/ReverseList.cs
-System.Linq/ParallelExecuter.cs
+System.Linq.Parallel/ParallelPartitioner.cs
+System.Linq.Parallel/RangeList.cs
+System.Linq.Parallel/StripPartitioner.cs
+System.Linq.Parallel/RepeatList.cs
+System.Linq.Parallel/ParallelQuickSort.cs
+System.Linq.Parallel/OrderingEnumerator.cs
+System.Linq.Parallel/AggregationList.cs
+System.Linq.Parallel/ConcurrentLookup.cs
+System.Linq.Parallel/ConcurrentGrouping.cs
+System.Linq.Parallel/ReverseList.cs
+System.Linq.Parallel/ParallelExecuter.cs
 System.Linq/ParallelQuery.cs
-System.Linq/Internal/QueryNodes/QueryWhereNode.cs
-System.Linq/Internal/QueryNodes/QueryCastNode.cs
-System.Linq/Internal/QueryNodes/QueryConcatNode.cs
-System.Linq/Internal/QueryNodes/QueryDefaultEmptyNode.cs
-System.Linq/Internal/QueryNodes/QueryOptionNode.cs
-System.Linq/Internal/QueryNodes/QueryGroupByNode.cs
-System.Linq/Internal/QueryNodes/QuerySelectNode.cs
-System.Linq/Internal/QueryNodes/QuerySelectManyNode.cs
-System.Linq/Internal/QueryNodes/QueryStreamNode.cs
-System.Linq/Internal/QueryNodes/QueryOrderedStreamNode.cs
-System.Linq/Internal/QueryNodes/QueryStartNode.cs
-System.Linq/Internal/QueryNodes/QueryBaseNode.cs
-System.Linq/Internal/QueryNodes/QueryChildNode.cs
-System.Linq/Internal/QueryNodes/QueryOrderGuardNode.cs
-System.Linq/Internal/QueryNodes/QueryOrderByNode.cs
-System.Linq/Internal/QueryNodes/QueryMuxNode.cs
-System.Linq/Internal/QueryNodes/QueryZipNode.cs
-System.Linq/Internal/QueryNodes/QuerySetNode.cs
-System.Linq/Internal/QueryNodes/QueryReverseNode.cs
-System.Linq/Internal/QueryNodes/SetInclusion.cs
-System.Linq/Internal/Visitors/INodeVisitor.cs
-System.Linq/Internal/Visitors/IVisitableNode.cs
-System.Linq/Internal/Visitors/QueryCheckerVisitor.cs
-System.Linq/Internal/Visitors/QueryOptions.cs
-System.Linq/Internal/QueryNodes/WrapHelper.cs
+System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
+System.Linq.Parallel.QueryNodes/QueryCastNode.cs
+System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
+System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
+System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
+System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
+System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
+System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
+System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
+System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
+System.Linq.Parallel.QueryNodes/QueryStartNode.cs
+System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
+System.Linq.Parallel.QueryNodes/QueryChildNode.cs
+System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
+System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
+System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
+System.Linq.Parallel.QueryNodes/QueryZipNode.cs
+System.Linq.Parallel.QueryNodes/QuerySetNode.cs
+System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
+System.Linq.Parallel.QueryNodes/SetInclusion.cs
+System.Linq.Parallel.QueryNodes/WrapHelper.cs
+System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
+System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
+System.Linq.Parallel/INodeVisitor.cs
+System.Linq.Parallel/IVisitableNode.cs
+System.Linq.Parallel/QueryCheckerVisitor.cs
+System.Linq.Parallel/QueryIsOrderedVisitor.cs
+System.Linq.Parallel/QueryOptions.cs
 ../corlib/System.Collections.Concurrent/Partitioners/EnumerablePartitioner.cs
 ../corlib/System.Collections.Concurrent/ConcurrentSkipList.cs
+../corlib/System.Threading/AtomicBoolean.cs
 
index 101feeefa615394b4774b4ac430f0d5e0a7c0c1f..6ea79b915cf31b3a2c3947716e3f930958f12e43 100755 (executable)
@@ -51,20 +51,10 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyFileVersion (Consts.FxFileVersion)]
 
 [assembly: NeutralResourcesLanguage ("en-US")]
-#if !NET_2_1
-[assembly: CLSCompliant (true)]
-#endif
 [assembly: AssemblyDelaySign (true)]
-#if NET_2_1
-       [assembly: AssemblyKeyFile ("../silverlight.pub")]
-#else
-       [assembly: AssemblyKeyFile ("../silverlight.pub")] // easing InternalVisibleTo use.
-#endif
+[assembly: AssemblyKeyFile ("../winfx.pub")]
 
 [assembly: ComVisible (false)]
-#if !NET_2_1
-[assembly: AllowPartiallyTrustedCallers]
-#endif
 
 [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
 [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
index da8a9b7abf8bdcc1a58f66638f7832ef7b2b12b0..e881a7b2d4724c77f7cec4fbcee0918899f490a9 100644 (file)
@@ -13,8 +13,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES =
 
-VALID_PROFILE := $(filter 2.1 4.0, $(FRAMEWORK_VERSION))
-ifndef VALID_PROFILE
+ifneq (2.1, $(FRAMEWORK_VERSION))
 LIBRARY_NAME = dummy-System.Json.dll
 NO_INSTALL = yes
 NO_SIGN_ASSEMBLY = yes
index 75c590eee321d34c444a917b80d6e789f3f309d4..fcbdca283703336f0934e7707f44833c0f7f3214 100644 (file)
@@ -5,4 +5,3 @@ System.Json/JsonObject.cs
 System.Json/JsonPrimitive.cs
 System.Json/JsonType.cs
 System.Json/JsonValue.cs
-System.Json/MergedEnumerable.cs
index a68877cab67335a2ee8264f93c62566e43f6ee77..49010681dcd205c5222fa31eaa75398d46b69385 100644 (file)
@@ -10,35 +10,24 @@ namespace System.Json
 {
        public class JsonArray : JsonValue, IList<JsonValue>
        {
-               int known_count = -1;
                List<JsonValue> list;
-               IEnumerable<JsonValue> source;
 
                public JsonArray (params JsonValue [] items)
-                       : this ((IEnumerable<JsonValue>) items)
                {
+                       list = new List<JsonValue> ();
+                       AddRange (items);
                }
 
                public JsonArray (IEnumerable<JsonValue> items)
                {
                        if (items == null)
                                throw new ArgumentNullException ("items");
-                       this.source = items;
+
+                       list = new List<JsonValue> (items);
                }
 
                public override int Count {
-                       get {
-                               if (known_count < 0) {
-                                       if (list != null)
-                                               known_count = list.Count;
-                                       else {
-                                               known_count = 0;
-                                               foreach (JsonValue v in source)
-                                                       known_count++;
-                                       }
-                               }
-                               return known_count;
-                       }
+                       get { return list.Count; }
                }
 
                public bool IsReadOnly {
@@ -46,19 +35,8 @@ namespace System.Json
                }
 
                public override sealed JsonValue this [int index] {
-                       get {
-                               if (list != null)
-                                       return list [index];
-                               int i = -1;
-                               foreach (JsonValue v in source)
-                                       if (++i == index)
-                                               return v;
-                               throw new ArgumentOutOfRangeException ("index");
-                       }
-                       set {
-                               PopulateList ();
-                               list [index] = value;
-                       }
+                       get { return list [index]; }
+                       set { list [index] = value; }
                }
 
                public override JsonType JsonType {
@@ -69,7 +47,7 @@ namespace System.Json
                {
                        if (item == null)
                                throw new ArgumentNullException ("item");
-                       PopulateList ();
+
                        list.Add (item);
                }
 
@@ -77,74 +55,50 @@ namespace System.Json
                {
                        if (items == null)
                                throw new ArgumentNullException ("items");
-                       if (list != null)
-                               list.AddRange (items);
-                       else
-                               source = new MergedEnumerable<JsonValue> (source, items);
+
+                       list.AddRange (items);
                }
 
-               public void AddRange (JsonValue [] items)
+               public void AddRange (params JsonValue [] items)
                {
-                       AddRange ((IEnumerable<JsonValue>) items);
-               }
+                       if (items == null)
+                               return;
 
-               static readonly JsonValue [] empty = new JsonValue [0];
+                       list.AddRange (items);
+               }
 
                public void Clear ()
                {
-                       if (list != null)
-                               list.Clear ();
-                       else
-                               source = empty;
+                       list.Clear ();
                }
 
                public bool Contains (JsonValue item)
                {
-                       if (item == null)
-                               throw new ArgumentNullException ("item");
-                       foreach (JsonValue v in this)
-                               if (item == v)
-                                       return true;
-                       return false;
+                       return list.Contains (item);
                }
 
                public void CopyTo (JsonValue [] array, int arrayIndex)
                {
-                       if (list != null)
-                               list.CopyTo (array, arrayIndex);
-                       else
-                               foreach (JsonValue v in source)
-                                       array [arrayIndex++] = v;
+                       list.CopyTo (array, arrayIndex);
                }
 
                public int IndexOf (JsonValue item)
                {
-                       if (item == null)
-                               throw new ArgumentNullException ("item");
-                       int idx = 0;
-                       foreach (JsonValue v in this) {
-                               if (item == v)
-                                       return idx;
-                               idx++;
-                       }
-                       return -1;
+                       return list.IndexOf (item);
                }
 
                public void Insert (int index, JsonValue item)
                {
-                       PopulateList ();
                        list.Insert (index, item);
                }
 
                public bool Remove (JsonValue item)
                {
-                       PopulateList ();
                        return list.Remove (item);
                }
 
                public void RemoveAt (int index)
                {
-                       PopulateList ();
                        list.RemoveAt (index);
                }
 
@@ -153,8 +107,8 @@ namespace System.Json
                        if (stream == null)
                                throw new ArgumentNullException ("stream");
                        stream.WriteByte ((byte) '[');
-                       for (int i = 0; i < Count; i++) {
-                               this [i].Save (stream);
+                       for (int i = 0; i < list.Count; i++) {
+                               list [i].Save (stream);
                                if (i < Count - 1) {
                                        stream.WriteByte ((byte) ',');
                                        stream.WriteByte ((byte) ' ');
@@ -163,22 +117,14 @@ namespace System.Json
                        stream.WriteByte ((byte) ']');
                }
 
-               void PopulateList ()
-               {
-                       if (list == null) {
-                               list = new List<JsonValue> (source);
-                               source = list;
-                       }
-               }
-
                IEnumerator<JsonValue> IEnumerable<JsonValue>.GetEnumerator ()
                {
-                       return source.GetEnumerator ();
+                       return list.GetEnumerator ();
                }
 
                IEnumerator IEnumerable.GetEnumerator ()
                {
-                       return source.GetEnumerator ();
+                       return list.GetEnumerator ();
                }
        }
 }
index e2f0a9917468214c03d7a54d50b65ef3b357e55a..6b6373d84d58d21d54c25cd5e229033f4d52ef07 100644 (file)
@@ -8,76 +8,46 @@ using System.Text;
 using JsonPair = System.Collections.Generic.KeyValuePair<string, System.Json.JsonValue>;
 using JsonPairEnumerable = System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, System.Json.JsonValue>>;
 
-
 namespace System.Json
 {
-       public class JsonObject : JsonValue, IDictionary<string, JsonValue>, ICollection<KeyValuePair<string, JsonValue>>
+       public class JsonObject : JsonValue, IDictionary<string, JsonValue>, ICollection<JsonPair>
        {
-               int known_count = -1;
                Dictionary<string, JsonValue> map;
-               JsonPairEnumerable source;
 
-               public JsonObject (params KeyValuePair<string, JsonValue> [] items)
-                       : this ((JsonPairEnumerable) items)
+               public JsonObject (params JsonPair [] items)
                {
+                       map = new Dictionary<string, JsonValue> ();
+
+                       if (items != null)
+                               AddRange (items);
                }
 
                public JsonObject (JsonPairEnumerable items)
                {
                        if (items == null)
                                throw new ArgumentNullException ("items");
-                       this.source = items;
+
+                       map = new Dictionary<string, JsonValue> ();
+                       AddRange (items);
                }
 
                public override int Count {
-                       get {
-                               if (known_count < 0) {
-                                       if (map != null)
-                                               known_count = map.Count;
-                                       else {
-                                               known_count = 0;
-                                               foreach (JsonPair p in source)
-                                                       known_count++;
-                                       }
-                               }
-                               return known_count;
-                       }
+                       get { return map.Count; }
                }
 
                public IEnumerator<JsonPair> GetEnumerator ()
                {
-                       return AsEnumerable ().GetEnumerator ();
+                       return map.GetEnumerator ();
                }
 
                IEnumerator IEnumerable.GetEnumerator ()
                {
-                       return AsEnumerable ().GetEnumerator ();
-               }
-                       
-               JsonPairEnumerable AsEnumerable ()
-               {
-                       return map ?? source;
-               }
-
-               public bool IsReadOnly {
-                       get { return false; }
-               }
-
-               bool ICollection<JsonPair>.IsReadOnly {
-                       get { return ((ICollection<JsonPair>) map).IsReadOnly; }
+                       return map.GetEnumerator ();
                }
 
                public override sealed JsonValue this [string key] {
-                       get {
-                               foreach (JsonPair pair in AsEnumerable ())
-                                       if (pair.Key == key)
-                                               return pair.Value;
-                               throw new KeyNotFoundException (String.Format ("key '{0}' was not found.", key));
-                       }
-                       set {
-                               PopulateMap ();
-                               map [key] = value;
-                       }
+                       get { return map [key]; }
+                       set { map [key] = value; }
                }
 
                public override JsonType JsonType {
@@ -85,17 +55,11 @@ namespace System.Json
                }
 
                public ICollection<string> Keys {
-                       get {
-                               PopulateMap ();
-                               return map.Keys;
-                       }
+                       get { return map.Keys; }
                }
 
                public ICollection<JsonValue> Values {
-                       get {
-                               PopulateMap ();
-                               return map.Values;
-                       }
+                       get { return map.Values; }
                }
 
                public void Add (string key, JsonValue value)
@@ -104,8 +68,8 @@ namespace System.Json
                                throw new ArgumentNullException ("key");
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       PopulateMap ();
-                       map [key] = value;
+
+                       map.Add (key, value);
                }
 
                public void Add (JsonPair pair)
@@ -117,55 +81,54 @@ namespace System.Json
                {
                        if (items == null)
                                throw new ArgumentNullException ("items");
-                       source = new MergedEnumerable<JsonPair> (source, items);
-                       map = null;
+
+                       foreach (var pair in items)
+                               map.Add (pair.Key, pair.Value);
                }
 
-               public void AddRange (JsonPair [] items)
+               public void AddRange (params JsonPair [] items)
                {
                        AddRange ((JsonPairEnumerable) items);
                }
 
-               static readonly JsonPair [] empty = new JsonPair [0];
-
                public void Clear ()
                {
-                       if (map != null)
-                               map.Clear ();
-                       else
-                               source = empty;
+                       map.Clear ();
                }
 
                bool ICollection<JsonPair>.Contains (JsonPair item)
                {
-                       return ContainsKey (item.Key);
+                       return (map as ICollection<JsonPair>).Contains (item);
+               }
+
+               bool ICollection<JsonPair>.Remove (JsonPair item)
+               {
+                       return (map as ICollection<JsonPair>).Remove (item);
                }
 
                public override bool ContainsKey (string key)
                {
                        if (key == null)
                                throw new ArgumentNullException ("key");
-                       foreach (JsonPair p in AsEnumerable ())
-                               if (p.Key == key)
-                                       return true;
-                       return false;
+
+                       return map.ContainsKey (key);
                }
 
                public void CopyTo (JsonPair [] array, int arrayIndex)
                {
-                       foreach (JsonPair p in AsEnumerable ())
-                               array [arrayIndex++] = p;
+                       (map as ICollection<JsonPair>).CopyTo (array, arrayIndex);
                }
 
                public bool Remove (string key)
                {
-                       PopulateMap ();
+                       if (key == null)
+                               throw new ArgumentNullException ("key");
+
                        return map.Remove (key);
                }
 
-               bool ICollection<JsonPair>.Remove (JsonPair item)
-               {
-                       return ((ICollection<JsonPair>) map).Remove (item);
+               bool ICollection<JsonPair>.IsReadOnly {
+                       get { return false; }
                }
 
                public override void Save (Stream stream)
@@ -173,7 +136,7 @@ namespace System.Json
                        if (stream == null)
                                throw new ArgumentNullException ("stream");
                        stream.WriteByte ((byte) '{');
-                       foreach (JsonPair pair in this) {
+                       foreach (JsonPair pair in map) {
                                stream.WriteByte ((byte) '"');
                                byte [] bytes = Encoding.UTF8.GetBytes (EscapeString (pair.Key));
                                stream.Write (bytes, 0, bytes.Length);
@@ -187,22 +150,7 @@ namespace System.Json
 
                public bool TryGetValue (string key, out JsonValue value)
                {
-                       foreach (JsonPair p in AsEnumerable ())
-                               if (p.Key == key) {
-                                       value = p.Value;
-                                       return true;
-                               }
-                       value = null;
-                       return false;
-               }
-
-               void PopulateMap ()
-               {
-                       if (map == null) {
-                               map = new Dictionary<string, JsonValue> ();
-                               foreach (JsonPair pair in source)
-                                       map.Add (pair.Key, pair.Value);
-                       }
+                       return map.TryGetValue (key, out value);
                }
        }
 }
diff --git a/mcs/class/System.Json/System.Json/MergedEnumerable.cs b/mcs/class/System.Json/System.Json/MergedEnumerable.cs
deleted file mode 100644 (file)
index a0bbce2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Json
-{
-       class MergedEnumerable<T> : IEnumerable<T>
-       {
-               IEnumerable<T> l1, l2;
-
-               public MergedEnumerable (IEnumerable<T> l1, IEnumerable<T> l2)
-               {
-                       if (l1 == null)
-                               throw new ArgumentNullException ("l1");
-                       if (l2 == null)
-                               throw new ArgumentNullException ("l2");
-                       this.l1 = l1;
-                       this.l2 = l2;
-               }
-
-               public IEnumerator<T> GetEnumerator ()
-               {
-                       foreach (T v in l1)
-                               yield return v;
-                       foreach (T v in l2)
-                               yield return v;
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return GetEnumerator ();
-               }
-       }
-}
index 6cff0a06bbea1cd99320ac2e623e24156107e697..ea98f9b0428bdafcff798718c88e04dc690bcf5b 100644 (file)
@@ -128,7 +128,6 @@ namespace System.Net.Policy {
                                        // is the application (XAP) URI allowed by the policy ?
                                        // check headers
                                        if (!af.HttpRequestHeaders.IsAllowed (headerKeys)) {
-                                               Exception = new NotSupportedException ();
                                                return false;
                                        }
 
index 3d73bb0f85bc5efffdeb336acfc25cf9e3fc2cb3..f936f73dc2f6254971f6530f870147078e47492b 100644 (file)
@@ -86,14 +86,13 @@ namespace System.Net {
                        set {
                                // note: this is not a field assignment but a copy (see unit tests)
                                // make sure everything we're supplied is valid...
-                               string[] keys = value.AllKeys;
-                               foreach (string header in keys) {
+                               foreach (string header in value) {
                                        // anything bad will throw
                                        WebHeaderCollection.ValidateHeader (header);
                                }
                                // ... before making those values our own
                                Headers.Clear ();
-                               foreach (string header in keys) {
+                               foreach (string header in value) {
                                        headers [header] = value [header];
                                }
                        }
index bd05bc4d5666d1e73c6604c2965418c4867927c2..003684ddbc553d2feded3a3ae5a0049c0859bede 100644 (file)
@@ -72,8 +72,10 @@ namespace System.Net {
                        }
                        finally {
                                // if used from WebClient then notify that the stream was closed
-                               if (WebClient != null)
-                                       WebClient.WriteStreamClosedCallback (WebClientData);
+                               if (WebClient != null) {
+                                       WebClient.WriteStreamClosedCallback (WebClientData, data.Length);
+                                       WebClient = null; // notify only once
+                               }
                        }
                }
 
index 1487adc40b62382f791f2bfd94b73d82e2829099..67216c70c61822016c2ed0e002e4b48393f8f54d 100644 (file)
@@ -33,6 +33,7 @@
 //
 
 using System.IO;
+using System.Security;
 using System.Text;
 using System.Threading;
 
@@ -44,6 +45,7 @@ namespace System.Net {
                WebHeaderCollection headers;
                WebHeaderCollection responseHeaders;
                string baseAddress;
+               Uri base_address_uri;
                bool is_busy;
                Encoding encoding = Encoding.UTF8;
                bool allow_read_buffering = true;
@@ -51,6 +53,7 @@ namespace System.Net {
                WebRequest request;
                object locker;
                CallbackData callback_data;
+               long upload_length;
 
                public WebClient ()
                {
@@ -58,7 +61,7 @@ namespace System.Net {
                        // but without adding dependency on System.Windows.dll. GetData is [SecurityCritical]
                        // this makes the default .ctor [SecuritySafeCritical] which would be a problem (inheritance)
                        // but it happens that MS SL2 also has this default .ctor as SSC :-)
-                       baseAddress = (AppDomain.CurrentDomain.GetData ("xap_uri") as string);
+                       BaseAddress = (AppDomain.CurrentDomain.GetData ("xap_uri") as string);
                        locker = new object ();
                        UseDefaultCredentials = true;
                }
@@ -70,12 +73,12 @@ namespace System.Net {
                        set {
                                if (String.IsNullOrEmpty (value)) {
                                        baseAddress = String.Empty;
+                                       base_address_uri = null;
                                } else {
-                                       Uri uri = null;
-                                       if (!Uri.TryCreate (value, UriKind.Absolute, out uri))
+                                       if (!Uri.TryCreate (value, UriKind.Absolute, out base_address_uri))
                                                throw new ArgumentException ("Invalid URI");
 
-                                       baseAddress = Uri.UnescapeDataString (uri.AbsoluteUri);
+                                       baseAddress = Uri.UnescapeDataString (base_address_uri.AbsoluteUri);
                                }
                        }
                }
@@ -133,7 +136,7 @@ namespace System.Net {
                void CheckBusy ()
                {
                        if (IsBusy)
-                               throw new NotSupportedException ("WebClient does not support conccurent I/O operations.");
+                               throw new NotSupportedException ("WebClient does not support concurrent I/O operations.");
                }
 
                void SetBusy ()
@@ -166,9 +169,28 @@ namespace System.Net {
                {
                        callback_data = callbackData;
                        WebRequest request = GetWebRequest (uri);
-                       request.Method = DetermineMethod (uri, method);
-                       foreach (string header in Headers.AllKeys)
-                               request.Headers.SetHeader (header, Headers [header]);
+                       // do not send a relative URI to Determine method
+                       request.Method = DetermineMethod (request.RequestUri, method);
+                       // copy headers to the request - some needs special treatments
+                       foreach (string header in Headers) {
+                               switch (header.ToLowerInvariant ()) {
+                               case "content-length":
+                                       long cl = 0;
+                                       if (Int64.TryParse (Headers [header], out cl) && (cl >= 0))
+                                               request.ContentLength = cl;
+                                       break;
+                               case "accept":
+                               case "content-type":
+                                       // this skip the normal/user validation on headers
+                                       request.Headers.SetHeader (header, Headers [header]);
+                                       break;
+                               default:
+                                       request.Headers [header] = Headers [header];
+                                       break;
+                               }
+                       }
+                       // original headers are removed after calls
+                       Headers.Clear ();
                        return request;
                }
 
@@ -200,14 +222,16 @@ namespace System.Net {
                {
                        if (request != null)
                                request.Abort ();
+                       upload_length = 0;
                }
 
                void CompleteAsync ()
                {
                        is_busy = false;
+                       upload_length = 0;
                }
 
-               class CallbackData {
+               internal class CallbackData {
                        public object user_token;
                        public SynchronizationContext sync_context;
                        public byte [] data;
@@ -266,8 +290,12 @@ namespace System.Net {
                                cancel = (web.Status == WebExceptionStatus.RequestCanceled);
                                ex = web;
                        }
+                       catch (SecurityException se) {
+                               // SecurityException inside a SecurityException (not a WebException) for SL compatibility
+                               ex = new SecurityException (String.Empty, se);
+                       }
                        catch (Exception e) {
-                               ex = e;
+                               ex = new WebException ("Could not complete operation.", e, WebExceptionStatus.UnknownError, null);
                        }
                        finally {
                                callback_data.sync_context.Post (delegate (object sender) {
@@ -316,8 +344,12 @@ namespace System.Net {
                                cancel = (web.Status == WebExceptionStatus.RequestCanceled);
                                ex = web;
                        }
+                       catch (SecurityException se) {
+                               // SecurityException inside a SecurityException (not a WebException) for SL compatibility
+                               ex = new SecurityException (String.Empty, se);
+                       }
                        catch (Exception e) {
-                               ex = e;
+                               ex = new WebException ("Could not complete operation.", e, WebExceptionStatus.UnknownError, null);
                        }
                        finally {
                                callback_data.sync_context.Post (delegate (object sender) {
@@ -376,7 +408,7 @@ namespace System.Net {
                                ex = web;
                        }
                        catch (Exception e) {
-                               ex = e;
+                               ex = new WebException ("Could not complete operation.", e, WebExceptionStatus.UnknownError, null);
                        }
                        finally {
                                callback_data.sync_context.Post (delegate (object sender) {
@@ -385,7 +417,7 @@ namespace System.Net {
                        }
                }
 
-               internal void WriteStreamClosedCallback (object WebClientData)
+               internal void WriteStreamClosedCallback (object WebClientData, long length)
                {
                        try {
                                request.BeginGetResponse (OpenWriteAsyncResponseCallback, WebClientData);
@@ -395,17 +427,33 @@ namespace System.Net {
                                        OnWriteStreamClosed (new WriteStreamClosedEventArgs (e));
                                }, null);
                        }
+                       finally {
+                               // kind of dummy, 0% progress, that is always emitted
+                               upload_length = length;
+                               callback_data.sync_context.Post (delegate (object sender) {
+                                       OnUploadProgressChanged (
+                                               new UploadProgressChangedEventArgs (0, -1, length, -1, 0, callback_data.user_token));
+                               }, null);
+                       }
                }
 
                private void OpenWriteAsyncResponseCallback (IAsyncResult result)
                {
+                       Exception ex = null;
                        try {
                                WebResponse response = request.EndGetResponse (result);
                                ProcessResponse (response);
                        }
+                       catch (SecurityException se) {
+                               // SecurityException inside a SecurityException (not a WebException) for SL compatibility
+                               ex = new SecurityException (String.Empty, se);
+                       }
                        catch (Exception e) {
+                               ex = new WebException ("Could not complete operation.", e, WebExceptionStatus.UnknownError, null);
+                       }
+                       finally {
                                callback_data.sync_context.Post (delegate (object sender) {
-                                       OnWriteStreamClosed (new WriteStreamClosedEventArgs (e));
+                                       OnWriteStreamClosed (new WriteStreamClosedEventArgs (ex));
                                }, null);
                        }
                }
@@ -433,8 +481,9 @@ namespace System.Net {
                                SetBusy ();
 
                                try {
-                                       request = SetupRequest (address, method, new CallbackData (userToken, encoding.GetBytes (data)));
-                                       request.BeginGetRequestStream (new AsyncCallback (UploadStringRequestAsyncCallback), null);
+                                       CallbackData cbd = new CallbackData (userToken, encoding.GetBytes (data));
+                                       request = SetupRequest (address, method, cbd);
+                                       request.BeginGetRequestStream (new AsyncCallback (UploadStringRequestAsyncCallback), cbd);
                                }
                                catch (Exception e) {
                                        WebException wex = new WebException ("Could not start operation.", e);
@@ -455,6 +504,14 @@ namespace System.Net {
                                request.Abort ();
                                throw;
                        }
+                       finally {
+                               // kind of dummy, 0% progress, that is always emitted
+                               upload_length = callback_data.data.Length;
+                               callback_data.sync_context.Post (delegate (object sender) {
+                                       OnUploadProgressChanged (
+                                               new UploadProgressChangedEventArgs (0, -1, upload_length, -1, 0, callback_data.user_token));
+                               }, "null");             
+                       }
                }
 
                private void UploadStringResponseAsyncCallback (IAsyncResult result)
@@ -474,11 +531,12 @@ namespace System.Net {
                                cancel = (web.Status == WebExceptionStatus.RequestCanceled);
                                ex = web;
                        }
-                       catch (InvalidOperationException ioe) {
-                               ex = new WebException ("An exception occurred during a WebClient request", ioe);
+                       catch (SecurityException se) {
+                               // SecurityException inside a SecurityException (not a WebException) for SL compatibility
+                               ex = new SecurityException (String.Empty, se);
                        }
                        catch (Exception e) {
-                               ex = e;
+                               ex = new WebException ("Could not complete operation.", e, WebExceptionStatus.UnknownError, null);
                        }
                        finally {
                                callback_data.sync_context.Post (delegate (object sender) {
@@ -547,7 +605,7 @@ namespace System.Net {
                                throw new ArgumentNullException ("address");
 
                        // if the URI is relative then we use our base address URI to make an absolute one
-                       Uri uri = address.IsAbsoluteUri ? address : new Uri (new Uri (baseAddress), address);
+                       Uri uri = address.IsAbsoluteUri || base_address_uri == null ? address : new Uri (base_address_uri, address);
 
                        HttpWebRequest request = (HttpWebRequest) WebRequest.Create (uri);
                        request.AllowReadStreamBuffering = AllowReadStreamBuffering;
@@ -556,9 +614,15 @@ namespace System.Net {
 
                        request.progress = delegate (long read, long length) {
                                callback_data.sync_context.Post (delegate (object sender) {
-                                       OnDownloadProgressChanged (new DownloadProgressChangedEventArgs (read, length, callback_data.user_token));
+                                       if (upload_length > 0) {
+                                               // always emitted as 50% with an unknown (-1) TotalBytesToSend
+                                               OnUploadProgressChanged (new UploadProgressChangedEventArgs (read, length, 
+                                                       upload_length, -1, 50, callback_data.user_token));
+                                       } else {
+                                               OnDownloadProgressChanged (new DownloadProgressChangedEventArgs (read, length, 
+                                                       callback_data.user_token));
+                                       }
                                }, null);
-
                        };
                        return request;
                }
index 9e57284fe74c951bd652ad86ed6df4978cf2f674..16a0d38b7ebe327eac46f04d1f674b7eaeb0c6d3 100644 (file)
@@ -4,8 +4,12 @@
 // Authors:
 //     Jb Evain  <jbevain@novell.com>
 //     Sebastien Pouliot  <sebastien@ximian.com>
+//     Lawrence Pit (loz@cable.a2000.nl)
+//     Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//     Miguel de Icaza (miguel@novell.com)
 //
-// (c) 2007, 2009 Novell, Inc. (http://www.novell.com)
+// Copyright 2003 Ximian, Inc. (http://www.ximian.com)
+// (c) 2007, 2009-2010 Novell, Inc. (http://www.novell.com)
 //
 
 //
@@ -77,11 +81,18 @@ namespace System.Net {
                        set {
                                if (header == null)
                                        throw new ArgumentNullException ("header");
-                               if (header.Length == 0)
+                               if (!IsHeaderName (header))
                                        throw new ArgumentException ("header");
 
                                if (validate)
                                        ValidateHeader (header);
+
+                               // null value are ignored (see moon-unit)
+                               if (value == null)
+                                       return;
+                               if (!IsHeaderValue (value))
+                                       throw new ArgumentException ("value");
+
                                headers [header] = value;
                        }
                }
@@ -221,12 +232,12 @@ namespace System.Net {
                        case "via":
                        case "warning":
                        case "allow":
-                       case "content-length":
-                       case "content-type":
+                       case "content-length":          // accepted by WebClient, copied to WebRequest.ContentLength (not headers)
+                       case "content-type":            // accepted by WebClient, copied to WebRequest.ContentType
                        case "content-location":
                        case "content-range":
                        case "last-modified":
-                       case "accept":
+                       case "accept":                  // accepted by WebClient, copied to HttpWebRequest.Accept
                        case "accept-charset":
                        case "accept-encoding":
                        case "accept-language":
@@ -266,11 +277,68 @@ namespace System.Net {
                        case "vary":
                        case "www-authenticate":
                        case "x-flash-version":
-                               throw new ArgumentException ("header");
+                               string msg = String.Format ("'{0}' cannot be modified", header);
+                               throw new ArgumentException (msg, "header");
                        default:
                                return;
                        }
                }
+
+               internal static bool IsHeaderValue (string value)
+               {
+                       // TEXT any 8 bit value except CTL's (0-31 and 127)
+                       //      but including \r\n space and \t
+                       //      after a newline at least one space or \t must follow
+                       //      certain header fields allow comments ()
+                               
+                       int len = value.Length;
+                       for (int i = 0; i < len; i++) {                 
+                               char c = value [i];
+                               if (c == 127)
+                                       return false;
+                               if (c < 0x20 && (c != '\r' && c != '\n' && c != '\t'))
+                                       return false;
+                               if (c == '\r' && ++i < len) {
+                                       c = value [i];
+                                       if (c != '\n')
+                                               return false;
+                               }
+                               if (c == '\n' && ++i < len) {
+                                       c = value [i];
+                                       if (c != ' ' && c != '\t')
+                                               return false;
+                               }
+                       }
+                       
+                       return true;
+               }
+               
+               internal static bool IsHeaderName (string name)
+               {
+                       if (name == null || name.Length == 0)
+                               return false;
+
+                       int len = name.Length;
+                       for (int i = 0; i < len; i++) {                 
+                               char c = name [i];
+                               if (c > 126 || !allowed_chars [(int) c])
+                                       return false;
+                       }
+                       
+                       return true;
+               }
+
+               static bool [] allowed_chars = new bool [126] {
+                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,
+                       false, false, false, false, false, false, false, false, false, false, false, false, false, false,
+                       false, false, false, false, false, true, false, true, true, true, true, false, false, false, true,
+                       true, false, true, true, false, true, true, true, true, true, true, true, true, true, true, false,
+                       false, false, false, false, false, false, true, true, true, true, true, true, true, true, true,
+                       true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
+                       false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true,
+                       true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
+                       false, true, false
+                       };
        }
 }
 
index 8edf07bc1be57dcf25f8c4eaf639f5a8118612e3..8900a19f5dcf535aabac6cfe5bc20cd0b19d006a 100644 (file)
@@ -107,7 +107,7 @@ namespace System.Net {
                        if (uri == null)
                                throw new ArgumentNullException ("uri");
                        if (!uri.IsAbsoluteUri)
-                               throw new InvalidOperationException ("Uri is not absolute.");
+                               throw new InvalidOperationException ("This operation is not supported for a relative URI.");
 
                        IWebRequestCreate creator = null;
 
index 2941cd0b24c4c1d30481dbc8c5337ab553a2bd45..34bbcf7e49dcb498c471d1b3bbde203994f62277 100644 (file)
@@ -55,13 +55,12 @@ namespace System.Runtime.Remoting.Channels.Ipc.Unix
                         Hashtable h = new Hashtable ();
 
                         foreach (DictionaryEntry e in props) {
+                                h [e.Key] = e.Value;
+                               
                                 switch (e.Key as string) {
                                 case "portName":
                                         h ["path"] = BuildPathFromPortName ((string)e.Value);
                                         break;
-                                default:
-                                        h [e.Key] = e.Value;
-                                        break;
                                 }
                         }
                         return h;
@@ -86,7 +85,8 @@ namespace System.Runtime.Remoting.Channels.Ipc.Unix
         
                 public IpcServerChannel (string name, string portName)
                 {
-                        _portName = portName = BuildPathFromPortName (portName);
+                        _portName = portName;
+                        _path = portName = BuildPathFromPortName (portName);
 
                         _innerChannel = Activator.CreateInstance(UnixChannelLoader.LoadServerChannel (), new object [] {name, portName});
                 }
index 03f4a97176cbf73a52a76ee89775274e82ddc363..df0f08501bddd3c8a13dacc27262484deb372c26 100644 (file)
@@ -99,7 +99,11 @@ namespace System.Runtime.Remoting.Channels.Tcp
                                if (!isOneWay) 
                                {
                                        sinkStack.Push (this, connection);
-                                       ThreadPool.QueueUserWorkItem (new WaitCallback(ReadAsyncTcpMessage), sinkStack);
+                                       ThreadPool.QueueUserWorkItem (new WaitCallback(data => {
+                                               try {
+                                                       ReadAsyncTcpMessage (data);
+                                               } catch {}
+                                               }), sinkStack);
                                }
                                else
                                        connection.Release();
index 394e8f00c4ae7be68b2e1e4d2b2806267746d1ec..74d97cdf10aba2efabb103abd134a46727bb0f1f 100644 (file)
@@ -67,6 +67,51 @@ namespace MonoTests.Remoting
                                return payload;
                        }
                }
+
+                [Test]
+               public void TestCtor2 ()
+               {
+                       string channelName = Guid.NewGuid ().ToString ("N");
+                       string portName = "ipc" + Guid.NewGuid ().ToString ("N");
+                       string url = String.Format ("ipc://{0}/server.rem", portName);
+
+                       IpcServerChannel chan = new IpcServerChannel (channelName, portName);
+                       string[] uris = chan.GetUrlsForUri ("server.rem");
+                       Assert.IsNotNull (uris);
+                       Assert.Greater (uris.Length, 0);
+
+                       bool found = false;
+                       foreach (string s in uris) {
+                               if (s == url) {
+                                       found = true;
+                                       break;
+                               }
+                       }
+                       Assert.IsTrue (found);
+               }
+
+               [Test]
+               public void TestCtor3 ()
+               {
+                       string portName = "ipc" + Guid.NewGuid ().ToString ("N");
+                       string url = String.Format ("ipc://{0}/server.rem", portName);
+
+                       Hashtable props = new Hashtable ();
+                       props ["portName"] = portName;
+                       IpcChannel chan = new IpcChannel (props, null, null);
+                       string[] uris = chan.GetUrlsForUri ("server.rem");
+                       Assert.IsNotNull (uris);
+                       Assert.Greater (uris.Length, 0);
+
+                       bool found = false;
+                       foreach (string s in uris) {
+                               if (s == url) {
+                                       found = true;
+                                       break;
+                               }
+                       }
+                       Assert.IsTrue (found);
+               }
        }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 3624a13..b0adbce
@@ -49,7 +49,7 @@ namespace System.Runtime.Serialization
 
                // This is only for compatible mode.
                StreamingContext context;
-               ReadOnlyCollection<Type> known_runtime_types;
+               ReadOnlyCollection<Type> returned_known_types;
                KnownTypeCollection known_types;
                IDataContractSurrogate surrogate;
 
@@ -222,7 +222,11 @@ namespace System.Runtime.Serialization
                }
 
                public ReadOnlyCollection<Type> KnownTypes {
-                       get { return known_runtime_types; }
+                       get {
+                               if (returned_known_types == null)
+                                       returned_known_types = new ReadOnlyCollection<Type> (known_types);
+                               return returned_known_types;
+                       }
                }
 
                public IDataContractSurrogate DataContractSurrogate {
old mode 100644 (file)
new mode 100755 (executable)
index d85a917..c694f35
@@ -566,6 +566,22 @@ namespace System.Runtime.Serialization
 
                static QName GetSerializableQName (Type type)
                {
+#if !NET_2_1
+                       // First, check XmlSchemaProviderAttribute and try GetSchema() to see if it returns a schema in the expected format.
+                       var xpa = type.GetCustomAttribute<XmlSchemaProviderAttribute> (true);
+                       if (xpa != null) {
+                               var mi = type.GetMethod (xpa.MethodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
+                               if (mi != null) {
+                                       try {
+                                               var xss = new XmlSchemaSet ();
+                                               return (XmlQualifiedName) mi.Invoke (null, new object [] {xss});
+                                       } catch {
+                                               // ignore.
+                                       }
+                               }
+                       }
+#endif
+
                        string xmlName = type.Name;
                        if (type.IsGenericType) {
                                xmlName = xmlName.Substring (0, xmlName.IndexOf ('`')) + "Of";
index 94169f7d591b761a799f60ef445486cabada3ad2..8dc987d1783e6cb6a61f5d60f2cd428c186fc955 100644 (file)
@@ -602,7 +602,7 @@ namespace System.Runtime.Serialization
                }
        }
 
-       // FIXME: it still needs to consider ItemName/KeyName/ValueName
+       // FIXME: it still needs to consider KeyName/ValueName
        // (especially Dictionary collection is not likely considered yet.)
        internal partial class CollectionContractTypeMap : CollectionTypeMap
        {
@@ -615,6 +615,8 @@ namespace System.Runtime.Serialization
                {
                        this.a = a;
                        IsReference = a.IsReference;
+                       if (!String.IsNullOrEmpty (a.ItemName))
+                               element_qname = new XmlQualifiedName (a.ItemName, a.Namespace ?? CurrentNamespace);
                }
 
                internal override string CurrentNamespace {
@@ -1019,20 +1021,20 @@ namespace System.Runtime.Serialization
                List<DataMemberInfo> GetMembers (Type type, QName qname, bool declared_only)
                {
                        List<DataMemberInfo> data_members = new List<DataMemberInfo> ();
-                       BindingFlags flags = AllInstanceFlags;
-                       if (declared_only)
-                               flags |= BindingFlags.DeclaredOnly;
+                       BindingFlags flags = AllInstanceFlags | BindingFlags.DeclaredOnly;
                        
-                       foreach (FieldInfo fi in type.GetFields (flags)) {
-                               if (fi.GetCustomAttributes (
-                                       typeof (NonSerializedAttribute),
-                                       false).Length > 0)
-                                       continue;
+                       for (Type t = type; t != null; t = t.BaseType) {
+                               foreach (FieldInfo fi in t.GetFields (flags)) {
+                                       if (fi.GetCustomAttributes (
+                                               typeof (NonSerializedAttribute),
+                                               false).Length > 0)
+                                               continue;
 
-                               if (fi.IsInitOnly)
-                                       throw new InvalidDataContractException (String.Format ("DataMember field {0} must not be read-only.", fi));
-                               DataMemberAttribute dma = new DataMemberAttribute ();
-                               data_members.Add (CreateDataMemberInfo (dma, fi, fi.FieldType));
+                                       if (fi.IsInitOnly)
+                                               throw new InvalidDataContractException (String.Format ("DataMember field {0} must not be read-only.", fi));
+                                       DataMemberAttribute dma = new DataMemberAttribute ();
+                                       data_members.Add (CreateDataMemberInfo (dma, fi, fi.FieldType));
+                               }
                        }
 
                        data_members.Sort (DataMemberInfo.DataMemberInfoComparer.Instance); // alphabetic order.
@@ -1193,7 +1195,7 @@ namespace System.Runtime.Serialization
                        Order = dma.Order;
                        Member = member;
                        IsRequired = dma.IsRequired;
-                       XmlName = dma.Name != null ? dma.Name : member.Name;
+                       XmlName = XmlConvert.EncodeLocalName (dma.Name != null ? dma.Name : member.Name);
                        XmlNamespace = ns;
                        XmlRootNamespace = rootNamespce;
                        if (Member is FieldInfo)
old mode 100644 (file)
new mode 100755 (executable)
index c47c65f..97b30da
@@ -79,10 +79,10 @@ namespace MonoTests.System.Runtime.Serialization
                [Test]
                public void ConstructorKnownTypesNull ()
                {
-                       // null knownTypes is allowed.
-                       new DataContractSerializer (typeof (Sample1), null);
-                       new DataContractSerializer (typeof (Sample1), "Foo", String.Empty, null);
-                       new DataContractSerializer (typeof (Sample1), new XmlDictionary ().Add ("Foo"), XmlDictionaryString.Empty, null);
+                       // null knownTypes is allowed. Though the property is filled.
+                       Assert.IsNotNull (new DataContractSerializer (typeof (Sample1), null).KnownTypes, "#1");
+                       Assert.IsNotNull (new DataContractSerializer (typeof (Sample1), "Foo", String.Empty, null).KnownTypes, "#2");
+                       Assert.IsNotNull (new DataContractSerializer (typeof (Sample1), new XmlDictionary ().Add ("Foo"), XmlDictionaryString.Empty, null).KnownTypes, "#3");
                }
 
                [Test]
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Channels/DiscoveryChannelBase.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Channels/DiscoveryChannelBase.cs
new file mode 100644 (file)
index 0000000..b9df2eb
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// RequestChannelBase.cs
+//
+// Author:
+//     Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc.  http://www.novell.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Channels
+{
+       internal abstract class DiscoveryChannelBase : ChannelBase
+       {
+               public DiscoveryChannelBase (ChannelManagerBase owner)
+                       : base (owner)
+               {
+               }
+
+               public TChannel CreateDiscoveryInnerChannel<TChannel> (DiscoveryChannelFactory<TChannel> factory)
+               {
+                       // FIXME: use timeout
+                       var client = new DiscoveryClient (factory.Source.DiscoveryEndpointProvider.GetDiscoveryEndpoint ());
+                       var res = client.Find (factory.Source.FindCriteria);
+
+                       foreach (var edm in res.Endpoints) {
+                               try {
+                                       // FIXME: find scheme-matching ListenUri
+                                       return factory.InnerFactory.CreateChannel (edm.Address, edm.ListenUris.FirstOrDefault (u => true) ?? edm.Address.Uri);
+                               } catch (Exception) {
+                               }
+                       }
+                       throw new EndpointNotFoundException (String.Format ("Could not find usable endpoint in {0} endpoints returned by the discovery service.", res.Endpoints.Count));
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Channels/RequestChannelBase.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Channels/RequestChannelBase.cs
new file mode 100644 (file)
index 0000000..66e71e6
--- /dev/null
@@ -0,0 +1,135 @@
+//
+// RequestChannelBase.cs
+//
+// Author:
+//     Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc.  http://www.novell.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Net.Security;
+using System.ServiceModel;
+using System.ServiceModel.Description;
+using System.ServiceModel.Security;
+
+namespace System.ServiceModel.Channels
+{
+       internal abstract class RequestChannelBase : DiscoveryChannelBase, IRequestChannel
+       {
+               ChannelFactoryBase channel_factory;
+               EndpointAddress address;
+               Uri via;
+
+               public RequestChannelBase (ChannelFactoryBase factory, EndpointAddress address, Uri via)
+                       : base (factory)
+               {
+                       this.channel_factory = factory;
+                       this.address = address;
+                       this.via = via;
+               }
+
+               protected internal override TimeSpan DefaultCloseTimeout {
+                       get { return channel_factory.DefaultCloseTimeout; }
+               }
+
+               protected internal override TimeSpan DefaultOpenTimeout {
+                       get { return channel_factory.DefaultOpenTimeout; }
+               }
+
+               public EndpointAddress RemoteAddress {
+                       get { return address; }
+               }
+
+               public Uri Via {
+                       get { return via ?? RemoteAddress.Uri; }
+               }
+
+               public override T GetProperty<T> ()
+               {
+                       if (typeof (T) == typeof (MessageVersion) && channel_factory is IHasMessageEncoder)
+                               return (T) (object) ((IHasMessageEncoder) channel_factory).MessageEncoder.MessageVersion;
+                       if (typeof (T) == typeof (IChannelFactory))
+                               return (T) (object) channel_factory;
+                       return base.GetProperty<T> ();
+               }
+
+               // Request
+
+               public Message Request (Message message)
+               {
+                       return Request (message, DefaultSendTimeout);
+               }
+
+               public abstract Message Request (Message message, TimeSpan timeout);
+
+               public IAsyncResult BeginRequest (Message message, AsyncCallback callback, object state)
+               {
+                       return BeginRequest (message, DefaultSendTimeout, callback, state);
+               }
+
+               Func<Message,TimeSpan,Message> request_delegate;
+
+               public virtual IAsyncResult BeginRequest (Message message, TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (request_delegate == null)
+                               request_delegate = new Func<Message,TimeSpan,Message> (Request);
+                       return request_delegate.BeginInvoke (message, timeout, callback, state);
+               }
+
+               public virtual Message EndRequest (IAsyncResult result)
+               {
+                       return request_delegate.EndInvoke (result);
+               }
+
+               // Open and Close
+               Action<TimeSpan> open_delegate;
+
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (open_delegate == null)
+                               open_delegate = new Action<TimeSpan> (OnOpen);
+                       return open_delegate.BeginInvoke (timeout, callback, state);
+               }
+
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       open_delegate.EndInvoke (result);
+               }
+
+               Action<TimeSpan> close_delegate;
+
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (close_delegate == null)
+                               close_delegate = new Action<TimeSpan> (OnClose);
+                       return close_delegate.BeginInvoke (timeout, callback, state);
+               }
+
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       close_delegate.EndInvoke (result);
+               }
+       }
+}
index fd6eaed0aa227464427a853dc967f937900ba580..e45675fe0ef8e5eb66a2ba85d6606b1987582b6f 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -11,6 +36,12 @@ namespace System.ServiceModel.Discovery.Configuration
                public AnnouncementChannelEndpointElementCollection ()
                {
                }
+               
+               protected override object GetElementKey (ConfigurationElement element)
+               {
+                       return ((ChannelEndpointElement) element).Name;
+               }
        }
 }
 
+#endif
index b61ee48177aaac9e02e7af2c4375328ad8de2cb2..4b00a0b3517532a1e2f2ec5e3e378cfe5b05f4c2 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -13,3 +38,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 16b847fb537494345c56543e7a1ba98333e137d4..9616a271a35ec7b24d2d07b4d874ee33a5081705 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -42,24 +67,51 @@ namespace System.ServiceModel.Discovery.Configuration
                        set { base [max_announcement_delay] = value; }
                }
                
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+               
                protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
                {
-                       throw new NotImplementedException ();
+                       if (contractDescription == null)
+                               throw new ArgumentNullException ("contractDescription");
+                       var ret = new AnnouncementEndpoint (DiscoveryVersion) { MaxAnnouncementDelay = this.MaxAnnouncementDelay };
+                       if (ret.Contract.ContractType != contractDescription.ContractType)
+                               throw new ArgumentException ("The argument contractDescription does not represent the expected Announcement contract");
+                       return ret;
                }
                
                protected override void InitializeFrom (ServiceEndpoint endpoint)
                {
-                       throw new NotImplementedException ();
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       AnnouncementEndpoint ae = (AnnouncementEndpoint) endpoint;
+                       DiscoveryVersion = ae.DiscoveryVersion;
+                       MaxAnnouncementDelay = ae.MaxAnnouncementDelay;
                }
                
                protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
                {
-                       throw new NotImplementedException ();
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       AnnouncementEndpoint ae = (AnnouncementEndpoint) endpoint;
+                       if (!ae.DiscoveryVersion.Equals (DiscoveryVersion))
+                               throw new ArgumentException ("Argument AnnouncementEndpoint is initialized with different DiscoveryVersion");
+                       ae.MaxAnnouncementDelay = MaxAnnouncementDelay;
+                       ae.Address = serviceEndpointElement.CreateEndpointAddress (); // it depends on InternalVisibleTo(System.ServiceModel)
+                       ae.Binding = ConfigUtil.CreateBinding (serviceEndpointElement.Binding, serviceEndpointElement.BindingConfiguration); // it depends on InternalVisibleTo(System.ServiceModel)
                }
 
                protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
                {
-                       throw new NotImplementedException ();
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       AnnouncementEndpoint ae = (AnnouncementEndpoint) endpoint;
+                       if (!ae.DiscoveryVersion.Equals (DiscoveryVersion))
+                               throw new ArgumentException ("Argument AnnouncementEndpoint is initialized with different DiscoveryVersion");
+                       ae.MaxAnnouncementDelay = MaxAnnouncementDelay;
+                       ae.Address = serviceEndpointElement.CreateEndpointAddress (); // it depends on InternalVisibleTo(System.ServiceModel)
+                       ae.Binding = ConfigUtil.CreateBinding (serviceEndpointElement.Binding, serviceEndpointElement.BindingConfiguration); // it depends on InternalVisibleTo(System.ServiceModel)
                }
                
                protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
@@ -74,3 +126,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 1402a9ca3c34cad6d41525758831d721b53b59f0..29c0a5d55b1960aa679e1f25d50246b0df3635a1 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -32,14 +57,14 @@ namespace System.ServiceModel.Discovery.Configuration
                [ConfigurationProperty ("name", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
                [StringValidator (MinLength = 0)]
                public string Name {
-                       get { return (string) Properties [name]; }
-                       set { Properties [name] = value; }
+                       get { return (string) base [name]; }
+                       set { base [name] = value; }
                }
 
                [ConfigurationProperty ("namespace", DefaultValue = "http://tempuri.org/", Options = ConfigurationPropertyOptions.IsKey)]
                public string Namespace {
-                       get { return (string) Properties [@namespace]; }
-                       set { Properties [@namespace] = value; }
+                       get { return (string) base [@namespace]; }
+                       set { base [@namespace] = value; }
                }
                
                protected override ConfigurationPropertyCollection Properties {
@@ -48,3 +73,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 4c47951910b48c83ca2f490c248143f87d955bab..7292b2cd6cdbe9363c338a20aebcbfdee58f7323 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -11,6 +36,12 @@ namespace System.ServiceModel.Discovery.Configuration
                public ContractTypeNameElementCollection ()
                {
                }
+               
+               protected override object GetElementKey (ConfigurationElement element)
+               {
+                       return ((ContractTypeNameElement) element).Name;
+               }
        }
 }
 
+#endif
index 0a9169bdfcda7016ce4a95afa4805bccc77ff90a..296ebaefc428b52c2e9733ecb55396ddccc7f86e 100644 (file)
@@ -1,6 +1,32 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
+using System.ServiceModel.Channels;
 using System.ServiceModel.Configuration;
 
 namespace System.ServiceModel.Discovery.Configuration
@@ -29,13 +55,53 @@ namespace System.ServiceModel.Discovery.Configuration
 
                [ConfigurationProperty ("endpoint")]
                public ChannelEndpointElement DiscoveryEndpoint {
-                       get { return (ChannelEndpointElement) Properties [endpoint]; }
+                       get { return (ChannelEndpointElement) base [endpoint]; }
                }
 
                [ConfigurationProperty ("findCriteria")]
                public FindCriteriaElement FindCriteria {
-                       get { return (FindCriteriaElement) Properties [find_criteria]; }
+                       get { return (FindCriteriaElement) base [find_criteria]; }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+               
+               public override void ApplyConfiguration (BindingElement bindingElement)
+               {
+                       if (bindingElement == null)
+                               throw new ArgumentNullException ("bindingElement");
+                       if (DiscoveryEndpoint == null)
+                               throw new ArgumentNullException ("'endpoint' configuration element is missing.");
+                       var be = (DiscoveryClientBindingElement) bindingElement;
+
+                       base.ApplyConfiguration (bindingElement);
+
+                       if (FindCriteria != null)
+                               be.FindCriteria = FindCriteria.CreateInstance ();
+
+                       // FIXME: apply DiscoveryEndpoint
+                       throw new NotImplementedException ();
+               }
+
+               public override void CopyFrom (ServiceModelExtensionElement from)
+               {
+                       if (from == null)
+                               throw new ArgumentNullException ("from");
+                       var ce = (DiscoveryClientElement) from;
+                       FindCriteria.CopyFrom (ce.FindCriteria);
+               }
+
+               protected override BindingElement CreateBindingElement ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               protected override void InitializeFrom (BindingElement bindingElement)
+               {
+                       throw new NotImplementedException ();
                }
        }
 }
 
+#endif
index 6cbf91d46b4c611798f634c61994b7fc62653463..5556659a1694e3412e7f40ce73725ebc0e995d22 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -25,13 +50,18 @@ namespace System.ServiceModel.Discovery.Configuration
                
                [ConfigurationProperty ("endpoint")]
                public ChannelEndpointElement DiscoveryEndpoint {
-                       get { return (ChannelEndpointElement) Properties [discovery_element]; }
+                       get { return (ChannelEndpointElement) base [endpoint]; }
                }
                
                [ConfigurationProperty ("findCriteria")]
                public FindCriteriaElement FindCriteria {
-                       get { return (FindCriteriaElement) Properties [find_criteria]; }
+                       get { return (FindCriteriaElement) base [find_criteria]; }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
                }
        }
 }
 
+#endif
index 50cd30aa81ef137c007a713fd784b1280d6185c3..0f0a487bb143a7a4894c242a53be6fac06a37cd3 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -13,3 +38,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 533f80c377fcea271bcebac77fbff513afb1ea6d..beb8938f705943fb03b0c602fcfbc8fb9149ffb7 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -8,10 +33,52 @@ namespace System.ServiceModel.Discovery.Configuration
 {
        public class DiscoveryEndpointElement : StandardEndpointElement
        {
+               static ConfigurationPropertyCollection properties;
+               static ConfigurationProperty discovery_mode, discovery_version, max_response_delay;
+               
+               static DiscoveryEndpointElement ()
+               {
+                       discovery_mode = new ConfigurationProperty ("discoveryMode", typeof (ServiceDiscoveryMode), ServiceDiscoveryMode.Managed, null, null, ConfigurationPropertyOptions.None);
+                       discovery_version = new ConfigurationProperty ("discoveryVersion", typeof (DiscoveryVersion), "WSDiscovery11", new DiscoveryVersionConverter (), null, ConfigurationPropertyOptions.None);
+                       max_response_delay = new ConfigurationProperty ("maxResponseDelay", typeof (TimeSpan), "00:00:00", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None);
+                       properties = new ConfigurationPropertyCollection ();
+                       properties.Add (discovery_mode);
+                       properties.Add (discovery_version);
+                       properties.Add (max_response_delay);
+               }
+
                public DiscoveryEndpointElement ()
                {
                }
 
+               [ConfigurationProperty ("discoveryMode", DefaultValue = ServiceDiscoveryMode.Managed)]
+               public ServiceDiscoveryMode DiscoveryMode {
+                       get { return (ServiceDiscoveryMode) base [discovery_mode]; }
+                       set { base [discovery_mode] = value; }
+               }
+
+               [TypeConverter (typeof (DiscoveryVersionConverter))]
+               [ConfigurationProperty ("discoveryVersion", DefaultValue = "WSDiscovery11")]
+               public DiscoveryVersion DiscoveryVersion {
+                       get { return (DiscoveryVersion) base [discovery_version]; }
+                       set { base [discovery_version] = value; }
+               }
+
+               [ConfigurationProperty ("maxResponseDelay", DefaultValue = "00:00:00")]
+               [TypeConverter (typeof (TimeSpanConverter))]
+               public TimeSpan MaxResponseDelay {
+                       get { return (TimeSpan) base [max_response_delay]; }
+                       set { base [max_response_delay] = value; }
+               }
+               
+               protected override Type EndpointType {
+                       get { return typeof (DiscoveryEndpoint); }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+
                protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
                {
                        throw new NotImplementedException ();
@@ -44,3 +111,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index eef51ce0ecee1dbb99b6cfffd9815807b6e47800..712b31e5c03dd90e1c387347ae7fa648487cb461 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -33,3 +58,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 9462cd48c72a413147813335fa3efa31ce855288..6ab9dd06dd61da65130414ebb5fcbfcf9f874ac1 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -13,3 +38,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 35faba0b0234762d67083437c390ba3dbd53cb01..d8fb28f942fd29f3aeb83c03f93e357133c6724a 100644 (file)
@@ -1,7 +1,33 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
 using System.ServiceModel.Configuration;
+using System.ServiceModel.Description;
 
 namespace System.ServiceModel.Discovery.Configuration
 {
@@ -23,8 +49,42 @@ namespace System.ServiceModel.Discovery.Configuration
 
                [ConfigurationProperty ("discoveryClientSettings")]
                public DiscoveryClientSettingsElement DiscoveryClientSettings {
-                       get { return (DiscoveryClientSettingsElement) Prperties [discovery_client_settings]; }
+                       get { return (DiscoveryClientSettingsElement) base [discovery_client_settings]; }
+               }
+               
+               protected override Type EndpointType {
+                       get { return typeof (DynamicEndpoint); }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+               
+               protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
+               {
+                       throw new NotImplementedException ();
                }
        }
 }
 
+#endif
index 75bb62e205d77da0eee51f4544a14fce29a7e83f..e0bd8dc1d084db189075da8216e1e3159178ba1a 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -33,24 +58,34 @@ namespace System.ServiceModel.Discovery.Configuration
 
                [ConfigurationProperty ("types")]
                public ContractTypeNameElementCollection ContractTypeNames {
-                       get { return (ContractTypeNameElementCollection) Properties [types]; }
+                       get { return (ContractTypeNameElementCollection) base [types]; }
                }
                
                [ConfigurationPropertyAttribute("enabled", DefaultValue = true)]
                public bool Enabled {
-                       get { return (bool) Properties [enabled]; }
-                       set { Properties [enabled] = value; }
+                       get { return (bool) base [enabled]; }
+                       set { base [enabled] = value; }
                }
                
                [ConfigurationPropertyAttribute("extensions")]
                public XmlElementElementCollection Extensions {
-                       get { return (XmlElementElementCollection) Properties [extensions]; }
+                       get { return (XmlElementElementCollection) base [extensions]; }
                }
                
                [ConfigurationPropertyAttribute("scopes")]
                public ScopeElementCollection Scopes {
-                       get { return (ScopeElementCollection) Properties [scopes]; }
+                       get { return (ScopeElementCollection) base [scopes]; }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+               
+               protected override object CreateBehavior ()
+               {
+                       throw new NotImplementedException ();
                }
        }
 }
 
+#endif
index f5a4a9c26e471f8b6c8f414b9f45598c05d9dc8c..01f840927ac8c31b5f31cb12bfe3ffd624746ce3 100644 (file)
@@ -1,7 +1,34 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
 using System.ServiceModel.Configuration;
+using System.Xml;
+using System.Xml.Linq;
 
 namespace System.ServiceModel.Discovery.Configuration
 {
@@ -13,9 +40,9 @@ namespace System.ServiceModel.Discovery.Configuration
                static FindCriteriaElement ()
                {
                        types = new ConfigurationProperty ("types", typeof (ContractTypeNameElementCollection), null, null, null, ConfigurationPropertyOptions.None);
-                       duration = new ConfigurationProperty ("duration", typeof (TimeSpan), "00:00:20", new TimeSpanconverter (), null, ConfigurationPropertyOptions.None);
+                       duration = new ConfigurationProperty ("duration", typeof (TimeSpan), "00:00:20", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None);
                        extensions = new ConfigurationProperty ("extensions", typeof (XmlElementElementCollection), null, null, null, ConfigurationPropertyOptions.None);
-                       max_results = new ConfigurationProperty ("maxResults", typeof (TimeSpan), "00:00:20", new TimeSpanconverter (), null, ConfigurationPropertyOptions.None);
+                       max_results = new ConfigurationProperty ("maxResults", typeof (TimeSpan), "00:00:20", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None);
                        scope_match_by = new ConfigurationProperty ("scopeMatchBy", typeof (Uri), null, null, null, ConfigurationPropertyOptions.None);
                        scopes = new ConfigurationProperty ("scopes", typeof (ScopeElementCollection), null, null, null, ConfigurationPropertyOptions.None);
                        properties = new ConfigurationPropertyCollection ();
@@ -33,39 +60,71 @@ namespace System.ServiceModel.Discovery.Configuration
 
                [ConfigurationProperty ("types")]
                public ContractTypeNameElementCollection ContractTypeNames {
-                       get { return (ContractTypeNameElementCollection) Properties [types]; }
+                       get { return (ContractTypeNameElementCollection) base [types]; }
                }
                
                [ConfigurationProperty ("duration", DefaultValue = "00:00:20")]
                [TypeConverter (typeof (TimeSpanConverter))]
                public TimeSpan Duration {
-                       get { return (TimeSpan) Properties [duration]; }
-                       set { Properties [duration] = value; }
+                       get { return (TimeSpan) base [duration]; }
+                       set { base [duration] = value; }
                }
                
                [ConfigurationProperty ("extensions")]
                public XmlElementElementCollection Extensions {
-                       get { return (XmlElementElementCollection) Properties [extensions]; }
+                       get { return (XmlElementElementCollection) base [extensions]; }
                }
                
                [ConfigurationProperty ("maxResults", DefaultValue = 0)]
-               [IntegerValidator (0, int.MaxValue)]
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
                public int MaxResults  {
-                       get { return (int) Properties [max_results]; }
-                       set { Properties [max_results] = value; }
+                       get { return (int) base [max_results]; }
+                       set { base [max_results] = value; }
                }
                
                [ConfigurationProperty ("scopeMatchBy")]
-               [TypeConverter (typeof (UriTypeConverter))]
                public Uri ScopeMatchBy {
-                       get { return (Uri) Properties [scope_match_by]; }
-                       set { Properties [scope_match_by] = value; }
+                       get { return (Uri) base [scope_match_by]; }
+                       set { base [scope_match_by] = value; }
                }
                
                [ConfigurationProperty ("scopes")]
                public ScopeElementCollection Scopes {
-                       get { return (ScopeElementCollection) Properties [scopes]; }
+                       get { return (ScopeElementCollection) base [scopes]; }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+
+               internal FindCriteria CreateInstance ()
+               {
+                       var fc = new FindCriteria ();
+                       foreach (ContractTypeNameElement ctn in ContractTypeNames)
+                               fc.ContractTypeNames.Add (new XmlQualifiedName (ctn.Name, ctn.Namespace));
+                       fc.Duration = Duration;
+                       foreach (XmlElementElement ext in Extensions)
+                               fc.Extensions.Add (XElement.Load (new XmlNodeReader (ext.XmlElement)));
+                       fc.MaxResults = MaxResults;
+                       fc.ScopeMatchBy = ScopeMatchBy;
+                       foreach (ScopeElement scope in Scopes)
+                               fc.Scopes.Add (scope.Scope);
+                       return fc;
+               }
+
+               internal void CopyFrom (FindCriteriaElement other)
+               {
+                       foreach (ContractTypeNameElement ctn in other.ContractTypeNames)
+                               ContractTypeNames.Add (new ContractTypeNameElement () { Name = ctn.Name, Namespace = ctn.Namespace });
+                       Duration = other.Duration;
+                       foreach (XmlElementElement ext in other.Extensions)
+                               Extensions.Add (new XmlElementElement () { XmlElement = (XmlElement) ext.XmlElement.CloneNode (true) });
+                       MaxResults = other.MaxResults;
+                       ScopeMatchBy = other.ScopeMatchBy;
+                       foreach (ScopeElement scope in other.Scopes)
+                               Scopes.Add (new ScopeElement () { Scope = scope.Scope });
                }
        }
 }
 
+#endif
index ba6bf254181159a8a824f7e57c275b579ab781bd..0ef36293594e727eb69272bd4259f2d02d6ed054 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -13,7 +38,7 @@ namespace System.ServiceModel.Discovery.Configuration
                
                static ScopeElement ()
                {
-                       scope = new ConfigurationProperty ("scopes", typeof (Uri), null, new CallbackValidator (typeof (ScopeElement), null/*FIXME: fill it*/), null, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
+                       scope = new ConfigurationProperty ("scopes", typeof (Uri), null, null, new CallbackValidator (typeof (ScopeElement), null/*FIXME: fill it*/), ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
                        properties = new ConfigurationPropertyCollection ();
                        properties.Add (scope);
                }
@@ -26,9 +51,14 @@ namespace System.ServiceModel.Discovery.Configuration
                [ConfigurationProperty ("scope", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
                [CallbackValidator (CallbackMethodName = "ScopeValidatorCallback", Type = typeof (ScopeElement))]
                public Uri Scope {
-                       get { return (Uri) Properties [scope]; }
-                       set { Properties [scope] = value; }
+                       get { return (Uri) base [scope]; }
+                       set { base [scope] = value; }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
                }
        }
 }
 
+#endif
index 1896a465a1d2f690f8d51d3444b1f39022157585..d2576ff0622b2809cddfb27fd5669d48b2ba93b3 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -11,6 +36,12 @@ namespace System.ServiceModel.Discovery.Configuration
                public ScopeElementCollection ()
                {
                }
+               
+               protected override object GetElementKey (ConfigurationElement element)
+               {
+                       return ((ScopeElement) element).Scope;
+               }
        }
 }
 
+#endif
index 68e8f4439a436a06a8b5666fbd5887ac9f59ba3d..675f2f63eb8060dc5a89ab9d6b77be151fb002d6 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -24,11 +49,21 @@ namespace System.ServiceModel.Discovery.Configuration
 
                [ConfigurationProperty ("announcementEndpoints")]
                public AnnouncementChannelEndpointElementCollection AnnouncementEndpoints {
-                       get { return Properties [announcement_endpoints]; }
+                       get { return (AnnouncementChannelEndpointElementCollection) base [announcement_endpoints]; }
                }
                public override Type BehaviorType {
                        get { return typeof (ServiceDiscoveryBehavior); }
                }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+               
+               protected override object CreateBehavior ()
+               {
+                       throw new NotImplementedException ();
+               }
        }
 }
 
+#endif
index 66d31c576919032c6341d40c995c184d60f5f968..8d610eb54c3026cb73a505bf0dbe0a1cdf78dc3e 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -13,3 +38,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index ddcd976421fc58f90d7c972a6cebb02d4171489c..f86f1422f4d5a1317a6111c7f08d84b6bb9d2b26 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -33,21 +58,55 @@ namespace System.ServiceModel.Discovery.Configuration
                [TypeConverter (typeof (TimeSpanConverter))]
                [ConfigurationPropertyAttribute("maxAnnouncementDelay", DefaultValue = "00:00:00.500")]
                public TimeSpan MaxAnnouncementDelay {
-                       get { return Properties [max_announcement_delay]; }
-                       set { Properties [max_announcement_delay] = value; }
+                       get { return (TimeSpan) base [max_announcement_delay]; }
+                       set { base [max_announcement_delay] = value; }
                }
                
-               [TypeConverter (typeof (UriTypeConverter))]
                [ConfigurationPropertyAttribute("multicastAddress", DefaultValue = "soap.udp://239.255.255.250:3702")]
                public Uri MulticastAddress {
-                       get { return Properties [multicast_address]; }
-                       set { Properties [multicast_address] = value; }
+                       get { return (Uri) base [multicast_address]; }
+                       set { base [multicast_address] = value; }
                }
                
                [ConfigurationPropertyAttribute("transportSettings")]
                public UdpTransportSettingsElement TransportSettings {
-                       get { return Properties [transport_settings]; }
+                       get { return (UdpTransportSettingsElement) base [transport_settings]; }
+               }
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+
+               protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               protected override void InitializeFrom (ServiceEndpoint endpoint)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+               {
+                       throw new NotImplementedException ();
                }
        }
 }
 
+#endif
index 5c526f6133d008c108256761287df5b258ba04a2..11ff428be014d5392fbddcd6524fe9f74241342e 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -13,3 +38,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index b085d14ba1f6cccbe5eabd27668d3c54842117ca..bac74eda63a0264c57fb6d05f77cf80c61a6a0d9 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -30,31 +55,36 @@ namespace System.ServiceModel.Discovery.Configuration
 
                [ConfigurationProperty ("discoveryMode", DefaultValue = ServiceDiscoveryMode.Adhoc)]
                public ServiceDiscoveryMode DiscoveryMode {
-                       get { return (ServiceDiscoveryMode) Propperties [discovery_mode]; }
-                       set { Properties [discovery_mode] = value; }
+                       get { return (ServiceDiscoveryMode) base [discovery_mode]; }
+                       set { base [discovery_mode] = value; }
                }
 
                protected override Type EndpointType {
                        get { return typeof (UdpDiscoveryEndpoint); }
                }
 
+               [TypeConverter (typeof (TimeSpanConverter))]
                [ConfigurationProperty ("maxResponseDelay", DefaultValue = "00:00:00.500")]
                public TimeSpan MaxResponseDelay {
-                       get { return (TimeSpan) Propperties [max_response_delay]; }
-                       set { Properties [max_response_delay] = value; }
+                       get { return (TimeSpan) base [max_response_delay]; }
+                       set { base [max_response_delay] = value; }
                }
 
                [ConfigurationProperty ("multicastAddress", DefaultValue = "soap.udp://239.255.255.250:3702")]
                public Uri MulticastAddress {
-                       get { return (Uri) Propperties [multicast_address]; }
-                       set { Properties [multicast_address] = value; }
+                       get { return (Uri) base [multicast_address]; }
+                       set { base [multicast_address] = value; }
                }
 
                [ConfigurationProperty ("transportSettings")]
                public UdpTransportSettingsElement TransportSettings {
-                       get { return (UdpTransportSettingsElement) Propperties [transport_settings]; }
+                       get { return (UdpTransportSettingsElement) base [transport_settings]; }
                }
-                       
+               
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return properties; }
+               }
+               
                protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
                {
                        throw new NotImplementedException ();
@@ -82,3 +112,4 @@ namespace System.ServiceModel.Discovery.Configuration
        }
 }
 
+#endif
index 425ce542c09e9132a5def69f382d5dbb2df1aff1..ca2ae99453620eb9ce5e0f52324cacb2a7cee1e2 100644 (file)
@@ -1,3 +1,28 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
 using System;
 using System.ComponentModel;
 using System.Configuration;
@@ -7,9 +32,91 @@ namespace System.ServiceModel.Discovery.Configuration
 {
        public sealed class UdpTransportSettingsElement : ConfigurationElement
        {
+               static ConfigurationPropertyCollection properties;
+               static ConfigurationProperty duplicate_message_history_length, max_buffer_pool_size, max_multicast_retransmit_count, max_pending_message_count, max_received_message_size, max_unicast_retransmit_count, multicast_interface_id,socket_receive_buffer_size, ttl;
+               
+               static UdpTransportSettingsElement ()
+               {
+                       duplicate_message_history_length = new ConfigurationProperty ("duplicateMessageHistoryLength", typeof (int), 4112, null, new IntegerValidator (0, int.MaxValue), ConfigurationPropertyOptions.None);
+                       max_buffer_pool_size = new ConfigurationProperty ("maxBufferPoolSize", typeof (long), 0x80000, null, new LongValidator (0, long.MaxValue), ConfigurationPropertyOptions.None);
+                       max_multicast_retransmit_count = new ConfigurationProperty ("maxMulticastRetransmitCount", typeof (int), 2, null, new IntegerValidator (0, int.MaxValue), ConfigurationPropertyOptions.None);
+                       max_pending_message_count = new ConfigurationProperty ("maxPendingMessageCount", typeof (int), 32, null, new IntegerValidator (0, int.MaxValue), ConfigurationPropertyOptions.None);
+                       max_received_message_size = new ConfigurationProperty ("maxReceivedMessageSize", typeof (long), 0xFFE7, null, new LongValidator (0, long.MaxValue), ConfigurationPropertyOptions.None);
+                       max_unicast_retransmit_count = new ConfigurationProperty ("maxUnicastRetransmitCount", typeof (long), 1, null, new IntegerValidator (0, int.MaxValue), ConfigurationPropertyOptions.None);
+                       multicast_interface_id = new ConfigurationProperty ("multicastInterfaceId", typeof (string), null, null, null, ConfigurationPropertyOptions.None);
+                       ttl = new ConfigurationProperty ("timeToLive", typeof (int), 1, null, new IntegerValidator (0, int.MaxValue), ConfigurationPropertyOptions.None);
+                       properties = new ConfigurationPropertyCollection ();
+                       ConfigurationProperty [] props = {duplicate_message_history_length, max_buffer_pool_size, max_multicast_retransmit_count, max_pending_message_count, max_received_message_size, max_unicast_retransmit_count, multicast_interface_id, ttl};
+                       foreach (var cp in props)
+                               properties.Add (cp);
+               }
+
                public UdpTransportSettingsElement ()
                {
                }
+
+               [ConfigurationProperty ("duplicateMessageHistoryLength", DefaultValue = 4112)]
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
+               public int DuplicateMessageHistoryLength {
+                       get { return (int) base [duplicate_message_history_length]; }
+                       set { base [duplicate_message_history_length] = value; }
+               }
+
+               [LongValidator (MinValue = 0, MaxValue = long.MaxValue)]
+               [ConfigurationProperty ("maxBufferPoolSize", DefaultValue = 0x80000)]
+               public long MaxBufferPoolSize {
+                       get { return (long) base [max_buffer_pool_size]; }
+                       set { base [max_buffer_pool_size] = value; }
+               }
+
+               [ConfigurationProperty ("maxMulticastRetransmitCount", DefaultValue = 2)]
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
+               public int MaxMulticastRetransmitCount {
+                       get { return (int) base [max_multicast_retransmit_count]; }
+                       set { base [max_multicast_retransmit_count] = value; }
+               }
+
+               [ConfigurationProperty ("maxPendingMessageCount", DefaultValue = 32)]
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
+               public int MaxPendingMessageCount {
+                       get { return (int) base [max_pending_message_count]; }
+                       set { base [max_pending_message_count] = value; }
+               }
+
+               [LongValidator (MinValue = 0, MaxValue = long.MaxValue)]
+               [ConfigurationProperty ("maxReceivedMessageSize", DefaultValue = 0xFFE7)]
+               public long MaxReceivedMessageSize {
+                       get { return (long) base [max_received_message_size]; }
+                       set { base [max_received_message_size] = value; }
+               }
+
+               [ConfigurationProperty ("maxUnicastRetransmitCount", DefaultValue = 1)]
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
+               public int MaxUnicastRetransmitCount {
+                       get { return (int) base [max_unicast_retransmit_count]; }
+                       set { base [max_unicast_retransmit_count] = value; }
+               }
+
+               [ConfigurationProperty ("multicastInterfaceId")]
+               public string MulticastInterfaceId {
+                       get { return (string) base [multicast_interface_id]; }
+                       set { base [multicast_interface_id] = value; }
+               }
+
+               [ConfigurationProperty ("socketReceiveBufferSize", DefaultValue = 0x10000)]
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
+               public int SocketReceiveBufferSize {
+                       get { return (int) base [socket_receive_buffer_size]; }
+                       set { base [socket_receive_buffer_size] = value; }
+               }
+
+               [IntegerValidator (MinValue = 0, MaxValue = int.MaxValue)]
+               [ConfigurationProperty ("timeToLive", DefaultValue = 1)]
+               public int TimeToLive {
+                       get { return (int) base [ttl]; }
+                       set { base [ttl] = value; }
+               }
        }
 }
 
+#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpChannelFactory.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpChannelFactory.cs
new file mode 100644 (file)
index 0000000..1430cbf
--- /dev/null
@@ -0,0 +1,86 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.IO;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class UdpChannelFactory : ChannelFactoryBase<IDuplexChannel>
+       {
+               public UdpChannelFactory (UdpTransportBindingElement source, BindingContext ctx)
+               {
+                       Source = source;
+                       Context = ctx;
+               }
+               
+               protected override void OnOpen (TimeSpan timeout)
+               {
+               }
+               
+               protected override void OnClose (TimeSpan timeout)
+               {
+               }
+               
+               Action<TimeSpan> open_delegate, close_delegate;
+               
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (open_delegate == null)
+                               open_delegate = new Action<TimeSpan> (OnOpen);
+                       return open_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       open_delegate.EndInvoke (result);
+               }
+               
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (close_delegate == null)
+                               close_delegate = new Action<TimeSpan> (OnClose);
+                       return close_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       close_delegate.EndInvoke (result);
+               }
+               
+               protected override IDuplexChannel OnCreateChannel (EndpointAddress address, Uri via)
+               {
+                       var uri = via ?? address.Uri;
+                       if (uri.Scheme != "soap.udp")
+                               throw new ArgumentException (String.Format ("Unexpected endpoint address URI scheme: expected 'soap.udp' but got '{0}'", address.Uri.Scheme));
+                       return new UdpDuplexChannel (this, Context, address, via);
+               }
+               
+               public UdpTransportBindingElement Source { get; private set; }
+               public BindingContext Context { get; private set; }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpChannelListener.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpChannelListener.cs
new file mode 100644 (file)
index 0000000..a273155
--- /dev/null
@@ -0,0 +1,143 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.IO;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.Threading;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class UdpChannelListener : ChannelListenerBase<IDuplexChannel>
+       {
+               public UdpChannelListener (UdpTransportBindingElement source, BindingContext context)
+               {
+                       Source = source;
+                       Context = context;
+                       listen_uri = context.ListenUriRelativeAddress != null ?
+                               new Uri (context.ListenUriBaseAddress, context.ListenUriRelativeAddress) :
+                               context.ListenUriBaseAddress;
+               }
+               
+               Uri listen_uri;
+               UdpDuplexChannel channel;
+               ManualResetEvent accept_wait_handle = new ManualResetEvent (true);
+               
+               public override Uri Uri {
+                       get { return listen_uri; }
+               }
+               
+               protected override void OnOpen (TimeSpan timeout)
+               {
+               }
+               
+               protected override void OnClose (TimeSpan timeout)
+               {
+                       if (channel != null)
+                               channel.Close (timeout);
+               }
+               
+               protected override void OnAbort ()
+               {
+                       if (channel != null)
+                               channel.Abort ();
+               }
+               
+               Action<TimeSpan> open_delegate, close_delegate;
+               
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (open_delegate == null)
+                               open_delegate = new Action<TimeSpan> (OnOpen);
+                       return open_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       open_delegate.EndInvoke (result);
+               }
+               
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (close_delegate == null)
+                               close_delegate = new Action<TimeSpan> (OnClose);
+                       return close_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       close_delegate.EndInvoke (result);
+               }
+
+               protected override IDuplexChannel OnAcceptChannel (TimeSpan timeout)
+               {
+                       if (!accept_wait_handle.WaitOne (timeout))
+                               throw new TimeoutException ();
+                       accept_wait_handle.Reset ();
+                       channel = new UdpDuplexChannel (this);
+                       channel.Closed += delegate {
+                               accept_wait_handle.Set ();
+                       };
+                       return channel;
+               }
+               
+               protected override bool OnWaitForChannel (TimeSpan timeout)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               Func<TimeSpan,IDuplexChannel> accept_delegate;
+               
+               protected override IAsyncResult OnBeginAcceptChannel (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (accept_delegate == null)
+                               accept_delegate = new Func<TimeSpan,IDuplexChannel> (OnAcceptChannel);
+                       return accept_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override IDuplexChannel OnEndAcceptChannel (IAsyncResult result)
+               {
+                       return accept_delegate.EndInvoke (result);
+               }
+               
+               Func<TimeSpan,bool> wait_for_channel_delegate;
+               
+               protected override IAsyncResult OnBeginWaitForChannel (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (wait_for_channel_delegate == null)
+                               wait_for_channel_delegate = new Func<TimeSpan,bool> (OnWaitForChannel);
+                       return wait_for_channel_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override bool OnEndWaitForChannel (IAsyncResult result)
+               {
+                       return wait_for_channel_delegate.EndInvoke (result);
+               }
+
+               public UdpTransportBindingElement Source { get; private set; }
+               public BindingContext Context { get; private set; }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpDuplexChannel.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpDuplexChannel.cs
new file mode 100644 (file)
index 0000000..1bcf85e
--- /dev/null
@@ -0,0 +1,326 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.NetworkInformation;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.Threading;
+using System.Xml;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class UdpDuplexChannel : ChannelBase, IDuplexChannel
+       {
+               // channel factory
+               public UdpDuplexChannel (UdpChannelFactory factory, BindingContext context, EndpointAddress address, Uri via)
+                       : base (factory)
+               {
+                       if (factory == null)
+                               throw new ArgumentNullException ("factory");
+                       if (context == null)
+                               throw new ArgumentNullException ("context");
+                       if (address == null)
+                               throw new ArgumentNullException ("address");
+
+                       binding_element = factory.Source;
+                       RemoteAddress = address;
+                       Via = via;
+                       FillMessageEncoder (context);
+               }
+               
+               public UdpDuplexChannel (UdpChannelListener listener)
+                       : base (listener)
+               {
+                       binding_element = listener.Source;
+                       LocalAddress = new EndpointAddress (listener.Uri);
+                       FillMessageEncoder (listener.Context);
+               }
+               
+               MessageEncoder message_encoder;
+               UdpClient client;
+               IPAddress multicast_address;
+               UdpTransportBindingElement binding_element;
+               
+               // for servers
+               public EndpointAddress LocalAddress { get; private set; }
+               // for clients
+               public EndpointAddress RemoteAddress { get; private set; }
+               
+               public Uri Via { get; private set; }
+
+               void FillMessageEncoder (BindingContext ctx)
+               {
+                       var mbe = (MessageEncodingBindingElement) ctx.RemainingBindingElements.FirstOrDefault (be => be is MessageEncodingBindingElement);
+                       if (mbe == null)
+                               mbe = new TextMessageEncodingBindingElement ();
+                       message_encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+               }
+               
+               public void Send (Message message)
+               {
+                       Send (message, DefaultSendTimeout);
+               }
+
+               static readonly Random rnd = new Random ();
+
+               UdpClient GetSenderClient (Message message)
+               {
+                       if (RemoteAddress != null)
+                               return client;
+                               
+                       var rmp = message.Properties [RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
+                       if (rmp == null)
+                               throw new ArgumentException ("This duplex channel from the channel listener cannot send messages without RemoteEndpointMessageProperty");
+                       var cli = new UdpClient ();
+Console.Error.WriteLine ("Target: " + rmp.Address + ":" + rmp.Port);
+                       cli.Connect (IPAddress.Parse (rmp.Address), rmp.Port);
+                       return cli;
+               }
+
+               public void Send (Message message, TimeSpan timeout)
+               {
+                       if (State != CommunicationState.Opened)
+                               throw new InvalidOperationException ("The UDP channel must be opened before sending a message.");
+
+                       var cli = GetSenderClient (message);
+                       try {
+                               SendCore (cli, message, timeout);
+                       } finally {
+                               if (cli != client)
+                                       cli.Close ();
+                       }
+               }
+
+               void SendCore (UdpClient cli, Message message, TimeSpan timeout)
+               {
+                       var ms = new MemoryStream ();
+                       message_encoder.WriteMessage (message, ms);
+                       // It seems .NET sends the same Message a couple of times so that the receivers don't miss it. So, do the same hack.
+                       for (int i = 0; i < 6; i++) {
+                               // FIXME: use MaxAnnouncementDelay. It is fixed now.
+                               Thread.Sleep (rnd.Next (50, 500));
+                               cli.Send (ms.GetBuffer (), (int) ms.Length);
+                       }
+               }
+
+               public bool WaitForMessage (TimeSpan timeout)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public Message Receive ()
+               {
+                       return Receive (DefaultReceiveTimeout);
+               }
+
+               public Message Receive (TimeSpan timeout)
+               {
+                       Message msg;
+                       if (!TryReceive (timeout, out msg))
+                               throw new TimeoutException ();
+                       return msg;
+               }
+
+               public bool TryReceive (TimeSpan timeout, out Message msg)
+               {
+                       DateTime start = DateTime.Now;
+                       ThrowIfDisposedOrNotOpen ();
+                       msg = null;
+
+                       if (client == null) // could be invoked while being closed.
+                               return false;
+
+                       byte [] bytes = null;
+                       IPEndPoint ip = new IPEndPoint (IPAddress.Any, 0);
+                       var ar = client.BeginReceive (delegate (IAsyncResult result) {
+                               bytes = client.EndReceive (result, ref ip);
+                       }, null);
+
+                       if (!ar.IsCompleted && !ar.AsyncWaitHandle.WaitOne (timeout))
+                               return false;
+                       if (bytes == null || bytes.Length == 0)
+                               return false;
+
+                       // Clients will send the same message many times, and this receiver has to 
+
+                       // FIXME: give maxSizeOfHeaders
+                       msg = message_encoder.ReadMessage (new MemoryStream (bytes), int.MaxValue);
+                       var id = msg.Headers.MessageId;
+                       if (message_ids.Contains (id))
+                               return TryReceive (timeout - (DateTime.Now - start), out msg);
+                       if (id != null) {
+                               message_ids.Enqueue (id);
+                               if (message_ids.Count >= binding_element.TransportSettings.DuplicateMessageHistoryLength)
+                                       message_ids.Dequeue ();
+                       }
+                       msg.Properties.Add ("Via", LocalAddress.Uri);
+                       msg.Properties.Add ("Encoder", message_encoder);
+                       msg.Properties.Add (RemoteEndpointMessageProperty.Name, new RemoteEndpointMessageProperty (ip.Address.ToString (), ip.Port));
+                       return true;
+               }
+
+               Queue<UniqueId> message_ids = new Queue<UniqueId> ();
+
+               protected override void OnAbort ()
+               {
+                       OnClose (TimeSpan.Zero);
+               }
+               
+               Action<TimeSpan> open_delegate, close_delegate;
+               
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (close_delegate == null)
+                               close_delegate = new Action<TimeSpan> (OnClose);
+                       return close_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       close_delegate.EndInvoke (result);
+               }
+               
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (open_delegate == null)
+                               open_delegate = new Action<TimeSpan> (OnOpen);
+                       return open_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       open_delegate.EndInvoke (result);
+               }
+               
+               protected override void OnClose (TimeSpan timeout)
+               {
+                       if (client != null) {
+                               if (multicast_address != null) {
+                                       client.DropMulticastGroup (multicast_address, LocalAddress.Uri.Port);
+                                       multicast_address = null;
+                               }
+                               client.Close ();
+                       }
+                       client = null;
+               }
+               
+               protected override void OnOpen (TimeSpan timeout)
+               {
+                       if (RemoteAddress != null) {
+                               client = new UdpClient ();
+                               var uri = Via ?? RemoteAddress.Uri;
+                               client.Connect (uri.Host, uri.Port);
+                       } else {
+                               var ip = IPAddress.Parse (LocalAddress.Uri.Host);
+                               bool isMulticast = NetworkInterface.GetAllNetworkInterfaces ().Any (nic => nic.SupportsMulticast && nic.GetIPProperties ().MulticastAddresses.Any (mca => mca.Address.Equals (ip)));
+                               int port = LocalAddress.Uri.Port;
+                               if (isMulticast) {
+                                       multicast_address = ip;
+                                       client = new UdpClient (new IPEndPoint (IPAddress.Any, port));
+                                       client.JoinMulticastGroup (ip, binding_element.TransportSettings.TimeToLive);
+                               }
+                               else
+                                       client = new UdpClient (new IPEndPoint (ip, port));
+                       }
+
+                       client.EnableBroadcast = true;
+
+                       // FIXME: apply UdpTransportSetting here.
+               }
+               
+               Func<TimeSpan,Message> receive_delegate;
+               
+               public IAsyncResult BeginReceive (AsyncCallback callback, object state)
+               {
+                       return BeginReceive (DefaultReceiveTimeout, callback, state);
+               }
+               
+               public IAsyncResult BeginReceive (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (receive_delegate == null)
+                               receive_delegate = new Func<TimeSpan,Message> (Receive);
+                       return receive_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               public Message EndReceive (IAsyncResult result)
+               {
+                       return receive_delegate.EndInvoke (result);
+               }
+               
+               delegate bool TryReceiveDelegate (TimeSpan timeout, out Message msg);
+               TryReceiveDelegate try_receive_delegate;
+
+               public IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (try_receive_delegate == null)
+                               try_receive_delegate = new TryReceiveDelegate (TryReceive);
+                       Message dummy;
+                       return try_receive_delegate.BeginInvoke (timeout, out dummy, callback, state);
+               }
+               
+               public bool EndTryReceive (IAsyncResult result, out Message msg)
+               {
+                       return try_receive_delegate.EndInvoke (out msg, result);
+               }
+
+               Func<TimeSpan,bool> wait_delegate;
+               
+               public IAsyncResult BeginWaitForMessage (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (wait_delegate == null)
+                               wait_delegate = new Func<TimeSpan,bool> (WaitForMessage);
+                       return wait_delegate.BeginInvoke (timeout, callback, state);
+               }
+               
+               public bool EndWaitForMessage (IAsyncResult result)
+               {
+                       return wait_delegate.EndInvoke (result);
+               }
+
+               Action<Message,TimeSpan> send_delegate;
+               
+               public IAsyncResult BeginSend (Message message, AsyncCallback callback, object state)
+               {
+                       return BeginSend (message, DefaultSendTimeout, callback, state);
+               }
+               
+               public IAsyncResult BeginSend (Message message, TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (send_delegate == null)
+                               send_delegate = new Action<Message,TimeSpan> (Send);
+                       return send_delegate.BeginInvoke (message, timeout, callback, state);
+               }
+               
+               public void EndSend (IAsyncResult result)
+               {
+                       send_delegate.EndInvoke (result);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpTransportBindingElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Udp/UdpTransportBindingElement.cs
new file mode 100644 (file)
index 0000000..c3c5078
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.IO;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class UdpTransportBindingElement : TransportBindingElement
+       {
+               public UdpTransportBindingElement ()
+                       : this (new UdpTransportSettings ())
+               {
+               }
+               
+               public UdpTransportBindingElement (UdpTransportSettings settings)
+               {
+                       this.settings = settings ?? new UdpTransportSettings ();
+               }
+               
+               private UdpTransportBindingElement (UdpTransportBindingElement other)
+               {
+                       settings = new UdpTransportSettings (other.settings);
+               }
+               
+               public override string Scheme {
+                       get { return "soap.udp"; }
+               }
+               
+               UdpTransportSettings settings;
+
+               public UdpTransportSettings TransportSettings {
+                       get { return settings; }
+               }
+
+               public override BindingElement Clone ()
+               {
+                       return new UdpTransportBindingElement (this);
+               }
+               
+               public override bool CanBuildChannelFactory<TChannel> (BindingContext ctx)
+               {
+                       return typeof (TChannel) == typeof (IDuplexChannel);
+               }
+               
+               public override bool CanBuildChannelListener<TChannel> (BindingContext ctx)
+               {
+                       return typeof (TChannel) == typeof (IDuplexChannel);
+               }
+               
+               public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (BindingContext ctx)
+               {
+                       if (!CanBuildChannelFactory<TChannel> (ctx))
+                               throw new InvalidOperationException (String.Format ("Not supported type of channel: {0}", typeof (TChannel)));
+
+                       return (IChannelFactory<TChannel>) (object) new UdpChannelFactory (this, ctx);
+               }
+               
+               public override IChannelListener<TChannel> BuildChannelListener<TChannel> (BindingContext ctx)
+               {
+                       if (!CanBuildChannelListener<TChannel> (ctx))
+                               throw new InvalidOperationException (String.Format ("Not supported type of channel: {0}", typeof (TChannel)));
+
+                       return (IChannelListener<TChannel>) (object) new UdpChannelListener (this, ctx);
+               }
+               
+               public override T GetProperty<T> (BindingContext ctx)
+               {
+                       return ctx.GetInnerProperty<T> ();
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/AnnouncementClient11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/AnnouncementClient11.cs
new file mode 100644 (file)
index 0000000..b4fdea5
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       internal class AnnouncementClient11 : ClientBase<IAnnouncementContract11>, AnnouncementClient.IAnnouncementCommon
+       {
+               public AnnouncementClient11 (AnnouncementEndpoint endpoint)
+                       : base (endpoint)
+               {
+               }
+               
+               public IAsyncResult BeginAnnounceOnline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
+               {
+                       var md = new EndpointDiscoveryMetadata11 (metadata);
+                       var seq = new DiscoveryMessageSequence11 (sequence);
+                       var msg = new MessageContracts11.OnlineAnnouncement () { EndpointDiscoveryMetadata = md, MessageSequence = seq };
+                       return Channel.BeginOnlineAnnouncement (msg, callback, state);
+               }
+
+               public void EndAnnounceOnline (IAsyncResult result)
+               {
+                       Channel.EndOnlineAnnouncement (result);
+               }
+
+               public IAsyncResult BeginAnnounceOffline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
+               {
+                       var md = new EndpointDiscoveryMetadata11 (metadata);
+                       var seq = new DiscoveryMessageSequence11 (sequence);
+                       var msg = new MessageContracts11.OfflineAnnouncement () { EndpointDiscoveryMetadata = md, MessageSequence = seq };
+                       return Channel.BeginOfflineAnnouncement (msg, callback, state);
+               }
+
+               public void EndAnnounceOffline (IAsyncResult result)
+               {
+                       Channel.EndOfflineAnnouncement (result);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryMessageSequence11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryMessageSequence11.cs
new file mode 100755 (executable)
index 0000000..9a80814
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class DiscoveryMessageSequence11 : IXmlSerializable
+       {
+               public static DiscoveryMessageSequence11 FromDiscoveryMessageSequence (DiscoveryMessageSequence discoveryMessageSequence)
+               {
+                       return new DiscoveryMessageSequence11 (discoveryMessageSequence);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscovery11;
+               static XmlSchema schema;
+               
+               static XmlSchema Schema {
+                       get {
+                               if (schema == null)
+                                       schema = DiscoveryMessageSequence.BuildSchema (version);
+                               return schema;
+                       }
+               }
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       schemaSet.Add (Schema);
+                       return new XmlQualifiedName ("AppSequenceType", version.Namespace);
+               }
+
+               // for deserialization
+               DiscoveryMessageSequence11 ()
+               {
+               }
+
+               internal DiscoveryMessageSequence11 (DiscoveryMessageSequence source)
+               {
+                       this.source = source;
+               }
+
+               DiscoveryMessageSequence source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return Schema;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = DiscoveryMessageSequence.ReadXml (reader, version);
+               }
+
+               public DiscoveryMessageSequence ToDiscoveryMessageSequence ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first to fill its contents");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryProxyClient11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryProxyClient11.cs
new file mode 100644 (file)
index 0000000..21674c7
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       internal class DiscoveryProxyClient11 : ClientBase<IDiscoveryProxyContract11>, DiscoveryClient.IDiscoveryCommon
+       {
+               public DiscoveryProxyClient11 (ServiceEndpoint endpoint)
+                       : base (endpoint)
+               {
+               }
+
+               public IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       var req = new MessageContracts11.FindRequest () { Body = new FindCriteria11 (criteria) };
+                       return Channel.BeginFind (req, callback, state);
+               }
+               
+               public FindResponse EndFind (IAsyncResult result)
+               {
+                       var ir = Channel.EndFind (result);
+                       var ret = new FindResponse ();
+                       foreach (var fr in ir.Body)
+                               ret.Endpoints.Add (fr.ToEndpointDiscoveryMetadata ());
+                       return ret;
+               }
+
+               public IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       var req = new MessageContracts11.ResolveRequest () { Body = new ResolveCriteria11 (criteria) };
+                       return Channel.BeginResolve (req, callback, state);
+               }
+
+               public ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       var ir = Channel.EndResolve (result);
+                       var metadata = ir.Body.ToEndpointDiscoveryMetadata ();
+                       var sequence = ir.MessageSequence.ToDiscoveryMessageSequence ();
+                       return new ResolveResponse (metadata, sequence);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryTargetClient11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/DiscoveryTargetClient11.cs
new file mode 100644 (file)
index 0000000..2ccf435
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Threading;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       internal class DiscoveryTargetClient11 : DuplexClientBase<IDiscoveryTargetContract11>, DiscoveryClient.IDiscoveryCommon
+       {
+               public DiscoveryTargetClient11 (ServiceEndpoint endpoint)
+                       : this (new DiscoveryTargetCallback11 (), endpoint)
+               {
+               }
+
+               DiscoveryTargetClient11 (DiscoveryTargetCallback11 instance, ServiceEndpoint endpoint)
+                       : base (instance, endpoint)
+               {
+                       instance.ReplyFindCompleted += delegate (MessageContracts11.FindResponse response) {
+                               find_completed = delegate { return response; };
+                               reply_find_handle.Set ();
+                       };
+                       instance.ReplyResolveCompleted += delegate (MessageContracts11.ResolveResponse response) {
+                               resolve_completed = delegate { return response; };
+                               reply_resolve_handle.Set ();
+                       };
+               }
+
+               // Find
+
+               Func<FindCriteria,FindResponse> find_delegate;
+               Func<MessageContracts11.FindResponse> find_completed;
+               ManualResetEvent reply_find_handle = new ManualResetEvent (false);
+
+               public IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       if (find_delegate == null)
+                               find_delegate = new Func<FindCriteria,FindResponse> (Find);
+                       return find_delegate.BeginInvoke (criteria, callback, state);
+               }
+               
+               public FindResponse EndFind (IAsyncResult result)
+               {
+                       return find_delegate.EndInvoke (result);
+               }
+               
+               FindResponse Find (FindCriteria criteria)
+               {
+                       var req = new MessageContracts11.FindRequest () { Body = new FindCriteria11 (criteria) };
+                       Channel.BeginFind (req, delegate (IAsyncResult result) {
+                               Channel.EndFind (result);
+                       }, null);
+                       
+                       if (!reply_find_handle.WaitOne (InnerChannel.OperationTimeout))
+                               throw new EndpointNotFoundException ("The discovery client could not receive Find operation response within the operation timeout.");
+                       try {
+                               var ir = find_completed ();
+                               var ret = new FindResponse ();
+                               foreach (var fr in ir.Body)
+                                       ret.Endpoints.Add (fr.ToEndpointDiscoveryMetadata ());
+                               return ret;
+                       } finally {
+                               find_completed = null;
+                       }
+               }
+
+               // Resolve
+
+               Func<ResolveCriteria,ResolveResponse> resolve_delegate;
+               Func<MessageContracts11.ResolveResponse> resolve_completed;
+               ManualResetEvent reply_resolve_handle = new ManualResetEvent (false);
+
+               public IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       if (resolve_delegate == null)
+                               resolve_delegate = new Func<ResolveCriteria,ResolveResponse> (Resolve);
+                       return resolve_delegate.BeginInvoke (criteria, callback, state);
+               }
+               
+               public ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       return resolve_delegate.EndInvoke (result);
+               }
+               
+               public ResolveResponse Resolve (ResolveCriteria criteria)
+               {
+                       var req = new MessageContracts11.ResolveRequest () { Body = new ResolveCriteria11 (criteria) };
+                       Channel.BeginResolve (req, delegate (IAsyncResult result) {
+                               Channel.EndResolve (result);
+                       }, null);
+
+                       if (!reply_resolve_handle.WaitOne (InnerChannel.OperationTimeout))
+                               throw new TimeoutException ();
+                       try {
+                               var ir = resolve_completed ();
+                               var metadata = ir.Body.ToEndpointDiscoveryMetadata ();
+                               var sequence = ir.MessageSequence.ToDiscoveryMessageSequence ();
+                               return new ResolveResponse (metadata, sequence);
+                       } finally {
+                               resolve_completed = null;
+                       }
+               }
+       
+               internal class DiscoveryTargetCallback11 : IDiscoveryTargetCallbackContract11
+               {
+                       public event Action<MessageContracts11.FindResponse> ReplyFindCompleted;
+                       public event Action<MessageContracts11.ResolveResponse> ReplyResolveCompleted;
+
+                       public void ReplyFind (MessageContracts11.FindResponse message)
+                       {
+                               if (ReplyFindCompleted != null)
+                                       ReplyFindCompleted (message);
+                       }
+
+                       public void ReplyResolve (MessageContracts11.ResolveResponse message)
+                       {
+                               if (ReplyResolveCompleted != null)
+                                       ReplyResolveCompleted (message);
+                       }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/EndpointDiscoveryMetadata11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/EndpointDiscoveryMetadata11.cs
new file mode 100755 (executable)
index 0000000..c6ed550
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class EndpointDiscoveryMetadata11 : IXmlSerializable
+       {
+               public static EndpointDiscoveryMetadata11 FromEndpointDiscoveryMetadata (EndpointDiscoveryMetadata endpointDiscoveryMetadata)
+               {
+                       return new EndpointDiscoveryMetadata11 (endpointDiscoveryMetadata);
+               }
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       EndpointAddress10.GetSchema (schemaSet);
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ProbeMatchType", version.Namespace);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscovery11;
+               static readonly XmlSchema schema = EndpointDiscoveryMetadata.BuildSchema (version);
+
+               // for deserialization use
+               EndpointDiscoveryMetadata11 ()
+               {
+               }
+
+               internal EndpointDiscoveryMetadata11 (EndpointDiscoveryMetadata source)
+               {
+                       this.source = source;
+               }
+               
+               EndpointDiscoveryMetadata source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return null;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = EndpointDiscoveryMetadata.ReadXml (reader, version);
+               }
+
+               public EndpointDiscoveryMetadata ToEndpointDiscoveryMetadata ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first before calling this method");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer, version);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/FindCriteria11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/FindCriteria11.cs
new file mode 100755 (executable)
index 0000000..ba8e202
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class FindCriteria11 : IXmlSerializable
+       {
+               public static FindCriteria11 FromFindCriteria (FindCriteria findCriteria)
+               {
+                       return new FindCriteria11 (findCriteria);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscovery11;
+               static XmlSchema schema = FindCriteria.BuildSchema (version);
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ProbeType", version.Namespace);
+               }
+               
+               // for deserialization
+               FindCriteria11 ()
+               {
+               }
+
+               internal FindCriteria11 (FindCriteria source)
+               {
+                       this.source = source;
+               }
+
+               FindCriteria source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return null;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = FindCriteria.ReadXml (reader, version);
+               }
+
+               public FindCriteria ToFindCriteria ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method before calling this method.");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer, version);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IAnnouncementContract11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IAnnouncementContract11.cs
new file mode 100644 (file)
index 0000000..a3ea2f1
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [ServiceContract (Name = "Client", Namespace = MessageContracts11.NS)]
+       internal interface IAnnouncementContract11
+       {
+               [OperationContract (Name = "Hello", Action = MessageContracts11.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOnlineAnnouncement (MessageContracts11.OnlineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOnlineAnnouncement (IAsyncResult result);
+
+               [OperationContract (Name = "Bye", Action = MessageContracts11.ByeAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOfflineAnnouncement (MessageContracts11.OfflineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOfflineAnnouncement (IAsyncResult result);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IDiscoveryProxyContract11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IDiscoveryProxyContract11.cs
new file mode 100644 (file)
index 0000000..8e0b9f2
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [ServiceContract (Name = "DiscoveryProxy", Namespace = MessageContracts11.NS)]
+       internal interface IDiscoveryProxyContract11
+       {
+               [OperationContract (Name = "Probe", Action = MessageContracts11.ProbeAction, AsyncPattern = true, ReplyAction = MessageContracts11.ProbeMatchAction)]
+               IAsyncResult BeginFind (MessageContracts11.FindRequest message, AsyncCallback callback, object state);
+
+               MessageContracts11.FindResponse EndFind (IAsyncResult result);
+
+               [OperationContract (Name = "Resolve", Action = MessageContracts11.ResolveAction, AsyncPattern = true, ReplyAction = MessageContracts11.ResolveMatchAction)]
+               IAsyncResult BeginResolve (MessageContracts11.ResolveRequest message, AsyncCallback callback, object state);
+
+               MessageContracts11.ResolveResponse EndResolve (IAsyncResult result);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IDiscoveryTargetContract11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/IDiscoveryTargetContract11.cs
new file mode 100644 (file)
index 0000000..bb59bc1
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [ServiceContract (Name = "TargetService", Namespace = MessageContracts11.NS, CallbackContract = typeof (IDiscoveryTargetCallbackContract11))]
+       internal interface IDiscoveryTargetContract11
+       {
+               [OperationContract (Name = "Probe", Action = MessageContracts11.ProbeAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginFind (MessageContracts11.FindRequest message, AsyncCallback callback, object state);
+
+               void EndFind (IAsyncResult result);
+
+               [OperationContract (Name = "ProbeMatches", Action = MessageContracts11.ProbeMatchAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginReplyFind (MessageContracts11.FindResponse message, AsyncCallback callback, object state);
+
+               void EndReplyFind (IAsyncResult result);
+
+               [OperationContract (Name = "Resolve", Action = MessageContracts11.ResolveAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginResolve (MessageContracts11.ResolveRequest message, AsyncCallback callback, object state);
+
+               void EndResolve (IAsyncResult result);
+
+               [OperationContract (Name = "ResolveMatches", Action = MessageContracts11.ResolveMatchAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginReplyResolve (MessageContracts11.ResolveResponse message, AsyncCallback callback, object state);
+
+               void EndReplyResolve (IAsyncResult result);
+
+               [OperationContract (Name = "Hello", Action = MessageContracts11.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOnlineAnnouncement (MessageContracts11.OnlineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOnlineAnnouncement (IAsyncResult result);
+       }
+
+       internal interface IDiscoveryTargetCallbackContract11
+       {
+               [OperationContract (Name = "ProbeMatches", Action = MessageContracts11.ProbeMatchAction, IsOneWay = true)]
+               void ReplyFind (MessageContracts11.FindResponse message);
+
+               [OperationContract (Name = "ResolveMatches", Action = MessageContracts11.ResolveMatchAction, IsOneWay = true)]
+               void ReplyResolve (MessageContracts11.ResolveResponse message);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/MessageContracts11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/MessageContracts11.cs
new file mode 100644 (file)
index 0000000..96ed805
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       internal class MessageContracts11
+       {
+               public const string NS = DiscoveryVersion.Namespace11;
+               public const string HelloAction = NS + "/Hello";
+               public const string ByeAction = NS + "/Bye";
+               public const string ProbeAction = NS + "/Probe";
+               public const string ProbeMatchAction = NS + "/ProbeMatches";
+               public const string ResolveAction = NS + "/Resolve";
+               public const string ResolveMatchAction = NS + "/ResolveMatches";
+
+               [MessageContract (IsWrapped = false)]
+               public class OnlineAnnouncement
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequence11 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "Hello", Namespace = NS)]
+                       public EndpointDiscoveryMetadata11 EndpointDiscoveryMetadata { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class OfflineAnnouncement
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequence11 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "Bye", Namespace = NS)]
+                       public EndpointDiscoveryMetadata11 EndpointDiscoveryMetadata { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class FindRequest
+               {
+                       [MessageBodyMember (Name = "Probe", Namespace = NS)]
+                       public FindCriteria11 Body { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class FindResponse
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequence11 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "ProbeMatches", Namespace = NS)]
+                       public FindResponse11 Body { get; set; }
+               }
+
+               [CollectionDataContract (Name = "ProbeMatches", ItemName = "ProbeMatch", Namespace = NS)]
+               public class FindResponse11 : List<EndpointDiscoveryMetadata11>
+               {
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class ResolveRequest
+               {
+                       [MessageBodyMember (Name = "Resolve", Namespace = NS)]
+                       public ResolveCriteria11 Body { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class ResolveResponse
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequence11 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "ResolveMatches", Namespace = NS)]
+                       public EndpointDiscoveryMetadata11 Body { get; set; }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/ResolveCriteria11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Version11/ResolveCriteria11.cs
new file mode 100755 (executable)
index 0000000..49c6f5d
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.Version11
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class ResolveCriteria11 : IXmlSerializable
+       {
+               public static ResolveCriteria11 FromResolveCriteria (ResolveCriteria resolveCriteria)
+               {
+                       return new ResolveCriteria11 (resolveCriteria);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscovery11;
+               static XmlSchema schema = ResolveCriteria.BuildSchema (version);
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       EndpointAddress10.GetSchema (schemaSet);
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ResolveType", version.Namespace);
+               }
+
+               internal ResolveCriteria11 (ResolveCriteria source)
+               {
+                       this.source = source;
+               }
+               
+               ResolveCriteria source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return null;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = ResolveCriteria.ReadXml (reader, version);
+               }
+
+               public ResolveCriteria ToResolveCriteria ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first before calling this method");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer, version);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/AnnouncementClientApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/AnnouncementClientApril2005.cs
new file mode 100644 (file)
index 0000000..cedca0d
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       internal class AnnouncementClientApril2005 : ClientBase<IAnnouncementContractApril2005>, AnnouncementClient.IAnnouncementCommon
+       {
+               public AnnouncementClientApril2005 (AnnouncementEndpoint endpoint)
+                       : base (endpoint)
+               {
+               }
+               
+               public IAsyncResult BeginAnnounceOnline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
+               {
+                       var md = new EndpointDiscoveryMetadataApril2005 (metadata);
+                       var seq = new DiscoveryMessageSequenceApril2005 (sequence);
+                       var msg = new MessageContractsApril2005.OnlineAnnouncement () { EndpointDiscoveryMetadata = md, MessageSequence = seq };
+                       return Channel.BeginOnlineAnnouncement (msg, callback, state);
+               }
+
+               public void EndAnnounceOnline (IAsyncResult result)
+               {
+                       Channel.EndOnlineAnnouncement (result);
+               }
+
+               public IAsyncResult BeginAnnounceOffline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
+               {
+                       var md = new EndpointDiscoveryMetadataApril2005 (metadata);
+                       var seq = new DiscoveryMessageSequenceApril2005 (sequence);
+                       var msg = new MessageContractsApril2005.OfflineAnnouncement () { EndpointDiscoveryMetadata = md, MessageSequence = seq };
+                       return Channel.BeginOfflineAnnouncement (msg, callback, state);
+               }
+
+               public void EndAnnounceOffline (IAsyncResult result)
+               {
+                       Channel.EndOfflineAnnouncement (result);
+               }
+       }
+}
index ea4791f12f486e315b48b3aaa9536caa95a405a2..8783f1de40fc2f9eaa11fa85974144b31faa15ed 100755 (executable)
@@ -1,7 +1,7 @@
 //
 // Author: Atsushi Enomoto <atsushi@ximian.com>
 //
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -35,41 +35,58 @@ using System.Xml.Serialization;
 
 namespace System.ServiceModel.Discovery.VersionApril2005
 {
+       [XmlSchemaProvider ("GetSchema")]
        public class DiscoveryMessageSequenceApril2005 : IXmlSerializable
        {
                public static DiscoveryMessageSequenceApril2005 FromDiscoveryMessageSequence (DiscoveryMessageSequence discoveryMessageSequence)
                {
-                       throw new NotImplementedException ();
+                       return new DiscoveryMessageSequenceApril2005 (discoveryMessageSequence);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryApril2005;
+               static XmlSchema schema;
+               
+               static XmlSchema Schema {
+                       get {
+                               if (schema == null)
+                                       schema = DiscoveryMessageSequence.BuildSchema (version);
+                               return schema;
+                       }
                }
 
                public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
                {
-                       throw new NotImplementedException ();
+                       schemaSet.Add (Schema);
+                       return new XmlQualifiedName ("AppSequenceType", version.Namespace);
                }
 
-               internal DiscoveryMessageSequenceApril2005 ()
+               internal DiscoveryMessageSequenceApril2005 (DiscoveryMessageSequence source)
                {
-                       throw new NotImplementedException ();
+                       this.source = source;
                }
 
+               DiscoveryMessageSequence source;
+
                public XmlSchema GetSchema ()
                {
-                       throw new NotImplementedException ();
+                       return Schema;
                }
 
                public void ReadXml (XmlReader reader)
                {
-                       throw new NotImplementedException ();
+                       source = DiscoveryMessageSequence.ReadXml (reader, version);
                }
 
                public DiscoveryMessageSequence ToDiscoveryMessageSequence ()
                {
-                       throw new NotImplementedException ();
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first to fill its contents");
+                       return source;
                }
 
                public void WriteXml (XmlWriter writer)
                {
-                       throw new NotImplementedException ();
+                       source.WriteXml (writer);
                }
        }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryProxyClientApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryProxyClientApril2005.cs
new file mode 100644 (file)
index 0000000..9e3fc07
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       internal class DiscoveryProxyClientApril2005 : ClientBase<IDiscoveryProxyContractApril2005>, DiscoveryClient.IDiscoveryCommon
+       {
+               public DiscoveryProxyClientApril2005 (ServiceEndpoint endpoint)
+                       : base (endpoint)
+               {
+               }
+
+               public IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       var req = new MessageContractsApril2005.FindRequest () { Body = new FindCriteriaApril2005 (criteria) };
+                       return Channel.BeginFind (req, callback, state);
+               }
+               
+               public FindResponse EndFind (IAsyncResult result)
+               {
+                       var ir = Channel.EndFind (result);
+                       var ret = new FindResponse ();
+                       foreach (var fr in ir.Body)
+                               ret.Endpoints.Add (fr.ToEndpointDiscoveryMetadata ());
+                       return ret;
+               }
+
+               public IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       var req = new MessageContractsApril2005.ResolveRequest () { Body = new ResolveCriteriaApril2005 (criteria) };
+                       return Channel.BeginResolve (req, callback, state);
+               }
+
+               public ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       var ir = Channel.EndResolve (result);
+                       var metadata = ir.Body.ToEndpointDiscoveryMetadata ();
+                       var sequence = ir.MessageSequence.ToDiscoveryMessageSequence ();
+                       return new ResolveResponse (metadata, sequence);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryTargetClientApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/DiscoveryTargetClientApril2005.cs
new file mode 100644 (file)
index 0000000..1c640b1
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Threading;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       internal class DiscoveryTargetClientApril2005 : DuplexClientBase<IDiscoveryTargetContractApril2005>, DiscoveryClient.IDiscoveryCommon
+       {
+               public DiscoveryTargetClientApril2005 (ServiceEndpoint endpoint)
+                       : this (new DiscoveryTargetCallbackApril2005 (), endpoint)
+               {
+               }
+
+               DiscoveryTargetClientApril2005 (DiscoveryTargetCallbackApril2005 instance, ServiceEndpoint endpoint)
+                       : base (instance, endpoint)
+               {
+                       instance.ReplyFindCompleted += delegate (MessageContractsApril2005.FindResponse response) {
+                               find_completed = delegate { return response; };
+                               reply_find_handle.Set ();
+                       };
+                       instance.ReplyResolveCompleted += delegate (MessageContractsApril2005.ResolveResponse response) {
+                               resolve_completed = delegate { return response; };
+                               reply_resolve_handle.Set ();
+                       };
+               }
+
+               // Find
+
+               Func<FindCriteria,FindResponse> find_delegate;
+               Func<MessageContractsApril2005.FindResponse> find_completed;
+               ManualResetEvent reply_find_handle = new ManualResetEvent (false);
+
+               public IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       if (find_delegate == null)
+                               find_delegate = new Func<FindCriteria,FindResponse> (Find);
+                       return find_delegate.BeginInvoke (criteria, callback, state);
+               }
+               
+               public FindResponse EndFind (IAsyncResult result)
+               {
+                       return find_delegate.EndInvoke (result);
+               }
+               
+               FindResponse Find (FindCriteria criteria)
+               {
+                       var req = new MessageContractsApril2005.FindRequest () { Body = new FindCriteriaApril2005 (criteria) };
+                       Channel.BeginFind (req, delegate (IAsyncResult result) {
+                               Channel.EndFind (result);
+                       }, null);
+                       
+                       if (!reply_find_handle.WaitOne (InnerChannel.OperationTimeout))
+                               throw new EndpointNotFoundException ("The discovery client could not receive Find operation response within the operation timeout.");
+                       try {
+                               var ir = find_completed ();
+                               var ret = new FindResponse ();
+                               foreach (var fr in ir.Body)
+                                       ret.Endpoints.Add (fr.ToEndpointDiscoveryMetadata ());
+                               return ret;
+                       } finally {
+                               find_completed = null;
+                       }
+               }
+
+               // Resolve
+
+               Func<ResolveCriteria,ResolveResponse> resolve_delegate;
+               Func<MessageContractsApril2005.ResolveResponse> resolve_completed;
+               ManualResetEvent reply_resolve_handle = new ManualResetEvent (false);
+
+               public IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       if (resolve_delegate == null)
+                               resolve_delegate = new Func<ResolveCriteria,ResolveResponse> (Resolve);
+                       return resolve_delegate.BeginInvoke (criteria, callback, state);
+               }
+               
+               public ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       return resolve_delegate.EndInvoke (result);
+               }
+               
+               public ResolveResponse Resolve (ResolveCriteria criteria)
+               {
+                       var req = new MessageContractsApril2005.ResolveRequest () { Body = new ResolveCriteriaApril2005 (criteria) };
+                       Channel.BeginResolve (req, delegate (IAsyncResult result) {
+                               Channel.EndResolve (result);
+                       }, null);
+
+                       if (!reply_resolve_handle.WaitOne (InnerChannel.OperationTimeout))
+                               throw new TimeoutException ();
+                       try {
+                               var ir = resolve_completed ();
+                               var metadata = ir.Body.ToEndpointDiscoveryMetadata ();
+                               var sequence = ir.MessageSequence.ToDiscoveryMessageSequence ();
+                               return new ResolveResponse (metadata, sequence);
+                       } finally {
+                               resolve_completed = null;
+                       }
+               }
+       
+               internal class DiscoveryTargetCallbackApril2005 : IDiscoveryTargetCallbackContractApril2005
+               {
+                       public event Action<MessageContractsApril2005.FindResponse> ReplyFindCompleted;
+                       public event Action<MessageContractsApril2005.ResolveResponse> ReplyResolveCompleted;
+
+                       public void ReplyFind (MessageContractsApril2005.FindResponse message)
+                       {
+                               if (ReplyFindCompleted != null)
+                                       ReplyFindCompleted (message);
+                       }
+
+                       public void ReplyResolve (MessageContractsApril2005.ResolveResponse message)
+                       {
+                               if (ReplyResolveCompleted != null)
+                                       ReplyResolveCompleted (message);
+                       }
+               }
+       }
+}
index 526de2e98069ffa34f58c463ec51bb054638fcbe..b6a9570411075bc18be33b429ee58cc78f07f5f5 100755 (executable)
@@ -1,7 +1,7 @@
 //
 // Author: Atsushi Enomoto <atsushi@ximian.com>
 //
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -35,36 +35,56 @@ using System.Xml.Serialization;
 
 namespace System.ServiceModel.Discovery.VersionApril2005
 {
+       [XmlSchemaProvider ("GetSchema")]
        public class EndpointDiscoveryMetadataApril2005 : IXmlSerializable
        {
                public static EndpointDiscoveryMetadataApril2005 FromEndpointDiscoveryMetadata (EndpointDiscoveryMetadata endpointDiscoveryMetadata)
                {
-                       throw new NotImplementedException ();
+                       return new EndpointDiscoveryMetadataApril2005 (endpointDiscoveryMetadata);
                }
 
                public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
                {
-                       throw new NotImplementedException ();
+                       EndpointAddress10.GetSchema (schemaSet);
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ProbeMatchType", version.Namespace);
                }
 
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryApril2005;
+               static readonly XmlSchema schema = EndpointDiscoveryMetadata.BuildSchema (version);
+
+               // for deserialization use
+               EndpointDiscoveryMetadataApril2005 ()
+               {
+               }
+
+               internal EndpointDiscoveryMetadataApril2005 (EndpointDiscoveryMetadata source)
+               {
+                       this.source = source;
+               }
+               
+               EndpointDiscoveryMetadata source;
+
                public XmlSchema GetSchema ()
                {
-                       throw new NotImplementedException ();
+                       return null;
                }
 
                public void ReadXml (XmlReader reader)
                {
-                       throw new NotImplementedException ();
+                       source = EndpointDiscoveryMetadata.ReadXml (reader, version);
                }
 
                public EndpointDiscoveryMetadata ToEndpointDiscoveryMetadata ()
                {
-                       throw new NotImplementedException ();
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first before calling this method");
+                       return source;
                }
 
                public void WriteXml (XmlWriter writer)
                {
-                       throw new NotImplementedException ();
+                       source.WriteXml (writer, version);
                }
        }
 }
index a7603ae6efd0936049641bacce5fa4d8dc75cd9b..45c5fbfbb635bb9cdb5272658bd97cf4450cf573 100755 (executable)
@@ -1,7 +1,7 @@
 //
 // Author: Atsushi Enomoto <atsushi@ximian.com>
 //
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -35,36 +35,55 @@ using System.Xml.Serialization;
 
 namespace System.ServiceModel.Discovery.VersionApril2005
 {
+       [XmlSchemaProvider ("GetSchema")]
        public class FindCriteriaApril2005 : IXmlSerializable
        {
                public static FindCriteriaApril2005 FromFindCriteria (FindCriteria findCriteria)
                {
-                       throw new NotImplementedException ();
+                       return new FindCriteriaApril2005 (findCriteria);
                }
 
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryApril2005;
+               static XmlSchema schema = FindCriteria.BuildSchema (version);
+
                public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
                {
-                       throw new NotImplementedException ();
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ProbeType", version.Namespace);
+               }
+               
+               // for deserialization
+               FindCriteriaApril2005 ()
+               {
                }
 
+               internal FindCriteriaApril2005 (FindCriteria source)
+               {
+                       this.source = source;
+               }
+
+               FindCriteria source;
+
                public XmlSchema GetSchema ()
                {
-                       throw new NotImplementedException ();
+                       return null;
                }
 
                public void ReadXml (XmlReader reader)
                {
-                       throw new NotImplementedException ();
+                       source = FindCriteria.ReadXml (reader, version);
                }
 
                public FindCriteria ToFindCriteria ()
                {
-                       throw new NotImplementedException ();
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method before calling this method.");
+                       return source;
                }
 
                public void WriteXml (XmlWriter writer)
                {
-                       throw new NotImplementedException ();
+                       source.WriteXml (writer, version);
                }
        }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IAnnouncementContractApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IAnnouncementContractApril2005.cs
new file mode 100644 (file)
index 0000000..06c853f
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       [ServiceContract (Name = "Client", Namespace = MessageContractsApril2005.NS)]
+       internal interface IAnnouncementContractApril2005
+       {
+               [OperationContract (Name = "Hello", Action = MessageContractsApril2005.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOnlineAnnouncement (MessageContractsApril2005.OnlineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOnlineAnnouncement (IAsyncResult result);
+
+               [OperationContract (Name = "Bye", Action = MessageContractsApril2005.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOfflineAnnouncement (MessageContractsApril2005.OfflineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOfflineAnnouncement (IAsyncResult result);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IDiscoveryProxyContractApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IDiscoveryProxyContractApril2005.cs
new file mode 100644 (file)
index 0000000..154ab66
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       [ServiceContract (Name = "DiscoveryProxy", Namespace = MessageContractsApril2005.NS)]
+       internal interface IDiscoveryProxyContractApril2005
+       {
+               [OperationContract (Name = "Probe", Action = MessageContractsApril2005.ProbeAction, AsyncPattern = true, ReplyAction = MessageContractsApril2005.ProbeMatchAction)]
+               IAsyncResult BeginFind (MessageContractsApril2005.FindRequest message, AsyncCallback callback, object state);
+
+               MessageContractsApril2005.FindResponse EndFind (IAsyncResult result);
+
+               [OperationContract (Name = "Resolve", Action = MessageContractsApril2005.ResolveAction, AsyncPattern = true, ReplyAction = MessageContractsApril2005.ResolveMatchAction)]
+               IAsyncResult BeginResolve (MessageContractsApril2005.ResolveRequest message, AsyncCallback callback, object state);
+
+               MessageContractsApril2005.ResolveResponse EndResolve (IAsyncResult result);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IDiscoveryTargetContractApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/IDiscoveryTargetContractApril2005.cs
new file mode 100644 (file)
index 0000000..32e359d
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       [ServiceContract (Name = "TargetService", Namespace = MessageContractsApril2005.NS, CallbackContract = typeof (IDiscoveryTargetCallbackContractApril2005))]
+       internal interface IDiscoveryTargetContractApril2005
+       {
+               [OperationContract (Name = "Probe", Action = MessageContractsApril2005.ProbeAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginFind (MessageContractsApril2005.FindRequest message, AsyncCallback callback, object state);
+
+               void EndFind (IAsyncResult result);
+
+               [OperationContract (Name = "ProbeMatches", Action = MessageContractsApril2005.ProbeMatchAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginReplyFind (MessageContractsApril2005.FindResponse message, AsyncCallback callback, object state);
+
+               void EndReplyFind (IAsyncResult result);
+
+               [OperationContract (Name = "Resolve", Action = MessageContractsApril2005.ResolveAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginResolve (MessageContractsApril2005.ResolveRequest message, AsyncCallback callback, object state);
+
+               void EndResolve (IAsyncResult result);
+
+               [OperationContract (Name = "ResolveMatches", Action = MessageContractsApril2005.ResolveMatchAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginReplyResolve (MessageContractsApril2005.ResolveResponse message, AsyncCallback callback, object state);
+
+               void EndReplyResolve (IAsyncResult result);
+
+               [OperationContract (Name = "Hello", Action = MessageContractsApril2005.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOnlineAnnouncement (MessageContractsApril2005.OnlineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOnlineAnnouncement (IAsyncResult result);
+       }
+
+       internal interface IDiscoveryTargetCallbackContractApril2005
+       {
+               [OperationContract (Name = "ProbeMatches", Action = MessageContractsApril2005.ProbeMatchAction, IsOneWay = true)]
+               void ReplyFind (MessageContractsApril2005.FindResponse message);
+
+               [OperationContract (Name = "ResolveMatches", Action = MessageContractsApril2005.ResolveMatchAction, IsOneWay = true)]
+               void ReplyResolve (MessageContractsApril2005.ResolveResponse message);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/MessageContractsApril2005.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionApril2005/MessageContractsApril2005.cs
new file mode 100644 (file)
index 0000000..760202f
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionApril2005
+{
+       internal class MessageContractsApril2005
+       {
+               public const string NS = DiscoveryVersion.NamespaceApril2005;
+               public const string HelloAction = NS + "/Hello";
+               public const string ByeAction = NS + "/Bye";
+               public const string ProbeAction = NS + "/Probe";
+               public const string ProbeMatchAction = NS + "/ProbeMatches";
+               public const string ResolveAction = NS + "/Resolve";
+               public const string ResolveMatchAction = NS + "/ResolveMatches";
+
+               [MessageContract (IsWrapped = false)]
+               public class OnlineAnnouncement
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceApril2005 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "Hello", Namespace = NS)]
+                       public EndpointDiscoveryMetadataApril2005 EndpointDiscoveryMetadata { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class OfflineAnnouncement
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceApril2005 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "Bye", Namespace = NS)]
+                       public EndpointDiscoveryMetadataApril2005 EndpointDiscoveryMetadata { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class FindRequest
+               {
+                       [MessageBodyMember (Name = "Probe", Namespace = NS)]
+                       public FindCriteriaApril2005 Body { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class FindResponse
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceApril2005 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "ProbeMatches", Namespace = NS)]
+                       public FindResponseApril2005 Body { get; set; }
+               }
+
+               [CollectionDataContract (Name = "ProbeMatches", ItemName = "ProbeMatch", Namespace = NS)]
+               public class FindResponseApril2005 : List<EndpointDiscoveryMetadataApril2005>
+               {
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class ResolveRequest
+               {
+                       [MessageBodyMember (Name = "Resolve", Namespace = NS)]
+                       public ResolveCriteriaApril2005 Body { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class ResolveResponse
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceApril2005 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "ResolveMatches", Namespace = NS)]
+                       public EndpointDiscoveryMetadataApril2005 Body { get; set; }
+               }
+       }
+}
index 0a6567344dbd2e0bd9cac28658ea46fb33563648..6159546282ad8d3960235f6e39175005095276cd 100755 (executable)
@@ -1,7 +1,7 @@
 //
 // Author: Atsushi Enomoto <atsushi@ximian.com>
 //
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -35,36 +35,51 @@ using System.Xml.Serialization;
 
 namespace System.ServiceModel.Discovery.VersionApril2005
 {
+       [XmlSchemaProvider ("GetSchema")]
        public class ResolveCriteriaApril2005 : IXmlSerializable
        {
                public static ResolveCriteriaApril2005 FromResolveCriteria (ResolveCriteria resolveCriteria)
                {
-                       throw new NotImplementedException ();
+                       return new ResolveCriteriaApril2005 (resolveCriteria);
                }
 
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryApril2005;
+               static XmlSchema schema = FindCriteria.BuildSchema (version);
+
                public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
                {
-                       throw new NotImplementedException ();
+                       EndpointAddress10.GetSchema (schemaSet);
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ResolveType", version.Namespace);
+               }
+
+               internal ResolveCriteriaApril2005 (ResolveCriteria source)
+               {
+                       this.source = source;
                }
+               
+               ResolveCriteria source;
 
                public XmlSchema GetSchema ()
                {
-                       throw new NotImplementedException ();
+                       return null;
                }
 
                public void ReadXml (XmlReader reader)
                {
-                       throw new NotImplementedException ();
+                       source = ResolveCriteria.ReadXml (reader, version);
                }
 
                public ResolveCriteria ToResolveCriteria ()
                {
-                       throw new NotImplementedException ();
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first before calling this method");
+                       return source;
                }
 
                public void WriteXml (XmlWriter writer)
                {
-                       throw new NotImplementedException ();
+                       source.WriteXml (writer, version);
                }
        }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/AnnouncementClientCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/AnnouncementClientCD1.cs
new file mode 100644 (file)
index 0000000..cd7d1cc
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       internal class AnnouncementClientCD1 : ClientBase<IAnnouncementContractCD1>, AnnouncementClient.IAnnouncementCommon
+       {
+               public AnnouncementClientCD1 (AnnouncementEndpoint endpoint)
+                       : base (endpoint)
+               {
+               }
+               
+               public IAsyncResult BeginAnnounceOnline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
+               {
+                       var md = new EndpointDiscoveryMetadataCD1 (metadata);
+                       var seq = new DiscoveryMessageSequenceCD1 (sequence);
+                       var msg = new MessageContractsCD1.OnlineAnnouncement () { EndpointDiscoveryMetadata = md, MessageSequence = seq };
+                       return Channel.BeginOnlineAnnouncement (msg, callback, state);
+               }
+
+               public void EndAnnounceOnline (IAsyncResult result)
+               {
+                       Channel.EndOnlineAnnouncement (result);
+               }
+
+               public IAsyncResult BeginAnnounceOffline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state)
+               {
+                       var md = new EndpointDiscoveryMetadataCD1 (metadata);
+                       var seq = new DiscoveryMessageSequenceCD1 (sequence);
+                       var msg = new MessageContractsCD1.OfflineAnnouncement () { EndpointDiscoveryMetadata = md, MessageSequence = seq };
+                       return Channel.BeginOfflineAnnouncement (msg, callback, state);
+               }
+
+               public void EndAnnounceOffline (IAsyncResult result)
+               {
+                       Channel.EndOfflineAnnouncement (result);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequence11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequence11.cs
deleted file mode 100755 (executable)
index 1b88d4d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// Author: Atsushi Enomoto <atsushi@ximian.com>
-//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-using System.ServiceModel.Dispatcher;
-using System.Xml;
-using System.Xml.Schema;
-using System.Xml.Serialization;
-
-namespace System.ServiceModel.Discovery.VersionCD1
-{
-       public class DiscoveryMessageSequence11 : IXmlSerializable
-       {
-               public static DiscoveryMessageSequence11 FromDiscoveryMessageSequence (DiscoveryMessageSequence discoveryMessageSequence)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               internal DiscoveryMessageSequence11 ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public XmlSchema GetSchema ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void ReadXml (XmlReader reader)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public DiscoveryMessageSequence ToDiscoveryMessageSequence ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void WriteXml (XmlWriter writer)
-               {
-                       throw new NotImplementedException ();
-               }
-       }
-}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequenceCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequenceCD1.cs
new file mode 100755 (executable)
index 0000000..840f5c7
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class DiscoveryMessageSequenceCD1 : IXmlSerializable
+       {
+               public static DiscoveryMessageSequenceCD1 FromDiscoveryMessageSequence (DiscoveryMessageSequence discoveryMessageSequence)
+               {
+                       return new DiscoveryMessageSequenceCD1 (discoveryMessageSequence);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryCD1;
+               static XmlSchema schema;
+               
+               static XmlSchema Schema {
+                       get {
+                               if (schema == null)
+                                       schema = DiscoveryMessageSequence.BuildSchema (version);
+                               return schema;
+                       }
+               }
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       schemaSet.Add (Schema);
+                       return new XmlQualifiedName ("AppSequenceType", version.Namespace);
+               }
+
+               // for deserialization
+               DiscoveryMessageSequenceCD1 ()
+               {
+               }
+
+               internal DiscoveryMessageSequenceCD1 (DiscoveryMessageSequence source)
+               {
+                       this.source = source;
+               }
+
+               DiscoveryMessageSequence source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return Schema;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = DiscoveryMessageSequence.ReadXml (reader, version);
+               }
+
+               public DiscoveryMessageSequence ToDiscoveryMessageSequence ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first to fill its contents");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryProxyClientCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryProxyClientCD1.cs
new file mode 100644 (file)
index 0000000..44a4503
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       internal class DiscoveryProxyClientCD1 : ClientBase<IDiscoveryProxyContractCD1>, DiscoveryClient.IDiscoveryCommon
+       {
+               public DiscoveryProxyClientCD1 (ServiceEndpoint endpoint)
+                       : base (endpoint)
+               {
+               }
+
+               public IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       var req = new MessageContractsCD1.FindRequest () { Body = new FindCriteriaCD1 (criteria) };
+                       return Channel.BeginFind (req, callback, state);
+               }
+               
+               public FindResponse EndFind (IAsyncResult result)
+               {
+                       var ir = Channel.EndFind (result);
+                       var ret = new FindResponse ();
+                       foreach (var fr in ir.Body)
+                               ret.Endpoints.Add (fr.ToEndpointDiscoveryMetadata ());
+                       return ret;
+               }
+
+               public IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       var req = new MessageContractsCD1.ResolveRequest () { Body = new ResolveCriteriaCD1 (criteria) };
+                       return Channel.BeginResolve (req, callback, state);
+               }
+
+               public ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       var ir = Channel.EndResolve (result);
+                       var metadata = ir.Body.ToEndpointDiscoveryMetadata ();
+                       var sequence = ir.MessageSequence.ToDiscoveryMessageSequence ();
+                       return new ResolveResponse (metadata, sequence);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryTargetClientCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/DiscoveryTargetClientCD1.cs
new file mode 100644 (file)
index 0000000..b36c7fc
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Threading;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       internal class DiscoveryTargetClientCD1 : DuplexClientBase<IDiscoveryTargetContractCD1>, DiscoveryClient.IDiscoveryCommon
+       {
+               public DiscoveryTargetClientCD1 (ServiceEndpoint endpoint)
+                       : this (new DiscoveryTargetCallbackCD1 (), endpoint)
+               {
+               }
+
+               DiscoveryTargetClientCD1 (DiscoveryTargetCallbackCD1 instance, ServiceEndpoint endpoint)
+                       : base (instance, endpoint)
+               {
+                       instance.ReplyFindCompleted += delegate (MessageContractsCD1.FindResponse response) {
+                               find_completed = delegate { return response; };
+                               reply_find_handle.Set ();
+                       };
+                       instance.ReplyResolveCompleted += delegate (MessageContractsCD1.ResolveResponse response) {
+                               resolve_completed = delegate { return response; };
+                               reply_resolve_handle.Set ();
+                       };
+               }
+
+               // Find
+
+               Func<FindCriteria,FindResponse> find_delegate;
+               Func<MessageContractsCD1.FindResponse> find_completed;
+               ManualResetEvent reply_find_handle = new ManualResetEvent (false);
+
+               public IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       if (find_delegate == null)
+                               find_delegate = new Func<FindCriteria,FindResponse> (Find);
+                       return find_delegate.BeginInvoke (criteria, callback, state);
+               }
+               
+               public FindResponse EndFind (IAsyncResult result)
+               {
+                       return find_delegate.EndInvoke (result);
+               }
+               
+               FindResponse Find (FindCriteria criteria)
+               {
+                       var req = new MessageContractsCD1.FindRequest () { Body = new FindCriteriaCD1 (criteria) };
+                       Channel.BeginFind (req, delegate (IAsyncResult result) {
+                               Channel.EndFind (result);
+                       }, null);
+                       
+                       if (!reply_find_handle.WaitOne (InnerChannel.OperationTimeout))
+                               throw new EndpointNotFoundException ("The discovery client could not receive Find operation response within the operation timeout.");
+                       try {
+                               var ir = find_completed ();
+                               var ret = new FindResponse ();
+                               foreach (var fr in ir.Body)
+                                       ret.Endpoints.Add (fr.ToEndpointDiscoveryMetadata ());
+                               return ret;
+                       } finally {
+                               find_completed = null;
+                       }
+               }
+
+               // Resolve
+
+               Func<ResolveCriteria,ResolveResponse> resolve_delegate;
+               Func<MessageContractsCD1.ResolveResponse> resolve_completed;
+               ManualResetEvent reply_resolve_handle = new ManualResetEvent (false);
+
+               public IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       if (resolve_delegate == null)
+                               resolve_delegate = new Func<ResolveCriteria,ResolveResponse> (Resolve);
+                       return resolve_delegate.BeginInvoke (criteria, callback, state);
+               }
+               
+               public ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       return resolve_delegate.EndInvoke (result);
+               }
+               
+               public ResolveResponse Resolve (ResolveCriteria criteria)
+               {
+                       var req = new MessageContractsCD1.ResolveRequest () { Body = new ResolveCriteriaCD1 (criteria) };
+                       Channel.BeginResolve (req, delegate (IAsyncResult result) {
+                               Channel.EndResolve (result);
+                       }, null);
+
+                       if (!reply_resolve_handle.WaitOne (InnerChannel.OperationTimeout))
+                               throw new TimeoutException ();
+                       try {
+                               var ir = resolve_completed ();
+                               var metadata = ir.Body.ToEndpointDiscoveryMetadata ();
+                               var sequence = ir.MessageSequence.ToDiscoveryMessageSequence ();
+                               return new ResolveResponse (metadata, sequence);
+                       } finally {
+                               resolve_completed = null;
+                       }
+               }
+       
+               internal class DiscoveryTargetCallbackCD1 : IDiscoveryTargetCallbackContractCD1
+               {
+                       public event Action<MessageContractsCD1.FindResponse> ReplyFindCompleted;
+                       public event Action<MessageContractsCD1.ResolveResponse> ReplyResolveCompleted;
+
+                       public void ReplyFind (MessageContractsCD1.FindResponse message)
+                       {
+                               if (ReplyFindCompleted != null)
+                                       ReplyFindCompleted (message);
+                       }
+
+                       public void ReplyResolve (MessageContractsCD1.ResolveResponse message)
+                       {
+                               if (ReplyResolveCompleted != null)
+                                       ReplyResolveCompleted (message);
+                       }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadata11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadata11.cs
deleted file mode 100755 (executable)
index 4d2260b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Author: Atsushi Enomoto <atsushi@ximian.com>
-//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-using System.ServiceModel.Dispatcher;
-using System.Xml;
-using System.Xml.Schema;
-using System.Xml.Serialization;
-
-namespace System.ServiceModel.Discovery.VersionCD1
-{
-       public class EndpointDiscoveryMetadata11 : IXmlSerializable
-       {
-               public static EndpointDiscoveryMetadata11 FromEndpointDiscoveryMetadata (EndpointDiscoveryMetadata endpointDiscoveryMetadata)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public XmlSchema GetSchema ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void ReadXml (XmlReader reader)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public EndpointDiscoveryMetadata ToEndpointDiscoveryMetadata ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void WriteXml (XmlWriter writer)
-               {
-                       throw new NotImplementedException ();
-               }
-       }
-}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadataCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadataCD1.cs
new file mode 100755 (executable)
index 0000000..e882e4e
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class EndpointDiscoveryMetadataCD1 : IXmlSerializable
+       {
+               public static EndpointDiscoveryMetadataCD1 FromEndpointDiscoveryMetadata (EndpointDiscoveryMetadata endpointDiscoveryMetadata)
+               {
+                       return new EndpointDiscoveryMetadataCD1 (endpointDiscoveryMetadata);
+               }
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       EndpointAddress10.GetSchema (schemaSet);
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ProbeMatchType", version.Namespace);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryCD1;
+               static readonly XmlSchema schema = EndpointDiscoveryMetadata.BuildSchema (version);
+
+               // for deserialization use
+               EndpointDiscoveryMetadataCD1 ()
+               {
+               }
+
+               internal EndpointDiscoveryMetadataCD1 (EndpointDiscoveryMetadata source)
+               {
+                       this.source = source;
+               }
+               
+               EndpointDiscoveryMetadata source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return null;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = EndpointDiscoveryMetadata.ReadXml (reader, version);
+               }
+
+               public EndpointDiscoveryMetadata ToEndpointDiscoveryMetadata ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first before calling this method");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer, version);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/FindCriteria11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/FindCriteria11.cs
deleted file mode 100755 (executable)
index a82174b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Author: Atsushi Enomoto <atsushi@ximian.com>
-//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-using System.ServiceModel.Dispatcher;
-using System.Xml;
-using System.Xml.Schema;
-using System.Xml.Serialization;
-
-namespace System.ServiceModel.Discovery.VersionCD1
-{
-       public class FindCriteria11 : IXmlSerializable
-       {
-               public static FindCriteria11 FromFindCriteria (FindCriteria findCriteria)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public XmlSchema GetSchema ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void ReadXml (XmlReader reader)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public FindCriteria ToFindCriteria ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void WriteXml (XmlWriter writer)
-               {
-                       throw new NotImplementedException ();
-               }
-       }
-}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/FindCriteriaCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/FindCriteriaCD1.cs
new file mode 100755 (executable)
index 0000000..9cd1cdb
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class FindCriteriaCD1 : IXmlSerializable
+       {
+               public static FindCriteriaCD1 FromFindCriteria (FindCriteria findCriteria)
+               {
+                       return new FindCriteriaCD1 (findCriteria);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryCD1;
+               static XmlSchema schema = FindCriteria.BuildSchema (version);
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ProbeType", version.Namespace);
+               }
+               
+               // for deserialization
+               FindCriteriaCD1 ()
+               {
+               }
+               
+               internal FindCriteriaCD1 (FindCriteria source)
+               {
+                       this.source = source;
+               }
+
+               FindCriteria source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return null;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = FindCriteria.ReadXml (reader, version);
+               }
+
+               public FindCriteria ToFindCriteria ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method before calling this method.");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer, version);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IAnnouncementContractCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IAnnouncementContractCD1.cs
new file mode 100644 (file)
index 0000000..2155cb0
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [ServiceContract (Name = "Client", Namespace = MessageContractsCD1.NS)]
+       internal interface IAnnouncementContractCD1
+       {
+               [OperationContract (Name = "Hello", Action = MessageContractsCD1.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOnlineAnnouncement (MessageContractsCD1.OnlineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOnlineAnnouncement (IAsyncResult result);
+
+               [OperationContract (Name = "Bye", Action = MessageContractsCD1.ByeAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOfflineAnnouncement (MessageContractsCD1.OfflineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOfflineAnnouncement (IAsyncResult result);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IDiscoveryProxyContractCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IDiscoveryProxyContractCD1.cs
new file mode 100644 (file)
index 0000000..849ae8d
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [ServiceContract (Name = "DiscoveryProxy", Namespace = MessageContractsCD1.NS)]
+       internal interface IDiscoveryProxyContractCD1
+       {
+               [OperationContract (Name = "Probe", Action = MessageContractsCD1.ProbeAction, AsyncPattern = true, ReplyAction = MessageContractsCD1.ProbeMatchAction)]
+               IAsyncResult BeginFind (MessageContractsCD1.FindRequest message, AsyncCallback callback, object state);
+
+               MessageContractsCD1.FindResponse EndFind (IAsyncResult result);
+
+               [OperationContract (Name = "Resolve", Action = MessageContractsCD1.ResolveAction, AsyncPattern = true, ReplyAction = MessageContractsCD1.ResolveMatchAction)]
+               IAsyncResult BeginResolve (MessageContractsCD1.ResolveRequest message, AsyncCallback callback, object state);
+
+               MessageContractsCD1.ResolveResponse EndResolve (IAsyncResult result);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IDiscoveryTargetContractCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/IDiscoveryTargetContractCD1.cs
new file mode 100644 (file)
index 0000000..ddccec6
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [ServiceContract (Name = "TargetService", Namespace = MessageContractsCD1.NS, CallbackContract = typeof (IDiscoveryTargetCallbackContractCD1))]
+       internal interface IDiscoveryTargetContractCD1
+       {
+               [OperationContract (Name = "Probe", Action = MessageContractsCD1.ProbeAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginFind (MessageContractsCD1.FindRequest message, AsyncCallback callback, object state);
+
+               void EndFind (IAsyncResult result);
+
+               [OperationContract (Name = "ProbeMatches", Action = MessageContractsCD1.ProbeMatchAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginReplyFind (MessageContractsCD1.FindResponse message, AsyncCallback callback, object state);
+
+               void EndReplyFind (IAsyncResult result);
+
+               [OperationContract (Name = "Resolve", Action = MessageContractsCD1.ResolveAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginResolve (MessageContractsCD1.ResolveRequest message, AsyncCallback callback, object state);
+
+               void EndResolve (IAsyncResult result);
+
+               [OperationContract (Name = "ResolveMatches", Action = MessageContractsCD1.ResolveMatchAction, AsyncPattern = true, IsOneWay = true)]
+               IAsyncResult BeginReplyResolve (MessageContractsCD1.ResolveResponse message, AsyncCallback callback, object state);
+
+               void EndReplyResolve (IAsyncResult result);
+
+               [OperationContract (Name = "Hello", Action = MessageContractsCD1.HelloAction, IsOneWay = true, AsyncPattern = true)]
+               IAsyncResult BeginOnlineAnnouncement (MessageContractsCD1.OnlineAnnouncement message, AsyncCallback callback, object state);
+
+               void EndOnlineAnnouncement (IAsyncResult result);
+       }
+
+       internal interface IDiscoveryTargetCallbackContractCD1
+       {
+               [OperationContract (Name = "ProbeMatches", Action = MessageContractsCD1.ProbeMatchAction, IsOneWay = true)]
+               void ReplyFind (MessageContractsCD1.FindResponse message);
+
+               [OperationContract (Name = "ResolveMatches", Action = MessageContractsCD1.ResolveMatchAction, IsOneWay = true)]
+               void ReplyResolve (MessageContractsCD1.ResolveResponse message);
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/MessageContractsCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/MessageContractsCD1.cs
new file mode 100644 (file)
index 0000000..36b4bf8
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       internal class MessageContractsCD1
+       {
+               public const string NS = DiscoveryVersion.NamespaceCD1;
+               public const string HelloAction = NS + "/Hello";
+               public const string ByeAction = NS + "/Bye";
+               public const string ProbeAction = NS + "/Probe";
+               public const string ProbeMatchAction = NS + "/ProbeMatches";
+               public const string ResolveAction = NS + "/Resolve";
+               public const string ResolveMatchAction = NS + "/ResolveMatches";
+
+               [MessageContract (IsWrapped = false)]
+               public class OnlineAnnouncement
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceCD1 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "Hello", Namespace = NS)]
+                       public EndpointDiscoveryMetadataCD1 EndpointDiscoveryMetadata { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class OfflineAnnouncement
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceCD1 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "Bye", Namespace = NS)]
+                       public EndpointDiscoveryMetadataCD1 EndpointDiscoveryMetadata { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class FindRequest
+               {
+                       [MessageBodyMember (Name = "Probe", Namespace = NS)]
+                       public FindCriteriaCD1 Body { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class FindResponse
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceCD1 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "ProbeMatches", Namespace = NS)]
+                       public FindResponseCD1 Body { get; set; }
+               }
+
+               [CollectionDataContract (Name = "ProbeMatches", ItemName = "ProbeMatch", Namespace = NS)]
+               public class FindResponseCD1 : List<EndpointDiscoveryMetadataCD1>
+               {
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class ResolveRequest
+               {
+                       [MessageBodyMember (Name = "Resolve", Namespace = NS)]
+                       public ResolveCriteriaCD1 Body { get; set; }
+               }
+
+               [MessageContract (IsWrapped = false)]
+               public class ResolveResponse
+               {
+                       [MessageHeader (Name = "AppSequence", Namespace = NS)]
+                       public DiscoveryMessageSequenceCD1 MessageSequence { get; set; }
+                       [MessageBodyMember (Name = "ResolveMatches", Namespace = NS)]
+                       public EndpointDiscoveryMetadataCD1 Body { get; set; }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/ResolveCriteria11.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/ResolveCriteria11.cs
deleted file mode 100755 (executable)
index 3367061..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Author: Atsushi Enomoto <atsushi@ximian.com>
-//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-using System.ServiceModel.Dispatcher;
-using System.Xml;
-using System.Xml.Schema;
-using System.Xml.Serialization;
-
-namespace System.ServiceModel.Discovery.VersionCD1
-{
-       public class ResolveCriteria11 : IXmlSerializable
-       {
-               public static ResolveCriteria11 FromResolveCriteria (ResolveCriteria resolveCriteria)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public XmlSchema GetSchema ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void ReadXml (XmlReader reader)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public ResolveCriteria ToResolveCriteria ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public void WriteXml (XmlWriter writer)
-               {
-                       throw new NotImplementedException ();
-               }
-       }
-}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/ResolveCriteriaCD1.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.VersionCD1/ResolveCriteriaCD1.cs
new file mode 100755 (executable)
index 0000000..2bcdab6
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+
+namespace System.ServiceModel.Discovery.VersionCD1
+{
+       [XmlSchemaProvider ("GetSchema")]
+       public class ResolveCriteriaCD1 : IXmlSerializable
+       {
+               public static ResolveCriteriaCD1 FromResolveCriteria (ResolveCriteria resolveCriteria)
+               {
+                       return new ResolveCriteriaCD1 (resolveCriteria);
+               }
+
+               static readonly DiscoveryVersion version = DiscoveryVersion.WSDiscoveryCD1;
+               static XmlSchema schema = FindCriteria.BuildSchema (version);
+
+               public static XmlQualifiedName GetSchema (XmlSchemaSet schemaSet)
+               {
+                       EndpointAddress10.GetSchema (schemaSet);
+                       schemaSet.Add (schema);
+                       return new XmlQualifiedName ("ResolveType", version.Namespace);
+               }
+
+               internal ResolveCriteriaCD1 (ResolveCriteria source)
+               {
+                       this.source = source;
+               }
+               
+               ResolveCriteria source;
+
+               public XmlSchema GetSchema ()
+               {
+                       return null;
+               }
+
+               public void ReadXml (XmlReader reader)
+               {
+                       source = ResolveCriteria.ReadXml (reader, version);
+               }
+
+               public ResolveCriteria ToResolveCriteria ()
+               {
+                       if (source == null)
+                               throw new InvalidOperationException ("Call ReadXml method first before calling this method");
+                       return source;
+               }
+
+               public void WriteXml (XmlWriter writer)
+               {
+                       source.WriteXml (writer, version);
+               }
+       }
+}
index c24404981426cb2c4f5262aeec974c97c188044f..295aec94282d2e86215287b50597541b293649cb 100644 (file)
@@ -2,6 +2,8 @@
 ../../build/common/Locale.cs
 ../../build/common/MonoTODOAttribute.cs
 Assembly/AssemblyInfo.cs
+System.ServiceModel.Channels/DiscoveryChannelBase.cs
+System.ServiceModel.Channels/RequestChannelBase.cs
 System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs
 System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs
 System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs
@@ -24,29 +26,63 @@ System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
 System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs
 System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
 System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs
+System.ServiceModel.Discovery.Udp/UdpChannelFactory.cs
+System.ServiceModel.Discovery.Udp/UdpChannelListener.cs
+System.ServiceModel.Discovery.Udp/UdpDuplexChannel.cs
+System.ServiceModel.Discovery.Udp/UdpTransportBindingElement.cs
+System.ServiceModel.Discovery.Version11/AnnouncementClient11.cs
+System.ServiceModel.Discovery.Version11/DiscoveryMessageSequence11.cs
+System.ServiceModel.Discovery.Version11/DiscoveryProxyClient11.cs
+System.ServiceModel.Discovery.Version11/DiscoveryTargetClient11.cs
+System.ServiceModel.Discovery.Version11/EndpointDiscoveryMetadata11.cs
+System.ServiceModel.Discovery.Version11/FindCriteria11.cs
+System.ServiceModel.Discovery.Version11/IAnnouncementContract11.cs
+System.ServiceModel.Discovery.Version11/IDiscoveryProxyContract11.cs
+System.ServiceModel.Discovery.Version11/IDiscoveryTargetContract11.cs
+System.ServiceModel.Discovery.Version11/MessageContracts11.cs
+System.ServiceModel.Discovery.Version11/ResolveCriteria11.cs
+System.ServiceModel.Discovery.VersionApril2005/AnnouncementClientApril2005.cs
 System.ServiceModel.Discovery.VersionApril2005/DiscoveryMessageSequenceApril2005.cs
+System.ServiceModel.Discovery.VersionApril2005/DiscoveryProxyClientApril2005.cs
+System.ServiceModel.Discovery.VersionApril2005/DiscoveryTargetClientApril2005.cs
 System.ServiceModel.Discovery.VersionApril2005/EndpointDiscoveryMetadataApril2005.cs
 System.ServiceModel.Discovery.VersionApril2005/FindCriteriaApril2005.cs
+System.ServiceModel.Discovery.VersionApril2005/IAnnouncementContractApril2005.cs
+System.ServiceModel.Discovery.VersionApril2005/IDiscoveryProxyContractApril2005.cs
+System.ServiceModel.Discovery.VersionApril2005/IDiscoveryTargetContractApril2005.cs
+System.ServiceModel.Discovery.VersionApril2005/MessageContractsApril2005.cs
 System.ServiceModel.Discovery.VersionApril2005/ResolveCriteriaApril2005.cs
-System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequence11.cs
-System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadata11.cs
-System.ServiceModel.Discovery.VersionCD1/FindCriteria11.cs
-System.ServiceModel.Discovery.VersionCD1/ResolveCriteria11.cs
+System.ServiceModel.Discovery.VersionCD1/AnnouncementClientCD1.cs
+System.ServiceModel.Discovery.VersionCD1/DiscoveryMessageSequenceCD1.cs
+System.ServiceModel.Discovery.VersionCD1/DiscoveryProxyClientCD1.cs
+System.ServiceModel.Discovery.VersionCD1/DiscoveryTargetClientCD1.cs
+System.ServiceModel.Discovery.VersionCD1/EndpointDiscoveryMetadataCD1.cs
+System.ServiceModel.Discovery.VersionCD1/FindCriteriaCD1.cs
+System.ServiceModel.Discovery.VersionCD1/IAnnouncementContractCD1.cs
+System.ServiceModel.Discovery.VersionCD1/IDiscoveryProxyContractCD1.cs
+System.ServiceModel.Discovery.VersionCD1/IDiscoveryTargetContractCD1.cs
+System.ServiceModel.Discovery.VersionCD1/MessageContractsCD1.cs
+System.ServiceModel.Discovery.VersionCD1/ResolveCriteriaCD1.cs
 System.ServiceModel.Discovery/AnnouncementClient.cs
 System.ServiceModel.Discovery/AnnouncementEndpoint.cs
 System.ServiceModel.Discovery/AnnouncementEventArgs.cs
 System.ServiceModel.Discovery/AnnouncementService.cs
+System.ServiceModel.Discovery/DiscoveryChannelDispatcher.cs
+System.ServiceModel.Discovery/DiscoveryChannelFactory.cs
 System.ServiceModel.Discovery/DiscoveryClient.cs
 System.ServiceModel.Discovery/DiscoveryClientBindingElement.cs
 System.ServiceModel.Discovery/DiscoveryEndpoint.cs
 System.ServiceModel.Discovery/DiscoveryEndpointProvider.cs
+System.ServiceModel.Discovery/DiscoveryEndpointPublisherBehavior.cs
 System.ServiceModel.Discovery/DiscoveryMessageSequence.cs
 System.ServiceModel.Discovery/DiscoveryMessageSequenceGenerator.cs
 System.ServiceModel.Discovery/DiscoveryOperationContextExtension.cs
 System.ServiceModel.Discovery/DiscoveryProxy.cs
+System.ServiceModel.Discovery/DiscoveryRequestChannel.cs
 System.ServiceModel.Discovery/DiscoveryService.cs
 System.ServiceModel.Discovery/DiscoveryServiceExtension.cs
 System.ServiceModel.Discovery/DiscoveryVersion.cs
+System.ServiceModel.Discovery/DiscoveryViaUriBehavior.cs
 System.ServiceModel.Discovery/DynamicEndpoint.cs
 System.ServiceModel.Discovery/EndpointDiscoveryBehavior.cs
 System.ServiceModel.Discovery/EndpointDiscoveryMetadata.cs
index 380e5ede216def7cb1e16e3e572ad7d3fcabf481..4e210e7201215b026a5021c81e91989826bc341a 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -6,32 +30,65 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.Xml;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public sealed class AnnouncementClient : ICommunicationObject, IDisposable
        {
+               internal interface IAnnouncementCommon
+               {
+                       IAsyncResult BeginAnnounceOnline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state);
+                       void EndAnnounceOnline (IAsyncResult result);
+                       IAsyncResult BeginAnnounceOffline (EndpointDiscoveryMetadata metadata, DiscoveryMessageSequence sequence, AsyncCallback callback, object state);
+                       void EndAnnounceOffline (IAsyncResult result);
+               }
+
                public AnnouncementClient ()
+                       : this (String.Empty)
                {
                }
 
                public AnnouncementClient (AnnouncementEndpoint announcementEndpoint)
                {
+                       if (announcementEndpoint == null)
+                               throw new ArgumentNullException ("announcementEndpoint");
+                       MessageSequenceGenerator = new DiscoveryMessageSequenceGenerator ();
+                       client = Activator.CreateInstance (announcementEndpoint.DiscoveryVersion.AnnouncementClientType, new object [] {announcementEndpoint});
                }
 
                public AnnouncementClient (string endpointConfigurationName)
                {
+                       throw new NotImplementedException ();
                }
 
-               public ChannelFactory ChannelFactory { get; private set; }
-               public ClientCredentials ClientCredentials { get; private set; }
-               public ServiceEndpoint Endpoint { get; private set; }
-               public IClientChannel InnerChannel { get; private set; }
                public DiscoveryMessageSequenceGenerator MessageSequenceGenerator { get; set; }
 
+               // FIXME: make it dynamic (dmcs crashes for now)
+               object client;
+
+               public ChannelFactory ChannelFactory {
+                       get { return (ChannelFactory) client.GetType ().GetProperty ("ChannelFactory").GetValue (client, null); }
+               }
+
+               public ClientCredentials ClientCredentials {
+                       get { return ChannelFactory.Credentials; }
+               }
+
+               public ServiceEndpoint Endpoint {
+                       get { return ChannelFactory.Endpoint; }
+               }
+
+               public IClientChannel InnerChannel {
+                       get { return (IClientChannel) client.GetType ().GetProperty ("InnerChannel").GetValue (client, null); }
+               }
+
+               CommunicationState State {
+                       get { return ((ICommunicationObject) this).State; }
+               }
+
                CommunicationState ICommunicationObject.State {
-                       get { return InnerChannel.State; }
+                       get { return ((ICommunicationObject) client).State; }
                }
 
                public event EventHandler<AsyncCompletedEventArgs> AnnounceOfflineCompleted;
@@ -58,64 +115,108 @@ namespace System.ServiceModel.Discovery
                        remove { InnerChannel.Opening -= value; }
                }
 
-               public void AnnounceOffline (EndpointDiscoveryMetadata discoveryMetadata)
+               // open/close
+
+               public void Open ()
                {
-                       throw new NotImplementedException ();
+                       ((ICommunicationObject) this).Open ();
                }
 
-               public void AnnounceOfflineAsync (EndpointDiscoveryMetadata discoveryMetadata)
+               public void Close ()
                {
-                       throw new NotImplementedException ();
+                       ((ICommunicationObject) this).Close ();
                }
 
-               public void AnnounceOfflineAsync (EndpointDiscoveryMetadata discoveryMetadata, object userState)
+               // sync
+
+               public void AnnounceOffline (EndpointDiscoveryMetadata discoveryMetadata)
                {
-                       throw new NotImplementedException ();
+                       EndAnnounceOffline (BeginAnnounceOffline (discoveryMetadata, null, null));
                }
 
                public void AnnounceOnline (EndpointDiscoveryMetadata discoveryMetadata)
                {
-                       throw new NotImplementedException ();
+                       EndAnnounceOnline (BeginAnnounceOnline (discoveryMetadata, null, null));
                }
 
-               public void AnnounceOnlineAsync (EndpointDiscoveryMetadata discoveryMetadata)
+               // async
+
+               public void AnnounceOfflineAsync (EndpointDiscoveryMetadata discoveryMetadata)
                {
-                       throw new NotImplementedException ();
+                       AnnounceOfflineAsync (discoveryMetadata, null);
                }
 
-               public void AnnounceOnlineAsync (EndpointDiscoveryMetadata discoveryMetadata, object userState)
+               public void AnnounceOfflineAsync (EndpointDiscoveryMetadata discoveryMetadata, object userState)
                {
-                       throw new NotImplementedException ();
+                       AsyncCallback cb = delegate (IAsyncResult result) {
+                               try {
+                                       EndAnnounceOffline (result);
+                               } catch (Exception ex) {
+                                       OnAnnounceOfflineCompleted (new AsyncCompletedEventArgs (ex, false, result.AsyncState));
+                               } finally {
+                                       OnAnnounceOfflineCompleted (new AsyncCompletedEventArgs (null, false, result.AsyncState));
+                               }
+                       };
+                       BeginAnnounceOffline (discoveryMetadata, cb, userState);
+               }
+
+               void OnAnnounceOfflineCompleted (AsyncCompletedEventArgs args)
+               {
+                       if (AnnounceOfflineCompleted != null)
+                               AnnounceOfflineCompleted (this, args);
                }
 
-               public IAsyncResult BeginAnnounceOffline (EndpointDiscoveryMetadata discoveryMetadata, AsyncCallback callback, object state)
+               public void AnnounceOnlineAsync (EndpointDiscoveryMetadata discoveryMetadata)
                {
-                       throw new NotImplementedException ();
+                       AnnounceOnlineAsync (discoveryMetadata, null);
                }
 
-               public IAsyncResult BeginAnnounceOnline (EndpointDiscoveryMetadata discoveryMetadata, AsyncCallback callback, object state)
+               public void AnnounceOnlineAsync (EndpointDiscoveryMetadata discoveryMetadata, object userState)
                {
-                       throw new NotImplementedException ();
+                       AsyncCallback cb = delegate (IAsyncResult result) {
+                               try {
+                                       EndAnnounceOnline (result);
+                               } catch (Exception ex) {
+                                       OnAnnounceOnlineCompleted (new AsyncCompletedEventArgs (ex, false, result.AsyncState));
+                               } finally {
+                                       OnAnnounceOnlineCompleted (new AsyncCompletedEventArgs (null, false, result.AsyncState));
+                               }
+                       };
+                       BeginAnnounceOnline (discoveryMetadata, cb, userState);
+               }
+
+               void OnAnnounceOnlineCompleted (AsyncCompletedEventArgs args)
+               {
+                       if (AnnounceOnlineCompleted != null)
+                               AnnounceOnlineCompleted (this, args);
                }
 
-               public void EndAnnounceOffline (IAsyncResult result)
+               // begin/end
+
+               public IAsyncResult BeginAnnounceOffline (EndpointDiscoveryMetadata discoveryMetadata, AsyncCallback callback, object state)
                {
-                       throw new NotImplementedException ();
+                       using (var ocs = new OperationContextScope (InnerChannel)) {
+                               OperationContext.Current.OutgoingMessageHeaders.MessageId = new UniqueId ();
+                               return ((IAnnouncementCommon) client).BeginAnnounceOffline (discoveryMetadata, MessageSequenceGenerator.Next (), callback, state);
+                       }
                }
 
-               public void EndAnnounceOnline (IAsyncResult result)
+               public IAsyncResult BeginAnnounceOnline (EndpointDiscoveryMetadata discoveryMetadata, AsyncCallback callback, object state)
                {
-                       throw new NotImplementedException ();
+                       using (var ocs = new OperationContextScope (InnerChannel)) {
+                               OperationContext.Current.OutgoingMessageHeaders.MessageId = new UniqueId ();
+                               return ((IAnnouncementCommon) client).BeginAnnounceOnline (discoveryMetadata, MessageSequenceGenerator.Next (), callback, state);
+                       }
                }
 
-               public void Close ()
+               public void EndAnnounceOffline (IAsyncResult result)
                {
-                       throw new NotImplementedException ();
+                       ((IAnnouncementCommon) client).EndAnnounceOffline (result);
                }
 
-               public void Open ()
+               public void EndAnnounceOnline (IAsyncResult result)
                {
-                       throw new NotImplementedException ();
+                       ((IAnnouncementCommon) client).EndAnnounceOnline (result);
                }
 
                // explicit interface impl.
@@ -132,12 +233,14 @@ namespace System.ServiceModel.Discovery
 
                void ICommunicationObject.Close ()
                {
-                       InnerChannel.Close ();
+                       if (State == CommunicationState.Opened)
+                               InnerChannel.Close ();
                }
 
                void ICommunicationObject.Close (TimeSpan timeout)
                {
-                       InnerChannel.Close (timeout);
+                       if (State == CommunicationState.Opened)
+                               InnerChannel.Close (timeout);
                }
 
                IAsyncResult ICommunicationObject.BeginOpen (AsyncCallback callback, object state)
@@ -172,12 +275,15 @@ namespace System.ServiceModel.Discovery
 
                void ICommunicationObject.Abort ()
                {
-                       InnerChannel.Abort ();
+                       if (State != CommunicationState.Closed) {
+                               InnerChannel.Abort ();
+                               ChannelFactory.Abort ();
+                       }
                }
 
                void IDisposable.Dispose ()
                {
-                       InnerChannel.Dispose ();
+                       Close ();
                }
        }
 }
index 0de05476270eb841f52b58804fc69dde4b554ddc..296a25c85a3155901b6afdf04fede70608c4eaf5 100755 (executable)
@@ -45,25 +45,30 @@ namespace System.ServiceModel.Discovery
                        if (discoveryVersion == null)
                                throw new ArgumentNullException ("discoveryVersion");
                        DiscoveryVersion = discoveryVersion;
+                       
+                       IsSystemEndpoint = true;
                }
 
                public AnnouncementEndpoint (Binding binding, EndpointAddress address)
-                       : this (DiscoveryVersion.WSDiscoveryApril2005, binding, address)
+                       : this (DiscoveryVersion.WSDiscovery11, binding, address)
                {
                }
 
-               [MonoTODO]
                public AnnouncementEndpoint (DiscoveryVersion discoveryVersion, Binding binding, EndpointAddress address)
-                       : base (null, binding, address)
+                       : base (GetContract (discoveryVersion), binding, address)
+               {
+                       DiscoveryVersion = discoveryVersion;
+               }
+
+               static ContractDescription GetContract (DiscoveryVersion discoveryVersion)
                {
                        if (discoveryVersion == null)
                                throw new ArgumentNullException ("discoveryVersion");
-                       DiscoveryVersion = discoveryVersion;
+                       return ContractDescription.GetContract (discoveryVersion.AnnouncementContractType);
                }
 
                public DiscoveryVersion DiscoveryVersion { get; private set; }
 
-               [MonoTODO]
                public TimeSpan MaxAnnouncementDelay { get; set; }
        }
 }
index 69f42d977a6eb14d6ce27df7803ba15182949c8b..6f1082e0e938048412fb256e76deae5d58330b37 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -5,14 +29,20 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery.Version11;
+using System.ServiceModel.Discovery.VersionApril2005;
+using System.ServiceModel.Discovery.VersionCD1;
+using System.Threading;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
+       // To be usable as ServiceType, it must implement contract interfaces.
+       // However, there is no public interfaces, so they must be internal.
        [ServiceBehavior (InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
-       public class AnnouncementService
+       public class AnnouncementService : IAnnouncementContract11, IAnnouncementContractApril2005, IAnnouncementContractCD1
        {
                public AnnouncementService ()
+                       : this (0)
                {
                }
 
@@ -23,24 +53,171 @@ namespace System.ServiceModel.Discovery
                public event EventHandler<AnnouncementEventArgs> OfflineAnnouncementReceived;
                public event EventHandler<AnnouncementEventArgs> OnlineAnnouncementReceived;
 
+               Action<object,AnnouncementEventArgs> online, offline;
+
                protected virtual IAsyncResult OnBeginOfflineAnnouncement (DiscoveryMessageSequence messageSequence, EndpointDiscoveryMetadata endpointDiscoveryMetadata, AsyncCallback callback, object state)
                {
-                       throw new NotImplementedException ();
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               if (offline == null)
+                                       offline = new Action<object,AnnouncementEventArgs> (OfflineAnnouncementReceived ?? delegate {});
+                               return offline.BeginInvoke (this, new AnnouncementEventArgs (endpointDiscoveryMetadata, messageSequence), callback, state);
+                       default:
+                               if (OfflineAnnouncementReceived != null)
+                                       OfflineAnnouncementReceived (this, new AnnouncementEventArgs (endpointDiscoveryMetadata, messageSequence));
+                               var result = new TempAsyncResult (null, state);
+                               if (callback != null)
+                                       callback (result);
+                               return result;
+                       }
                }
 
                protected virtual IAsyncResult OnBeginOnlineAnnouncement (DiscoveryMessageSequence messageSequence, EndpointDiscoveryMetadata endpointDiscoveryMetadata, AsyncCallback callback, object state)
                {
-                       throw new NotImplementedException ();
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               if (online == null)
+                                       online = new Action<object,AnnouncementEventArgs> (OnlineAnnouncementReceived ?? delegate {});
+                               return online.BeginInvoke (this, new AnnouncementEventArgs (endpointDiscoveryMetadata, messageSequence), callback, state);
+                       default:
+                               if (OnlineAnnouncementReceived != null)
+                                       OnlineAnnouncementReceived (this, new AnnouncementEventArgs (endpointDiscoveryMetadata, messageSequence));
+                               var result = new TempAsyncResult (null, state);
+                               if (callback != null)
+                                       callback (result);
+                               return result;
+                       }
                }
 
                protected virtual void OnEndOfflineAnnouncement (IAsyncResult result)
                {
-                       throw new NotImplementedException ();
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               offline.EndInvoke (result);
+                               break;
+                       default:
+                               // do nothing
+                               break;
+                       }
                }
 
                protected virtual void OnEndOnlineAnnouncement (IAsyncResult result)
                {
-                       throw new NotImplementedException ();
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               online.EndInvoke (result);
+                               break;
+                       default:
+                               // do nothing
+                               break;
+                       }
+               }
+
+               // BeginOnlineAnnouncement
+
+               IAsyncResult IAnnouncementContract11.BeginOnlineAnnouncement (MessageContracts11.OnlineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var msq = msg.MessageSequence != null ? msg.MessageSequence.ToDiscoveryMessageSequence () : null;
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOnlineAnnouncement (msq, edm, callback, state);
+               }
+
+               IAsyncResult IAnnouncementContractApril2005.BeginOnlineAnnouncement (MessageContractsApril2005.OnlineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var msq = msg.MessageSequence != null ? msg.MessageSequence.ToDiscoveryMessageSequence () : null;
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOnlineAnnouncement (msq, edm, callback, state);
+               }
+
+               IAsyncResult IAnnouncementContractCD1.BeginOnlineAnnouncement (MessageContractsCD1.OnlineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var msq = msg.MessageSequence != null ? msg.MessageSequence.ToDiscoveryMessageSequence () : null;
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOnlineAnnouncement (msq, edm, callback, state);
+               }
+
+               // EndOnlineAnnouncement
+
+               void IAnnouncementContract11.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOnlineAnnouncement (result);
+               }
+
+               void IAnnouncementContractApril2005.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOnlineAnnouncement (result);
+               }
+
+               void IAnnouncementContractCD1.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOnlineAnnouncement (result);
+               }
+
+               // BeginOfflineAnnouncement
+
+               IAsyncResult IAnnouncementContract11.BeginOfflineAnnouncement (MessageContracts11.OfflineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var msq = msg.MessageSequence != null ? msg.MessageSequence.ToDiscoveryMessageSequence () : null;
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOfflineAnnouncement (msq, edm, callback, state);
+               }
+
+               IAsyncResult IAnnouncementContractApril2005.BeginOfflineAnnouncement (MessageContractsApril2005.OfflineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var msq = msg.MessageSequence != null ? msg.MessageSequence.ToDiscoveryMessageSequence () : null;
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOfflineAnnouncement (msq, edm, callback, state);
+               }
+
+               IAsyncResult IAnnouncementContractCD1.BeginOfflineAnnouncement (MessageContractsCD1.OfflineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var msq = msg.MessageSequence != null ? msg.MessageSequence.ToDiscoveryMessageSequence () : null;
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOfflineAnnouncement (msq, edm, callback, state);
+               }
+
+               // EndOfflineAnnouncement
+
+               void IAnnouncementContract11.EndOfflineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOfflineAnnouncement (result);
+               }
+
+               void IAnnouncementContractApril2005.EndOfflineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOfflineAnnouncement (result);
+               }
+
+               void IAnnouncementContractCD1.EndOfflineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOfflineAnnouncement (result);
+               }
+       }
+
+       // FIXME: It is introduced for a workaround for (similar to) bug #633945. Remove this class and all of its usage once that bug gets fixed.
+       class TempAsyncResult : IAsyncResult
+       {
+               public TempAsyncResult (object returnValue, object state)
+               {
+                       ReturnValue = returnValue;
+                       AsyncState = state;
+                       CompletedSynchronously = true;
+                       IsCompleted = true;
+                       AsyncWaitHandle = new ManualResetEvent (true);
                }
+               
+               public object ReturnValue { get; set; }
+               public object AsyncState { get; set; }
+               public bool CompletedSynchronously { get; set; }
+               public bool IsCompleted { get; set; }
+               public WaitHandle AsyncWaitHandle { get; set; }
        }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryChannelDispatcher.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryChannelDispatcher.cs
new file mode 100644 (file)
index 0000000..a88af07
--- /dev/null
@@ -0,0 +1,148 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class DiscoveryChannelDispatcher : ChannelDispatcherBase
+       {
+               ServiceHostBase host;
+               AnnouncementClient client;
+               bool handle_announce_online;
+
+               public DiscoveryChannelDispatcher (AnnouncementEndpoint endpoint, bool handleAnnounceOnline)
+               {
+                       // The argument endpoint is to indicate "destination".
+                       // It is different from the destination indicated in 
+                       // "EndpointDiscoveryMetadata" argument in announcement messages sent by the "client".
+                       this.client = new AnnouncementClient (endpoint);
+                       this.handle_announce_online = handleAnnounceOnline;
+               }
+
+               public ICommunicationObject Communication {
+                       get { return client; }
+               }
+
+               public override ServiceHostBase Host {
+                       get { return host; }
+               }
+
+               public override IChannelListener Listener {
+                       get { return null; }
+               }
+
+               // might be different value
+               protected override TimeSpan DefaultOpenTimeout {
+                       get { return client.Endpoint.Binding.OpenTimeout; }
+               }
+
+               // might be different value
+               protected override TimeSpan DefaultCloseTimeout {
+                       get { return client.Endpoint.Binding.CloseTimeout; }
+               }
+
+               protected override void Attach (ServiceHostBase host)
+               {
+                       base.Attach (host);
+                       this.host = host;
+               }
+
+               protected override void Detach (ServiceHostBase host)
+               {
+                       base.Detach (host);
+                       this.host = null;
+               }
+
+               protected override void OnOpen (TimeSpan timeout)
+               {
+                       if (!handle_announce_online)
+                               return; // Offline announcement is done by another DiscoveryChannelDispatcher
+
+                       DateTime start = DateTime.Now;
+                       Communication.Open (timeout);
+
+                       // and call AnnouncementOnline().
+                       var dx = host.Extensions.Find<DiscoveryServiceExtension> ();
+                       // Published endpoints are added by DicoveryEndpointPublisherBehavior, which is added to each ServiceEndpoint in the primary (non-announcement) service.
+                       if (dx != null) {
+                               foreach (var edm in dx.PublishedEndpoints) {
+                                       client.InnerChannel.OperationTimeout = timeout - (DateTime.Now - start);
+                                       client.AnnounceOnline (edm);
+                               }
+                       }
+               }
+
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return Communication.BeginOpen (timeout, callback, state);
+               }
+
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       Communication.EndOpen (result);
+               }
+
+               protected override void OnClose (TimeSpan timeout)
+               {
+                       if (handle_announce_online)
+                               return; // Offline announcement is done by another DiscoveryChannelDispatcher
+
+                       DateTime start = DateTime.Now;
+                       // and call AnnouncementOnline().
+                       var dx = host.Extensions.Find<DiscoveryServiceExtension> ();
+                       // Published endpoints are added by DicoveryEndpointPublisherBehavior, which is added to each ServiceEndpoint in the primary (non-announcement) service.
+                       if (dx != null) {
+                               foreach (var edm in dx.PublishedEndpoints) {
+                                       client.InnerChannel.OperationTimeout = timeout - (DateTime.Now - start);
+                                       client.AnnounceOffline (edm);
+                               }
+                       }
+
+                       // Then close the client.
+                       Communication.Close (timeout - (DateTime.Now - start));
+               }
+
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return Communication.BeginClose (timeout, callback, state);
+               }
+
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       Communication.EndClose (result);
+               }
+               
+               protected override void OnAbort ()
+               {
+                       Communication.Abort ();
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryChannelFactory.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryChannelFactory.cs
new file mode 100644 (file)
index 0000000..e432a34
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class DiscoveryChannelFactory<TChannel> : ChannelFactoryBase<TChannel>
+       {
+               public DiscoveryChannelFactory (DiscoveryClientBindingElement source, BindingContext context)
+               {
+                       Source = source;
+                       this.inner = context.BuildInnerChannelFactory<TChannel> ();
+               }
+
+               IChannelFactory<TChannel> inner;
+               internal DiscoveryClientBindingElement Source { get; private set; }
+               internal IChannelFactory<TChannel> InnerFactory {
+                       get { return inner; }
+               }
+
+               protected override void OnOpen (TimeSpan timeout)
+               {
+                       inner.Open (timeout);
+               }
+
+               protected override void OnClose (TimeSpan timeout)
+               {
+                       inner.Close (timeout);
+               }
+
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return inner.BeginOpen (timeout, callback, state);
+               }
+
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return inner.BeginClose (timeout, callback, state);
+               }
+
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       inner.EndOpen (result);
+               }
+
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       inner.EndClose (result);
+               }
+
+               protected override TChannel OnCreateChannel (EndpointAddress address, Uri via)
+               {
+                       if (address == null)
+                               throw new ArgumentNullException ("address");
+                       if (address != DiscoveryClientBindingElement.DiscoveryEndpointAddress)
+                               throw new ArgumentException ("Only DiscoveryEndpointAddress is expected as the argument EndpointAddress");
+
+                       return (TChannel) (object) new DiscoveryChannel<TChannel> (this, address, via);
+               }
+       }
+}
+
index b454c530f798861278b9f4e9642805d3f076bb22..366943fc16aef726733351d9ce3aec21806f27cc 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -9,28 +33,65 @@ using System.ServiceModel.Dispatcher;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public sealed class DiscoveryClient : ICommunicationObject, IDisposable
        {
+               internal interface IDiscoveryCommon
+               {
+                       IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state);
+                       FindResponse EndFind (IAsyncResult result);
+                       IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state);
+                       ResolveResponse EndResolve (IAsyncResult result);
+               }
+               
                public DiscoveryClient ()
+                       : this (String.Empty)
                {
                }
 
                public DiscoveryClient (DiscoveryEndpoint discoveryEndpoint)
                {
+                       if (discoveryEndpoint == null)
+                               throw new ArgumentNullException ("discoveryEndpoint");
+
+                       // create DiscoveryTargetClientXX for each version:
+                       // Managed -> DiscoveryTargetClientType (request-reply)
+                       // Adhoc   -> DiscoveryProxyClientType (duplex)
+                       if (discoveryEndpoint.DiscoveryMode == ServiceDiscoveryMode.Managed)
+                               client = Activator.CreateInstance (discoveryEndpoint.DiscoveryVersion.DiscoveryProxyClientType, new object [] {discoveryEndpoint});
+                       else
+                               client = Activator.CreateInstance (discoveryEndpoint.DiscoveryVersion.DiscoveryTargetClientType, new object [] {discoveryEndpoint});
                }
 
                public DiscoveryClient (string endpointConfigurationName)
                {
+                       throw new NotImplementedException ();
+               }
+
+               // FIXME: make it dynamic (dmcs crashes for now)
+               object client;
+
+               public ChannelFactory ChannelFactory {
+                       get { return (ChannelFactory) client.GetType ().GetProperty ("ChannelFactory").GetValue (client, null); }
+               }
+
+               public ClientCredentials ClientCredentials {
+                       get { return ChannelFactory.Credentials; }
                }
 
-               public ChannelFactory ChannelFactory { get; private set; }
-               public ClientCredentials ClientCredentials { get; private set; }
-               public ServiceEndpoint Endpoint { get; private set; }
-               public IClientChannel InnerChannel { get; private set; }
+               public ServiceEndpoint Endpoint {
+                       get { return ChannelFactory.Endpoint; }
+               }
+
+               public IClientChannel InnerChannel {
+                       get { return (IClientChannel) client.GetType ().GetProperty ("InnerChannel").GetValue (client, null); }
+               }
+
+               CommunicationState State {
+                       get { return ((ICommunicationObject) this).State; }
+               }
 
                CommunicationState ICommunicationObject.State {
-                       get { return InnerChannel.State; }
+                       get { return ((ICommunicationObject) client).State; }
                }
 
                public event EventHandler<FindCompletedEventArgs> FindCompleted;
@@ -59,49 +120,109 @@ namespace System.ServiceModel.Discovery
                        remove { InnerChannel.Opening -= value; }
                }
 
-               public void CancelAsync (object userState)
+               public void Open ()
                {
-                       throw new NotImplementedException ();
+                       ((ICommunicationObject) this).Open ();
                }
 
                public void Close ()
+               {
+                       ((ICommunicationObject) this).Close ();
+               }
+
+               bool cancelled;
+
+               public void CancelAsync (object userState)
                {
                        throw new NotImplementedException ();
                }
 
+               // find
+
                public FindResponse Find (FindCriteria criteria)
                {
-                       throw new NotImplementedException ();
+                       return EndFind (BeginFind (criteria, null, null));
                }
 
                public void FindAsync (FindCriteria criteria)
                {
-                       throw new NotImplementedException ();
+                       FindAsync (criteria, null);
                }
 
                public void FindAsync (FindCriteria criteria, object userState)
                {
-                       throw new NotImplementedException ();
+                       AsyncCallback cb = delegate (IAsyncResult result) {
+                               FindResponse ret = null;
+                               Exception error = null;
+                               try {
+                                       ret = EndFind (result);
+                               } catch (Exception ex) {
+                                       error = ex;
+                               }
+                               OnFindCompleted (new FindCompletedEventArgs (ret, error, cancelled, result.AsyncState));
+                       };
+                       cancelled = false;
+                       BeginFind (criteria, cb, userState);
                }
 
-               public void Open ()
+               void OnFindCompleted (FindCompletedEventArgs args)
                {
-                       throw new NotImplementedException ();
+                       if (FindCompleted != null)
+                               FindCompleted (this, args);
                }
 
+               IAsyncResult BeginFind (FindCriteria criteria, AsyncCallback callback, object state)
+               {
+                       return ((IDiscoveryCommon) client).BeginFind (criteria, callback, state);
+               }
+               
+               FindResponse EndFind (IAsyncResult result)
+               {
+                       return ((IDiscoveryCommon) client).EndFind (result);
+               }
+
+               // resolve
+
                public ResolveResponse Resolve (ResolveCriteria criteria)
                {
-                       throw new NotImplementedException ();
+                       return EndResolve (BeginResolve (criteria, null, null));
                }
 
                public void ResolveAsync (ResolveCriteria criteria)
                {
-                       throw new NotImplementedException ();
+                       ResolveAsync (criteria, null);
                }
 
                public void ResolveAsync (ResolveCriteria criteria, object userState)
                {
-                       throw new NotImplementedException ();
+                       AsyncCallback cb = delegate (IAsyncResult result) {
+                               ResolveResponse ret = null;
+                               Exception error = null;
+                               try {
+                                       ret = EndResolve (result);
+                               } catch (Exception ex) {
+                                       error = ex;
+                               }
+                               OnResolveCompleted (new ResolveCompletedEventArgs (ret, error, cancelled, result.AsyncState));
+                       };
+                       cancelled = false;
+                       BeginResolve (criteria, cb, userState);
+               }
+
+               void OnResolveCompleted (ResolveCompletedEventArgs args)
+               {
+                       if (ResolveCompleted != null)
+                               ResolveCompleted (this, args);
+               }
+
+               IAsyncResult BeginResolve (ResolveCriteria criteria, AsyncCallback callback, object state)
+               {
+                       return ((IDiscoveryCommon) client).BeginResolve (criteria, callback, state);
+               }
+               
+               ResolveResponse EndResolve (IAsyncResult result)
+               {
+                       return ((IDiscoveryCommon) client).EndResolve (result);
                }
 
                // explicit interface impl.
index c3b2d2a66c9b71346987af830594dd9abb839bca..81aa35410ed0f2061df4006da96ce0691078776a 100755 (executable)
@@ -1,6 +1,31 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Linq;
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
@@ -8,18 +33,23 @@ using System.ServiceModel.Dispatcher;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public sealed class DiscoveryClientBindingElement : BindingElement
        {
-               [MonoTODO]
-               public static readonly EndpointAddress DiscoveryEndpointAddress = null;
+               public static readonly EndpointAddress DiscoveryEndpointAddress = new EndpointAddress ("http://schemas.microsoft.com/discovery/dynamic");
 
                public DiscoveryClientBindingElement ()
                {
+                       DiscoveryEndpointProvider = DiscoveryEndpointProvider.CreateDefault ();
+                       FindCriteria = new FindCriteria (); // empty
                }
 
                public DiscoveryClientBindingElement (DiscoveryEndpointProvider discoveryEndpointProvider, FindCriteria findCriteria)
                {
+                       if (discoveryEndpointProvider == null)
+                               throw new ArgumentNullException ("discoveryEndpointProvider");
+                       if (findCriteria == null)
+                               throw new ArgumentNullException ("findCriteria");
+
                        DiscoveryEndpointProvider = discoveryEndpointProvider;
                        FindCriteria = findCriteria;
                }
@@ -29,32 +59,35 @@ namespace System.ServiceModel.Discovery
 
                public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (BindingContext context)
                {
-                       throw new NotImplementedException ();
+                       if (!(context.Binding.CreateBindingElements ().First () is DiscoveryClientBindingElement))
+                               throw new InvalidOperationException ("DiscoveryClientBindingElement is expected at the top of the input binding elements in the BindingContext");
+
+                       return new DiscoveryChannelFactory<TChannel> (this, context);
                }
 
                public override IChannelListener<TChannel> BuildChannelListener<TChannel> (BindingContext context)
                {
-                       throw new NotImplementedException ();
+                       throw new NotSupportedException ();
                }
 
                public override bool CanBuildChannelFactory<TChannel> (BindingContext context)
                {
-                       throw new NotImplementedException ();
+                       return context.CanBuildInnerChannelFactory<TChannel> ();
                }
 
                public override bool CanBuildChannelListener<TChannel> (BindingContext context)
                {
-                       throw new NotImplementedException ();
+                       return false;
                }
 
                public override BindingElement Clone ()
                {
-                       throw new NotImplementedException ();
+                       return new DiscoveryClientBindingElement (DiscoveryEndpointProvider, FindCriteria);
                }
 
                public override T GetProperty<T> (BindingContext context)
                {
-                       throw new NotImplementedException ();
+                       return context.GetInnerProperty<T> ();
                }
        }
 }
index 5b3d8b852cddfc5f36a7ace2549b54bc0c54fc6a..362cd1529d85cebfe46a75006226416658e54f85 100755 (executable)
@@ -40,7 +40,7 @@ namespace System.ServiceModel.Discovery
                }
 
                public DiscoveryEndpoint (Binding binding, EndpointAddress endpointAddress)
-                       : this (DiscoveryVersion.WSDiscoveryApril2005, ServiceDiscoveryMode.Managed, binding, endpointAddress)
+                       : this (DiscoveryVersion.WSDiscovery11, ServiceDiscoveryMode.Managed, binding, endpointAddress)
                {
                }
 
@@ -50,17 +50,27 @@ namespace System.ServiceModel.Discovery
                }
 
                public DiscoveryEndpoint (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode, Binding binding, EndpointAddress endpointAddress)
-                       : base (null, binding, endpointAddress)
+                       : base (GetContract (discoveryVersion, discoveryMode), binding, endpointAddress)
                {
-                       if (discoveryVersion == null)
-                               throw new ArgumentNullException ("discoveryVersion");
                        DiscoveryVersion = discoveryVersion;
                        DiscoveryMode = discoveryMode;
+
+                       IsSystemEndpoint = true;
+               }
+
+               static ContractDescription GetContract (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode mode)
+               {
+                       if (discoveryVersion == null)
+                               throw new ArgumentNullException ("discoveryVersion");
+                       // Provide different contract type for Adhoc mode and Managed mode, respectively.
+                       if (mode == ServiceDiscoveryMode.Managed)
+                               return ContractDescription.GetContract (discoveryVersion.DiscoveryProxyContractType);
+                       else
+                               return ContractDescription.GetContract (discoveryVersion.DiscoveryTargetContractType);
                }
 
                public ServiceDiscoveryMode DiscoveryMode { get; private set; }
                public DiscoveryVersion DiscoveryVersion { get; private set; }
-               [MonoTODO]
                public TimeSpan MaxResponseDelay { get; set; }
        }
 }
index 46cff0d2f5e49881bf804c42bf8d393b18844dc1..d4cdf86774b5fb8c68ac9a458fe0de805651afa1 100755 (executable)
@@ -34,6 +34,36 @@ namespace System.ServiceModel.Discovery
 {
        public abstract class DiscoveryEndpointProvider
        {
+               internal static DiscoveryEndpointProvider CreateDefault ()
+               {
+                       return new UdpDiscoveryEndpointProvider ();
+               }
+
                public abstract DiscoveryEndpoint GetDiscoveryEndpoint ();
        }
+
+       internal class SimpleDiscoveryEndpointProvider : DiscoveryEndpointProvider
+       {
+               public SimpleDiscoveryEndpointProvider (DiscoveryEndpoint value)
+               {
+                       this.value = value;
+               }
+               
+               DiscoveryEndpoint value;
+               
+               public override DiscoveryEndpoint GetDiscoveryEndpoint ()
+               {
+                       return value;
+               }
+       }
+
+       internal class UdpDiscoveryEndpointProvider : DiscoveryEndpointProvider
+       {
+               public override DiscoveryEndpoint GetDiscoveryEndpoint ()
+               {
+                       var binding = new CustomBinding (new TextMessageEncodingBindingElement (), new UdpTransportBindingElement ());
+                       // FIXME: Name might not be set here (but needs to be modified somewhere anyways).
+                       return new UdpDiscoveryEndpoint () { Binding = binding };
+               }
+       }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryEndpointPublisherBehavior.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryEndpointPublisherBehavior.cs
new file mode 100644 (file)
index 0000000..210a745
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class DiscoveryEndpointPublisherBehavior : IEndpointBehavior
+       {
+               DiscoveryServiceExtension extension;
+
+               internal DiscoveryEndpointPublisherBehavior (DiscoveryServiceExtension extension)
+               {
+                       this.extension = extension;
+               }
+
+               void IEndpointBehavior.AddBindingParameters (ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
+               {
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       if (bindingParameters == null)
+                               throw new ArgumentNullException ("bindingParameters");
+               }
+
+               void IEndpointBehavior.ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime clientRuntime)
+               {
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       if (clientRuntime == null)
+                               throw new ArgumentNullException ("clientRuntime");
+               }
+
+               void IEndpointBehavior.ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
+               {
+               // It is applied to the ServiceEndpoints in the ServiceHost which has ServiceDiscoveryBehavior as one of its service behaviors.
+               // That is, this target endpoint is an endpoint in the target service itself, not for "announcement service".
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       if (endpointDispatcher == null)
+                               throw new ArgumentNullException ("endpointDispatcher");
+
+                       var edb = endpoint.Behaviors.Find<EndpointDiscoveryBehavior> ();
+                       if (edb != null && !edb.Enabled)
+                               return;
+
+                       var edm = EndpointDiscoveryMetadata.FromServiceEndpoint (endpoint);
+                       extension.PublishedInternalEndpoints.Add (edm);
+               }
+
+               void IEndpointBehavior.Validate (ServiceEndpoint endpoint)
+               {
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+               }
+       }
+}
index 7590eb1f177210280d6d429715b8ecfd0d410298..2a04e3cf19e126efe4bece22f12d704746c71935 100755 (executable)
@@ -29,6 +29,8 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
 
 namespace System.ServiceModel.Discovery
 {
@@ -45,18 +47,14 @@ namespace System.ServiceModel.Discovery
                public long MessageNumber { get; private set; }
                public Uri SequenceId { get; private set; }
 
-               [MonoTODO]
                public bool CanCompareTo (DiscoveryMessageSequence other)
                {
-                       if (other == null)
-                               return false;
-                       return InstanceId == other.InstanceId && SequenceId.Equals (other.SequenceId);
+                       return other != null; // I cannot find any other conditions that return false.
                }
 
-               [MonoTODO]
                public int CompareTo (DiscoveryMessageSequence other)
                {
-                       throw new NotImplementedException ();
+                       return CanCompareTo (other) ? GetHashCode () - other.GetHashCode () : -1;
                }
 
                public bool Equals (DiscoveryMessageSequence other)
@@ -64,7 +62,7 @@ namespace System.ServiceModel.Discovery
                        if (other == null)
                                return false;
                        return  InstanceId == other.InstanceId &&
-                               SequenceId.Equals (other.SequenceId) &&
+                               (SequenceId == null && other.SequenceId == null || SequenceId.Equals (other.SequenceId)) &&
                                MessageNumber == other.MessageNumber;
                }
 
@@ -74,16 +72,14 @@ namespace System.ServiceModel.Discovery
                        return s != null && Equals (s);
                }
 
-               [MonoTODO]
                public override int GetHashCode ()
                {
-                       throw new NotImplementedException ();
+                       return (int) ((InstanceId * (SequenceId != null ? SequenceId.GetHashCode () : 1) << 17) + MessageNumber);
                }
 
-               [MonoTODO]
                public override string ToString ()
                {
-                       throw new NotImplementedException ();
+                       return String.Format ("InstanceId={0}, SequenceId={1}, MessageNumber={2}", InstanceId, SequenceId, MessageNumber);
                }
 
                public static bool operator == (DiscoveryMessageSequence messageSequence1, DiscoveryMessageSequence messageSequence2)
@@ -95,5 +91,42 @@ namespace System.ServiceModel.Discovery
                {
                        return messageSequence1 == null ? messageSequence2 != null : !messageSequence1.Equals (messageSequence2);
                }
+
+               internal static DiscoveryMessageSequence ReadXml (XmlReader reader, DiscoveryVersion version)
+               {
+                       if (reader == null)
+                               throw new ArgumentNullException ("reader");
+                       if (reader.LocalName != "AppSequenceType" || reader.NamespaceURI != version.Namespace)
+                               throw new ArgumentException (String.Format ("AppSequenceType element in namespace '{0}' was expected. Got '{1}' element in '{2}' namespace", version.Namespace, reader.LocalName, reader.NamespaceURI));
+
+                       var instId = reader.GetAttribute ("InstanceId");
+                       var seqId = reader.GetAttribute ("SequenceId");
+                       var msgno = reader.GetAttribute ("MessageNumber");
+                       var source = new DiscoveryMessageSequence (instId != null ? XmlConvert.ToInt64 (instId) : 0, seqId != null ? new Uri (seqId, UriKind.RelativeOrAbsolute) : null, msgno != null ? XmlConvert.ToInt64 (msgno) : 0);
+                       
+                       reader.Skip ();
+                       return source;
+               }
+
+               internal void WriteXml (XmlWriter writer)
+               {
+                       writer.WriteAttributeString ("InstanceId", XmlConvert.ToString (InstanceId));
+                       if (SequenceId != null)
+                               writer.WriteAttributeString ("SequenceId", SequenceId.ToString ());
+                       writer.WriteAttributeString ("MessageNumber", XmlConvert.ToString (MessageNumber));
+               }
+
+               internal static XmlSchema BuildSchema (DiscoveryVersion version)
+               {
+                       var schema = new XmlSchema () { TargetNamespace = version.Namespace };
+                       var ccr = new XmlSchemaComplexContentRestriction ();
+                       ccr.Attributes.Add (new XmlSchemaAttribute () { Name = "InstanceId", SchemaTypeName = new XmlQualifiedName ("unsignedInt", XmlSchema.Namespace), Use = XmlSchemaUse.Required });
+                       ccr.Attributes.Add (new XmlSchemaAttribute () { Name = "SequenceId", SchemaTypeName = new XmlQualifiedName ("anyURI", XmlSchema.Namespace), Use = XmlSchemaUse.Optional });
+                       ccr.Attributes.Add (new XmlSchemaAttribute () { Name = "MessageNumber", SchemaTypeName = new XmlQualifiedName ("unsignedInt", XmlSchema.Namespace), Use = XmlSchemaUse.Required });
+                       var ct = new XmlSchemaComplexType () { Name = "AppSequenceType", ContentModel = new XmlSchemaComplexContent () { Content = ccr } };
+                       schema.Items.Add (ct);
+
+                       return schema;
+               }
        }
 }
index f960a4a7b0ac5d81d1eac15fd7b58d94e8b652f7..0e70f069446522bb2da0806967428dc3895289a6 100755 (executable)
@@ -34,8 +34,10 @@ namespace System.ServiceModel.Discovery
 {
        public class DiscoveryMessageSequenceGenerator
        {
-               [MonoTODO ("default values?")]
+               static readonly Random rnd = new Random ();
+
                public DiscoveryMessageSequenceGenerator ()
+                       : this (AppDomain.CurrentDomain.Id, null) // not sure what should be used for instanceId; multiple instances share the same Id
                {
                }
 
@@ -48,10 +50,9 @@ namespace System.ServiceModel.Discovery
                long instance_id, message_count;
                Uri sequence_id;
 
-               [MonoTODO ("default number?")]
                public DiscoveryMessageSequence Next ()
                {
-                       return new DiscoveryMessageSequence (instance_id, sequence_id, message_count++);
+                       return new DiscoveryMessageSequence (instance_id, sequence_id, ++message_count);
                }
        }
 }
index ccc64892c12e99f19b79719bc5234f72b6325500..dc964cba660a0039bb8b5ef12c0ad95e20674465 100755 (executable)
@@ -11,8 +11,24 @@ namespace System.ServiceModel.Discovery
        [MonoTODO]
        public class DiscoveryOperationContextExtension : IExtension<OperationContext>
        {
-               internal DiscoveryOperationContextExtension ()
+               internal DiscoveryOperationContextExtension (DiscoveryEndpoint endpoint)
                {
+                       this.endpoint = endpoint;
+               }
+               
+               DiscoveryEndpoint endpoint;
+
+               public ServiceDiscoveryMode DiscoveryMode {
+                       get { return endpoint.DiscoveryMode; }
+               }
+
+               public DiscoveryVersion DiscoveryVersion {
+                       get { return endpoint.DiscoveryVersion; }
+               }
+
+               public TimeSpan MaxResponseDelay {
+                       get { return endpoint.MaxResponseDelay; }
+                       internal set { endpoint.MaxResponseDelay = value; }
                }
 
                void IExtension<OperationContext>.Attach (OperationContext owner)
index 33a3ffb5e01aa4cae0c47595e69689d1f24e5b9f..46c4143e3fa8328600efe5d6e8cd3f0e889c3516 100755 (executable)
@@ -5,17 +5,22 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery.Version11;
+using System.ServiceModel.Discovery.VersionApril2005;
+using System.ServiceModel.Discovery.VersionCD1;
 
 namespace System.ServiceModel.Discovery
 {
        [MonoTODO]
-       public abstract class DiscoveryProxy
+       public abstract class DiscoveryProxy : IDiscoveryProxyContract11, IDiscoveryProxyContractApril2005, IDiscoveryProxyContractCD1, IDiscoveryTargetContract11, IDiscoveryTargetContractApril2005, IDiscoveryTargetContractCD1
        {
                protected DiscoveryProxy ()
+                       : this (new DiscoveryMessageSequenceGenerator ())
                {
                }
 
                protected DiscoveryProxy (DiscoveryMessageSequenceGenerator messageSequenceGenerator)
+                       : this (messageSequenceGenerator, 0)
                {
                }
 
@@ -23,6 +28,10 @@ namespace System.ServiceModel.Discovery
                {
                }
 
+               internal DiscoveryMessageSequenceGenerator DiscoveryMessageSequenceGenerator { get; private set; }
+
+               internal int DuplicateMessageHistoryLength { get; private set; }
+
                protected virtual IAsyncResult BeginShouldRedirectFind (FindCriteria resolveCriteria, AsyncCallback callback, Object state)
                {
                        throw new NotImplementedException ();
@@ -52,5 +61,246 @@ namespace System.ServiceModel.Discovery
                protected abstract void OnEndOnlineAnnouncement (IAsyncResult result);
                protected abstract EndpointDiscoveryMetadata OnEndResolve (IAsyncResult result);
 
+
+               #region service contract implementation
+               
+               // IDiscoveryProxyContract11
+               IAsyncResult IDiscoveryProxyContract11.BeginFind (MessageContracts11.FindRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               MessageContracts11.FindResponse IDiscoveryProxyContract11.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryProxyContract11.BeginResolve (MessageContracts11.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               MessageContracts11.ResolveResponse IDiscoveryProxyContract11.EndResolve (IAsyncResult result)
+               {
+                       var ret = OnEndResolve (result);
+                       return new MessageContracts11.ResolveResponse () { MessageSequence = new DiscoveryMessageSequence11 (DiscoveryMessageSequenceGenerator.Next ()), Body = new EndpointDiscoveryMetadata11 (ret) };
+               }
+               
+               // IDiscoveryProxyContractApril2005
+               IAsyncResult IDiscoveryProxyContractApril2005.BeginFind (MessageContractsApril2005.FindRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               MessageContractsApril2005.FindResponse IDiscoveryProxyContractApril2005.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryProxyContractApril2005.BeginResolve (MessageContractsApril2005.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               MessageContractsApril2005.ResolveResponse IDiscoveryProxyContractApril2005.EndResolve (IAsyncResult result)
+               {
+                       var ret = OnEndResolve (result);
+                       return new MessageContractsApril2005.ResolveResponse () { MessageSequence = new DiscoveryMessageSequenceApril2005 (DiscoveryMessageSequenceGenerator.Next ()), Body = new EndpointDiscoveryMetadataApril2005 (ret) };
+               }
+               
+               // IDiscoveryProxyContractCD1
+               IAsyncResult IDiscoveryProxyContractCD1.BeginFind (MessageContractsCD1.FindRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               MessageContractsCD1.FindResponse IDiscoveryProxyContractCD1.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryProxyContractCD1.BeginResolve (MessageContractsCD1.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               MessageContractsCD1.ResolveResponse IDiscoveryProxyContractCD1.EndResolve (IAsyncResult result)
+               {
+                       var ret = OnEndResolve (result);
+                       return new MessageContractsCD1.ResolveResponse () { MessageSequence = new DiscoveryMessageSequenceCD1 (DiscoveryMessageSequenceGenerator.Next ()), Body = new EndpointDiscoveryMetadataCD1 (ret) };
+               }
+
+               // IDiscoveryTargetContract11
+               IAsyncResult IDiscoveryTargetContract11.BeginFind (MessageContracts11.FindRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               void IDiscoveryTargetContract11.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginReplyFind (MessageContracts11.FindResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContract11.EndReplyFind (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginResolve (MessageContracts11.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               void IDiscoveryTargetContract11.EndResolve (IAsyncResult result)
+               {
+                       OnEndResolve (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginReplyResolve (MessageContracts11.ResolveResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContract11.EndReplyResolve (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginOnlineAnnouncement (MessageContracts11.OnlineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOnlineAnnouncement (DiscoveryMessageSequenceGenerator.Next (), edm, callback, state);
+               }
+
+               void IDiscoveryTargetContract11.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOnlineAnnouncement (result);
+               }
+
+               // IDiscoveryTargetContractApril2005
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginFind (MessageContractsApril2005.FindRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               void IDiscoveryTargetContractApril2005.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginReplyFind (MessageContractsApril2005.FindResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractApril2005.EndReplyFind (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginResolve (MessageContractsApril2005.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               void IDiscoveryTargetContractApril2005.EndResolve (IAsyncResult result)
+               {
+                       OnEndResolve (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginReplyResolve (MessageContractsApril2005.ResolveResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractApril2005.EndReplyResolve (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginOnlineAnnouncement (MessageContractsApril2005.OnlineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOnlineAnnouncement (DiscoveryMessageSequenceGenerator.Next (), edm, callback, state);
+               }
+
+               void IDiscoveryTargetContractApril2005.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOnlineAnnouncement (result);
+               }
+
+               // IDiscoveryTargetContractCD1
+               IAsyncResult IDiscoveryTargetContractCD1.BeginFind (MessageContractsCD1.FindRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               void IDiscoveryTargetContractCD1.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginReplyFind (MessageContractsCD1.FindResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractCD1.EndReplyFind (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginResolve (MessageContractsCD1.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               void IDiscoveryTargetContractCD1.EndResolve (IAsyncResult result)
+               {
+                       OnEndResolve (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginReplyResolve (MessageContractsCD1.ResolveResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractCD1.EndReplyResolve (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginOnlineAnnouncement (MessageContractsCD1.OnlineAnnouncement msg, AsyncCallback callback, object state)
+               {
+                       var edm = msg.EndpointDiscoveryMetadata != null ? msg.EndpointDiscoveryMetadata.ToEndpointDiscoveryMetadata () : null;
+                       return OnBeginOnlineAnnouncement (DiscoveryMessageSequenceGenerator.Next (), edm, callback, state);
+               }
+
+               void IDiscoveryTargetContractCD1.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       OnEndOnlineAnnouncement (result);
+               }
+
+               #endregion
        }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryRequestChannel.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryRequestChannel.cs
new file mode 100644 (file)
index 0000000..893fdf6
--- /dev/null
@@ -0,0 +1,266 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery
+{
+//* Strange, but this causes compiler error at DiscoveryClientBindingElement.
+
+       internal class DiscoveryChannel<TChannel> : DiscoveryChannelBase, IRequestSessionChannel, IDuplexSessionChannel
+       {
+               DiscoveryChannelFactory<TChannel> factory;
+               TChannel inner;
+
+               public DiscoveryChannel (DiscoveryChannelFactory<TChannel> factory, EndpointAddress address, Uri via)
+                       : base (factory)
+               {
+                       this.factory = factory;
+                       RemoteAddress = address;
+                       Via = via;
+               }
+
+               public EndpointAddress RemoteAddress { get; private set; }
+               public Uri Via { get; private set; }
+               public EndpointAddress LocalAddress {
+                       get { return ((IDuplexSessionChannel) inner).LocalAddress; }
+               }
+
+               IDuplexSession ISessionChannel<IDuplexSession>.Session {
+                       get { return ((IDuplexSessionChannel) inner).Session; }
+               }
+
+               IOutputSession ISessionChannel<IOutputSession>.Session {
+                       get { return ((IOutputSessionChannel) inner).Session; }
+               }
+
+               Action<TimeSpan> open_delegate, close_delegate;
+
+               protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (close_delegate == null)
+                               close_delegate = new Action<TimeSpan> (OnClose);
+                       return close_delegate.BeginInvoke (timeout, callback, state);
+               }
+
+               protected override void OnEndClose (IAsyncResult result)
+               {
+                       close_delegate.EndInvoke (result);
+               }
+
+               protected override void OnAbort ()
+               {
+                       if (inner != null) {
+                               ((IChannel) inner).Abort ();
+                               inner = default (TChannel);
+                       }
+               }
+
+               protected override void OnClose (TimeSpan timeout)
+               {
+                       if (inner != null) {
+                               ((IChannel) inner).Close (timeout);
+                               inner = default (TChannel);
+                       }
+               }
+
+               protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       if (open_delegate == null)
+                               open_delegate = new Action<TimeSpan> (OnOpen);
+                       return open_delegate.BeginInvoke (timeout, callback, state);
+               }
+
+               protected override void OnEndOpen (IAsyncResult result)
+               {
+                       open_delegate.EndInvoke (result);
+               }
+
+               protected override void OnOpen (TimeSpan timeout)
+               {
+                       // FIXME: use timeout
+                       DateTime start = DateTime.Now;
+                       inner = CreateDiscoveryInnerChannel<TChannel> (factory);
+                       ((IChannel) inner).Open (timeout - (DateTime.Now - start));
+               }
+
+               public Message Request (Message msg)
+               {
+                       return Request (msg, DefaultSendTimeout + DefaultReceiveTimeout);
+               }
+
+               public Message Request (Message msg, TimeSpan timeout)
+               {
+                       return ((IRequestChannel) inner).Request (msg, timeout);
+               }
+
+               public IAsyncResult BeginRequest (Message msg, AsyncCallback callback, object state)
+               {
+                       return BeginRequest (msg, DefaultSendTimeout + DefaultReceiveTimeout, callback, state);
+               }
+
+               public IAsyncResult BeginRequest (Message msg, TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return ((IRequestChannel) inner).BeginRequest (msg, timeout, callback, state);
+               }
+
+               public Message EndRequest (IAsyncResult result)
+               {
+                       return ((IRequestChannel) inner).EndRequest (result);
+               }
+
+               public Message Receive ()
+               {
+                       return Receive (DefaultReceiveTimeout);
+               }
+
+               public Message Receive (TimeSpan timeout)
+               {
+                       return ((IInputChannel) inner).Receive (timeout);
+               }
+
+               public IAsyncResult BeginReceive (AsyncCallback callback, object state)
+               {
+                       return BeginReceive (DefaultReceiveTimeout, callback, state);
+               }
+
+               public IAsyncResult BeginReceive (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return ((IInputChannel) inner).BeginReceive (timeout, callback, state);
+               }
+
+               public Message EndReceive (IAsyncResult result)
+               {
+                       return ((IInputChannel) inner).EndReceive (result);
+               }
+
+               public bool TryReceive (out Message msg)
+               {
+                       return TryReceive (DefaultReceiveTimeout, out msg);
+               }
+
+               public bool TryReceive (TimeSpan timeout, out Message msg)
+               {
+                       return ((IInputChannel) inner).TryReceive (timeout, out msg);
+               }
+
+               public IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return ((IInputChannel) inner).BeginTryReceive (timeout, callback, state);
+               }
+
+               public bool EndTryReceive (IAsyncResult result, out Message msg)
+               {
+                       return ((IInputChannel) inner).EndTryReceive (result, out msg);
+               }
+
+               public bool WaitForMessage (TimeSpan timeout)
+               {
+                       return ((IInputChannel) inner).WaitForMessage (timeout);
+               }
+
+               public IAsyncResult BeginWaitForMessage (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return ((IInputChannel) inner).BeginWaitForMessage (timeout, callback, state);
+               }
+
+               public bool EndWaitForMessage (IAsyncResult result)
+               {
+                       return ((IInputChannel) inner).EndWaitForMessage (result);
+               }
+
+               public void Send (Message msg)
+               {
+                       Send (msg, DefaultSendTimeout);
+               }
+
+               public void Send (Message msg, TimeSpan timeout)
+               {
+                       ((IOutputChannel) inner).Send (msg, timeout);
+               }
+
+               public IAsyncResult BeginSend (Message msg, AsyncCallback callback, object state)
+               {
+                       return BeginSend (msg, DefaultSendTimeout, callback, state);
+               }
+
+               public IAsyncResult BeginSend (Message msg, TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return ((IOutputChannel) inner).BeginSend (msg, timeout, callback, state);
+               }
+               
+               public void EndSend (IAsyncResult result)
+               {
+                       ((IOutputChannel) inner).EndSend (result);
+               }
+       }
+//*/
+
+       internal class DiscoveryRequestChannel : RequestChannelBase
+       {
+               public DiscoveryRequestChannel (DiscoveryChannelFactory<IRequestChannel> factory, EndpointAddress address, Uri via)
+                       : base (factory, address, via)
+               {
+                       this.factory = factory;
+               }
+               
+               DiscoveryChannelFactory<IRequestChannel> factory;
+               IRequestChannel inner;
+               DiscoveryClient client;
+
+               protected override void OnOpen (TimeSpan timeout)
+               {
+                       inner = CreateDiscoveryInnerChannel<IRequestChannel> (factory);
+               }
+
+               protected override void OnClose (TimeSpan timeout)
+               {
+                       if (inner != null) {
+                               inner.Close (timeout);
+                               inner = null;
+                       }
+               }
+
+               protected override void OnAbort ()
+               {
+                       if (inner != null) {
+                               inner.Abort ();
+                               inner = null;
+                       }
+               }
+
+               public override Message Request (Message input, TimeSpan timeout)
+               {
+                       ThrowIfDisposedOrNotOpen ();
+                       return inner.Request (input, timeout);
+               }
+       }
+}
index 1bd1c9a63789468e107aab56245d16a5bd852d08..428de8cf55fa46c8c2351606a67a039b02f59d50 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -5,24 +29,34 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery.Version11;
+using System.ServiceModel.Discovery.VersionApril2005;
+using System.ServiceModel.Discovery.VersionCD1;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
-       public abstract class DiscoveryService
+       public abstract class DiscoveryService : IDiscoveryProxyContract11, IDiscoveryProxyContractApril2005, IDiscoveryProxyContractCD1, IDiscoveryTargetContract11, IDiscoveryTargetContractApril2005, IDiscoveryTargetContractCD1
        {
                protected DiscoveryService ()
+                       : this (new DiscoveryMessageSequenceGenerator ())
                {
                }
 
                protected DiscoveryService (DiscoveryMessageSequenceGenerator discoveryMessageSequenceGenerator)
+                       : this (discoveryMessageSequenceGenerator, 0)
                {
                }
 
                protected DiscoveryService (DiscoveryMessageSequenceGenerator discoveryMessageSequenceGenerator, int duplicateMessageHistoryLength)
                {
+                       DiscoveryMessageSequenceGenerator = discoveryMessageSequenceGenerator;
+                       DuplicateMessageHistoryLength = duplicateMessageHistoryLength;
                }
 
+               internal DiscoveryMessageSequenceGenerator DiscoveryMessageSequenceGenerator { get; private set; }
+
+               internal int DuplicateMessageHistoryLength { get; private set; }
+
                protected abstract IAsyncResult OnBeginFind (FindRequestContext findRequestContext, AsyncCallback callback, Object state);
 
                protected abstract IAsyncResult OnBeginResolve (ResolveCriteria resolveCriteria, AsyncCallback callback, Object state);
@@ -30,5 +64,380 @@ namespace System.ServiceModel.Discovery
                protected abstract void OnEndFind (IAsyncResult result);
 
                protected abstract EndpointDiscoveryMetadata OnEndResolve (IAsyncResult result);
+
+               #region service contract implementation
+               
+               // IDiscoveryProxyContract11
+               
+               FindRequestContext find_context;
+               
+               IAsyncResult IDiscoveryProxyContract11.BeginFind (MessageContracts11.FindRequest message, AsyncCallback callback, object state)
+               {
+                       if (find_context != null)
+                               throw new InvalidOperationException ("Another async Find operation is ongoing");
+                       find_context = new DefaultFindRequestContext (message.Body.ToFindCriteria ());
+                       return OnBeginFind (find_context, callback, state);
+               }
+
+               MessageContracts11.FindResponse IDiscoveryProxyContract11.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       return CreateFindResponse11 ();
+               }
+
+               MessageContracts11.FindResponse CreateFindResponse11 ()
+               {
+                       var l = new MessageContracts11.FindResponse11 ();
+                       foreach (var edm in find_context.Endpoints)
+                               l.Add (new EndpointDiscoveryMetadata11 (edm));
+                       find_context = null;
+                       return new MessageContracts11.FindResponse () { Body = l };
+               }
+
+               IAsyncResult IDiscoveryProxyContract11.BeginResolve (MessageContracts11.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               MessageContracts11.ResolveResponse IDiscoveryProxyContract11.EndResolve (IAsyncResult result)
+               {
+                       var ret = OnEndResolve (result);
+                       return new MessageContracts11.ResolveResponse () { MessageSequence = new DiscoveryMessageSequence11 (DiscoveryMessageSequenceGenerator.Next ()), Body = new EndpointDiscoveryMetadata11 (ret) };
+               }
+               
+               // IDiscoveryProxyContractApril2005
+               IAsyncResult IDiscoveryProxyContractApril2005.BeginFind (MessageContractsApril2005.FindRequest message, AsyncCallback callback, object state)
+               {
+                       if (find_context != null)
+                               throw new InvalidOperationException ("Another async Find operation is ongoing");
+                       find_context = new DefaultFindRequestContext (message.Body.ToFindCriteria ());
+                       return OnBeginFind (find_context, callback, state);
+               }
+
+               MessageContractsApril2005.FindResponse IDiscoveryProxyContractApril2005.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       return CreateFindResponseApril2005 ();
+               }
+
+               MessageContractsApril2005.FindResponse CreateFindResponseApril2005 ()
+               {
+                       var l = new MessageContractsApril2005.FindResponseApril2005 ();
+                       foreach (var edm in find_context.Endpoints)
+                               l.Add (new EndpointDiscoveryMetadataApril2005 (edm));
+                       find_context = null;
+                       return new MessageContractsApril2005.FindResponse () { Body = l };
+               }
+
+               IAsyncResult IDiscoveryProxyContractApril2005.BeginResolve (MessageContractsApril2005.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               MessageContractsApril2005.ResolveResponse IDiscoveryProxyContractApril2005.EndResolve (IAsyncResult result)
+               {
+                       var ret = OnEndResolve (result);
+                       return new MessageContractsApril2005.ResolveResponse () { MessageSequence = new DiscoveryMessageSequenceApril2005 (DiscoveryMessageSequenceGenerator.Next ()), Body = new EndpointDiscoveryMetadataApril2005 (ret) };
+               }
+               
+               // IDiscoveryProxyContractCD1
+               IAsyncResult IDiscoveryProxyContractCD1.BeginFind (MessageContractsCD1.FindRequest message, AsyncCallback callback, object state)
+               {
+                       if (find_context != null)
+                               throw new InvalidOperationException ("Another async Find operation is ongoing");
+                       find_context = new DefaultFindRequestContext (message.Body.ToFindCriteria ());
+                       return OnBeginFind (find_context, callback, state);
+               }
+
+               MessageContractsCD1.FindResponse IDiscoveryProxyContractCD1.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       return CreateFindResponseCD1 ();
+               }
+
+               MessageContractsCD1.FindResponse CreateFindResponseCD1 ()
+               {
+                       var l = new MessageContractsCD1.FindResponseCD1 ();
+                       foreach (var edm in find_context.Endpoints)
+                               l.Add (new EndpointDiscoveryMetadataCD1 (edm));
+                       find_context = null;
+                       return new MessageContractsCD1.FindResponse () { Body = l };
+               }
+
+               IAsyncResult IDiscoveryProxyContractCD1.BeginResolve (MessageContractsCD1.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               MessageContractsCD1.ResolveResponse IDiscoveryProxyContractCD1.EndResolve (IAsyncResult result)
+               {
+                       var ret = OnEndResolve (result);
+                       return new MessageContractsCD1.ResolveResponse () { MessageSequence = new DiscoveryMessageSequenceCD1 (DiscoveryMessageSequenceGenerator.Next ()), Body = new EndpointDiscoveryMetadataCD1 (ret) };
+               }
+
+               // IDiscoveryTargetContract11
+               IAsyncResult IDiscoveryTargetContract11.BeginFind (MessageContracts11.FindRequest message, AsyncCallback callback, object state)
+               {
+                       find_context = new DefaultFindRequestContext (message.Body.ToFindCriteria ());
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               void IDiscoveryTargetContract11.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       var cb = OperationContext.Current.GetCallbackChannel<IDiscoveryTargetCallbackContract11> ();
+                       cb.ReplyFind (CreateFindResponse11 ());
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginReplyFind (MessageContracts11.FindResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContract11.EndReplyFind (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginResolve (MessageContracts11.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               void IDiscoveryTargetContract11.EndResolve (IAsyncResult result)
+               {
+                       OnEndResolve (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginReplyResolve (MessageContracts11.ResolveResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContract11.EndReplyResolve (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContract11.BeginOnlineAnnouncement (MessageContracts11.OnlineAnnouncement message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContract11.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               // IDiscoveryTargetContractApril2005
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginFind (MessageContractsApril2005.FindRequest message, AsyncCallback callback, object state)
+               {
+                       find_context = new DefaultFindRequestContext (message.Body.ToFindCriteria ());
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               void IDiscoveryTargetContractApril2005.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       var cb = OperationContext.Current.GetCallbackChannel<IDiscoveryTargetCallbackContractApril2005> ();
+                       cb.ReplyFind (CreateFindResponseApril2005 ());
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginReplyFind (MessageContractsApril2005.FindResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractApril2005.EndReplyFind (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginResolve (MessageContractsApril2005.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               void IDiscoveryTargetContractApril2005.EndResolve (IAsyncResult result)
+               {
+                       OnEndResolve (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginReplyResolve (MessageContractsApril2005.ResolveResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractApril2005.EndReplyResolve (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractApril2005.BeginOnlineAnnouncement (MessageContractsApril2005.OnlineAnnouncement message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractApril2005.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               // IDiscoveryTargetContractCD1
+               IAsyncResult IDiscoveryTargetContractCD1.BeginFind (MessageContractsCD1.FindRequest message, AsyncCallback callback, object state)
+               {
+                       find_context = new DefaultFindRequestContext (message.Body.ToFindCriteria ());
+                       return OnBeginFind (new DefaultFindRequestContext (message.Body.ToFindCriteria ()), callback, state);
+               }
+
+               void IDiscoveryTargetContractCD1.EndFind (IAsyncResult result)
+               {
+                       OnEndFind (result);
+                       var cb = OperationContext.Current.GetCallbackChannel<IDiscoveryTargetCallbackContractCD1> ();
+                       cb.ReplyFind (CreateFindResponseCD1 ());
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginReplyFind (MessageContractsCD1.FindResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractCD1.EndReplyFind (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginResolve (MessageContractsCD1.ResolveRequest message, AsyncCallback callback, object state)
+               {
+                       return OnBeginResolve (message.Body.ToResolveCriteria (), callback, state);
+               }
+
+               void IDiscoveryTargetContractCD1.EndResolve (IAsyncResult result)
+               {
+                       OnEndResolve (result);
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginReplyResolve (MessageContractsCD1.ResolveResponse message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractCD1.EndReplyResolve (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               IAsyncResult IDiscoveryTargetContractCD1.BeginOnlineAnnouncement (MessageContractsCD1.OnlineAnnouncement message, AsyncCallback callback, object state)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               void IDiscoveryTargetContractCD1.EndOnlineAnnouncement (IAsyncResult result)
+               {
+                       // is it expected to be invoked??
+                       throw new NotImplementedException ();
+               }
+
+               #endregion
+       }
+
+       internal class DefaultDiscoveryService : DiscoveryService
+       {
+               Action<FindRequestContext> find_delegate;
+               Func<ResolveCriteria,EndpointDiscoveryMetadata> resolve_delegate;
+
+               protected override IAsyncResult OnBeginFind (FindRequestContext findRequestContext, AsyncCallback callback, object state)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               if (find_delegate == null)
+                                       find_delegate = new Action<FindRequestContext> (Find);
+                               return find_delegate.BeginInvoke (findRequestContext, callback, state);
+                       default:
+                               Find (findRequestContext);
+                               var result = new TempAsyncResult (null, state);
+                               if (callback != null)
+                                       callback (result);
+                               return result;
+                       }
+               }
+
+               protected override void OnEndFind (IAsyncResult result)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               find_delegate.EndInvoke (result);
+                               break;
+                       default:
+                               break;
+                       }
+
+                       var oc = OperationContext.Current;
+                       var rmp = oc.IncomingMessageProperties [RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
+                       if (rmp != null)
+                               // FIXME: use appropriate port. Client does not listen at the sending port.
+                               oc.OutgoingMessageProperties.Add (RemoteEndpointMessageProperty.Name, new RemoteEndpointMessageProperty (rmp.Address, rmp.Port));
+               }
+
+               protected override IAsyncResult OnBeginResolve (ResolveCriteria resolveCriteria, AsyncCallback callback, object state)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               if (resolve_delegate == null)
+                                       resolve_delegate = new Func<ResolveCriteria,EndpointDiscoveryMetadata> (Resolve);
+                               return resolve_delegate.BeginInvoke (resolveCriteria, callback, state);
+                       default:
+                               var ret = Resolve (resolveCriteria);
+                               var result = new TempAsyncResult (ret, state);
+                               if (callback != null)
+                                       callback (result);
+                               return result;
+                       }
+               }
+
+               protected override EndpointDiscoveryMetadata OnEndResolve (IAsyncResult result)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               return resolve_delegate.EndInvoke (result);
+                       default:
+                               return (EndpointDiscoveryMetadata) ((TempAsyncResult) result).ReturnValue;
+                       }
+               }
+
+               void Find (FindRequestContext context)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               EndpointDiscoveryMetadata Resolve (ResolveCriteria criteria)
+               {
+                       throw new NotImplementedException ();
+               }
        }
 }
index a55f1450c13b5daaf6ae4002dabd81414d961839..e84364aa29c6132145a7a94eed0037775ecb3e32 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -8,17 +32,42 @@ using System.ServiceModel.Dispatcher;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
+       // This class is for custom implementation.
+       // It is used by ServiceDiscoveryBehavior to find an extension of this
+       // type, to call GetDiscoveryService().
+       // See http://msdn.microsoft.com/en-us/library/system.servicemodel.discovery.discoveryserviceextension.aspx
        public abstract class DiscoveryServiceExtension : IExtension<ServiceHostBase>
        {
+               protected DiscoveryServiceExtension ()
+               {
+                       PublishedInternalEndpoints = new Collection<EndpointDiscoveryMetadata> ();
+                       PublishedEndpoints = new ReadOnlyCollection<EndpointDiscoveryMetadata> (PublishedInternalEndpoints);
+               }
+
+               internal Collection<EndpointDiscoveryMetadata> PublishedInternalEndpoints { get; private set; }
+               
+               internal DiscoveryService Service { get; private set; }
+
+               public ReadOnlyCollection<EndpointDiscoveryMetadata> PublishedEndpoints { get; private set; }
+
                protected abstract DiscoveryService GetDiscoveryService ();
 
                void IExtension<ServiceHostBase>.Attach (ServiceHostBase owner)
                {
+                       // FIXME: use it somewhere
+                       Service = GetDiscoveryService ();
                }
 
                void IExtension<ServiceHostBase>.Detach (ServiceHostBase owner)
                {
                }
+
+               internal class DefaultDiscoveryServiceExtension : DiscoveryServiceExtension
+               {
+                       protected override DiscoveryService GetDiscoveryService ()
+                       {
+                               return new DefaultDiscoveryService ();
+                       }
+               }
        }
 }
index ac106cc2ab31517b12663c68af6f03ffac4749af..49edfb4489c800c52790f0aa7f36c17925660350 100755 (executable)
@@ -29,16 +29,52 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.ServiceModel.Discovery.Version11;
+using System.ServiceModel.Discovery.VersionApril2005;
+using System.ServiceModel.Discovery.VersionCD1;
 
 namespace System.ServiceModel.Discovery
 {
        public sealed class DiscoveryVersion
        {
+               internal const string Namespace11 = "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01";
+               internal const string NamespaceApril2005 = "http://schemas.xmlsoap.org/ws/2005/04/discovery";
+               internal const string NamespaceCD1 = "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09";
+
                static DiscoveryVersion ()
                {
-                       v11 = new DiscoveryVersion ("WSDiscovery11");
-                       april2005 = new DiscoveryVersion ("WSDiscoveryApril2005");
-                       cd1 = new DiscoveryVersion ("WSDiscoveryCD1");
+                       v11 = new DiscoveryVersion ("WSDiscovery11",
+                               Namespace11,
+                               "urn:docs-oasis-open-org:ws-dd:ns:discovery:2009:01",
+                               MessageVersion.Soap12WSAddressing10,
+                               typeof (Version11.IAnnouncementContract11),
+                               typeof (AnnouncementClient11),
+                               typeof (IDiscoveryProxyContract11),
+                               typeof (DiscoveryProxyClient11),
+                               typeof (IDiscoveryTargetContract11),
+                               typeof (DiscoveryTargetClient11));
+
+                       april2005 = new DiscoveryVersion ("WSDiscoveryApril2005",
+                               NamespaceApril2005,
+                               "urn:schemas-xmlsoap-org:ws:2005:04:discovery",
+                               MessageVersion.Soap12WSAddressingAugust2004,
+                               typeof (IAnnouncementContractApril2005),
+                               typeof (AnnouncementClientApril2005),
+                               typeof (IDiscoveryProxyContractApril2005),
+                               typeof (DiscoveryProxyClientApril2005),
+                               typeof (IDiscoveryTargetContractApril2005),
+                               typeof (DiscoveryTargetClientApril2005));
+
+                       cd1 = new DiscoveryVersion ("WSDiscoveryCD1",
+                               NamespaceCD1,
+                               "urn:docs-oasis-open-org:ws-dd:discovery:2008:09",
+                               MessageVersion.Soap12WSAddressingAugust2004,
+                               typeof (IAnnouncementContractCD1),
+                               typeof (AnnouncementClientCD1),
+                               typeof (IDiscoveryProxyContractCD1),
+                               typeof (DiscoveryProxyClientCD1),
+                               typeof (IDiscoveryTargetContractCD1),
+                               typeof (DiscoveryTargetClientCD1));
                }
 
                static readonly DiscoveryVersion v11, april2005, cd1;
@@ -67,19 +103,35 @@ namespace System.ServiceModel.Discovery
                        case "WSDiscoveryCD1":
                                return cd1;
                        default:
-                               throw new ArgumentNullException (String.Format ("Invalid version name: {0}", name));
+                               throw new ArgumentOutOfRangeException (String.Format ("Invalid version name: {0}", name));
                        }
                }
 
-               internal DiscoveryVersion (string name)
+               internal DiscoveryVersion (string name, string ns, string adhoc, MessageVersion version, Type announcementContractType, Type announcementClientType, Type discoveryProxyContractType, Type discoveryProxyClientType, Type discoveryTargetContractType, Type discoveryTargetClientType)
                {
                        this.Name = name;
+                       this.Namespace = ns;
+                       AdhocAddress = new Uri (adhoc);
+                       MessageVersion = version;
+                       AnnouncementContractType = announcementContractType;
+                       AnnouncementClientType = announcementClientType;
+                       DiscoveryProxyContractType = discoveryProxyContractType;
+                       DiscoveryProxyClientType = discoveryProxyClientType;
+                       DiscoveryTargetContractType = discoveryTargetContractType;
+                       DiscoveryTargetClientType = discoveryTargetClientType;
                }
 
                public Uri AdhocAddress { get; private set; }
                public MessageVersion MessageVersion { get; private set; }
                public string Name { get; private set; }
                public string Namespace { get; private set; }
+               
+               internal Type AnnouncementContractType { get; private set; }
+               internal Type AnnouncementClientType { get; private set; }
+               internal Type DiscoveryProxyContractType { get; private set; }
+               internal Type DiscoveryProxyClientType { get; private set; }
+               internal Type DiscoveryTargetContractType { get; private set; }
+               internal Type DiscoveryTargetClientType { get; private set; }
 
                public override string ToString ()
                {
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryViaUriBehavior.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery/DiscoveryViaUriBehavior.cs
new file mode 100644 (file)
index 0000000..1f2a7b6
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Dispatcher;
+
+namespace System.ServiceModel.Discovery
+{
+       internal class DiscoveryViaUriBehavior : IEndpointBehavior
+       {
+               public DiscoveryViaUriBehavior (Uri via)
+               {
+                       Via = via;
+               }
+               
+               Uri Via { get; set; }
+               
+               public void AddBindingParameters (ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
+               {
+               }
+               
+               public void ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime clientRuntime)
+               {
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+                       if (clientRuntime == null)
+                               throw new ArgumentNullException ("clientRuntime");
+
+                       clientRuntime.Via = Via;
+               }
+
+               public void ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
+               {
+               }
+               
+               public void Validate (ServiceEndpoint endpoint)
+               {
+               }
+       }
+}
index 80f1d81edd7f8cedc8a27991b8d3bbb7304d047b..2bab549b74ea9acbbaf28c860ae3788577b5a458 100755 (executable)
@@ -8,12 +8,24 @@ using System.ServiceModel.Dispatcher;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public class DynamicEndpoint : ServiceEndpoint
        {
                public DynamicEndpoint (ContractDescription contract, Binding binding)
-                       : base (contract, binding, null)
+                       : base (contract, CreateBinding (binding), new EndpointAddress ("http://schemas.microsoft.com/discovery/dynamic"))
                {
+                       if (binding == null)
+                               throw new ArgumentNullException ("binding");
+                       DiscoveryEndpointProvider = DiscoveryEndpointProvider.CreateDefault ();
+                       FindCriteria = new FindCriteria (contract.ContractType);
+                       
+                       IsSystemEndpoint = true;
+               }
+
+               static CustomBinding CreateBinding (Binding source)
+               {
+                       var bec = source.CreateBindingElements ();
+                       bec.Insert (0, new DiscoveryClientBindingElement ());
+                       return new CustomBinding (bec);
                }
 
                public DiscoveryEndpointProvider DiscoveryEndpointProvider { get; set; }
index 334c944de4ac63dcfefd596d39ac1c557dc791d3..91069d21fd447a3eb54caae0d12657b94389f878 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -5,12 +29,29 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Linq;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public class EndpointDiscoveryBehavior : IEndpointBehavior
        {
+               public EndpointDiscoveryBehavior ()
+               {
+                       Enabled = true;
+                       ContractTypeNames = new Collection<XmlQualifiedName> ();
+                       Extensions = new Collection<XElement> ();
+                       Scopes = new Collection<Uri> ();
+               }
+
+               public Collection<XmlQualifiedName> ContractTypeNames { get; private set; }
+
+               public bool Enabled { get; set; }
+
+               public Collection<XElement> Extensions { get; private set; }
+
+               public Collection<Uri> Scopes { get; private set; }
+
                void IEndpointBehavior.AddBindingParameters (ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
                {
                }
index a905159c140e27f0a73d3758a6e54dccb9f55749..73faec9a8d4d708266e8f3807d0b1bb5737bac58 100755 (executable)
@@ -6,22 +6,45 @@ using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using System.Xml;
+using System.Xml.Schema;
 using System.Xml.Linq;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public class EndpointDiscoveryMetadata
        {
                public static EndpointDiscoveryMetadata FromServiceEndpoint (ServiceEndpoint endpoint)
                {
-                       throw new NotImplementedException ();
+                       var ret = new EndpointDiscoveryMetadata ();
+                       ret.ContractTypeNames.Add (new XmlQualifiedName (endpoint.Contract.Name, endpoint.Contract.Namespace));
+                       ret.Address = endpoint.Address;
+                       if (endpoint.Address != null)
+                               ret.ListenUris.Add (endpoint.Address.Uri);
+
+                       var edb = endpoint.Behaviors.Find<EndpointDiscoveryBehavior> ();
+                       if (edb != null) {
+                               foreach (var ctn in edb.ContractTypeNames)
+                                       ret.ContractTypeNames.Add (ctn);
+                               foreach (var ext in edb.Extensions)
+                                       ret.Extensions.Add (ext);
+                       }
+
+                       return ret;
                }
 
                public static EndpointDiscoveryMetadata FromServiceEndpoint (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
                {
                        throw new NotImplementedException ();
                }
+               
+               public EndpointDiscoveryMetadata ()
+               {
+                       Address = new EndpointAddress (EndpointAddress.AnonymousUri);
+                       ContractTypeNames = new Collection<XmlQualifiedName> ();
+                       ListenUris = new Collection<Uri> ();
+                       Scopes = new Collection<Uri> ();
+                       Extensions = new Collection<XElement> ();
+               }
 
                public EndpointAddress Address { get; set; }
                public Collection<XmlQualifiedName> ContractTypeNames { get; private set; }
@@ -29,5 +52,116 @@ namespace System.ServiceModel.Discovery
                public Collection<Uri> ListenUris { get; private set; }
                public Collection<Uri> Scopes { get; private set; }
                public int Version { get; set; }
+
+               const string addrNS = "http://www.w3.org/2005/08/addressing";
+
+               internal static EndpointDiscoveryMetadata ReadXml (XmlReader reader, DiscoveryVersion version)
+               {
+                       if (reader == null)
+                               throw new ArgumentNullException ("reader");
+
+                       var ret = new EndpointDiscoveryMetadata ();
+
+                       reader.MoveToContent ();
+
+                       reader.ReadStartElement ();
+                       reader.MoveToContent ();
+
+                       // standard members
+                       reader.MoveToContent ();
+                       ret.Address = EndpointAddress.ReadFrom (AddressingVersion.WSAddressing10, reader, "EndpointReference", addrNS);
+
+                       reader.MoveToContent ();
+                       if (reader.IsStartElement ("Types", version.Namespace))
+                               ret.ContractTypeNames = new Collection<XmlQualifiedName> ((XmlQualifiedName []) reader.ReadElementContentAs (typeof (XmlQualifiedName []), null, "Types", version.Namespace));
+
+                       reader.MoveToContent ();
+                       if (reader.IsStartElement ("Scopes", version.Namespace))
+                               ret.Scopes = new Collection<Uri> ((Uri []) reader.ReadElementContentAs (typeof (Uri []), null, "Scopes", version.Namespace));
+
+                       if (reader.IsStartElement ("XAddrs", version.Namespace))
+                               ret.ListenUris = new Collection<Uri> ((Uri []) reader.ReadElementContentAs (typeof (Uri []), null, "XAddrs", version.Namespace));
+
+                       if (reader.IsStartElement ("MetadataVersion", version.Namespace))
+                               ret.Version = reader.ReadElementContentAsInt ();
+
+                       // non-standard members
+                       for (reader.MoveToContent (); !reader.EOF && reader.NodeType != XmlNodeType.EndElement; reader.MoveToContent ())
+                               ret.Extensions.Add (XElement.Load (reader));
+
+                       reader.ReadEndElement ();
+
+                       return ret;
+               }
+
+               internal void WriteXml (XmlWriter writer, DiscoveryVersion version)
+               {
+                       if (writer == null)
+                               throw new ArgumentNullException ("writer");
+
+                       // standard members
+                       if (Address != null)
+                               Address.WriteTo (AddressingVersion.WSAddressing10, writer);
+
+                       writer.WriteStartElement ("d", "Types", version.Namespace);
+                       int p = 0;
+                       foreach (var qname in ContractTypeNames)
+                               if (writer.LookupPrefix (qname.Namespace) == null)
+                                       writer.WriteAttributeString ("xmlns", "p" + p++, "http://www.w3.org/2000/xmlns/", qname.Namespace);
+                       writer.WriteValue (ContractTypeNames);
+                       writer.WriteEndElement ();
+
+                       if (Scopes.Count > 0) {
+                               writer.WriteStartElement ("Scopes", version.Namespace);
+                               writer.WriteValue (Scopes);
+                               writer.WriteEndElement ();
+                       }
+
+                       if (ListenUris.Count > 0) {
+                               writer.WriteStartElement ("XAddrs", version.Namespace);
+                               writer.WriteValue (ListenUris);
+                               writer.WriteEndElement ();
+                       }
+                       
+                       writer.WriteStartElement ("MetadataVersion", version.Namespace);
+                       writer.WriteValue (Version);
+                       writer.WriteEndElement ();
+
+                       // non-standard members
+
+                       foreach (var ext in Extensions)
+                               ext.WriteTo (writer);
+               }
+
+               internal static XmlSchema BuildSchema (DiscoveryVersion version)
+               {
+                       var schema = new XmlSchema () { TargetNamespace = version.Namespace };
+
+                       var anyAttr = new XmlSchemaAnyAttribute () { Namespace = "##other", ProcessContents = XmlSchemaContentProcessing.Lax };
+
+                       var probePart = new XmlSchemaSequence ();
+                       probePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("Types", version.Namespace), MinOccurs = 0 });
+                       probePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("Scopes", version.Namespace), MinOccurs = 0 });
+                       probePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("XAddrs", version.Namespace), MinOccurs = 0 });
+                       probePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("MetadataVersion", version.Namespace), MinOccurs = 0 });
+                       probePart.Items.Add (new XmlSchemaAny () { MinOccurs = 0, MaxOccursString = "unbounded", Namespace = "##other", ProcessContents = XmlSchemaContentProcessing.Lax });
+                       var ct = new XmlSchemaComplexType () { Name = "ProbeMatchType", Particle = probePart, AnyAttribute = anyAttr };
+                       schema.Items.Add (ct);
+
+                       schema.Items.Add (new XmlSchemaSimpleType () { Name = "QNameListType", Content = new XmlSchemaSimpleTypeList () { ItemTypeName = new XmlQualifiedName ("QName", XmlSchema.Namespace) } });
+
+                       var scr = new XmlSchemaSimpleContentRestriction () { BaseTypeName = new XmlQualifiedName ("UriListType", version.Namespace), AnyAttribute = anyAttr };
+                       scr.Attributes.Add (new XmlSchemaAttribute () { Name = "matchBy", SchemaTypeName = new XmlQualifiedName ("anyURI", XmlSchema.Namespace) });
+                       schema.Items.Add (new XmlSchemaComplexType () { Name = "ScopesType", ContentModel = new XmlSchemaSimpleContent () { Content = scr } });
+
+                       schema.Items.Add (new XmlSchemaSimpleType () { Name = "UriListType", Content = new XmlSchemaSimpleTypeList () { ItemTypeName = new XmlQualifiedName ("anyURI", XmlSchema.Namespace) } });
+
+                       schema.Items.Add (new XmlSchemaElement () { Name = "Types", SchemaTypeName = new XmlQualifiedName ("QNameListType", version.Namespace) });
+                       schema.Items.Add (new XmlSchemaElement () { Name = "Scopes", SchemaTypeName = new XmlQualifiedName ("ScopesType", version.Namespace) });
+                       schema.Items.Add (new XmlSchemaElement () { Name = "XAddrs", SchemaTypeName = new XmlQualifiedName ("UriListType", version.Namespace) });
+                       schema.Items.Add (new XmlSchemaElement () { Name = "MetadataVersion", SchemaTypeName = new XmlQualifiedName ("unisgnedInt", XmlSchema.Namespace) });
+
+                       return schema;
+               }
        }
 }
index 12c79fd2158cd1681f17f8ce49c9555e5debea9c..c8104b1efd5260d78c6cc5b9a1390b7d81cdadb0 100755 (executable)
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Linq;
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using System.Xml;
+using System.Xml.Schema;
 using System.Xml.Linq;
 
 namespace System.ServiceModel.Discovery
 {
        public class FindCriteria
        {
-               public static readonly Uri ScopeMatchByExact = new Uri ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/strcmp0");
-               public static readonly Uri ScopeMatchByLdap = new Uri ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/ldap");
-               public static readonly Uri ScopeMatchByNone = new Uri ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/none");
-               public static readonly Uri ScopeMatchByPrefix = new Uri ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/rfc3986");
-               public static readonly Uri ScopeMatchByUuid = new Uri ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/uuid");
+               const string SerializationNS = "http://schemas.microsoft.com/ws/2008/06/discovery";
+               const int default_max_results = int.MaxValue;
+
+               public static readonly Uri ScopeMatchByExact = new Uri ("http://schemas.microsoft.com/ws/2008/06/discovery/strcmp0");
+               public static readonly Uri ScopeMatchByLdap = new Uri ("http://schemas.microsoft.com/ws/2008/06/discovery/ldap");
+               public static readonly Uri ScopeMatchByNone = new Uri ("http://schemas.microsoft.com/ws/2008/06/discovery/none");
+               public static readonly Uri ScopeMatchByPrefix = new Uri ("http://schemas.microsoft.com/ws/2008/06/discovery/rfc3986");
+               public static readonly Uri ScopeMatchByUuid = new Uri ("http://schemas.microsoft.com/ws/2008/06/discovery/uuid");
 
                public static FindCriteria CreateMetadataExchangeEndpointCriteria ()
                {
@@ -65,27 +70,177 @@ namespace System.ServiceModel.Discovery
                        ContractTypeNames = new Collection<XmlQualifiedName> ();
                        Extensions = new Collection<XElement> ();
                        Scopes = new Collection<Uri> ();
+                       ScopeMatchBy = ScopeMatchByPrefix;
+                       MaxResults = default_max_results;
+                       Duration = TimeSpan.FromSeconds (20);
                }
 
-               [MonoTODO]
                public FindCriteria (Type contractType)
                        : this ()
                {
-                       throw new NotImplementedException ();
+                       var cd = ContractDescription.GetContract (contractType);
+                       ContractTypeNames.Add (new XmlQualifiedName (cd.Name, cd.Namespace));
                }
 
                public Collection<XmlQualifiedName> ContractTypeNames { get; private set; }
                public TimeSpan Duration { get; set; }
                public Collection<XElement> Extensions { get; private set; }
-               [MonoTODO]
                public int MaxResults { get; set; }
                public Uri ScopeMatchBy { get; set; }
                public Collection<Uri> Scopes { get; private set; }
 
-               [MonoTODO]
+               [MonoTODO ("find out conformant behavior, and implement remaining bits")]
                public bool IsMatch (EndpointDiscoveryMetadata endpointDiscoveryMetadata)
                {
-                       throw new NotImplementedException ();
+                       var edm = endpointDiscoveryMetadata;
+                       if (edm == null)
+                               throw new ArgumentNullException ("endpointDiscoveryMetadata");
+                       if (ContractTypeNames.Count > 0) {
+                               bool match = false;
+                               foreach (var qn in ContractTypeNames)
+                                       if (edm.ContractTypeNames.Contains (qn))
+                                               match = true;
+                               if (!match)
+                                       return false;
+                       }
+                       if (Scopes.Count > 0) {
+                               bool match = false;
+                               foreach (var scope in Scopes) {
+                                       if (ScopeMatchBy == null || ScopeMatchBy.Equals (ScopeMatchByPrefix)) {
+                                               if (edm.Scopes.Contains (scope))
+                                                       match = true;
+                                       } else if (ScopeMatchBy.Equals (ScopeMatchByExact)) {
+                                               if (edm.Scopes.Any (s => s.AbsoluteUri == scope.AbsoluteUri))
+                                                       match = true;
+                                       }
+                                       else if (ScopeMatchBy.Equals (ScopeMatchByUuid))
+                                               throw new NotImplementedException ();
+                                       else if (ScopeMatchBy.Equals (ScopeMatchByNone))
+                                               throw new NotImplementedException ();
+                                       else if (ScopeMatchBy.Equals (ScopeMatchByLdap))
+                                               throw new NotImplementedException ();
+                                       else
+                                               throw new InvalidOperationException (String.Format ("Unexpected ScopeMatchBy value: {0}", ScopeMatchBy));
+                               }
+                               if (!match)
+                                       return false;
+                       }
+                       if (Extensions.Count > 0)
+                               throw new NotImplementedException (String.Format ("{0} extensions are found", Extensions.Count));
+
+                       return true;
+               }
+
+               internal static FindCriteria ReadXml (XmlReader reader, DiscoveryVersion version)
+               {
+                       if (reader == null)
+                               throw new ArgumentNullException ("reader");
+
+                       var ret = new FindCriteria ();
+
+                       reader.MoveToContent ();
+                       if (!reader.IsStartElement ("Probe", version.Namespace) || reader.IsEmptyElement)
+                               throw new XmlException (String.Format ("Non-empty ProbeType element is expected. Got '{0}' {1} node in namespace '{2}' instead.", reader.LocalName, reader.NodeType, reader.NamespaceURI));
+                       reader.ReadStartElement ("Probe", version.Namespace);
+
+                       // standard members
+                       reader.MoveToContent ();
+                       if (reader.IsStartElement ("Types", version.Namespace))
+                               ret.ContractTypeNames = new Collection<XmlQualifiedName> ((XmlQualifiedName []) reader.ReadElementContentAs (typeof (XmlQualifiedName []), null, "Types", version.Namespace));
+
+                       reader.MoveToContent ();
+                       if (reader.IsStartElement ("Types", version.Namespace)) {
+                               if (reader.MoveToAttribute ("MatchBy")) {
+                                       ret.ScopeMatchBy = new Uri (reader.Value, UriKind.RelativeOrAbsolute);
+                                       reader.MoveToElement ();
+                               }
+                       }
+                       if (reader.IsStartElement ("Scopes", version.Namespace))
+                               ret.Scopes = new Collection<Uri> ((Uri []) reader.ReadElementContentAs (typeof (Uri []), null, "Scopes", version.Namespace));
+
+                       // non-standard members
+                       for (reader.MoveToContent (); !reader.EOF && reader.NodeType != XmlNodeType.EndElement; reader.MoveToContent ()) {
+                               if (reader.NamespaceURI == SerializationNS) {
+                                       switch (reader.LocalName) {
+                                       case "MaxResults":
+                                               ret.MaxResults = reader.ReadElementContentAsInt ();
+                                               break;
+                                       case "Duration":
+                                               ret.Duration = (TimeSpan) reader.ReadElementContentAs (typeof (TimeSpan), null);
+                                               break;
+                                       }
+                               }
+                               else
+                                       ret.Extensions.Add (XElement.Load (reader));
+                       }
+
+                       reader.ReadEndElement ();
+
+                       return ret;
+               }
+
+               internal void WriteXml (XmlWriter writer, DiscoveryVersion version)
+               {
+                       if (writer == null)
+                               throw new ArgumentNullException ("writer");
+
+                       // standard members
+                       writer.WriteStartElement ("d", "Types", version.Namespace);
+                       int p = 0;
+                       foreach (var qname in ContractTypeNames)
+                               if (writer.LookupPrefix (qname.Namespace) == null)
+                                       writer.WriteAttributeString ("xmlns", "p" + p++, "http://www.w3.org/2000/xmlns/", qname.Namespace);
+                       writer.WriteValue (ContractTypeNames);
+                       writer.WriteEndElement ();
+
+                       writer.WriteStartElement ("Scopes", version.Namespace);
+                       if (ScopeMatchBy != null) {
+                               writer.WriteStartAttribute ("MatchBy");
+                               writer.WriteValue (ScopeMatchBy);
+                               writer.WriteEndAttribute ();
+                       }
+                       writer.WriteValue (Scopes);
+                       writer.WriteEndElement ();
+
+                       // non-standard members
+                       if (MaxResults != default_max_results) {
+                               writer.WriteStartElement ("MaxResults", SerializationNS);
+                               writer.WriteValue (MaxResults);
+                               writer.WriteEndElement ();
+                       }
+                       writer.WriteStartElement ("Duration", SerializationNS);
+                       writer.WriteValue (Duration);
+                       writer.WriteEndElement ();
+                       
+                       foreach (var ext in Extensions)
+                               ext.WriteTo (writer);
+               }
+
+               internal static XmlSchema BuildSchema (DiscoveryVersion version)
+               {
+                       var schema = new XmlSchema () { TargetNamespace = version.Namespace };
+
+                       var anyAttr = new XmlSchemaAnyAttribute () { Namespace = "##other", ProcessContents = XmlSchemaContentProcessing.Lax };
+
+                       var probePart = new XmlSchemaSequence ();
+                       probePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("Types", version.Namespace), MinOccurs = 0 });
+                       probePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("Scopes", version.Namespace), MinOccurs = 0 });
+                       probePart.Items.Add (new XmlSchemaAny () { MinOccurs = 0, MaxOccursString = "unbounded", Namespace = "##other", ProcessContents = XmlSchemaContentProcessing.Lax });
+                       var ct = new XmlSchemaComplexType () { Name = "ProbeType", Particle = probePart, AnyAttribute = anyAttr };
+                       schema.Items.Add (ct);
+
+                       schema.Items.Add (new XmlSchemaSimpleType () { Name = "QNameListType", Content = new XmlSchemaSimpleTypeList () { ItemTypeName = new XmlQualifiedName ("QName", XmlSchema.Namespace) } });
+
+                       var scr = new XmlSchemaSimpleContentRestriction () { BaseTypeName = new XmlQualifiedName ("UriListType", version.Namespace), AnyAttribute = anyAttr };
+                       scr.Attributes.Add (new XmlSchemaAttribute () { Name = "matchBy", SchemaTypeName = new XmlQualifiedName ("anyURI", XmlSchema.Namespace) });
+                       schema.Items.Add (new XmlSchemaComplexType () { Name = "ScopesType", ContentModel = new XmlSchemaSimpleContent () { Content = scr } });
+
+                       schema.Items.Add (new XmlSchemaSimpleType () { Name = "UriListType", Content = new XmlSchemaSimpleTypeList () { ItemTypeName = new XmlQualifiedName ("anyURI", XmlSchema.Namespace) } });
+
+                       schema.Items.Add (new XmlSchemaElement () { Name = "Types", SchemaTypeName = new XmlQualifiedName ("QNameListType", version.Namespace) });
+                       schema.Items.Add (new XmlSchemaElement () { Name = "Scopes", SchemaTypeName = new XmlQualifiedName ("ScopesType", version.Namespace) });
+
+                       return schema;
                }
        }
 }
index 06ab140d2d0c2dd5d14c92fcc8fa06c9807db2ea..93da8e396b190a5e3f158a1eaeea57ee1b791dbc 100755 (executable)
@@ -39,20 +39,34 @@ namespace System.ServiceModel.Discovery
                        if (criteria == null)
                                throw new ArgumentNullException ("criteria");
                        Criteria = criteria;
+                       Endpoints = new Collection<EndpointDiscoveryMetadata> ();
                }
 
                public FindCriteria Criteria { get; private set; }
 
-               [MonoTODO]
+               internal Collection<EndpointDiscoveryMetadata> Endpoints { get; private set; }
+
                public void AddMatchingEndpoint (EndpointDiscoveryMetadata matchingEndpoint)
                {
+                       if (matchingEndpoint == null)
+                               throw new ArgumentNullException ("matchingEndpoint");
                        OnAddMatchingEndpoint (matchingEndpoint);
                }
 
-               [MonoTODO]
                protected virtual void OnAddMatchingEndpoint (EndpointDiscoveryMetadata matchingEndpoint)
                {
-                       throw new NotImplementedException ();
+                       if (matchingEndpoint == null)
+                               throw new ArgumentNullException ("matchingEndpoint");
+                       Endpoints.Add (matchingEndpoint);
+               }
+       }
+       
+       // Not sure why it must be derived yet.
+       internal class DefaultFindRequestContext : FindRequestContext
+       {
+               public DefaultFindRequestContext (FindCriteria criteria)
+                       : base (criteria)
+               {
                }
        }
 }
index 11731efb31cdbb24aaeb31bc2c305aa641c927c8..c47fa5eef815d3cc5409b1ffe85b4626f24086c1 100755 (executable)
@@ -1,7 +1,7 @@
 //
 // Author: Atsushi Enomoto <atsushi@ximian.com>
 //
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -29,15 +29,22 @@ using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.Xml;
+using System.Xml.Schema;
 using System.Xml.Linq;
 
 namespace System.ServiceModel.Discovery
 {
        public class ResolveCriteria
        {
+               const string SerializationNS = "http://schemas.microsoft.com/ws/2008/06/discovery";
+               static readonly EndpointAddress anonymous_address = new EndpointAddress (EndpointAddress.AnonymousUri);
+
                public ResolveCriteria ()
                {
                        Extensions = new Collection<XElement> ();
+                       Duration = TimeSpan.FromSeconds (20);
+                       Address = anonymous_address;
                }
 
                public ResolveCriteria (EndpointAddress address)
@@ -47,8 +54,76 @@ namespace System.ServiceModel.Discovery
                }
 
                public EndpointAddress Address { get; set; }
-               [MonoTODO]
                public TimeSpan Duration { get; set; }
                public Collection<XElement> Extensions { get; private set; }
+
+               internal static ResolveCriteria ReadXml (XmlReader reader, DiscoveryVersion version)
+               {
+                       if (reader == null)
+                               throw new ArgumentNullException ("reader");
+
+                       var ret = new ResolveCriteria ();
+
+                       reader.MoveToContent ();
+                       if (!reader.IsStartElement ("ResolveType", version.Namespace) || reader.IsEmptyElement)
+                               throw new XmlException ("Non-empty ResolveType element is expected");
+                       reader.ReadStartElement ("ResolveType", version.Namespace);
+
+                       // standard members
+                       reader.MoveToContent ();
+                       ret.Address = EndpointAddress.ReadFrom (AddressingVersion.WSAddressing10, reader);
+
+                       // non-standard members
+                       for (reader.MoveToContent (); !reader.EOF && reader.NodeType != XmlNodeType.EndElement; reader.MoveToContent ()) {
+                               if (reader.NamespaceURI == SerializationNS) {
+                                       switch (reader.LocalName) {
+                                       case "Duration":
+                                               ret.Duration = (TimeSpan) reader.ReadElementContentAs (typeof (TimeSpan), null);
+                                               break;
+                                       }
+                               }
+                               else
+                                       ret.Extensions.Add (XElement.Load (reader));
+                       }
+
+                       reader.ReadEndElement ();
+
+                       return ret;
+               }
+
+               internal void WriteXml (XmlWriter writer, DiscoveryVersion version)
+               {
+                       if (writer == null)
+                               throw new ArgumentNullException ("writer");
+
+                       // standard members
+                       Address.WriteTo (AddressingVersion.WSAddressing10, writer);
+
+                       // non-standard members
+                       writer.WriteStartElement ("Duration", SerializationNS);
+                       writer.WriteValue (Duration);
+                       writer.WriteEndElement ();
+                       
+                       foreach (var ext in Extensions)
+                               ext.WriteTo (writer);
+               }
+
+               internal static XmlSchema BuildSchema (DiscoveryVersion version)
+               {
+                       var schema = new XmlSchema () { TargetNamespace = version.Namespace };
+                       string addrNS = "http://www.w3.org/2005/08/addressing";
+
+                       var anyAttr = new XmlSchemaAnyAttribute () { Namespace = "##other", ProcessContents = XmlSchemaContentProcessing.Lax };
+
+                       var resolvePart = new XmlSchemaSequence ();
+                       resolvePart.Items.Add (new XmlSchemaElement () { RefName = new XmlQualifiedName ("EndpointReference", addrNS), MinOccurs = 0 });
+                       resolvePart.Items.Add (new XmlSchemaAny () { MinOccurs = 0, MaxOccursString = "unbounded", Namespace = "##other", ProcessContents = XmlSchemaContentProcessing.Lax });
+                       var ct = new XmlSchemaComplexType () { Name = "ResolveType", Particle = resolvePart, AnyAttribute = anyAttr };
+
+                       schema.Includes.Add (new XmlSchemaImport () { Namespace = addrNS });
+                       schema.Items.Add (ct);
+
+                       return schema;
+               }
        }
 }
index 22599e377218444acc837cf0c422026c695b8f40..f9c4b2ebe42050dac05deb4e023a0397906e8a1c 100755 (executable)
@@ -1,3 +1,27 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2009,2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -8,19 +32,57 @@ using System.ServiceModel.Dispatcher;
 
 namespace System.ServiceModel.Discovery
 {
-       [MonoTODO]
        public class ServiceDiscoveryBehavior : IServiceBehavior
        {
+               public ServiceDiscoveryBehavior ()
+               {
+                       AnnouncementEndpoints = new Collection<AnnouncementEndpoint> ();
+               }
+               
+               public Collection<AnnouncementEndpoint> AnnouncementEndpoints { get; private set; }
+
                void IServiceBehavior.AddBindingParameters (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collection<ServiceEndpoint> endpoints, BindingParameterCollection bindingParameters)
                {
+                       if (serviceDescription == null)
+                               throw new ArgumentNullException ("serviceDescription");
+                       if (serviceHostBase == null)
+                               throw new ArgumentNullException ("serviceHostBase");
+                       if (endpoints == null)
+                               throw new ArgumentNullException ("endpoints");
+                       if (bindingParameters == null)
+                               throw new ArgumentNullException ("bindingParameters");
+
+                       // do nothing
                }
 
                void IServiceBehavior.ApplyDispatchBehavior (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
                {
+                       if (serviceDescription == null)
+                               throw new ArgumentNullException ("serviceDescription");
+                       if (serviceHostBase == null)
+                               throw new ArgumentNullException ("serviceHostBase");
+
+                       // FIXME: add ChannelDispatchers (via extension)
+                       foreach (var ae in AnnouncementEndpoints) {
+                               serviceHostBase.ChannelDispatchers.Add (new DiscoveryChannelDispatcher (ae, true));
+                               serviceHostBase.ChannelDispatchers.Add (new DiscoveryChannelDispatcher (ae, false));
+                       }
+
+                       // BTW, on .NET, calling this method again adds endpoints more than one time...
                }
 
                void IServiceBehavior.Validate (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
                {
+                       if (serviceHostBase == null)
+                               throw new ArgumentNullException ("serviceHostBase");
+                       var dse = serviceHostBase.Extensions.Find<DiscoveryServiceExtension> ();
+                       if (dse == null) {
+                               dse = new DiscoveryServiceExtension.DefaultDiscoveryServiceExtension ();
+                               serviceHostBase.Extensions.Add (dse);
+                       }
+                       
+                       foreach (var se in serviceDescription.Endpoints)
+                               se.Behaviors.Add (new DiscoveryEndpointPublisherBehavior (dse));
                }
        }
 }
index 95823a6b5e87f87c5e75934583cbca63c2ae1477..6b7d003d80b17a13b62e2ab02bebf92cba0b859e 100755 (executable)
@@ -25,6 +25,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Net.Sockets;
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
@@ -34,10 +35,12 @@ namespace System.ServiceModel.Discovery
 {
        public class UdpAnnouncementEndpoint : AnnouncementEndpoint
        {
-               [MonoTODO]
-               public static readonly Uri DefaultIPv4MulticastAddress;
-               [MonoTODO]
-               public static readonly Uri DefaultIPv6MulticastAddress;
+               public static readonly Uri DefaultIPv4MulticastAddress = new Uri ("soap.udp://239.255.255.250:3702/");
+               public static readonly Uri DefaultIPv6MulticastAddress = new Uri ("soap.udp://[FF02:0000:0000:0000:0000:0000:0000:000C]:3702/");
+
+               internal static Uri DefaultMulticastAddress {
+                       get { return Socket.SupportsIPv4 ? DefaultIPv4MulticastAddress : DefaultIPv6MulticastAddress; }
+               }
 
                // (1)->(2)
                public UdpAnnouncementEndpoint ()
@@ -45,11 +48,10 @@ namespace System.ServiceModel.Discovery
                {
                }
 
-               // (2), everything falls to here.
+               // (2)->(6)
                public UdpAnnouncementEndpoint (DiscoveryVersion discoveryVersion)
-                       : base (discoveryVersion)
+                       : this (discoveryVersion, DefaultMulticastAddress)
                {
-                       TransportSettings = new UdpTransportSettings ();
                }
 
                // (3)->(4)
@@ -70,11 +72,20 @@ namespace System.ServiceModel.Discovery
                {
                }
 
-               // (6)->(2)
+               // (6), everything falls to here
                public UdpAnnouncementEndpoint (DiscoveryVersion discoveryVersion, Uri multicastAddress)
-                       : this (discoveryVersion)
+                       : base (discoveryVersion, CreateBinding (), new EndpointAddress (discoveryVersion.AdhocAddress))
                {
+                       ListenUri = multicastAddress;
+                       TransportSettings = new UdpTransportSettings ();
                        MulticastAddress = multicastAddress;
+                       MaxAnnouncementDelay = TimeSpan.FromMilliseconds (500);
+                       Behaviors.Add (new DiscoveryViaUriBehavior (multicastAddress));
+               }
+
+               static Binding CreateBinding ()
+               {
+                       return new CustomBinding (new TextMessageEncodingBindingElement (), new UdpTransportBindingElement ()) { SendTimeout = TimeSpan.FromMinutes (1), ReceiveTimeout = TimeSpan.FromMinutes (10) };
                }
 
                public Uri MulticastAddress { get; set; }
index 72c57b7edd4f4e29d55a366e53d29d8124a797fe..2a80f94c0875adb8b4711f28e65b0cff993f060f 100755 (executable)
@@ -25,6 +25,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Net.Sockets;
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
@@ -34,22 +35,23 @@ namespace System.ServiceModel.Discovery
 {
        public class UdpDiscoveryEndpoint : DiscoveryEndpoint
        {
-               [MonoTODO]
-               public static readonly Uri DefaultIPv4MulticastAddress;
-               [MonoTODO]
-               public static readonly Uri DefaultIPv6MulticastAddress;
+               public static readonly Uri DefaultIPv4MulticastAddress = new Uri ("soap.udp://239.255.255.250:3702/");
+               public static readonly Uri DefaultIPv6MulticastAddress = new Uri ("soap.udp://[FF02:0000:0000:0000:0000:0000:0000:000C]:3702/");
 
+               internal static Uri DefaultMulticastAddress {
+                       get { return Socket.SupportsIPv4 ? DefaultIPv4MulticastAddress : DefaultIPv6MulticastAddress; }
+               }
+               
                // (1)->(2)
                public UdpDiscoveryEndpoint ()
                        : this (DiscoveryVersion.WSDiscovery11)
                {
                }
 
-               // (2), everything falls to here.
+               // (2)->(6)
                public UdpDiscoveryEndpoint (DiscoveryVersion discoveryVersion)
-                       : base (discoveryVersion, ServiceDiscoveryMode.Adhoc)
+                       : this (discoveryVersion, DefaultMulticastAddress)
                {
-                       TransportSettings = new UdpTransportSettings ();
                }
 
                // (3)->(4)
@@ -70,11 +72,20 @@ namespace System.ServiceModel.Discovery
                {
                }
 
-               // (6)->(2)
+               // (6), everything falls to here.
                public UdpDiscoveryEndpoint (DiscoveryVersion discoveryVersion, Uri multicastAddress)
-                       : this (discoveryVersion)
+                       : base (discoveryVersion, ServiceDiscoveryMode.Adhoc, CreateBinding (), new EndpointAddress (discoveryVersion.AdhocAddress))
                {
+                       ListenUri = multicastAddress;
+                       TransportSettings = new UdpTransportSettings ();
                        MulticastAddress = multicastAddress;
+                       MaxResponseDelay = TimeSpan.FromMilliseconds (500);
+                       Behaviors.Add (new DiscoveryViaUriBehavior (multicastAddress));
+               }
+
+               static Binding CreateBinding ()
+               {
+                       return new CustomBinding (new TextMessageEncodingBindingElement (), new UdpTransportBindingElement ()) { SendTimeout = TimeSpan.FromMinutes (1), ReceiveTimeout = TimeSpan.FromMinutes (10) };
                }
 
                public Uri MulticastAddress { get; set; }
index e0f2171fed2ce3db198cac2bfe970fc2c8212117..d6032b1f2fb8c8054ec5125d69f8723603e8fb1b 100755 (executable)
@@ -36,6 +36,26 @@ namespace System.ServiceModel.Discovery
        {
                internal UdpTransportSettings ()
                {
+                       DuplicateMessageHistoryLength = 4112;
+                       MaxBufferPoolSize = 0x80000;
+                       MaxMulticastRetransmitCount = 2;
+                       MaxPendingMessageCount = 32;
+                       MaxReceivedMessageSize = 0xFFE7;
+                       MaxUnicastRetransmitCount = 1;
+                       SocketReceiveBufferSize = 0x10000;
+                       TimeToLive = 1;
+               }
+
+               internal UdpTransportSettings (UdpTransportSettings source)
+               {
+                       DuplicateMessageHistoryLength = source.DuplicateMessageHistoryLength;
+                       MaxBufferPoolSize = source.MaxBufferPoolSize;
+                       MaxMulticastRetransmitCount = source.MaxMulticastRetransmitCount;
+                       MaxPendingMessageCount = source.MaxPendingMessageCount;
+                       MaxReceivedMessageSize = source.MaxReceivedMessageSize;
+                       MaxUnicastRetransmitCount = source.MaxUnicastRetransmitCount;
+                       SocketReceiveBufferSize = source.SocketReceiveBufferSize;
+                       TimeToLive = source.TimeToLive;
                }
 
                public int DuplicateMessageHistoryLength { get; set; }
index ffd63d37c59c344afc8d16f0aadd7038dcbd335d..3964b41cc2530c5a78f556317e9972e7d1c51464 100644 (file)
@@ -1,2 +1,22 @@
+System.ServiceModel.Discovery/AnnouncementBoundDiscoveryService.cs
+System.ServiceModel.Discovery/AnnouncementClientTest.cs
+System.ServiceModel.Discovery/AnnouncementEndpointTest.cs
+System.ServiceModel.Discovery/AnnouncementServiceTest.cs
+System.ServiceModel.Discovery/ContractTypes.cs
+System.ServiceModel.Discovery/DiscoveryClientBindingElementTest.cs
+System.ServiceModel.Discovery/DiscoveryClientTest.cs
+System.ServiceModel.Discovery/DiscoveryEndpointTest.cs
+System.ServiceModel.Discovery/DiscoveryProxyTest.cs
+System.ServiceModel.Discovery/DiscoveryServiceTest.cs
 System.ServiceModel.Discovery/DiscoveryVersionTest.cs
+System.ServiceModel.Discovery/DynamicEndpointTest.cs
+System.ServiceModel.Discovery/EndpointDiscoveryBehaviorTest.cs
+System.ServiceModel.Discovery/EndpointDiscoveryMetadataTest.cs
 System.ServiceModel.Discovery/FindCriteriaTest.cs
+System.ServiceModel.Discovery/InspectionBehaviors.cs
+System.ServiceModel.Discovery/IntegratedDiscoveryTest.cs
+System.ServiceModel.Discovery/MyDiscoveryServiceTypes.cs
+System.ServiceModel.Discovery/ServiceDiscoveryBehaviorTest.cs
+System.ServiceModel.Discovery/UdpAnnouncementEndpointTest.cs
+System.ServiceModel.Discovery/UdpDiscoveryEndpointTest.cs
+System.ServiceModel.Discovery/UdpTransportTest.cs
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementBoundDiscoveryService.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementBoundDiscoveryService.cs
new file mode 100644 (file)
index 0000000..f6a6629
--- /dev/null
@@ -0,0 +1,186 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using System.Threading;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [ServiceBehavior (InstanceContextMode = InstanceContextMode.Single)]
+       public class AnnouncementBoundDiscoveryService : DiscoveryService, IDisposable
+       {
+               ServiceHost ahost;
+
+               public AnnouncementBoundDiscoveryService (AnnouncementEndpoint aendpoint)
+               {
+                       var ans = new AnnouncementService ();
+                       ans.OnlineAnnouncementReceived += RegisterEndpoint;
+                       ans.OfflineAnnouncementReceived += UnregisterEndpoint;
+                       ahost = new ServiceHost (ans);
+                       ahost.AddServiceEndpoint (aendpoint);
+                       ahost.Open ();
+                       foreach (var cd in ahost.ChannelDispatchers)
+                               TextWriter.Null.WriteLine ("AnnouncementService.ChannelDispatcher " + cd.Listener.Uri);
+               }
+
+               public void Dispose ()
+               {
+                       if (ahost.State == CommunicationState.Opened)
+                               ahost.Close ();
+               }
+
+               Action<FindRequestContext> find_delegate;
+               Func<ResolveCriteria,EndpointDiscoveryMetadata> resolve_delegate;
+
+               protected override IAsyncResult OnBeginFind (FindRequestContext findRequestContext, AsyncCallback callback, object state)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               if (find_delegate == null)
+                                       find_delegate = new Action<FindRequestContext> (Find);
+                               return find_delegate.BeginInvoke (findRequestContext, callback, state);
+                       default:
+                               Find (findRequestContext);
+                               var result = new TempAsyncResult (null, state);
+                               if (callback != null)
+                                       callback (result);
+                               return result;
+                       }
+               }
+               
+               Queue<DiscoveryMessageSequence> sequences = new Queue<DiscoveryMessageSequence> ();
+               List<EndpointDiscoveryMetadata> endpoints = new List<EndpointDiscoveryMetadata> ();
+
+               bool PushQueueItem (DiscoveryMessageSequence seq)
+               {
+                       if (sequences.Contains (seq))
+                               return false;
+                       sequences.Enqueue (seq);
+                       if (sequences.Count > 20)
+                               sequences.Dequeue ();
+                       return true;
+               }
+
+               void RegisterEndpoint (object obj, AnnouncementEventArgs e)
+               {
+                       if (!PushQueueItem (e.MessageSequence))
+                               return;
+                       endpoints.Add (e.EndpointDiscoveryMetadata);
+               }
+
+               void UnregisterEndpoint (object obj, AnnouncementEventArgs e)
+               {
+                       if (!PushQueueItem (e.MessageSequence))
+                               return;
+                       endpoints.Remove (e.EndpointDiscoveryMetadata);
+               }
+
+               protected override void OnEndFind (IAsyncResult result)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               find_delegate.EndInvoke (result);
+                               break;
+                       default:
+                               break;
+                       }
+               }
+
+               protected override IAsyncResult OnBeginResolve (ResolveCriteria resolveCriteria, AsyncCallback callback, object state)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               if (resolve_delegate == null)
+                                       resolve_delegate = new Func<ResolveCriteria,EndpointDiscoveryMetadata> (Resolve);
+                               return resolve_delegate.BeginInvoke (resolveCriteria, callback, state);
+                       default:
+                               var ret = Resolve (resolveCriteria);
+                               var result = new TempAsyncResult (ret, state);
+                               if (callback != null)
+                                       callback (result);
+                               return result;
+                       }
+               }
+
+               protected override EndpointDiscoveryMetadata OnEndResolve (IAsyncResult result)
+               {
+                       // FIXME: this is a workaround for (similar to) bug #633945.
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               return resolve_delegate.EndInvoke (result);
+                       default:
+                               return (EndpointDiscoveryMetadata) ((TempAsyncResult) result).ReturnValue;
+                       }
+               }
+
+               void Find (FindRequestContext context)
+               {
+                       TextWriter.Null.WriteLine ("Find operation: " + context);
+                       foreach (var edm in endpoints)
+                               if (context.Criteria.IsMatch (edm))
+                                       context.AddMatchingEndpoint (edm);
+               }
+
+               EndpointDiscoveryMetadata Resolve (ResolveCriteria criteria)
+               {
+                       TextWriter.Null.WriteLine ("Resolve operation: " + criteria);
+                       throw new NotImplementedException ();
+               }
+       }
+
+       // FIXME: It is introduced for a workaround for (similar to) bug #633945. Remove this class and all of its usage once that bug gets fixed.
+       class TempAsyncResult : IAsyncResult
+       {
+               public TempAsyncResult (object returnValue, object state)
+               {
+                       ReturnValue = returnValue;
+                       AsyncState = state;
+                       CompletedSynchronously = true;
+                       IsCompleted = true;
+                       AsyncWaitHandle = new ManualResetEvent (true);
+               }
+               
+               public object ReturnValue { get; set; }
+               public object AsyncState { get; set; }
+               public bool CompletedSynchronously { get; set; }
+               public bool IsCompleted { get; set; }
+               public WaitHandle AsyncWaitHandle { get; set; }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementClientTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementClientTest.cs
new file mode 100644 (file)
index 0000000..c1aeaf7
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class AnnouncementClientTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       // default constructor causes IOE unless there is default configuration...
+                       var ac = new AnnouncementClient (new AnnouncementEndpoint ());
+                       Assert.AreEqual (ac.ChannelFactory.Endpoint, ac.Endpoint, "#1");
+                       Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01", ac.Endpoint.Contract.Namespace, "#2");
+                       Assert.AreEqual (2, ac.Endpoint.Contract.Operations.Count, "#2-2");
+                       Assert.IsTrue (ac.Endpoint.Contract.Operations.Any (od => od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Hello")), "#2-3");
+                       Assert.IsTrue (ac.Endpoint.Contract.Operations.Any (od => od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Bye")), "#2-4");
+                       Assert.IsNull (ac.Endpoint.Binding, "#3");
+                       Assert.IsNull (ac.Endpoint.Address, "#4");
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidOperationException))]
+               public void AnnonceOnlineOfflineNoEndpointAddress ()
+               {
+                       var ac = new AnnouncementClient (new AnnouncementEndpoint () { Binding = new BasicHttpBinding () });
+                       var edm = new EndpointDiscoveryMetadata ();
+                       try {
+                               ac.AnnounceOnline (edm);
+                       } finally {
+                               ac.Close ();
+                       }
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidOperationException))]
+               public void AnnonceOnlineOfflineNoBinding ()
+               {
+                       var ac = new AnnouncementClient (new AnnouncementEndpoint () { Address = new EndpointAddress ("http://localhost:37564")});
+                       var edm = new EndpointDiscoveryMetadata ();
+                       ac.AnnounceOnline (edm);
+                       // attempt to close the client causes another CommunicationObjectFaultedException - looks like it fails to allow Close() at faulted state unlike other objects.
+               }
+
+               [Test]
+               // looks like EndpointAddress is *ignored*
+               public void AnnonceOnlineOfflineAddressSchemeMismatch ()
+               {
+                       var ac = new AnnouncementClient (new UdpAnnouncementEndpoint () { Address = new EndpointAddress ("http://localhost:37564")});
+                       var edm = new EndpointDiscoveryMetadata ();
+                       try {
+                               ac.AnnounceOnline (edm);
+                               ac.AnnounceOffline (edm);
+                       } finally {
+                               ac.Close ();
+                       }
+               }
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void AnnonceOnlineOfflineAddressSchemeMismatch2 ()
+               {
+                       var ac = new AnnouncementClient (new AnnouncementEndpoint () { Binding = new BasicHttpBinding (), Address = new EndpointAddress ("soap.udp://localhost:37564")});
+                       var edm = new EndpointDiscoveryMetadata ();
+                       try {
+                               ac.AnnounceOnline (edm);
+                       } finally {
+                               ac.Close ();
+                       }
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidOperationException))]
+               public void AnnonceOnlineOfflineHttpMessageVersionMismatch ()
+               {
+                       var ac = new AnnouncementClient (new AnnouncementEndpoint () { Binding = new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (10), ReceiveTimeout = TimeSpan.FromSeconds (10) }, Address = http_address });
+                       var edm = new EndpointDiscoveryMetadata ();
+                       try {
+                               ac.AnnounceOnline (edm);
+                       } finally {
+                               ac.Close ();
+                       }
+               }
+
+               EndpointAddress http_address = new EndpointAddress ("http://localhost:37564");
+
+               [Test]
+               [ExpectedException (typeof (EndpointNotFoundException))]
+               public void AnnonceOnlineOfflineHttpWSA10 ()
+               {
+                       var binding = new CustomBinding (new HttpTransportBindingElement ()) { SendTimeout = TimeSpan.FromSeconds (10), ReceiveTimeout = TimeSpan.FromSeconds (10) };
+                       var ac = new AnnouncementClient (new AnnouncementEndpoint () { Binding = binding, Address = http_address });
+                       var edm = new EndpointDiscoveryMetadata ();
+                       try {
+                               ac.AnnounceOnline (edm);
+                       } finally {
+                               ac.Close ();
+                       }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementEndpointTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementEndpointTest.cs
new file mode 100644 (file)
index 0000000..9d971ff
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class AnnouncementEndpointTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var de = new AnnouncementEndpoint ();
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, de.DiscoveryVersion, "#1");
+                       Assert.AreEqual (TimeSpan.Zero, de.MaxAnnouncementDelay, "#2");
+                       Assert.IsNotNull (de.Contract, "#11"); // some version-dependent internal type.
+                       Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01", de.Contract.Namespace, "#11-2");
+                       Assert.AreEqual ("Client", de.Contract.Name, "#11-3");
+                       Assert.IsNull (de.Binding, "#12");
+                       Assert.IsNull (de.Address, "#13");
+                       Assert.IsNull (de.ListenUri, "#14");
+                       Assert.AreEqual (0, de.Behaviors.Count, "#15");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementServiceTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/AnnouncementServiceTest.cs
new file mode 100644 (file)
index 0000000..769b8bb
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class AnnouncementServiceTest
+       {
+               [Test]
+               public void ContractInterface ()
+               {
+                       // This will raise IOE if AnnouncementService does not implement any of the contract interfaces.
+                       var host = new ServiceHost (typeof (AnnouncementService));
+                       host.AddServiceEndpoint (new UdpAnnouncementEndpoint (DiscoveryVersion.WSDiscovery11));
+                       host.AddServiceEndpoint (new UdpAnnouncementEndpoint (DiscoveryVersion.WSDiscoveryApril2005, "soap.udp://239.255.255.250:3703/"));
+                       host.AddServiceEndpoint (new UdpAnnouncementEndpoint (DiscoveryVersion.WSDiscoveryCD1, "soap.udp://239.255.255.250:3704/"));
+
+                       var v11 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01");
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("CustomBinding_Client", v11.Name, "v11.Name");
+
+                       var v200504 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://schemas.xmlsoap.org/ws/2005/04/discovery");
+                       Assert.IsNotNull (v200504, "v200504");
+                       Assert.AreEqual ("CustomBinding_Client", v200504.Name, "v200504.Name");
+
+                       var vCD1 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09");
+                       Assert.IsNotNull (vCD1, "vCD1");
+                       Assert.AreEqual ("CustomBinding_Client", vCD1.Name, "v11.Name");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/ContractTypes.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/ContractTypes.cs
new file mode 100644 (file)
index 0000000..988d952
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [ServiceContract]
+       public interface ITestService
+       {
+               [OperationContract]
+               string Echo (string input);
+       }
+
+       public class TestService : ITestService
+       {
+               public string Echo (string input)
+               {
+                       return input;
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryClientBindingElementTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryClientBindingElementTest.cs
new file mode 100644 (file)
index 0000000..3f7c0a9
--- /dev/null
@@ -0,0 +1,214 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using System.Threading;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class DiscoveryClientBindingElementTest
+       {
+               [Test]
+               public void StaticMembers ()
+               {
+                       Assert.AreEqual (new Uri ("http://schemas.microsoft.com/discovery/dynamic"), DiscoveryClientBindingElement.DiscoveryEndpointAddress.Uri, "#1");
+               }
+               
+               DynamicEndpoint CreateDynamicEndpoint ()
+               {
+                       var cd = ContractDescription.GetContract (typeof (ITestService));
+                       var binding = new BasicHttpBinding ();
+                       return new DynamicEndpoint (cd, binding);
+               }
+
+               [Test]
+               public void Constructors ()
+               {
+                       var de = CreateDynamicEndpoint ();
+                       var be = new DiscoveryClientBindingElement (de.DiscoveryEndpointProvider, de.FindCriteria);
+                       Assert.IsNotNull (be.FindCriteria, "#1");
+                       Assert.IsNotNull (be.DiscoveryEndpointProvider, "#2");
+                       var die = be.DiscoveryEndpointProvider.GetDiscoveryEndpoint ();
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, die.DiscoveryVersion, "#3");
+                       Assert.IsTrue (die is UdpDiscoveryEndpoint, "#3-2");
+                       Assert.AreEqual (ServiceDiscoveryMode.Adhoc, die.DiscoveryMode, "#4");
+                       Assert.AreEqual ("urn:docs-oasis-open-org:ws-dd:ns:discovery:2009:01", die.Address.Uri.ToString (), "#5");
+                       Assert.IsNotNull (die.Contract, "#6");
+                       Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01", die.Contract.Namespace, "#6-2");
+                       Assert.AreEqual ("TargetService", die.Contract.Name, "#6-3");
+                       // could be either IPv4 or IPv6
+                       Assert.AreEqual (new UdpDiscoveryEndpoint ().MulticastAddress, die.ListenUri, "#7");
+                       Assert.AreEqual (ListenUriMode.Explicit, die.ListenUriMode, "#8");
+                       Assert.AreEqual (5, die.Behaviors.Count, "#9");
+
+                       // default constructor
+                       be = new DiscoveryClientBindingElement ();
+                       Assert.IsNotNull (be.FindCriteria, "#11");
+                       Assert.IsNotNull (be.DiscoveryEndpointProvider, "#12");
+                       die = be.DiscoveryEndpointProvider.GetDiscoveryEndpoint ();
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, die.DiscoveryVersion, "#13");
+                       Assert.IsTrue (die is UdpDiscoveryEndpoint, "#13-2");
+               }
+
+               [Test]
+               public void CanBuildChannels ()
+               {
+                       var de = CreateDynamicEndpoint ();
+                       // it is channel dependent - i.e. this binding element does not affect.
+                       var be = new DiscoveryClientBindingElement (de.DiscoveryEndpointProvider, de.FindCriteria);
+                       var bc = new BindingContext (new CustomBinding (new TcpTransportBindingElement ()), new BindingParameterCollection ());
+                       Assert.IsTrue (be.CanBuildChannelFactory<IDuplexSessionChannel> (bc), "#0");
+                       Assert.IsFalse (be.CanBuildChannelFactory<IDuplexChannel> (bc), "#1");
+                       Assert.IsFalse (be.CanBuildChannelFactory<IOutputChannel> (bc), "#2");
+                       Assert.IsFalse (be.CanBuildChannelFactory<IRequestChannel> (bc), "#3");
+
+                       // It always return false.
+                       Assert.IsFalse (be.CanBuildChannelListener<IDuplexSessionChannel> (bc), "#4"); // false!
+                       Assert.IsFalse (be.CanBuildChannelListener<IDuplexChannel> (bc), "#5");
+                       Assert.IsFalse (be.CanBuildChannelListener<IRequestChannel> (bc), "#6");
+                       Assert.IsFalse (be.CanBuildChannelListener<IReplyChannel> (bc), "#7");
+
+                       bc = new BindingContext (new CustomBinding (new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       Assert.IsFalse (be.CanBuildChannelFactory<IDuplexSessionChannel> (bc), "#10");
+                       Assert.IsFalse (be.CanBuildChannelFactory<IDuplexChannel> (bc), "#11");
+                       Assert.IsFalse (be.CanBuildChannelFactory<IOutputChannel> (bc), "#12");
+                       Assert.IsTrue (be.CanBuildChannelFactory<IRequestChannel> (bc), "#13");
+
+                       // It always return false.
+                       Assert.IsFalse (be.CanBuildChannelListener<IDuplexSessionChannel> (bc), "#14");
+                       Assert.IsFalse (be.CanBuildChannelListener<IDuplexChannel> (bc), "#15");
+                       Assert.IsFalse (be.CanBuildChannelListener<IRequestChannel> (bc), "#16");
+                       Assert.IsFalse (be.CanBuildChannelListener<IReplyChannel> (bc), "#17");
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidOperationException))]
+               public void BuildChannelFactory_OnlyTransport ()
+               {
+                       var be = new DiscoveryClientBindingElement ();
+                       var bc = new BindingContext (new CustomBinding (new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       be.BuildChannelFactory<IRequestChannel> (bc);
+               }
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void BuildChannelFactory_CreateNonDynamicUriChannel ()
+               {
+                       var be = new DiscoveryClientBindingElement ();
+                       var bc = new BindingContext (new CustomBinding (be, new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       var cf = be.BuildChannelFactory<IRequestChannel> (bc);
+                       cf.Open ();
+                       var uri = new Uri ("http://localhost:37564");
+                       cf.CreateChannel (new EndpointAddress (uri));
+               }
+
+               [Test]
+               public void BuildChannelFactory ()
+               {
+                       var be = new DiscoveryClientBindingElement ();
+                       var bc = new BindingContext (new CustomBinding (be, new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       var cf = be.BuildChannelFactory<IRequestChannel> (bc);
+                       cf.Open ();
+                       var ch = cf.CreateChannel (DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                       Assert.AreEqual (DiscoveryClientBindingElement.DiscoveryEndpointAddress, ch.RemoteAddress, "#1");
+               }
+
+               // This test takes a while, so I in face don't want to enable it ...
+               [Test]
+               [ExpectedException (typeof (EndpointNotFoundException))]
+               public void RequestChannelOpenFails ()
+               {
+                       var be = new DiscoveryClientBindingElement ();
+                       var bc = new BindingContext (new CustomBinding (be, new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       var cf = be.BuildChannelFactory<IRequestChannel> (bc);
+                       cf.Open ();
+                       Assert.IsNull (cf.GetProperty<DiscoveryEndpoint> (), "#1");
+                       var ch = cf.CreateChannel (DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                       Assert.IsNull (ch.GetProperty<DiscoveryEndpoint> (), "#2");
+                       ch.Open ();
+               }
+
+               [Test]
+               [ExpectedException (typeof (EndpointNotFoundException))]
+               public void RequestChannelOpenFails2 ()
+               {
+                       var be = new DiscoveryClientBindingElement ();
+                       var bc = new BindingContext (new CustomBinding (be, new TcpTransportBindingElement ()), new BindingParameterCollection ());
+                       var cf = be.BuildChannelFactory<IDuplexSessionChannel> (bc);
+                       cf.Open ();
+                       var ch = cf.CreateChannel (DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                       ch.Open ();
+               }
+
+               [Test]
+               public void CustomDiscoveryEndpointProvider ()
+               {
+                       var be = new DiscoveryClientBindingElement () { DiscoveryEndpointProvider = new MyDiscoveryEndpointProvider () };
+                       var bc = new BindingContext (new CustomBinding (be, new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       var cf = be.BuildChannelFactory<IRequestChannel> (bc);
+                       cf.Open ();
+                       var ch = cf.CreateChannel (DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                       try {
+                               ch.Open ();
+                               Assert.Fail ("Should try to use failing endpoint provider.");
+                       } catch (MyException) {
+                       }
+               }
+
+               class MyDiscoveryEndpointProvider : DiscoveryEndpointProvider
+               {
+                       public override DiscoveryEndpoint GetDiscoveryEndpoint ()
+                       {
+                               throw new MyException ();
+                       }
+                       
+               }
+
+               class MyException : Exception
+               {
+               }
+
+               [Test]
+               public void GetProperty ()
+               {
+                       var be = new DiscoveryClientBindingElement ();
+                       var bc = new BindingContext (new CustomBinding (new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       // so, they are not part of GetProperty<T>() return values.
+                       Assert.IsNull (be.GetProperty<FindCriteria> (bc), "#1");
+                       Assert.IsNull (be.GetProperty<DiscoveryEndpointProvider> (bc), "#2");
+
+                       Assert.IsNull (be.GetProperty<DiscoveryEndpoint> (bc), "#3");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryClientTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryClientTest.cs
new file mode 100644 (file)
index 0000000..e07f593
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class DiscoveryClientTest
+       {
+               [Test]
+               public void ContractInterfaceManaged ()
+               {
+                       var client = new DiscoveryClient (new DiscoveryEndpoint ());
+                       var v11 = client.ChannelFactory.Endpoint;
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("DiscoveryProxy", v11.Name, "v11.Name");
+                       Assert.AreEqual (2, v11.Contract.Operations.Count, "v11.Operations.Count");
+                       Assert.IsNull (v11.Contract.CallbackContractType, "v11.CallbackContractType");
+               }
+
+               [Test]
+               public void ContractInterfaceAdhoc ()
+               {
+                       var client = new DiscoveryClient (new UdpDiscoveryEndpoint ());
+                       var v11 = client.ChannelFactory.Endpoint;
+var cd = ContractDescription.GetContract (v11.Contract.ContractType);
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("CustomBinding_TargetService", v11.Name, "v11.Name");
+                       Assert.AreEqual (5, v11.Contract.Operations.Count, "v11.Operations.Count");
+                       Assert.IsNotNull (v11.Contract.CallbackContractType, "v11.CallbackContractType");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryEndpointTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryEndpointTest.cs
new file mode 100644 (file)
index 0000000..a369930
--- /dev/null
@@ -0,0 +1,86 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class DiscoveryEndpointTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var de = new DiscoveryEndpoint ();
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, de.DiscoveryVersion, "#1");
+                       Assert.AreEqual (ServiceDiscoveryMode.Managed, de.DiscoveryMode, "#2");
+                       Assert.AreEqual (TimeSpan.Zero, de.MaxResponseDelay, "#3");
+                       var cd = de.Contract;
+                       Assert.IsNotNull (cd, "#11"); // some version-dependent internal type.
+                       Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01", cd.Namespace, "#11-2");
+                       Assert.AreEqual ("DiscoveryProxy", cd.Name, "#11-3");
+                       Assert.AreEqual (2, cd.Operations.Count, "#11-4");
+                       var oper = cd.Operations.FirstOrDefault (od => !od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Probe"));
+                       Assert.IsNotNull (oper, "#11-5");
+                       Assert.IsNotNull (oper.Messages.Any (md => md.Body.ReturnValue != null && md.Body.ReturnValue.Type == typeof (void)), "#11-5-2"); // return type is void
+                       Assert.IsTrue (cd.Operations.Any (od => !od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Resolve")), "#11-6");
+                       Assert.IsNull (de.Binding, "#12");
+                       Assert.IsNull (de.Address, "#13");
+                       Assert.IsNull (de.ListenUri, "#14");
+               }
+
+               // Adhoc mode gives *different* ServiceContract than Managed mode.
+               // Adhoc one is one-way based, while Managed one is bidirectional.
+               [Test]
+               public void AdhocDefaultValues ()
+               {
+                       var de = new DiscoveryEndpoint (DiscoveryVersion.WSDiscoveryCD1, ServiceDiscoveryMode.Adhoc);
+                       Assert.AreEqual (DiscoveryVersion.WSDiscoveryCD1, de.DiscoveryVersion, "#1");
+                       Assert.AreEqual (ServiceDiscoveryMode.Adhoc, de.DiscoveryMode, "#2");
+                       Assert.AreEqual (TimeSpan.Zero, de.MaxResponseDelay, "#3");
+                       var cd = de.Contract;
+                       Assert.IsNotNull (cd, "#11"); // some version-dependent internal type.
+                       Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09", cd.Namespace, "#11-2");
+                       Assert.AreEqual ("TargetService", cd.Name, "#11-3");
+                       Assert.AreEqual (5, cd.Operations.Count, "#11-4");
+                       Assert.IsTrue (cd.Operations.Any (od => od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09/Probe")), "#11-5");
+                       Assert.IsTrue (cd.Operations.Any (od => od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09/Resolve")), "#11-6");
+                       Assert.IsTrue (cd.Operations.Any (od => od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09/ProbeMatches")), "#11-7");
+                       Assert.IsTrue (cd.Operations.Any (od => od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09/ResolveMatches")), "#11-8");
+                       Assert.IsTrue (cd.Operations.Any (od => od.IsOneWay && od.Messages.Any (md => md.Action == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09/Hello")), "#11-9");
+                       Assert.IsNull (de.Binding, "#12");
+                       Assert.IsNull (de.Address, "#13");
+                       Assert.IsNull (de.ListenUri, "#14");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryProxyTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryProxyTest.cs
new file mode 100644 (file)
index 0000000..eba85ce
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class DiscoveryProxyTest
+       {
+               [Test]
+               public void ContractInterfaceManaged ()
+               {
+                       // This will raise IOE if DiscoveryProxy does not implement any of the contract interfaces.
+                       var host = new ServiceHost (typeof (DiscoveryProxy));
+                       host.AddServiceEndpoint (new DiscoveryEndpoint (DiscoveryVersion.WSDiscovery11, ServiceDiscoveryMode.Managed, new BasicHttpBinding (), new EndpointAddress ("http://localhost:8080")));
+                       host.AddServiceEndpoint (new DiscoveryEndpoint (DiscoveryVersion.WSDiscoveryApril2005, ServiceDiscoveryMode.Managed, new BasicHttpBinding (), new EndpointAddress ("http://localhost:8081")));
+                       host.AddServiceEndpoint (new DiscoveryEndpoint (DiscoveryVersion.WSDiscoveryCD1, ServiceDiscoveryMode.Managed, new BasicHttpBinding (), new EndpointAddress ("http://localhost:8082")));
+
+                       var v11 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01");
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("BasicHttpBinding_DiscoveryProxy", v11.Name, "v11.Name");
+                       Assert.AreEqual (2, v11.Contract.Operations.Count, "v11.Operations.Count");
+
+                       var v200504 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://schemas.xmlsoap.org/ws/2005/04/discovery");
+                       Assert.IsNotNull (v200504, "v200504");
+                       Assert.AreEqual ("BasicHttpBinding_DiscoveryProxy", v200504.Name, "v200504.Name");
+                       // FIXME: April2005 does not seem to support request-reply pattern. Is it correct?
+                       // Assert.AreEqual (5, v200504.Contract.Operations.Count, "v200504.Operations.Count");
+
+                       var vCD1 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09");
+                       Assert.IsNotNull (vCD1, "vCD1");
+                       Assert.AreEqual ("BasicHttpBinding_DiscoveryProxy", vCD1.Name, "vCD1.Name");
+                       Assert.AreEqual (2, vCD1.Contract.Operations.Count, "vCD1.Operations.Count");
+               }
+
+               [Test]
+               public void ContractInterfaceAdhoc ()
+               {
+                       // This will raise IOE if DiscoveryProxy does not implement any of the contract interfaces.
+                       var host = new ServiceHost (typeof (DiscoveryProxy));
+                       host.AddServiceEndpoint (new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscovery11));
+                       host.AddServiceEndpoint (new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscoveryApril2005, "soap.udp://239.255.255.250:3703/"));
+                       host.AddServiceEndpoint (new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscoveryCD1, "soap.udp://239.255.255.250:3704/"));
+
+                       var v11 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01");
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("CustomBinding_TargetService", v11.Name, "v11.Name");
+                       Assert.AreEqual (5, v11.Contract.Operations.Count, "v11.Operations.Count");
+
+                       var v200504 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://schemas.xmlsoap.org/ws/2005/04/discovery");
+                       Assert.IsNotNull (v200504, "v200504");
+                       Assert.AreEqual ("CustomBinding_TargetService", v200504.Name, "v200504.Name");
+                       Assert.AreEqual (5, v200504.Contract.Operations.Count, "v11.Operations.Count");
+
+                       var vCD1 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09");
+                       Assert.IsNotNull (vCD1, "vCD1");
+                       Assert.AreEqual ("CustomBinding_TargetService", vCD1.Name, "v11.Name");
+                       Assert.AreEqual (5, vCD1.Contract.Operations.Count, "v11.Operations.Count");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryServiceTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DiscoveryServiceTest.cs
new file mode 100644 (file)
index 0000000..1dfd982
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class DiscoveryServiceTest
+       {
+               [Test]
+               public void ContractInterfaceManaged ()
+               {
+                       // This will raise IOE if DiscoveryService does not implement any of the contract interfaces.
+                       var host = new ServiceHost (typeof (DiscoveryService));
+                       host.AddServiceEndpoint (new DiscoveryEndpoint (DiscoveryVersion.WSDiscovery11, ServiceDiscoveryMode.Managed, new BasicHttpBinding (), new EndpointAddress ("http://localhost:8080")));
+                       host.AddServiceEndpoint (new DiscoveryEndpoint (DiscoveryVersion.WSDiscoveryApril2005, ServiceDiscoveryMode.Managed, new BasicHttpBinding (), new EndpointAddress ("http://localhost:8081")));
+                       host.AddServiceEndpoint (new DiscoveryEndpoint (DiscoveryVersion.WSDiscoveryCD1, ServiceDiscoveryMode.Managed, new BasicHttpBinding (), new EndpointAddress ("http://localhost:8082")));
+
+                       var v11 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01");
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("BasicHttpBinding_DiscoveryProxy", v11.Name, "v11.Name");
+
+                       var v200504 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://schemas.xmlsoap.org/ws/2005/04/discovery");
+                       Assert.IsNotNull (v200504, "v200504");
+                       Assert.AreEqual ("BasicHttpBinding_DiscoveryProxy", v200504.Name, "v200504.Name");
+
+                       var vCD1 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09");
+                       Assert.IsNotNull (vCD1, "vCD1");
+                       Assert.AreEqual ("BasicHttpBinding_DiscoveryProxy", vCD1.Name, "v11.Name");
+               }
+
+               [Test]
+               public void ContractInterfaceAdhoc ()
+               {
+                       // This will raise IOE if DiscoveryService does not implement any of the contract interfaces.
+                       var host = new ServiceHost (typeof (DiscoveryService));
+                       host.AddServiceEndpoint (new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscovery11));
+                       host.AddServiceEndpoint (new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscoveryApril2005, "soap.udp://239.255.255.250:3703/"));
+                       host.AddServiceEndpoint (new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscoveryCD1, "soap.udp://239.255.255.250:3704/"));
+
+                       var v11 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01");
+                       Assert.IsNotNull (v11, "v11");
+                       Assert.AreEqual ("CustomBinding_TargetService", v11.Name, "v11.Name");
+
+                       var v200504 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://schemas.xmlsoap.org/ws/2005/04/discovery");
+                       Assert.IsNotNull (v200504, "v200504");
+                       Assert.AreEqual ("CustomBinding_TargetService", v200504.Name, "v200504.Name");
+
+                       var vCD1 = host.Description.Endpoints.FirstOrDefault (ep => ep.Contract.Namespace == "http://docs.oasis-open.org/ws-dd/ns/discovery/2008/09");
+                       Assert.IsNotNull (vCD1, "vCD1");
+                       Assert.AreEqual ("CustomBinding_TargetService", vCD1.Name, "v11.Name");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DynamicEndpointTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/DynamicEndpointTest.cs
new file mode 100644 (file)
index 0000000..848b66a
--- /dev/null
@@ -0,0 +1,88 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class DynamicEndpointTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var cd = ContractDescription.GetContract (typeof (ITestService));
+                       var binding = new BasicHttpBinding ();
+                       var de = new DynamicEndpoint (cd, binding);
+                       Assert.AreEqual (DiscoveryClientBindingElement.DiscoveryEndpointAddress, de.Address, "#1");
+                       var fc = de.FindCriteria;
+                       Assert.IsNotNull (fc, "#2");
+                       Assert.AreEqual (1, fc.ContractTypeNames.Count, "#2-2");
+                       Assert.AreEqual (0, fc.Scopes.Count, "#2-3");
+                       Assert.AreEqual (0, fc.Extensions.Count, "#2-4");
+
+                       var dep = de.DiscoveryEndpointProvider;
+                       Assert.IsNotNull (dep, "#3");
+                       var dise = dep.GetDiscoveryEndpoint ();
+                       TestDiscoveryEndpoint (dise);
+
+                       Assert.IsNotNull (de.Contract, "#11"); // for ITestService
+                       Assert.AreEqual ("http://tempuri.org/", de.Contract.Namespace, "#11-2");
+                       Assert.AreEqual ("ITestService", de.Contract.Name, "#11-3");
+                       Assert.IsNotNull (de.Binding, "#12"); // Custom{DiscoveryClient|BasicHttpBinding-elements}
+                       Assert.IsNotNull (de.Binding.CreateBindingElements ().FirstOrDefault (be => be is DiscoveryClientBindingElement), "#12-2");
+                       Assert.IsNotNull (de.Binding.CreateBindingElements ().FirstOrDefault (be => be is HttpTransportBindingElement), "#12-3");
+                       Assert.IsNotNull (de.Address, "#13");
+                       Assert.AreEqual (DiscoveryClientBindingElement.DiscoveryEndpointAddress, de.Address, "#13-2");
+                       Assert.AreEqual (DiscoveryClientBindingElement.DiscoveryEndpointAddress.Uri, de.ListenUri, "#14");
+                       Assert.AreEqual (0, de.Behaviors.Count, "#15");
+               }
+
+               // copied from UdpDiscoveryEndpointTest.
+               public void TestDiscoveryEndpoint (DiscoveryEndpoint de)
+               {
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, de.DiscoveryVersion, "#1");
+                       Assert.AreEqual (ServiceDiscoveryMode.Adhoc, de.DiscoveryMode, "#2");
+                       Assert.AreEqual (TimeSpan.FromMilliseconds (500), de.MaxResponseDelay, "#3");
+                       var cd = de.Contract;
+                       Assert.IsNotNull (cd, "#11");
+                       Assert.IsNotNull (de.Binding, "#12");
+                       TransportBindingElement tbe;
+                       Assert.IsTrue (de.Binding.CreateBindingElements ().Any (be => (tbe = be as TransportBindingElement) != null && tbe.Scheme == "soap.udp"), "#12-2");
+                       Assert.IsNotNull (de.Address, "#13");
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11.AdhocAddress, de.Address.Uri, "#13-2");
+                       Assert.AreEqual (Socket.SupportsIPv4 ? UdpDiscoveryEndpoint.DefaultIPv4MulticastAddress : UdpDiscoveryEndpoint.DefaultIPv6MulticastAddress, de.ListenUri, "#14");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/EndpointDiscoveryBehaviorTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/EndpointDiscoveryBehaviorTest.cs
new file mode 100644 (file)
index 0000000..3327e99
--- /dev/null
@@ -0,0 +1,109 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class EndpointDiscoveryBehaviorTest
+       {
+               [Test]
+               public void Use ()
+               {
+                       // Without ServiceDiscoveryBehavior.
+                       var b = new EndpointDiscoveryBehavior ();
+                       IEndpointBehavior eb = b;
+                       var host = new ServiceHost (typeof (TestService));
+                       var se = host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+                       se.Behaviors.Add (b);
+
+                       var bc = new BindingParameterCollection ();
+                       eb.AddBindingParameters (se, bc);
+                       Assert.AreEqual (0, bc.Count, "#1");
+                       Assert.AreEqual (0, host.Extensions.Count, "#1-2");
+
+                       eb.Validate (se);
+                       // This behavior itself does not populate discovery extension. It just configures the extension.
+                       Assert.AreEqual (0, host.Extensions.Count, "#2-2");
+               }
+
+               [Test]
+               public void Use2 ()
+               {
+                       // This time with ServiceDiscoveryBehavior.
+                       var b = new EndpointDiscoveryBehavior ();
+                       IEndpointBehavior eb = b;
+                       var host = new ServiceHost (typeof (TestService));
+                       var se = host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+                       var sdb = new ServiceDiscoveryBehavior ();
+                       sdb.AnnouncementEndpoints.Add (new UdpAnnouncementEndpoint ());
+                       IServiceBehavior sb = sdb;
+                       se.Behaviors.Add (b);
+
+                       var bc = new BindingParameterCollection ();
+                       sb.AddBindingParameters (host.Description, host, host.Description.Endpoints, bc);
+                       eb.AddBindingParameters (se, bc);
+                       Assert.AreEqual (0, bc.Count, "#1");
+                       Assert.AreEqual (0, host.Extensions.Count, "#1-2");
+
+                       sb.Validate (host.Description, host);
+                       eb.Validate (se);
+                       // ... should "validate" not "apply dispatch behavior" do "add host extension" job? I doubt that.
+                       Assert.AreEqual (1, host.Extensions.Count, "#2-2");
+                       var dse = host.Extensions.Find<DiscoveryServiceExtension> ();
+
+                       Assert.IsNotNull (dse, "#2-3");
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#2-4");
+                       Assert.AreEqual (2, se.Behaviors.Count, "#2-5"); // EndpointDiscoveryBehavior + discovery initializer.
+
+                       Assert.AreEqual (0, host.ChannelDispatchers.Count, "#3-1");
+                       Assert.AreEqual (1, host.Description.Endpoints.Count, "#3-2");
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#3-4");
+
+                       // The IEndpointBehavior from EndpointDiscoveryBehavior, when ApplyDispatchBehavior() is invoked, publishes an endpoint.
+                       sb.ApplyDispatchBehavior (host.Description, host);
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#3-5"); // not yet published
+                       eb.ApplyDispatchBehavior (se, new EndpointDispatcher (new EndpointAddress ("http://localhost:37564"), "ITestService", "http://tempuri.org/"));
+                       Assert.AreEqual (2, host.ChannelDispatchers.Count, "#3-6-1"); // for online and offline announcements
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#3-6-2"); // still not published.
+
+                       host.Open ();
+                       try {
+                               Assert.AreEqual (3, host.ChannelDispatchers.Count, "#4-1"); // for online and offline announcements
+                               Assert.AreEqual (1, dse.PublishedEndpoints.Count, "#4-2"); // The endpoint is published again. (Not sure if it's worthy of testing.)
+                       } finally {
+                               host.Close ();
+                       }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/EndpointDiscoveryMetadataTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/EndpointDiscoveryMetadataTest.cs
new file mode 100644 (file)
index 0000000..f6f47af
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class EndpointDiscoveryMetadataTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var edm = new EndpointDiscoveryMetadata ();
+                       Assert.IsNotNull (edm.Address, "#1");
+                       Assert.AreEqual (EndpointAddress.AnonymousUri, edm.Address.Uri, "#1-2");
+                       Assert.AreEqual (0, edm.Version, "#2");
+                       Assert.IsNotNull (edm.ContractTypeNames, "#3");
+                       Assert.IsNotNull (edm.Scopes, "#4");
+                       Assert.IsNotNull (edm.ListenUris, "#5");
+                       Assert.IsNotNull (edm.Extensions, "#6");
+               }
+       }
+}
index 53bf01bf75ec72e701c737bd51b7602b8ddd3b1d..cb2b271b639cf997941f9c7285cc7cd64a24780e 100755 (executable)
@@ -23,5 +23,16 @@ namespace MonoTests.System.ServiceModel.Discovery
                        Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/rfc3986", FindCriteria.ScopeMatchByPrefix.ToString (), "#4");
                        Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/uuid", FindCriteria.ScopeMatchByUuid.ToString (), "#5");
                }
+
+               [Test]
+               public void DefaultValues ()
+               {
+                       var fc = new FindCriteria ();
+                       Assert.AreEqual (int.MaxValue, fc.MaxResults, "#1");
+                       Assert.IsNotNull (fc.ContractTypeNames, "#2");
+                       Assert.IsNotNull (fc.Scopes, "#3");
+                       Assert.AreEqual (FindCriteria.ScopeMatchByPrefix, fc.ScopeMatchBy, "#4");
+                       Assert.AreEqual (TimeSpan.FromSeconds (20), fc.Duration, "#5");
+               }
        }
 }
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/InspectionBehaviors.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/InspectionBehaviors.cs
new file mode 100644 (file)
index 0000000..92e621e
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       class InspectionBehavior : IEndpointBehavior
+       {
+               public static object State { get; set; }
+
+               public event PostClientMessageReceiveHandler ReplyReceived;
+               public event PreClientMessageSendHandler RequestSending;
+               public event PostDispatchMessageReceiveHandler RequestReceived;
+               public event PreDispatchMessageSendHandler ReplySending;
+
+               public bool ClientBehaviorApplied { get; set; }
+               public bool DispatchBehaviorApplied { get; set; }
+
+               public void AddBindingParameters (ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
+               {
+               }
+               
+               public void ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime clientRuntime)
+               {
+                       ClientBehaviorApplied = true;
+
+                       var inspector = new MessageInspector ();
+                       inspector.RequestSending += delegate (ref Message message, IClientChannel channel) {
+                               if (RequestSending != null)
+                                       return RequestSending (ref message, channel);
+                               else
+                                       return null;
+                       };
+                       inspector.ReplyReceived += delegate (ref Message reply, object correlationState) {
+                               if (ReplyReceived != null)
+                                       ReplyReceived (ref reply, correlationState);
+                       };
+                       clientRuntime.MessageInspectors.Add (inspector);
+               }
+               
+               public void ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
+               {
+                       DispatchBehaviorApplied = true;
+
+                       var inspector = new MessageInspector ();
+                       inspector.RequestReceived += delegate (ref Message message, IClientChannel channel, InstanceContext instanceContext) {
+                               if (RequestReceived != null)
+                                       return RequestReceived (ref message, channel, instanceContext);
+                               else
+                                       return null;
+                       };
+                       inspector.ReplySending += delegate (ref Message reply, object correlationState) {
+                               if (ReplySending != null)
+                                       ReplySending (ref reply, correlationState);
+                       };
+                       endpointDispatcher.DispatchRuntime.MessageInspectors.Add (inspector);
+               }
+               
+               public void Validate (ServiceEndpoint endpoint)
+               {
+               }
+       }
+       
+       delegate object PostDispatchMessageReceiveHandler (ref Message request, IClientChannel channel, InstanceContext instanceContext);
+       delegate void PreDispatchMessageSendHandler (ref Message request,object correleationState);
+       delegate object PreClientMessageSendHandler (ref Message request, IClientChannel channel);
+       delegate void PostClientMessageReceiveHandler (ref Message request,object correleationState);
+
+       class MessageInspector : IDispatchMessageInspector, IClientMessageInspector
+       {
+               public event PostClientMessageReceiveHandler ReplyReceived;
+               public event PreClientMessageSendHandler RequestSending;
+               public event PostDispatchMessageReceiveHandler RequestReceived;
+               public event PreDispatchMessageSendHandler ReplySending;
+
+               public object BeforeSendRequest (ref Message request, IClientChannel channel)
+               {
+                       if (RequestSending != null)
+                               return RequestSending (ref request, channel);
+                       else
+                               return null;
+               }
+
+               public void AfterReceiveReply (ref Message reply, object correlationState)
+               {
+                       if (ReplyReceived != null)
+                               ReplyReceived (ref reply, correlationState);
+               }
+
+               public object AfterReceiveRequest (ref Message request, IClientChannel channel, InstanceContext instanceContext)
+               {
+                       if (RequestReceived != null)
+                               return RequestReceived (ref request, channel, instanceContext);
+                       else
+                               return null;
+               }
+
+               public void BeforeSendReply (ref Message reply, object correlationState)
+               {
+                       if (ReplySending != null)
+                               ReplySending (ref reply, correlationState);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/IntegratedDiscoveryTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/IntegratedDiscoveryTest.cs
new file mode 100644 (file)
index 0000000..a7f6a87
--- /dev/null
@@ -0,0 +1,245 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using System.Threading;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class IntegratedDiscoveryTest
+       {
+               void AssertTcpPortOpen (int port)
+               {
+                       try {
+                               var l = new TcpListener (port);
+                               l.Start ();
+                               l.Stop ();
+                       } catch (Exception ex) {
+                               Assert.Fail (String.Format ("TCP port {0} is not freed", port));
+                       }
+               }
+
+               [Test]
+               public void UseCase1 ()
+               {
+                       RunCodeUnderDiscoveryHost1 (new Uri ("http://localhost:37564"), new Uri ("http://localhost:4949"), new Uri ("http://localhost:4989"), UseCase1Core);
+                       AssertTcpPortOpen (4949);
+                       AssertTcpPortOpen (4989);
+                       AssertTcpPortOpen (37564);
+               }
+
+               void UseCase1Core (Uri serviceUri, AnnouncementEndpoint aEndpoint, DiscoveryEndpoint dEndpoint)
+               {
+                       // actual service, announcing to 4989
+                       var host = new ServiceHost (typeof (TestService));
+                       var sdb = new ServiceDiscoveryBehavior ();
+                       sdb.AnnouncementEndpoints.Add (aEndpoint);
+                       host.Description.Behaviors.Add (sdb);
+                       host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), serviceUri);
+                       host.Open ();
+                       // It does not start announcement very soon, so wait for a while.
+                       Thread.Sleep (1000);
+                       try {
+                               // actual client, with DiscoveryClientBindingElement
+                               var be = new DiscoveryClientBindingElement () { DiscoveryEndpointProvider = new SimpleDiscoveryEndpointProvider (dEndpoint) };
+                               var clientBinding = new CustomBinding (new BasicHttpBinding ());
+                               clientBinding.Elements.Insert (0, be);
+                               var cf = new ChannelFactory<ITestService> (clientBinding, DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                               var ch = cf.CreateChannel ();
+                               Assert.AreEqual ("TEST", ch.Echo ("TEST"), "#1");
+                               cf.Close ();
+                       } finally {
+                               host.Close ();
+                       }
+               }
+
+               void RunCodeUnderDiscoveryHost1 (Uri serviceUri, Uri dHostUri, Uri aHostUri, Action<Uri,AnnouncementEndpoint,DiscoveryEndpoint> action)
+               {
+                       // announcement service
+                       var abinding = new CustomBinding (new HttpTransportBindingElement ());
+                       var aAddress = new EndpointAddress (aHostUri);
+                       var aEndpoint = new AnnouncementEndpoint (abinding, aAddress);
+                       
+                       // discovery service
+                       var dbinding = new CustomBinding (new HttpTransportBindingElement ());
+                       var dAddress = new EndpointAddress (dHostUri);
+                       var dEndpoint = new DiscoveryEndpoint (dbinding, dAddress);
+                       // Without this, .NET rejects the host as if it had no service.
+                       dEndpoint.IsSystemEndpoint = false;
+
+                       // it internally hosts an AnnouncementService
+                       using (var inst = new AnnouncementBoundDiscoveryService (aEndpoint)) {
+                               var host = new ServiceHost (inst);
+                               host.AddServiceEndpoint (dEndpoint);
+                               try {
+                                       host.Open ();
+                                       action (serviceUri, aEndpoint, dEndpoint);
+                               } finally {
+                                       host.Close ();
+                               }
+                       }
+               }
+
+               [Test] // Announcement: UDP, Discovery: HTTP
+               public void UseCase2 ()
+               {
+                       RunCodeUnderDiscoveryHost2 (new Uri ("http://localhost:37564"), new Uri ("http://localhost:4949"), UseCase2Core);
+                       AssertTcpPortOpen (4949);
+                       AssertTcpPortOpen (37564);
+               }
+
+               void UseCase2Core (Uri serviceUri, AnnouncementEndpoint aEndpoint, DiscoveryEndpoint dEndpoint)
+               {
+                       // actual service, announcing to UDP
+                       var host = new ServiceHost (typeof (TestService));
+                       var sdb = new ServiceDiscoveryBehavior ();
+                       sdb.AnnouncementEndpoints.Add (aEndpoint);
+                       host.Description.Behaviors.Add (sdb);
+                       host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), serviceUri);
+                       host.Open ();
+                       // It does not start announcement very soon, so wait for a while.
+                       Thread.Sleep (1000);
+                       try {
+                               // actual client, with DiscoveryClientBindingElement
+                               var be = new DiscoveryClientBindingElement () { DiscoveryEndpointProvider = new SimpleDiscoveryEndpointProvider (dEndpoint) };
+                               var clientBinding = new CustomBinding (new BasicHttpBinding ());
+                               clientBinding.Elements.Insert (0, be);
+                               var cf = new ChannelFactory<ITestService> (clientBinding, DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                               var ch = cf.CreateChannel ();
+                               Assert.AreEqual ("TEST", ch.Echo ("TEST"), "#1");
+                       } finally {
+                               host.Close ();
+                       }
+               }
+
+               void RunCodeUnderDiscoveryHost2 (Uri serviceUri, Uri dHostUri, Action<Uri,AnnouncementEndpoint,DiscoveryEndpoint> action)
+               {
+                       // announcement service
+                       var aEndpoint = new UdpAnnouncementEndpoint (new Uri ("soap.udp://239.255.255.250:3802/"));
+                       
+                       // discovery service
+                       var dbinding = new CustomBinding (new HttpTransportBindingElement ());
+                       var dAddress = new EndpointAddress (dHostUri);
+                       var dEndpoint = new DiscoveryEndpoint (dbinding, dAddress);
+                       // Without this, .NET rejects the host as if it had no service.
+                       dEndpoint.IsSystemEndpoint = false;
+
+                       // it internally hosts an AnnouncementService
+                       using (var inst = new AnnouncementBoundDiscoveryService (aEndpoint)) {
+                               var host = new ServiceHost (inst);
+                               host.AddServiceEndpoint (dEndpoint);
+                               try {
+                                       host.Open ();
+                                       action (serviceUri, aEndpoint, dEndpoint);
+                               } finally {
+                                       host.Close ();
+                               }
+                       }
+               }
+
+               [Test]
+               public void UseCase3 ()
+               {
+                       RunCodeUnderDiscoveryHost3 (new Uri ("http://localhost:37564"), new Uri ("http://localhost:4989"), UseCase3Core);
+                       AssertTcpPortOpen (4989);
+                       AssertTcpPortOpen (37564);
+               }
+
+               void UseCase3Core (Uri serviceUri, AnnouncementEndpoint aEndpoint, DiscoveryEndpoint dEndpoint)
+               {
+                       // actual service, announcing to 4989
+                       var host = new ServiceHost (typeof (TestService));
+                       var sdb = new ServiceDiscoveryBehavior ();
+                       sdb.AnnouncementEndpoints.Add (aEndpoint);
+                       host.Description.Behaviors.Add (sdb);
+                       host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), serviceUri);
+                       host.Open ();
+                       // It does not start announcement very soon, so wait for a while.
+                       Thread.Sleep (1000);
+                       try {
+                               // actual client, with DiscoveryClientBindingElement
+                               var be = new DiscoveryClientBindingElement () { DiscoveryEndpointProvider = new SimpleDiscoveryEndpointProvider (dEndpoint) };
+                               var clientBinding = new CustomBinding (new BasicHttpBinding ());
+                               clientBinding.Elements.Insert (0, be);
+                               var cf = new ChannelFactory<ITestService> (clientBinding, DiscoveryClientBindingElement.DiscoveryEndpointAddress);
+                               var ch = cf.CreateChannel ();
+                               Assert.AreEqual ("TEST", ch.Echo ("TEST"), "#1");
+                               cf.Close ();
+                       } finally {
+                               host.Close ();
+                       }
+               }
+
+               void RunCodeUnderDiscoveryHost3 (Uri serviceUri, Uri aHostUri, Action<Uri,AnnouncementEndpoint,DiscoveryEndpoint> action)
+               {
+                       // announcement service
+                       var abinding = new CustomBinding (new HttpTransportBindingElement ());
+                       var aAddress = new EndpointAddress (aHostUri);
+                       var aEndpoint = new AnnouncementEndpoint (abinding, aAddress);
+                       
+                       // discovery service
+                       var dEndpoint = new UdpDiscoveryEndpoint (DiscoveryVersion.WSDiscovery11, new Uri ("soap.udp://239.255.255.250:3802/"));
+                       // Without this, .NET rejects the host as if it had no service.
+                       dEndpoint.IsSystemEndpoint = false;
+
+                       // it internally hosts an AnnouncementService
+                       using (var inst = new AnnouncementBoundDiscoveryService (aEndpoint)) {
+                               var host = new ServiceHost (inst);
+                               host.AddServiceEndpoint (dEndpoint);
+                               try {
+                                       host.Open ();
+                                       action (serviceUri, aEndpoint, dEndpoint);
+                               } finally {
+                                       host.Close ();
+                               }
+                       }
+               }
+
+               class SimpleDiscoveryEndpointProvider : DiscoveryEndpointProvider
+               {
+                       public SimpleDiscoveryEndpointProvider (DiscoveryEndpoint endpoint)
+                       {
+                               this.endpoint = endpoint;
+                       }
+                       
+                       DiscoveryEndpoint endpoint;
+                       
+                       public override DiscoveryEndpoint GetDiscoveryEndpoint ()
+                       {
+                               return endpoint;
+                       }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/MyDiscoveryServiceTypes.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/MyDiscoveryServiceTypes.cs
new file mode 100644 (file)
index 0000000..d3390f0
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace System.ServiceModel.Discovery
+{
+       public class MyServiceDiscoveryBehavior : ServiceDiscoveryBehavior, IServiceBehavior
+       {
+               IServiceBehavior GetBase ()
+               {
+                       var sdb = (ServiceDiscoveryBehavior) this;
+                       return (IServiceBehavior) sdb;
+               }
+
+               void IServiceBehavior.AddBindingParameters (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collection<ServiceEndpoint> endpoints, BindingParameterCollection bindingParameters)
+               {
+                       GetBase ().AddBindingParameters (serviceDescription, serviceHostBase, endpoints, bindingParameters);
+               }
+
+               void IServiceBehavior.ApplyDispatchBehavior (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
+               {
+                       GetBase ().ApplyDispatchBehavior (serviceDescription, serviceHostBase);
+               }
+
+               void IServiceBehavior.Validate (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
+               {
+                       if (serviceHostBase == null)
+                               throw new ArgumentNullException ("serviceHostBase");
+                       var dse = serviceHostBase.Extensions.Find<DiscoveryServiceExtension> ();
+                       if (dse == null) {
+                               dse = new MyDiscoveryServiceExtension ();
+                               serviceHostBase.Extensions.Add (dse);
+                       }
+
+                       GetBase ().Validate (serviceDescription, serviceHostBase);
+               }
+       }
+
+       public class MyDiscoveryServiceExtension : DiscoveryServiceExtension
+       {
+               protected override DiscoveryService GetDiscoveryService ()
+               {
+                       return new MyDiscoveryService ();
+               }
+       }
+
+       public class MyDiscoveryService : DiscoveryService
+       {
+               protected override IAsyncResult OnBeginFind (FindRequestContext findRequestContext, AsyncCallback callback, Object state)
+               {
+                       Console.Error.WriteLine ("OnBeginFind");
+                       throw new Exception ("1");
+               }
+
+               protected override IAsyncResult OnBeginResolve (ResolveCriteria resolveCriteria, AsyncCallback callback, Object state)
+               {
+                       Console.Error.WriteLine ("OnBeginResolve");
+                       throw new Exception ("2");
+               }
+
+               protected override void OnEndFind (IAsyncResult result)
+               {
+                       Console.Error.WriteLine ("OnEndFind");
+                       throw new Exception ("3");
+               }
+
+               protected override EndpointDiscoveryMetadata OnEndResolve (IAsyncResult result)
+               {
+                       Console.Error.WriteLine ("OnEndResolve");
+                       throw new Exception ("4");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/ServiceDiscoveryBehaviorTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/ServiceDiscoveryBehaviorTest.cs
new file mode 100644 (file)
index 0000000..0707aa0
--- /dev/null
@@ -0,0 +1,165 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class ServiceDiscoveryBehaviorTest
+       {
+               [Test]
+               public void Use ()
+               {
+                       var b = new ServiceDiscoveryBehavior ();
+                       b.AnnouncementEndpoints.Add (new UdpAnnouncementEndpoint ());
+                       IServiceBehavior sb = b;
+                       var host = new ServiceHost (new Uri ("http://localhost:37564"));
+
+                       var bc = new BindingParameterCollection ();
+                       sb.AddBindingParameters (host.Description, host, host.Description.Endpoints, bc);
+                       Assert.AreEqual (0, bc.Count, "#1");
+
+                       Assert.AreEqual (0, host.Extensions.Count, "#2-1");
+                       sb.Validate (host.Description, host);
+                       // ... should "validate" not "apply dispatch behavior" do "add host extension" job? I doubt that.
+                       Assert.AreEqual (1, host.Extensions.Count, "#2-2");
+                       var dse = host.Extensions.Find<DiscoveryServiceExtension> ();
+                       Assert.IsNotNull (dse, "#2-3");
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#2-4");
+
+                       Assert.AreEqual (0, host.ChannelDispatchers.Count, "#3-1");
+                       sb.ApplyDispatchBehavior (host.Description, host);
+                       Assert.AreEqual (0, host.Description.Endpoints.Count, "#3-2");
+                       Assert.AreEqual (2, host.ChannelDispatchers.Count, "#3-3"); // for online and offline announcements
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#3-4"); // discovery endpoints are not "published"
+                       int idx = 0;
+                       foreach (var cdisb in host.ChannelDispatchers) {
+                               var cdis = cdisb as ChannelDispatcher;
+                               string head = "#4." + idx + ".";
+                               Assert.IsNull (cdis, head + "dispatcher");
+                               if (cdisb.Listener != null)
+                                       Assert.AreEqual ("urn:schemas-microsoft-org:ws:2008:07:discovery", cdisb.Listener.Uri.ToString (), head + "uri");
+                               // else ... WHOA! .NET "OnlineAnnouncementChannelDispatcher" type does not seem to provide the listener.
+                               idx++;
+                       }
+               }
+
+               [Test]
+               public void Use2 ()
+               {
+                       var b = new ServiceDiscoveryBehavior ();
+                       b.AnnouncementEndpoints.Add (new UdpAnnouncementEndpoint ());
+                       IServiceBehavior sb = b;
+                       var host = new ServiceHost (typeof (TestService));
+                       var se = host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+
+                       var bc = new BindingParameterCollection ();
+                       sb.AddBindingParameters (host.Description, host, host.Description.Endpoints, bc);
+                       Assert.AreEqual (0, bc.Count, "#1");
+                       Assert.AreEqual (0, host.Extensions.Count, "#1-2");
+                       Assert.AreEqual (0, se.Behaviors.Count, "#1-3");
+
+                       sb.Validate (host.Description, host);
+                       // ... should "validate" not "apply dispatch behavior" do "add host extension" job? I doubt that.
+                       Assert.AreEqual (1, host.Extensions.Count, "#2-2");
+                       var dse = host.Extensions.Find<DiscoveryServiceExtension> ();
+                       Assert.IsNotNull (dse, "#2-3");
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#2-4");
+                       Assert.AreEqual (1, se.Behaviors.Count, "#2-5"); // Validate() adds endpoint initialization behavior.
+
+                       Assert.AreEqual (0, host.ChannelDispatchers.Count, "#3-1");
+                       sb.ApplyDispatchBehavior (host.Description, host);
+                       Assert.AreEqual (1, host.Description.Endpoints.Count, "#3-2");
+                       Assert.AreEqual (2, host.ChannelDispatchers.Count, "#3-3"); // for online and offline announcements
+                       Assert.AreEqual (0, dse.PublishedEndpoints.Count, "#3-4"); // discovery endpoints are not "published"
+                       Assert.AreEqual (1, se.Behaviors.Count, "#3-5");
+
+                       // The IEndpointBehavior from ServiceDiscoveryBehavior, when ApplyDispatchBehavior() is invoked, publishes an endpoint.
+                       se.Behaviors [0].ApplyDispatchBehavior (se, new EndpointDispatcher (new EndpointAddress ("http://localhost:37564"), "ITestService", "http://tempuri.org/"));
+                       Assert.AreEqual (2, host.ChannelDispatchers.Count, "#3-6-1"); // for online and offline announcements
+                       Assert.AreEqual (1, dse.PublishedEndpoints.Count, "#3-6-2"); // The endpoint is newly published.
+
+                       host.Open ();
+                       try {
+                               Assert.AreEqual (3, host.ChannelDispatchers.Count, "#4-1"); // for online and offline announcements
+                               Assert.AreEqual (2, dse.PublishedEndpoints.Count, "#4-2"); // The endpoint is published again. (Not sure if it's worthy of testing.)
+                       } finally {
+                               host.Close ();
+                       }
+               }
+
+               [Test]
+               public void UseHttpBinding ()
+               {
+                       var ahost = new ServiceHost (typeof (AnnouncementService));
+                       var aendpoint = new AnnouncementEndpoint (new CustomBinding (new HttpTransportBindingElement ()), new EndpointAddress ("http://localhost:4989"));
+                       var ib = new InspectionBehavior ();
+                       object state = new object ();
+                       ib.RequestReceived += delegate {
+                               InspectionBehavior.State = state;
+                               return null;
+                       };
+                       aendpoint.Behaviors.Add (ib);
+                       ahost.AddServiceEndpoint (aendpoint);
+                       ahost.Open ();
+                       try {
+                               Assert.IsTrue (ib.DispatchBehaviorApplied, "#1");
+                               var b = new ServiceDiscoveryBehavior ();
+                               b.AnnouncementEndpoints.Add (new AnnouncementEndpoint (new CustomBinding (new HttpTransportBindingElement ()), new EndpointAddress ("http://localhost:4989")));
+                               IServiceBehavior sb = b;
+                               var host = new ServiceHost (typeof (TestService));
+                               var se = host.AddServiceEndpoint (typeof (ITestService), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+
+                               var bc = new BindingParameterCollection ();
+                               sb.AddBindingParameters (host.Description, host, host.Description.Endpoints, bc);
+                               sb.Validate (host.Description, host);
+                               // ... should "validate" not "apply dispatch behavior" do "add host extension" job? I doubt that.
+                               var dse = host.Extensions.Find<DiscoveryServiceExtension> ();
+                               Assert.IsNotNull (dse, "#2");
+                               sb.ApplyDispatchBehavior (host.Description, host);
+
+                               // The IEndpointBehavior from ServiceDiscoveryBehavior, when ApplyDispatchBehavior() is invoked, publishes an endpoint.
+                               se.Behaviors [0].ApplyDispatchBehavior (se, new EndpointDispatcher (new EndpointAddress ("http://localhost:37564"), "ITestService", "http://tempuri.org/"));
+
+                               host.Open ();
+                               try {
+                                       Assert.AreEqual (state, InspectionBehavior.State, "#3");
+                               } finally {
+                                       host.Close ();
+                               }
+                       } finally {
+                               ahost.Close ();
+                       }
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpAnnouncementEndpointTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpAnnouncementEndpointTest.cs
new file mode 100644 (file)
index 0000000..ecd7c1c
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class UdpAnnouncementEndpointTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var de = new UdpAnnouncementEndpoint ();
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, de.DiscoveryVersion, "#1");
+                       Assert.AreEqual (TimeSpan.FromMilliseconds (500), de.MaxAnnouncementDelay, "#2");
+                       Assert.IsNotNull (de.Contract, "#11"); // some version-dependent internal type.
+                       Assert.AreEqual ("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01", de.Contract.Namespace, "#11-2");
+                       Assert.AreEqual ("Client", de.Contract.Name, "#11-3");
+                       Assert.IsNotNull (de.Binding, "#12");
+                       TransportBindingElement tbe = null;
+                       Assert.IsTrue (de.Binding.CreateBindingElements ().Any (be => (tbe = be as TransportBindingElement) != null && tbe.Scheme == "soap.udp"), "#12-2");
+                       Assert.IsNotNull (de.Address, "#13");
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11.AdhocAddress, de.Address.Uri, "#13-2");
+                       Assert.AreEqual (Socket.SupportsIPv4 ? UdpAnnouncementEndpoint.DefaultIPv4MulticastAddress : UdpAnnouncementEndpoint.DefaultIPv6MulticastAddress, de.ListenUri, "#14");
+
+                       // .NET has two endpoint behaviors: DiscoveryViaBehavior and UdpContractFilterBehavior. Not worthy of testing that though.
+                       // Assert.AreEqual (2, de.Behaviors.Count, "#15");
+                       // foreach (var eb in de.Behaviors) Console.Error.WriteLine (eb);
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpDiscoveryEndpointTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpDiscoveryEndpointTest.cs
new file mode 100644 (file)
index 0000000..f124cb8
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class UdpDiscoveryEndpointTest
+       {
+               [Test]
+               public void DefaultValues ()
+               {
+                       var de = new UdpDiscoveryEndpoint ();
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11, de.DiscoveryVersion, "#1");
+                       Assert.AreEqual (ServiceDiscoveryMode.Adhoc, de.DiscoveryMode, "#2");
+                       Assert.AreEqual (TimeSpan.FromMilliseconds (500), de.MaxResponseDelay, "#3");
+                       var cd = de.Contract;
+                       Assert.IsNotNull (cd, "#11");
+                       Assert.IsNotNull (de.Binding, "#12");
+                       TransportBindingElement tbe;
+                       Assert.IsTrue (de.Binding.CreateBindingElements ().Any (be => (tbe = be as TransportBindingElement) != null && tbe.Scheme == "soap.udp"), "#12-2");
+                       Assert.IsNotNull (de.Address, "#13");
+                       Assert.AreEqual (DiscoveryVersion.WSDiscovery11.AdhocAddress, de.Address.Uri, "#13-2");
+                       Assert.AreEqual (Socket.SupportsIPv4 ? UdpDiscoveryEndpoint.DefaultIPv4MulticastAddress : UdpDiscoveryEndpoint.DefaultIPv6MulticastAddress, de.ListenUri, "#14");
+               }
+       }
+}
diff --git a/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpTransportTest.cs b/mcs/class/System.ServiceModel.Discovery/Test/System.ServiceModel.Discovery/UdpTransportTest.cs
new file mode 100644 (file)
index 0000000..71e1c14
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// Author: Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net.Sockets;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.ServiceModel.Discovery;
+using System.ServiceModel.Dispatcher;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Discovery
+{
+       [TestFixture]
+       public class UdpTransportTest
+       {
+               [Test]
+               public void DefaultSettings ()
+               {
+                       var binding = new UdpDiscoveryEndpoint ().Binding;
+                       Assert.AreEqual (TimeSpan.FromMinutes (1), binding.SendTimeout, "#1");
+                       Assert.AreEqual (TimeSpan.FromMinutes (10), binding.ReceiveTimeout, "#2");
+               }
+
+               [Test]
+               public void CanBuildChannelFactory ()
+               {
+                       var binding = new UdpDiscoveryEndpoint ().Binding;
+                       Assert.IsFalse (binding.CanBuildChannelFactory<IRequestChannel> (), "#1");
+                       Assert.IsFalse (binding.CanBuildChannelFactory<IRequestSessionChannel> (), "#2");
+                       Assert.IsTrue (binding.CanBuildChannelFactory<IDuplexChannel> (), "#3");
+                       Assert.IsFalse (binding.CanBuildChannelFactory<IDuplexSessionChannel> (), "#4");
+                       Assert.IsFalse (binding.CanBuildChannelFactory<IOutputChannel> (), "#5");
+                       Assert.IsFalse (binding.CanBuildChannelFactory<IOutputSessionChannel> (), "#6");
+               }
+
+               [Test]
+               public void CanBuildChannelListener ()
+               {
+                       var binding = new UdpDiscoveryEndpoint ().Binding;
+                       Assert.IsFalse (binding.CanBuildChannelListener<IRequestChannel> (), "#1");
+                       Assert.IsFalse (binding.CanBuildChannelListener<IRequestSessionChannel> (), "#2");
+                       Assert.IsTrue (binding.CanBuildChannelListener<IDuplexChannel> (), "#3");
+                       Assert.IsFalse (binding.CanBuildChannelListener<IDuplexSessionChannel> (), "#4");
+                       Assert.IsFalse (binding.CanBuildChannelListener<IOutputChannel> (), "#5");
+                       Assert.IsFalse (binding.CanBuildChannelListener<IOutputSessionChannel> (), "#6");
+               }
+       }
+}
index c0da0036775ca8ed919f3242bf7faf4ced96015d..6f50d3b680566c3e86b50c17b3e025c8ec0c0dfa 100644 (file)
@@ -61,7 +61,7 @@ using System.Runtime.InteropServices;
 #endif
 
 #if NET_2_1
-[assembly: InternalsVisibleTo ("System.Json, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
+[assembly: InternalsVisibleTo ("System.Json, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
 [assembly: InternalsVisibleTo ("System.ServiceModel.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
 #else
 [assembly: InternalsVisibleTo ("dummy-System.Json, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
index ade35f02f1fef711f29f0c4cc5fb471545eb94fb..d5064169f7d10f6f9af434b650f4ff403b62447d 100644 (file)
@@ -46,7 +46,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public partial class WebHttpBindingCollectionElement
                 : StandardBindingCollectionElement<WebHttpBinding, WebHttpBindingElement>
        {
@@ -62,9 +61,12 @@ namespace System.ServiceModel.Configuration
                {
                }
 
+               // Methods
 
-               // Properties
-
+               protected override Binding GetDefault ()
+               {
+                       return new WebHttpBinding ();
+               }
 
        }
 
index 1e5b0f77bbccb8456825642031d46be52958bba1..ca61760f377cf5d2568007c0ffb071cd786f286c 100644 (file)
@@ -46,7 +46,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public partial class WebHttpBindingElement
                 : StandardBindingElement,  IBindingConfigurationElement
        {
@@ -135,6 +134,10 @@ namespace System.ServiceModel.Configuration
                {
                }
 
+               public WebHttpBindingElement (string name)
+               {
+                       this.Name = name;
+               }
 
                // Properties
 
@@ -273,7 +276,26 @@ namespace System.ServiceModel.Configuration
                        webBinding.UseDefaultWebProxy = UseDefaultWebProxy;
                        webBinding.WriteEncoding = WriteEncoding;
 
-                       Security.ApplyConfiguration(webBinding.Security);
+                       Security.ApplyConfiguration (webBinding.Security);
+               }
+
+               protected override void InitializeFrom (Binding binding)
+               {
+                       WebHttpBinding b = (WebHttpBinding)binding;
+                       
+                       AllowCookies = b.AllowCookies;
+                       BypassProxyOnLocal = b.BypassProxyOnLocal;
+                       HostNameComparisonMode = b.HostNameComparisonMode;
+                       MaxBufferPoolSize = b.MaxBufferPoolSize;
+                       MaxBufferSize = b.MaxBufferSize;
+                       MaxReceivedMessageSize = b.MaxReceivedMessageSize;
+                       if(ProxyAddress != null)
+                                ProxyAddress = b.ProxyAddress;
+                       TransferMode = b.TransferMode;
+                       UseDefaultWebProxy = b.UseDefaultWebProxy;
+                       WriteEncoding = b.WriteEncoding;
+
+                       Security.InitializeFrom (b.Security);
                }
        }
 
index ff88ee6349baf1508b0c95d5d6597b7716badea5..55e160188a5e0362657716d8f55ddcd5da149043 100644 (file)
@@ -46,7 +46,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public sealed partial class WebHttpElement
                 : BehaviorExtensionElement
        {
index f14e37782d21a4acfe5645478fd2c7d1a50c8094..5eb76fbb9e480e8ad6ade32d2eca89c0a54ca539 100644 (file)
@@ -46,7 +46,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public sealed partial class WebHttpSecurityElement
                 : ConfigurationElement
        {
@@ -101,6 +100,12 @@ namespace System.ServiceModel.Configuration
                        security.Mode = Mode;
                        security.Transport.ClientCredentialType = Transport.ClientCredentialType;
                }
+               
+               internal void InitializeFrom (WebHttpSecurity security)
+               {
+                       Mode = security.Mode;
+                       Transport.ClientCredentialType = security.Transport.ClientCredentialType;
+               }
        }
 
 }
index 48e715264d047f12911da79d210d43fc31fd3b1e..025ae3f80b0f8fd92d49850b7f21f6dfce8707a3 100644 (file)
@@ -46,7 +46,6 @@ using System.Xml;
 
 namespace System.ServiceModel.Configuration
 {
-       [MonoTODO]
        public sealed partial class WebMessageEncodingElement
                 : BindingElementExtensionElement
        {
@@ -152,10 +151,53 @@ namespace System.ServiceModel.Configuration
                        set { base [web_content_type_mapper_type] = value; }
                }
 
-               [MonoTODO]
                protected internal override BindingElement CreateBindingElement ()
                {
-                       throw new NotImplementedException ();
+                       var be = new WebMessageEncodingBindingElement ();
+                       ApplyConfiguration (be);
+                       return be;
+               }
+               
+               public override void ApplyConfiguration (BindingElement bindingElement)
+               {
+                       base.ApplyConfiguration (bindingElement);
+                       var b = (WebMessageEncodingBindingElement) bindingElement;
+                       b.ContentTypeMapper = (WebContentTypeMapper) Activator.CreateInstance (Type.GetType (WebContentTypeMapperType), true);
+                       b.MaxReadPoolSize = MaxReadPoolSize;
+                       b.MaxWritePoolSize = MaxWritePoolSize;
+                       b.WriteEncoding = WriteEncoding;
+                       ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
+               }
+
+               public override void CopyFrom (ServiceModelExtensionElement from)
+               {
+                       base.CopyFrom (from);
+                       var c = (WebMessageEncodingElement) from;
+                       MaxReadPoolSize = c.MaxReadPoolSize;
+                       MaxWritePoolSize = c.MaxWritePoolSize;
+                       ReaderQuotas.CopyFrom (c.ReaderQuotas);
+                       WriteEncoding = c.WriteEncoding;
+               }
+       }
+       
+       static class Extensions
+       {
+               public static void ApplyConfiguration (this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotas q)
+               {
+                       q.MaxArrayLength = e.MaxArrayLength;
+                       q.MaxBytesPerRead = e.MaxBytesPerRead;
+                       q.MaxDepth = e.MaxDepth;
+                       q.MaxNameTableCharCount = e.MaxNameTableCharCount;
+                       q.MaxStringContentLength = e.MaxStringContentLength;
+               }
+
+               public static void CopyFrom (this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotasElement o)
+               {
+                       e.MaxArrayLength = o.MaxArrayLength;
+                       e.MaxBytesPerRead = o.MaxBytesPerRead;
+                       e.MaxDepth = o.MaxDepth;
+                       e.MaxNameTableCharCount = o.MaxNameTableCharCount;
+                       e.MaxStringContentLength = o.MaxStringContentLength;
                }
        }
 }
index 80026420cade96d00df95502a87aabf29983c203..4c62750cc3148db88aaca1bc9cab186eddb45632 100644 (file)
@@ -263,6 +263,7 @@ namespace System.ServiceModel.Description
                                throw new InvalidOperationException ("ManualAddressing in the transport binding element in the binding must be true for WebHttpBehavior");
                }
 
+#if !NET_2_1
                internal class WebHttpErrorHandler : IErrorHandler
                {
                        public void ProvideFault (Exception error, MessageVersion version, ref Message fault)
@@ -307,5 +308,6 @@ namespace System.ServiceModel.Description
                                throw new InvalidOperationException ();
                        }
                }
+#endif
        }
 }
index 517a4c0e615f9187dbbe9bb787ddbf2fdf00eb07..5e21c07c086187f42c4122959e088f1636cb381a 100644 (file)
@@ -157,6 +157,7 @@ namespace System.ServiceModel.Channels.Http
 
        abstract class HttpRequestInfo
        {
+               public abstract long ContentLength64 { get; }
                public abstract NameValueCollection QueryString { get; }
                public abstract NameValueCollection Headers { get; }
                public abstract Uri Url { get; }
@@ -174,6 +175,9 @@ namespace System.ServiceModel.Channels.Http
                
                HttpListenerRequest req;
 
+               public override long ContentLength64 {
+                       get { return req.ContentLength64; }
+               }
                public override NameValueCollection QueryString {
                        get { return req.QueryString; }
                }
@@ -203,6 +207,9 @@ namespace System.ServiceModel.Channels.Http
                
                HttpRequest req;
 
+               public override long ContentLength64 {
+                       get { return req.ContentLength; }
+               }
                public override NameValueCollection QueryString {
                        get { return req.QueryString; }
                }
index 3bae51bd5fbfbca49cbeab7060adc0b3fab2166e..2d1b592d946d6b9ea60d5632058d71d20fe53330 100644 (file)
@@ -90,7 +90,9 @@ namespace System.ServiceModel.Channels.Http
                        DateTime start = DateTime.Now;
 
                        context = null;
-                       var ce = Entries.First (e => e.ChannelDispatcher == channel);
+                       var ce = Entries.FirstOrDefault (e => e.ChannelDispatcher == channel);
+                       if (ce == null)
+                               return false;
                        lock (ce.RetrieverLock) {
                                var q = ce.ContextQueue;
                                if (q.Count == 0) {
@@ -132,7 +134,7 @@ namespace System.ServiceModel.Channels.Http
 
                        // Start here. It is shared between channel listeners
                        // that share the same listen Uri. So there is no other appropriate place.
-#if true
+#if USE_SEPARATE_LOOP // this cannot be enabled because it causes infinite loop when ChannelDispatcher is not involved.
                        loop = new Thread (new ThreadStart (delegate {
                                listener.Start ();
                                try {
@@ -145,6 +147,7 @@ namespace System.ServiceModel.Channels.Http
                        }));
                        loop.Start ();
 #else
+                       listener.Start ();
                        listener.BeginGetContext (GetContextCompleted, null);
 #endif
                }
@@ -158,7 +161,7 @@ namespace System.ServiceModel.Channels.Http
                        if (Entries.Count > 0)
                                return;
 
-#if true
+#if USE_SEPARATE_LOOP
                        loop.Abort ();
 #else
                        this.listener.Stop ();
index 0770e6007dbfaf60c0fc5f2bedbd4824688586f5..916c06a86caf118751f6d3efc02af3ee193c5bba 100644 (file)
@@ -177,8 +177,29 @@ namespace System.ServiceModel.Channels.Http
                        // FIXME: supply maxSizeOfHeaders.
                        int maxSizeOfHeaders = 0x10000;
 
+#if false // FIXME: enable it, once duplex callback test gets passed.
+                       Stream stream = ctxi.Request.InputStream;
+                       if (source.Source.TransferMode == TransferMode.Buffered) {
+                               if (ctxi.Request.ContentLength64 <= 0)
+                                       throw new ArgumentException ("This HTTP channel is configured to use buffered mode, and thus expects Content-Length sent to the listener");
+                               long size = 0;
+                               var ms = new MemoryStream ();
+                               var buf = new byte [0x1000];
+                               while (size < ctxi.Request.ContentLength64) {
+                                       if ((size += stream.Read (buf, 0, 0x1000)) > source.Source.MaxBufferSize)
+                                               throw new QuotaExceededException ("Message quota exceeded");
+                                       ms.Write (buf, 0, (int) (size - ms.Length));
+                               }
+                               ms.Position = 0;
+                               stream = ms;
+                       }
+
+                       var msg = Encoder.ReadMessage (
+                               stream, maxSizeOfHeaders, ctxi.Request.ContentType);
+#else
                        var msg = Encoder.ReadMessage (
                                ctxi.Request.InputStream, maxSizeOfHeaders, ctxi.Request.ContentType);
+#endif
 
                        if (MessageVersion.Envelope.Equals (EnvelopeVersion.Soap11) ||
                            MessageVersion.Addressing.Equals (AddressingVersion.None)) {
index b5c1508a5ff88803528ef480edcde5cce550f5ed..c53b70faa697088ab2c7f09d9d0f8add29249197 100644 (file)
@@ -183,7 +183,7 @@ namespace System.ServiceModel.Channels
                                return (T) (object) GetCapabilities ();
                        if (typeof (T) == typeof (IdentityVerifier))
                                throw new NotImplementedException ();
-                       return context.GetInnerProperty<T> ();
+                       return base.GetProperty<T> (context);
                }
 
                AsymmetricSecurityCapabilities GetCapabilities ()
index c92c3b07d9364929690183dfce17ae66f1fdcf90..ba3a5511f31fb61f7efcd6bc4cf443d6c3525c23 100644 (file)
@@ -163,6 +163,18 @@ namespace System.ServiceModel.Channels
                                                using (Stream s = web_request.EndGetRequestStream (r))
                                                        s.Write (buffer.GetBuffer (), 0, (int) buffer.Length);
                                                web_request.BeginGetResponse (GotResponse, result);
+                                       } catch (WebException ex) {
+                                               switch (ex.Status) {
+#if !NET_2_1
+                                               case WebExceptionStatus.NameResolutionFailure:
+#endif
+                                               case WebExceptionStatus.ConnectFailure:
+                                                       result.Complete (new EndpointNotFoundException (new EndpointNotFoundException ().Message, ex));
+                                                       break;
+                                               default:
+                                                       result.Complete (ex);
+                                                       break;
+                                               }
                                        } catch (Exception ex) {
                                                result.Complete (ex);
                                        }
index 12380cce602d8ade27e956ee55230c992baf35bf..0303aed9f010415ef03ba6a101529db861b370bc 100644 (file)
@@ -50,6 +50,13 @@ namespace System.ServiceModel.Channels
 
                public abstract MessageVersion MessageVersion { get; set; }
 
+               public override T GetProperty<T> (BindingContext ctx)
+               {
+                       if (typeof (T) == typeof (MessageVersion))
+                               return (T) (object) MessageVersion;
+                       return ctx.GetInnerProperty<T> ();
+               }
+
 #if !NET_2_1
                [MonoTODO]
                protected virtual void OnImportPolicy (XmlElement assertion,
index 80e2800217e256ad05bf572db4d9da8f5a0edb9c..6fe0bb1905025403d28818e676dbac0e3ee536be 100644 (file)
@@ -167,6 +167,14 @@ namespace System.ServiceModel.Channels
                        BuildChannelListenerCore<TChannel> (BindingContext context)
                        where TChannel : class, IChannel;
 
+               public override T GetProperty<T> (BindingContext context)
+               {
+                       // It is documented that ISecurityCapabilities and IdentityVerifier can be returned.
+                       // Though, this class is not inheritable, and they are returned by the derived types.
+                       // So I don't care about them here.
+                       return context.GetInnerProperty<T> ();
+               }
+
                public virtual void SetKeyDerivation (bool requireDerivedKeys)
                {
                        endpoint.SetKeyDerivation (requireDerivedKeys);
index 27322761f756a4412978218ce579eac480ff93b1..ab44494bea80b5007080d44e8453e39e0b5ee313 100644 (file)
@@ -158,7 +158,7 @@ namespace System.ServiceModel.Channels
                                return (T) (object) GetCapabilities ();
                        if (typeof (T) == typeof (IdentityVerifier))
                                throw new NotImplementedException ();
-                       return context.GetInnerProperty<T> ();
+                       return base.GetProperty<T> (context);
                }
 
                SymmetricSecurityCapabilities GetCapabilities ()
index 5a5ab97a25ebba46edfd3dfea0be1ba64caac11b..1786a93db541642509c4dadc1be9256272fe8688 100644 (file)
@@ -100,6 +100,30 @@ namespace System.ServiceModel.Configuration
                        return new EndpointAddress (el.Address, el.Identity.CreateInstance (), el.Headers.Headers);
                }
 
+               public static void CopyFrom (this ChannelEndpointElement to, ChannelEndpointElement from)
+               {
+                       to.Address = from.Address;
+                       to.BehaviorConfiguration = from.BehaviorConfiguration;
+                       to.Binding = from.Binding;
+                       to.BindingConfiguration = from.BindingConfiguration;
+                       to.Contract = from.Contract;
+                       if (from.Headers != null)
+                               to.Headers.Headers = from.Headers.Headers;
+                       if (from.Identity != null)
+                               to.Identity.InitializeFrom (from.Identity.CreateInstance ());
+                       to.Name = from.Name;
+               }
+
+               public static EndpointAddress CreateEndpointAddress (this ChannelEndpointElement el)
+               {
+                       return new EndpointAddress (el.Address, el.Identity != null ? el.Identity.CreateInstance () : null, el.Headers.Headers);
+               }
+
+               public static EndpointAddress CreateEndpointAddress (this ServiceEndpointElement el)
+               {
+                       return new EndpointAddress (el.Address, el.Identity != null ? el.Identity.CreateInstance () : null, el.Headers.Headers);
+               }
+
                public static EndpointIdentity CreateInstance (this IdentityElement el)
                {
                        if (el.Certificate != null)
index 3859aaab2db9908e6b8afac48a2f2aacb44b6452..cd94210b92e23040662f8eafeba357b7c511acdf 100644 (file)
@@ -32,6 +32,7 @@ using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Configuration;
+using System.Linq;
 using System.Net;
 using System.Net.Security;
 using System.Reflection;
@@ -99,24 +100,29 @@ namespace System.ServiceModel.Configuration
                        get { return (UserPrincipalNameElement) base ["userPrincipalName"]; }
                }
 
-
+               // it was extraneous...
                internal EndpointIdentity Create ()
                {
-                       if (Certificate != null && !String.IsNullOrEmpty (Certificate.EncodedValue))
-                               return new X509CertificateEndpointIdentity (new X509Certificate2 (Convert.FromBase64String (Certificate.EncodedValue)));
-                       if (CertificateReference != null && !String.IsNullOrEmpty (CertificateReference.FindValue))
-                               // FIXME: imeplement
-                               throw new NotImplementedException ();
-                       if (Dns != null && !String.IsNullOrEmpty (Dns.Value))
-                               return new DnsEndpointIdentity (Dns.Value);
-                       if (Rsa != null && !String.IsNullOrEmpty (Rsa.Value))
-                               return new RsaEndpointIdentity (Rsa.Value);
-                       if (ServicePrincipalName != null && !String.IsNullOrEmpty (ServicePrincipalName.Value))
-                               return new SpnEndpointIdentity (ServicePrincipalName.Value);
-                       if (UserPrincipalName != null && !String.IsNullOrEmpty (UserPrincipalName.Value))
-                               return new UpnEndpointIdentity (UserPrincipalName.Value);
+                       return ConfigUtil.CreateInstance (this);
+               }
+
+               public void InitializeFrom (EndpointIdentity identity)
+               {
+                       if (identity == null)
+                               throw new ArgumentNullException ("identity");
 
-                       return null;
+                       if (identity is X509CertificateEndpointIdentity)
+                               Certificate.EncodedValue = Convert.ToBase64String (((X509CertificateEndpointIdentity) identity).Certificates [0].RawData);
+                       else if (identity is DnsEndpointIdentity)
+                               Dns.Value = (string) ((DnsEndpointIdentity) identity).IdentityClaim.Resource;
+                       else if (identity is RsaEndpointIdentity)
+                               Rsa.Value = (string) ((RsaEndpointIdentity) identity).IdentityClaim.Resource;
+                       else if (identity is SpnEndpointIdentity)
+                               ServicePrincipalName.Value = (string) ((SpnEndpointIdentity) identity).IdentityClaim.Resource;
+                       else if (identity is UpnEndpointIdentity)
+                               UserPrincipalName.Value = (string) ((UpnEndpointIdentity) identity).IdentityClaim.Resource;
+                       else
+                               throw new ArgumentException (String.Format ("Unexpected EndpointIdentity of type '{0}'", identity.GetType ()));
                }
        }
 
index 0d0143ed34b01db891ab758db14e2740dcde48f4..b5c0527d1d6306f44c0acfe38ce201ed7c857964 100644 (file)
@@ -58,6 +58,10 @@ namespace System.ServiceModel.Configuration
        public sealed class StandardEndpointElementCollection<TEndpointConfiguration> : ServiceModelEnhancedConfigurationElementCollection<TEndpointConfiguration>
                where TEndpointConfiguration : StandardEndpointElement, new()
        {
+               protected override object GetElementKey (ConfigurationElement element)
+               {
+                       return ((StandardEndpointElement) element).Name;
+               }
        }
 }
 #endif
index f3b3721c727ca9224070b427760f42d147a14185..2f135566e59b2fdc7f8d7f7f5447f3e285a20a1e 100644 (file)
@@ -228,13 +228,7 @@ namespace System.ServiceModel.Description
                {
                        string name = oca.Name ?? (oca.AsyncPattern ? mi.Name.Substring (5) : mi.Name);
 
-                       OperationDescription od = null;
-                       foreach (OperationDescription iter in cd.Operations) {
-                               if (iter.Name == name) {
-                                       od = iter;
-                                       break;
-                               }
-                       }
+                       OperationDescription od = cd.Operations.FirstOrDefault (o => o.Name == name);
                        if (od == null) {
                                od = new OperationDescription (name, cd);
                                od.IsOneWay = oca.IsOneWay;
@@ -263,7 +257,7 @@ namespace System.ServiceModel.Description
                        }
                        else if (oca.AsyncPattern && od.BeginMethod != null ||
                                 !oca.AsyncPattern && od.SyncMethod != null)
-                               throw new InvalidOperationException ("A contract cannot have two operations that have the identical names and different set of parameters.");
+                               throw new InvalidOperationException (String.Format ("contract '{1}' cannot have two operations for '{0}' that have the identical names and different set of parameters.", name, cd.Name));
 
                        if (oca.AsyncPattern)
                                od.BeginMethod = mi;
index 216c2a2526cbf15e03a5d28be09a47e383373648..2a6bfa0ed00608eb55ca93a8c456bbef6f3286be 100644 (file)
@@ -85,7 +85,10 @@ namespace System.ServiceModel.Description
                        ServiceDescription description,
                        ServiceHostBase serviceHostBase)
                {
-                       foreach (ChannelDispatcher cd in serviceHostBase.ChannelDispatchers)
+                       foreach (var cdb in serviceHostBase.ChannelDispatchers) {
+                               var cd = cdb as ChannelDispatcher;
+                               if (cd == null) // non-ChannelDispatcher ChannelDispatcherBase instance.
+                                       continue;
                                foreach (var ed in cd.Endpoints) {
                                        var dr = ed.DispatchRuntime;
                                        dr.ExternalAuthorizationPolicies = ExternalAuthorizationPolicies;
@@ -94,6 +97,7 @@ namespace System.ServiceModel.Description
                                        dr.RoleProvider = RoleProvider;
                                        dr.ServiceAuthorizationManager = ServiceAuthorizationManager;
                                }
+                       }
                }
 
                [MonoTODO]
index 7f022d959deedbb8644a54d3545928a98afa9f34..4ec398efc8b04dc814e63eb2c32263e5faa60b50 100644 (file)
@@ -69,9 +69,13 @@ namespace System.ServiceModel.Description
                {
                        ServiceMetadataExtension sme = ServiceMetadataExtension.EnsureServiceMetadataExtension (serviceHostBase);
 
-                       foreach (ChannelDispatcher dispatcher in serviceHostBase.ChannelDispatchers)
+                       foreach (var dispatcherBase in serviceHostBase.ChannelDispatchers) {
+                               var dispatcher = dispatcherBase as ChannelDispatcher;
+                               if (dispatcher == null) // non-ChannelDispatcher ChannelDispatcherBase instance.
+                                       continue;
                                if (IncludeExceptionDetailInFaults) // may be set also in ServiceBehaviorAttribute
                                        dispatcher.IncludeExceptionDetailInFaults = true;
+                       }
 
                        if (HttpHelpPageEnabled) {
                                Uri uri = serviceHostBase.CreateUri ("http", HttpHelpPageUrl);
index 2a75c84993cece6d3aafaccb0e855951344a55b2..4ca4dd9555aae90c36c5de2a03b4cbcee71a018d 100644 (file)
@@ -78,6 +78,13 @@ namespace System.ServiceModel.Description
                        set { binding = value; }
                }
 
+#if NET_4_0
+               public
+#else
+               internal
+#endif
+               bool IsSystemEndpoint { get; set; }
+
                public Uri ListenUri {
                        get { return listen_uri ?? (Address != null ? Address.Uri : null); }
                        set { listen_uri = value; }
@@ -90,8 +97,13 @@ namespace System.ServiceModel.Description
 
                public string Name {
                        get {
-                               if (name == null)
-                                       name = Binding.Name + "_" + Contract.Name;
+                               if (name == null) {
+                                       // do not create cache when either of Binding or Contract is null.
+                                       if (Binding == null)
+                                               return Contract != null ? Contract.Name : null;
+                                       else if (Contract != null)
+                                               name = Binding.Name + "_" + Contract.Name;
+                               }
                                return name;
                        }
                        set { name = value; }
index 15e5eb3e7978bd8a53798ce075cc8f83e63f2a29..780c4a90b998437cfba78c8ee105418a55979d15 100644 (file)
@@ -198,7 +198,9 @@ namespace System.ServiceModel
                                                return Endpoint.Binding.BuildChannelFactory<IOutputChannel> (pl);
                                        break;
                                }
-                       } else {
+                       }
+                       // both OneWay and non-OneWay contracts fall into here.
+                       {
                                switch (Endpoint.Contract.SessionMode) {
                                case SessionMode.Required:
                                        if (Endpoint.Binding.CanBuildChannelFactory<IRequestSessionChannel> (pl))
@@ -216,7 +218,7 @@ namespace System.ServiceModel
                                        break;
                                }
                        }
-                       throw new InvalidOperationException ("The binding does not support any of the channel types that the contract allows.");
+                       throw new InvalidOperationException (String.Format ("The binding does not support any of the channel types that the contract '{0}' allows.", Endpoint.Contract.Name));
                }
 
                BindingParameterCollection CreateBindingParameters ()
index d9314d3e1d9eaddc9456f35bbcf245880cb7ecb1..7aef069bc02ce021c331128fbb7ba6677d84171a 100644 (file)
@@ -27,6 +27,7 @@
 //
 using System;
 using System.Collections.ObjectModel;
+using System.Reflection;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
@@ -147,7 +148,11 @@ namespace System.ServiceModel
                        // that should work either.
                        object proxy = Activator.CreateInstance (type, new object [] {Endpoint, this, address ?? Endpoint.Address, via});
                        return (TChannel) proxy;
-
+                       } catch (TargetInvocationException ex) {
+                               if (ex.InnerException != null)
+                                       throw ex.InnerException;
+                               else
+                                       throw;
                        } finally {
                                Endpoint.Address = existing;
                        }
index d9e98a1856700aeeaee3c63f3cc801deaa1a8686..8115395fb24af8859ccc3f09363b901588ad40ca 100644 (file)
@@ -65,7 +65,6 @@ namespace System.ServiceModel
 
                ChannelFactory<TChannel> factory;
                IClientChannel inner_channel;
-               CommunicationState state;
 
                protected delegate IAsyncResult BeginOperationDelegate (object[] inValues, AsyncCallback asyncCallback, object state);
                protected delegate object[] EndOperationDelegate (IAsyncResult result);
@@ -149,20 +148,40 @@ namespace System.ServiceModel
                        Initialize (instance, binding, remoteAddress);
                }
 
+#if NET_4_0
+               protected ClientBase (ServiceEndpoint endpoint)
+                       : this (null, endpoint)
+               {
+               }
+
+               protected ClientBase (InstanceContext instance, ServiceEndpoint endpoint)
+                       : this (instance, new ChannelFactory<TChannel> (endpoint))
+               {
+               }
+#endif
+
                internal ClientBase (ChannelFactory<TChannel> factory)
+                       : this (null, factory)
+               {
+               }
+
+               internal ClientBase (InstanceContext instance, ChannelFactory<TChannel> factory)
                {
+                       // FIXME: use instance
                        ChannelFactory = factory;
                }
 
                internal virtual void Initialize (InstanceContext instance,
                        string endpointConfigurationName, EndpointAddress remoteAddress)
                {
+                       // FIXME: use instance
                        ChannelFactory = new ChannelFactory<TChannel> (endpointConfigurationName, remoteAddress);
                }
 
                internal virtual void Initialize (InstanceContext instance,
                        Binding binding, EndpointAddress remoteAddress)
                {
+                       // FIXME: use instance
                        ChannelFactory = new ChannelFactory<TChannel> (binding, remoteAddress);
                }
 
@@ -195,7 +214,7 @@ namespace System.ServiceModel
                }
 
                public CommunicationState State {
-                       get { return InnerChannel.State; }
+                       get { return inner_channel != null ? inner_channel.State : CommunicationState.Created; }
                }
 
                public void Abort ()
index a3c711105cd18578664c921d5c22b783a283a61d..08e447d066f72b100dded763fa6eabc428596626 100644 (file)
@@ -72,9 +72,12 @@ namespace System.ServiceModel.MonoInternal
 
                public ClientRuntimeChannel (ClientRuntime runtime, ContractDescription contract, TimeSpan openTimeout, TimeSpan closeTimeout, IChannel contextChannel, IChannelFactory factory, MessageVersion messageVersion, EndpointAddress remoteAddress, Uri via)
                {
+                       if (runtime == null)
+                               throw new ArgumentNullException ("runtime");
                        this.runtime = runtime;
                        this.remote_address = remoteAddress;
-                       runtime.Via = via ?? remote_address.Uri;
+                       if (runtime.Via == null)
+                               runtime.Via = via ?? (remote_address != null ?remote_address.Uri : null);
                        this.contract = contract;
                        this.message_version = messageVersion;
                        default_open_timeout = openTimeout;
@@ -91,8 +94,15 @@ namespace System.ServiceModel.MonoInternal
                                channel = contextChannel;
                        else {
                                var method = factory.GetType ().GetMethod ("CreateChannel", new Type [] {typeof (EndpointAddress), typeof (Uri)});
-                               channel = (IChannel) method.Invoke (factory, new object [] {remote_address, Via});
-                               this.factory = factory;
+                               try {
+                                       channel = (IChannel) method.Invoke (factory, new object [] {remote_address, Via});
+                                       this.factory = factory;
+                               } catch (TargetInvocationException ex) {
+                                       if (ex.InnerException != null)
+                                               throw ex.InnerException;
+                                       else
+                                               throw;
+                               }
                        }
                }
 
@@ -405,12 +415,42 @@ namespace System.ServiceModel.MonoInternal
 
                #region Request/Output processing
 
+               class TempAsyncResult : IAsyncResult
+               {
+                       public TempAsyncResult (object returnValue, object state)
+                       {
+                               ReturnValue = returnValue;
+                               AsyncState = state;
+                               CompletedSynchronously = true;
+                               IsCompleted = true;
+                               AsyncWaitHandle = new ManualResetEvent (true);
+                       }
+                       
+                       public object ReturnValue { get; set; }
+                       public object AsyncState { get; set; }
+                       public bool CompletedSynchronously { get; set; }
+                       public bool IsCompleted { get; set; }
+                       public WaitHandle AsyncWaitHandle { get; set; }
+               }
+
                public IAsyncResult BeginProcess (MethodBase method, string operationName, object [] parameters, AsyncCallback callback, object asyncState)
                {
                        if (context != null)
                                throw new InvalidOperationException ("another operation is in progress");
                        context = OperationContext.Current;
-                       return _processDelegate.BeginInvoke (method, operationName, parameters, callback, asyncState);
+
+                       // FIXME: this is a workaround for bug #633945
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               return _processDelegate.BeginInvoke (method, operationName, parameters, callback, asyncState);
+                       default:
+                               var result = Process (method, operationName, parameters);
+                               var ret = new TempAsyncResult (result, asyncState);
+                               if (callback != null)
+                                       callback (ret);
+                               return ret;
+                       }
                }
 
                public object EndProcess (MethodBase method, string operationName, object [] parameters, IAsyncResult result)
@@ -422,7 +462,14 @@ namespace System.ServiceModel.MonoInternal
                                throw new ArgumentNullException ("parameters");
                        // FIXME: the method arguments should be verified to be 
                        // identical to the arguments in the corresponding begin method.
-                       return _processDelegate.EndInvoke (result);
+                       // FIXME: this is a workaround for bug #633945
+                       switch (Environment.OSVersion.Platform) {
+                       case PlatformID.Unix:
+                       case PlatformID.MacOSX:
+                               return _processDelegate.EndInvoke (result);
+                       default:
+                               return ((TempAsyncResult) result).ReturnValue;
+                       }
                }
 
                public object Process (MethodBase method, string operationName, object [] parameters)
@@ -548,7 +595,10 @@ namespace System.ServiceModel.MonoInternal
 
                internal void Send (Message msg, TimeSpan timeout)
                {
-                       OutputChannel.Send (msg, timeout);
+                       if (OutputChannel != null)
+                               OutputChannel.Send (msg, timeout);
+                       else
+                               RequestChannel.Request (msg, timeout); // and ignore returned message.
                }
 
                internal IAsyncResult BeginSend (Message msg, TimeSpan timeout, AsyncCallback callback, object state)
@@ -602,7 +652,7 @@ namespace System.ServiceModel.MonoInternal
                                        msg.Headers.MessageId = new UniqueId ();
                                if (msg.Headers.ReplyTo == null)
                                        msg.Headers.ReplyTo = new EndpointAddress (Constants.WsaAnonymousUri);
-                               if (msg.Headers.To == null)
+                               if (msg.Headers.To == null && RemoteAddress != null)
                                        msg.Headers.To = RemoteAddress.Uri;
                        }
 
index ceeae118589b4b38a533727234bc775ad4f19267..0eaf6c0e1acfd858d32fb73fe825fb48e90bd029 100644 (file)
@@ -28,6 +28,7 @@
 using System;
 using System.Collections.Generic;
 using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
 
 namespace System.ServiceModel
 {
@@ -56,6 +57,12 @@ namespace System.ServiceModel
                {
                }
 
+               protected DuplexClientBase (object instance,
+                       string endpointConfigurationName, string remoteAddress)
+                       : this (new InstanceContext (instance), endpointConfigurationName, remoteAddress)
+               {
+               }
+
                protected DuplexClientBase (InstanceContext instance)
                        : base (instance)
                {
@@ -73,12 +80,30 @@ namespace System.ServiceModel
                {
                }
 
+               protected DuplexClientBase (InstanceContext instance,
+                       string endpointConfigurationName, string remoteAddress)
+                       : base (instance, endpointConfigurationName, remoteAddress)
+               {
+               }
+
                protected DuplexClientBase (InstanceContext instance,
                        string configurationName, EndpointAddress address)
                        : base (instance, configurationName, address)
                {
                }
 
+#if NET_4_0
+               protected DuplexClientBase (object instance, ServiceEndpoint endpoint)
+                       : this (new InstanceContext (instance), endpoint)
+               {
+               }
+
+               protected DuplexClientBase (InstanceContext instance, ServiceEndpoint endpoint)
+                       : base (instance, endpoint)
+               {
+               }
+#endif
+
                public IDuplexContextChannel InnerDuplexChannel {
                        get { return (IDuplexContextChannel) base.InnerChannel; }
                }
index 01306d99c1f9b829e0c9a788e2317d6f5f08b153..0d37c4cf22c9b8aa5437a241c3c5907728636f05 100644 (file)
@@ -124,7 +124,7 @@ namespace System.ServiceModel
                public MessageHeaders OutgoingMessageHeaders {
                        get {
                                if (outgoing_headers == null)
-                                       outgoing_headers = new MessageHeaders (MessageVersion.Default);
+                                       outgoing_headers = new MessageHeaders (channel.GetProperty<MessageVersion> () ?? MessageVersion.Default);
                                return outgoing_headers;
                        }
                }
index 1f8484264b9d0c8353371b3de031051964d3dabf..a7e66db731893f9c598c4bda1c7503e4d5da1df9 100644 (file)
@@ -203,6 +203,28 @@ namespace System.ServiceModel
                        return AddServiceEndpointCore (cd, binding, ea, listenUri);
                }
 
+#if NET_4_0
+               public virtual void AddServiceEndpoint (ServiceEndpoint endpoint)
+               {
+                       if (endpoint == null)
+                               throw new ArgumentNullException ("endpoint");
+
+                       ThrowIfDisposedOrImmutable ();
+
+                       if (endpoint.Address == null)
+                               throw new ArgumentException ("Address on the argument endpoint is null");
+                       if (endpoint.Contract == null)
+                               throw new ArgumentException ("Contract on the argument endpoint is null");
+                       if (endpoint.Binding == null)
+                               throw new ArgumentException ("Binding on the argument endpoint is null");
+
+                       if (!ImplementedContracts.Values.Any (cd => cd.ContractType == endpoint.Contract.ContractType))
+                               throw new InvalidOperationException (String.Format ("Contract '{0}' is not implemented in this service '{1}'", endpoint.Contract.Name, Description.Name));
+
+                       Description.Endpoints.Add (endpoint);
+               }
+#endif
+
                Type PopulateType (string typeName)
                {
                        Type type = Type.GetType (typeName);
@@ -417,8 +439,8 @@ namespace System.ServiceModel
                        foreach (ServiceEndpoint endPoint in Description.Endpoints)
                                endPoint.Validate ();
 
-                       if (Description.Endpoints.FirstOrDefault (e => e.Contract != mex_contract) == null)
-                               throw new InvalidOperationException ("The ServiceHost must have at least one application endpoint (that does not include metadata exchange contract) defined by either configuration, behaviors or call to AddServiceEndpoint methods.");
+                       if (Description.Endpoints.FirstOrDefault (e => e.Contract != mex_contract && !e.IsSystemEndpoint) == null)
+                               throw new InvalidOperationException ("The ServiceHost must have at least one application endpoint (that does not include metadata exchange endpoint) defined by either configuration, behaviors or call to AddServiceEndpoint methods.");
                }
 
                [MonoTODO]
@@ -481,7 +503,8 @@ namespace System.ServiceModel
                                        var cd2 = ChannelDispatchers [j];
                                        if (cd1.IsMex || cd2.IsMex)
                                                continue;
-                                       if (cd1.Listener.Uri.Equals (cd2.Listener.Uri))
+                                       // surprisingly, some ChannelDispatcherBase implementations have null Listener property.
+                                       if (cd1.Listener != null && cd2.Listener != null && cd1.Listener.Uri.Equals (cd2.Listener.Uri))
                                                throw new InvalidOperationException ("Two or more service endpoints with different Binding instance are bound to the same listen URI.");
                                }
                        }
index 9c780c4cdff50a7dc958f718cd21bc5f50df06c9..49403d918052e3f1bc42a6ecd394b91892c61127 100644 (file)
@@ -41,8 +41,12 @@ namespace System.ServiceModel.MonoInternal
                public DuplexServiceRuntimeChannel (IChannel channel, DispatchRuntime runtime)
                        : base (channel, runtime)
                {
+                       if (channel == null)
+                               throw new ArgumentNullException ("channel");
                        // setup callback ClientRuntimeChannel.
                        var crt = runtime.CallbackClientRuntime;
+                       if (crt == null)
+                               throw new InvalidOperationException ("The DispatchRuntime does not have CallbackClientRuntime");
                        var cd = ContractDescriptionGenerator.GetCallbackContract (runtime.Type, crt.CallbackClientType);
                        client = new ClientRuntimeChannel (crt, cd, this.DefaultOpenTimeout, this.DefaultCloseTimeout, channel, null,
                                                           runtime.ChannelDispatcher.MessageVersion, this.RemoteAddress, null);
index 6c6140a6c483193d95502572d6034392667ffaf9..d179666fc6c625e576d44ce838befcd14832ad16 100644 (file)
@@ -47,18 +47,13 @@ namespace MonoTests.System.ServiceModel.Channels
                                throw new Exception ();
                        }
 
-                       public override T GetProperty<T> (BindingContext ctx)
-                       {
-                               throw new Exception ();
-                       }
-
                        public override MessageEncoderFactory CreateMessageEncoderFactory ()
                        {
                                throw new Exception ();
                        }
 
                        public override MessageVersion MessageVersion {
-                               get { throw new Exception (); }
+                               get { return MessageVersion.None; }
                                set { throw new Exception (); }
                        }
                }
@@ -117,5 +112,12 @@ namespace MonoTests.System.ServiceModel.Channels
                                new BindingParameterCollection ());
                        be.BuildChannelFactory<IRequestChannel> (ctx);
                }
+
+               [Test]
+               public void GetProperty ()
+               {
+                       var ctx = new BindingContext (new CustomBinding (new HttpTransportBindingElement ()), new BindingParameterCollection ());
+                       Assert.AreEqual (MessageVersion.None, new MyEncodingBindingElement ().GetProperty<MessageVersion> (ctx), "#1");
+               }
        }
 }
index 230d1f17f68e90000ae3b43f55c5ae19865e3db4..faa52b0c3e95a34221bf8372a8cd992d12d95192 100644 (file)
@@ -88,7 +88,23 @@ namespace MonoTests.System.ServiceModel.Description
                        Message msg = c.ToMessage (t1);
                        Test1 t2 = (Test1) c.FromMessage (msg);
                        Assert.AreEqual ("test", t2.echo.msg, "#01");
-                       Assert.AreEqual ("testtest", t2.body2, "#01");
+                       Assert.AreEqual ("testtest", t2.body2, "#02");
+               }
+
+               [Test]
+               public void StandardRoundtrip2 ()
+               {
+                       TypedMessageConverter c = TypedMessageConverter.Create (
+                               typeof (Test2), "http://tempuri.org/MyTest");
+                       var t1 = new Test2 ();
+                       t1.Body = new Echo () { msg = "test" };
+                       var uid = Guid.NewGuid ();
+                       t1.Id = uid;
+                       Message msg = c.ToMessage (t1);
+                       var t2 = (Test2) c.FromMessage (msg);
+                       Assert.AreEqual ("test", t2.Body.msg, "#01");
+                       // FIXME: enable it (not working yet)
+                       //Assert.AreEqual (uid, t2.Id, "#02");
                }
 
                [Test]
@@ -102,7 +118,7 @@ namespace MonoTests.System.ServiceModel.Description
                        Message msg = c.ToMessage (t1);
                        Test1 t2 = (Test1) c.FromMessage (msg);
                        Assert.AreEqual ("test", t2.echo.msg, "#01");
-                       Assert.AreEqual ("testtest", t2.body2, "#01");
+                       Assert.AreEqual ("testtest", t2.body2, "#02");
                }
        }
 
@@ -122,4 +138,13 @@ namespace MonoTests.System.ServiceModel.Description
                [DataMember]
                public string msg = "default";
        }
+
+       [MessageContract (IsWrapped = false)]
+       public class Test2
+       {
+               [MessageHeader (Name = "head", Namespace = "urn:foo")]
+               public Guid Id { get; set; }
+               [MessageBodyMember (Name = "body", Namespace = "urn:foo")]
+               public Echo Body { get; set; }
+       }
 }
index 75e51fd6706aa63be64bfa2cc2b652d56d1d974f..427127e9468379bc521de683b55515859fa1c161 100644 (file)
@@ -32,6 +32,7 @@ using System.Runtime.Serialization;
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
+using System.Threading;
 using System.Xml;
 using System.Xml.Serialization;
 using MonoTests.System.ServiceModel.Channels;
@@ -431,6 +432,15 @@ namespace MonoTests.System.ServiceModel
                        Assert.AreEqual ("callResult", res.val, "#2");
                }
 
+#if NET_4_0
+               [Test]
+               public void ConstructorServiceEndpoint ()
+               {
+                       // It is okay to pass ServiceEndpoint that does not have Binding or EndpointAddress.
+                       new ChannelFactory<IRequestChannel> (new ServiceEndpoint (ContractDescription.GetContract (typeof (IMetadataExchange)), null, null));
+               }
+#endif
+
                public T CreateFooComplexMC_Channel<T> (bool isXml)
                {
                        return CreateChannel<T> (
@@ -467,6 +477,27 @@ namespace MonoTests.System.ServiceModel
                        Assert.AreEqual ("callArg", res.resMsg.val, "#3");
                }
 
+               [Test]
+               public void OneWayOperationWithRequestReplyChannel ()
+               {
+                       var host = new ServiceHost (typeof (OneWayService));
+                       host.AddServiceEndpoint (typeof (IOneWayService),
+                               new BasicHttpBinding (),
+                               new Uri ("http://localhost:8080"));
+                       host.Open ();
+                       try {
+                               var cf = new ChannelFactory<IOneWayService> (
+                                       new BasicHttpBinding (),
+                                       new EndpointAddress ("http://localhost:8080"));
+                               var ch = cf.CreateChannel ();
+                               ch.GiveMessage ("test");
+                               
+                               Assert.IsTrue (OneWayService.WaitHandle.WaitOne (TimeSpan.FromSeconds (5)), "#1");
+                       } finally {
+                               host.Close ();
+                       }
+               }
+
                [ServiceContract]
                public interface ITestService
                {
@@ -513,6 +544,23 @@ namespace MonoTests.System.ServiceModel
                        TestResult FooComplexMC (TestMessage arg1);
                }
 
+               [ServiceContract]
+               public interface IOneWayService
+               {
+                       [OperationContract (IsOneWay = true)]
+                       void GiveMessage (string input);
+               }
+
+               public class OneWayService : IOneWayService
+               {
+                       public static ManualResetEvent WaitHandle = new ManualResetEvent (false);
+
+                       public void GiveMessage (string input)
+                       {
+                               WaitHandle.Set ();
+                       }
+               }
+
                public enum FooColor { Red = 1, Green, Blue }
 
                [DataContract]
index fd1ca945c611d980ffd76a72b814d987ba871a49..ee445d6620f590d5cb3fcb5aa1d01a6fbee8680f 100644 (file)
@@ -473,5 +473,32 @@ namespace MonoTests.System.ServiceModel
                                throw new NotImplementedException ();
                        }
                }
+
+#if NET_4_0
+               [Test]
+               public void ConstructorServiceEndpoint ()
+               {
+                       // It is okay to pass ServiceEndpoint that does not have Binding or EndpointAddress.
+                       new MyClient (new ServiceEndpoint (ContractDescription.GetContract (typeof (IMetadataExchange)), null, null));
+                       try {
+                               new MyClient ((Binding) null, (EndpointAddress) null);
+                               Assert.Fail ("ArgumentNullException is expected");
+                       } catch (ArgumentNullException) {
+                       }
+               }
+
+               class MyClient : ClientBase<IMetadataExchange>
+               {
+                       public MyClient (ServiceEndpoint endpoint)
+                               : base (endpoint)
+                       {
+                       }
+                       
+                       public MyClient (Binding binding, EndpointAddress address)
+                               : base (binding, address)
+                       {
+                       }
+               }
+#endif
        }
 }
index 8b91324af608c3bfbed2144cebfb0119662465dc..373411c9ec97cc157b4c94e4ed1f3ea154e78696 100644 (file)
@@ -361,6 +361,29 @@ namespace MonoTests.System.ServiceModel
                        return host;
                }
 
+#if NET_4_0
+               [Test]
+               public void AddServiceEndpoint_Directly ()
+               {
+                       var host = new ServiceHost (typeof (DummyService));
+                       var address = new EndpointAddress ("http://localhost:8080");
+                       var binding = new BasicHttpBinding ();
+                       var contract = ContractDescription.GetContract (typeof (IDummyService));
+                       host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address));
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidOperationException))]
+               public void AddServiceEndpoint_Directly_ContractMismatch ()
+               {
+                       var host = new ServiceHost (typeof (DummyService));
+                       var address = new EndpointAddress ("http://localhost:8080");
+                       var binding = new BasicHttpBinding ();
+                       var contract = ContractDescription.GetContract (typeof (INotImplementedService));
+                       host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address));
+               }
+#endif
+
                #region helpers
 
                public enum Stage
index 64e61ad0c933502990fdfdb0e5b96193e9ac9018..22d436eb6d5bcebb33f7757b4bf6df1d9e59214c 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Web.UI
 
                protected internal override bool HasTriggered ()
                {
-                       Control ctrl = Owner.FindControl (ControlID);
+                       Control ctrl = FindTargetControl (true);
                        string ctrlUniqueID = ctrl != null ? ctrl.UniqueID : null;
                        if (ctrlUniqueID == null)
                                return false;
@@ -76,8 +76,9 @@ namespace System.Web.UI
                }
 
                // LAME SPEC: it seems DefaultEventAttribute is never queried for the event name.
-               protected internal override void Initialize () {
-                       Control c = FindTargetControl (false);
+               protected internal override void Initialize ()
+               {
+                       Control c = FindTargetControl (true);
                        ScriptManager sm = Owner.ScriptManager;
                        string eventName = EventName;
 
@@ -100,8 +101,11 @@ namespace System.Web.UI
                        sm.RegisterAsyncPostBackControl (c);
                }
 
-               public void OnEvent (object sender, EventArgs e) {
-                       Owner.Update ();
+               public void OnEvent (object sender, EventArgs e)
+               {
+                       UpdatePanel owner = Owner;
+                       if (owner != null && owner.UpdateMode != UpdatePanelUpdateMode.Always)
+                               owner.Update ();
                }
 
                public override string ToString () {
index a157d455cac9a039a2a5ecc9b48262fa625a0299..4c39f6c4e88347fb0a57e34cf12adb72eeee56fd 100644 (file)
@@ -395,9 +395,17 @@ namespace System.Web.UI
                public static ScriptManager GetCurrent (Page page) {
                        if (page == null)
                                throw new ArgumentNullException ("page");
-                       return (ScriptManager) page.Items [ScriptManagerKey];
+                       return GetCurrentInternal (page);
                }
 
+               static ScriptManager GetCurrentInternal (Page page)
+               {
+                       if (page == null)
+                               return null;
+
+                       return (ScriptManager) page.Items [ScriptManagerKey];
+               }
+               
                static void SetCurrent (Page page, ScriptManager instance) {
                        page.Items [ScriptManagerKey] = instance;
                        page.ClientScript.RegisterWebFormClientScript ();
@@ -446,7 +454,7 @@ namespace System.Web.UI
                protected override void OnInit (EventArgs e) {
                        base.OnInit (e);
 
-                       if (GetCurrent (Page) != null)
+                       if (GetCurrentInternal (Page) != null)
                                throw new InvalidOperationException ("Only one instance of a ScriptManager can be added to the page.");
 
                        SetCurrent (Page, this);
@@ -754,8 +762,11 @@ namespace System.Web.UI
 
                public static void RegisterArrayDeclaration (Control control, string arrayName, string arrayValue) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        if (sm._arrayDeclarations == null)
                                sm._arrayDeclarations = new List<RegisteredArrayDeclaration> ();
 
@@ -784,8 +795,11 @@ namespace System.Web.UI
 
                public static void RegisterClientScriptBlock (Control control, Type type, string key, string script, bool addScriptTags) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        RegisterScript (ref sm._clientScriptBlocks, control, type, key, script, null, addScriptTags, RegisteredScriptType.ClientScriptBlock);
 
                        if (!sm.IsInAsyncPostBack)
@@ -798,8 +812,11 @@ namespace System.Web.UI
 
                public static void RegisterClientScriptInclude (Control control, Type type, string key, string url) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        RegisterScript (ref sm._clientScriptBlocks, control, type, key, null, url, false, RegisteredScriptType.ClientScriptInclude);
 
                        if (!sm.IsInAsyncPostBack)
@@ -901,8 +918,11 @@ namespace System.Web.UI
 
                public static void RegisterExpandoAttribute (Control control, string controlId, string attributeName, string attributeValue, bool encode) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        if (sm._expandoAttributes == null)
                                sm._expandoAttributes = new List<RegisteredExpandoAttribute> ();
 
@@ -918,8 +938,11 @@ namespace System.Web.UI
 
                public static void RegisterHiddenField (Control control, string hiddenFieldName, string hiddenFieldInitialValue) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        if (sm._hiddenFields == null)
                                sm._hiddenFields = new List<RegisteredHiddenField> ();
 
@@ -935,8 +958,11 @@ namespace System.Web.UI
 
                public static void RegisterOnSubmitStatement (Control control, Type type, string key, string script) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        RegisterScript (ref sm._onSubmitStatements, control, type, key, script, null, false, RegisteredScriptType.OnSubmitStatement);
 
                        if (!sm.IsInAsyncPostBack)
@@ -1014,8 +1040,11 @@ namespace System.Web.UI
 
                public static void RegisterStartupScript (Control control, Type type, string key, string script, bool addScriptTags) {
                        Page page = control.Page;
-                       ScriptManager sm = GetCurrent (page);
+                       ScriptManager sm = GetCurrentInternal (page);
 
+                       if (sm == null)
+                               return;
+                       
                        RegisterScript (ref sm._startupScriptBlocks, control, type, key, script, null, addScriptTags, RegisteredScriptType.ClientStartupScript);
 
                        if (!sm.IsInAsyncPostBack)
index dbacbfafc78e356511b467c5ff2f085914789f90..7327b014cbbd9b5c9d9c4f7cde0d67db52dab712 100644 (file)
@@ -366,7 +366,8 @@ STANDALONE_TEST_COMPILABLE_TESTS = \
        ApplicationPreStartMethods/test_06 \
        ApplicationPreStartMethods/test_07 \
        ApplicationPreStartMethods/test_08 \
-       RegisterBuildProvider
+       RegisterBuildProvider \
+       PageParserDefaultTypeProperties
 endif
 
 STANDALONE_TEST_RUNNER = Test/tools/standalone-runner.exe
@@ -440,3 +441,5 @@ ifdef STANDALONE_TEST_COMPILABLE_TESTS
                $(MAKE) -C Test/standalone/$$d clean ; \
        done
 endif
\ No newline at end of file
index fd1eee678393e75d98053efc2d79082738b6f850..a82b846a5f82dd8f95fba1826c4d05c4b1a418d3 100644 (file)
@@ -41,9 +41,12 @@ namespace System.Web.Caching
                internal const string DEFAULT_PROVIDER_NAME = "AspNetInternalProvider";
                
                static readonly object initLock = new object ();
+               static readonly object defaultProviderInitLock = new object();
+               
                static bool initialized;
                static string defaultProviderName;
                static OutputCacheProviderCollection providers;
+               static OutputCacheProvider defaultProvider;
                
                public static string DefaultProviderName {
                        get {
@@ -55,6 +58,20 @@ namespace System.Web.Caching
                        }
                }
 
+               internal static OutputCacheProvider DefaultProvider {
+                       get {
+                               if (defaultProvider == null) {
+                                       string providerName = DefaultProviderName;
+                                       lock (defaultProviderInitLock) {
+                                               if (defaultProvider == null)
+                                                       defaultProvider = new InMemoryOutputCacheProvider ();
+                                       }
+                               }
+
+                               return defaultProvider;
+                       }
+               }
+               
                public static OutputCacheProviderCollection Providers {
                        get {
                                Init ();
@@ -88,6 +105,18 @@ namespace System.Web.Caching
                        new BinaryFormatter ().Serialize (stream, data);
                }
 
+               internal static OutputCacheProvider GetProvider (string providerName)
+               {
+                       if (String.IsNullOrEmpty (providerName))
+                               return null;
+
+                       if (String.Compare (providerName, DEFAULT_PROVIDER_NAME, StringComparison.Ordinal) == 0)
+                               return DefaultProvider;
+
+                       OutputCacheProviderCollection providers = OutputCache.Providers;
+                       return (providers != null ? providers [providerName] : null);
+               }
+               
                static bool IsInvalidType (object data)
                {
                        return !(data is MemoryResponseElement) &&
index d1a6cd3486ce3bbe5688fb1ac711cee58d200d77..74167447bb910359a61333f08cd773ace27e5499 100644 (file)
@@ -73,16 +73,8 @@ namespace System.Web.Caching
                        string providerName = app.GetOutputCacheProviderName (ctx);
                        if (String.IsNullOrEmpty (providerName))
                                throw new ProviderException ("Invalid OutputCacheProvider name. Name must not be null or an empty string.");
-                       
-                       if (String.Compare (providerName, OutputCache.DEFAULT_PROVIDER_NAME, StringComparison.Ordinal) == 0) {
-                               if (provider == null)
-                                       provider = new InMemoryOutputCacheProvider ();
-                               return provider;
-                       }
-
-                       OutputCacheProviderCollection providers = OutputCache.Providers;
-                       OutputCacheProvider ret = providers != null ? providers [providerName] : null;
 
+                       OutputCacheProvider ret = OutputCache.GetProvider (providerName);
                        if (ret == null)
                                throw new ProviderException (String.Format ("OutputCacheProvider named '{0}' cannot be found.", providerName));
 
index 816ffd5faa1c53ca032a94328c8d12d656ad9ec3..d0078795618cd5e1483eee9bb3de108670ec00b6 100644 (file)
@@ -886,9 +886,6 @@ namespace System.Web.Compilation
 
                        if (text.Length != 0) {
                                bool ignoreEmptyString = lastTag == TagType.CodeRender;
-#if NET_4_0
-                               ignoreEmptyString |= lastTag == TagType.CodeRenderEncode;
-#endif
                                FlushText (ignoreEmptyString);
                        }
                        
index 1eeef4a1bee25c07b514a5653c904f96eae4db91..0e9dbdcd6db825638a518e6b3c3ed07693cdc07d 100644 (file)
@@ -202,7 +202,13 @@ namespace System.Web.Compilation
                        if (is_precompiled)
                                is_precompiled = LoadPrecompilationInfo (precomp_name);
                }
-
+#if NET_4_0
+               internal static void AssertPreStartMethodsRunning ()
+               {
+                       if (!BuildManager.PreStartMethodsRunning)
+                               throw new InvalidOperationException ("This method must be called during the application's pre-start initialization stage.");
+               }
+#endif
                // Deal with precompiled sites deployed in a different virtual path
                static void FixVirtualPaths ()
                {
index ef6215e117f326da9cc5fc8a8945f7e5b46ef32b..e9a295fee48dcceb3b3850ee25269592e2724681 100644 (file)
@@ -63,7 +63,7 @@ namespace System.Web.Compilation
                CompilationSection CompilationSection {
                        get {
                                if (compilationSection == null)
-                                       compilationSection = WebConfigurationManager.GetWebApplicationSection ("system.web/compilation") as CompilationSection;
+                                       compilationSection = WebConfigurationManager.GetSection ("system.web/compilation") as CompilationSection;
                                return compilationSection;
                        }
                }
index 6091c8e12c9d5c6abc3f5a56d86d0eadf03f47f2..68fe0bd770904f0882f8a04c9d5c7e81a1747dce 100644 (file)
@@ -148,8 +148,7 @@ namespace System.Web.Compilation
                        if (!typeof (BuildProvider).IsAssignableFrom (providerType))
                                throw new ArgumentException ("The parameter 'providerType' is invalid", "providerType");
 
-                       if (!BuildManager.PreStartMethodsRunning)
-                               throw new InvalidOperationException ("This method cannot be called during the application's pre-start initialization stage.");
+                       BuildManager.AssertPreStartMethodsRunning ();
 
                        if (registeredBuildProviderTypes == null)
                                registeredBuildProviderTypes = new Dictionary <string, Type> (StringComparer.OrdinalIgnoreCase);
@@ -157,21 +156,29 @@ namespace System.Web.Compilation
                        registeredBuildProviderTypes [extension] = providerType;
                }
 
-               internal static BuildProvider GetProviderInstanceForExtension (string extension)
+               internal static Type GetProviderTypeForExtension (string extension)
                {
-                       Type type = null;
+                       if (String.IsNullOrEmpty (extension))
+                               return null;
 
+                       Type type = null;
                        if (registeredBuildProviderTypes == null || !registeredBuildProviderTypes.TryGetValue (extension, out type) || type == null) {
                                var cs = WebConfigurationManager.GetSection ("system.web/compilation") as CompilationSection;
                                BuildProviderCollection bpcoll = cs != null ? cs.BuildProviders : null;
                                global::System.Web.Configuration.BuildProvider bpcfg = bpcoll != null ? bpcoll [extension] : null;
                                if (bpcfg != null)
                                        type = HttpApplication.LoadType (bpcfg.Type);
-                       }       
-                       
+                       }
+
+                       return type;
+               }
+               
+               internal static BuildProvider GetProviderInstanceForExtension (string extension)
+               {
+                       Type type = GetProviderTypeForExtension (extension);
                        if (type == null)
                                return null;
-                               
+                       
                        return Activator.CreateInstance (type, null) as global::System.Web.Compilation.BuildProvider;
                }
 #endif
index bbfabbcc6db98ffe38d4a4dec6e0c59914bb74c7..c026fed03793a874708921c7368e70625d330c17 100644 (file)
@@ -41,6 +41,7 @@ using System.Reflection;
 using System.Resources;
 using System.Text;
 using System.Web;
+using System.Web.Caching;
 using System.Web.Configuration;
 using System.Web.UI;
 using System.Web.UI.WebControls;
@@ -160,12 +161,35 @@ namespace System.Web.Compilation
                        invoke.Parameters.Add (expr);
                        builder.MethodStatements.Add (AddLinePragma (invoke, builder));
                }
+
+               CodeStatement CreateControlVariable (Type type, ControlBuilder builder, CodeMemberMethod method, CodeTypeReference ctrlTypeRef)
+               {
+                       CodeObjectCreateExpression newExpr = new CodeObjectCreateExpression (ctrlTypeRef);
+
+                       object [] atts = type != null ? type.GetCustomAttributes (typeof (ConstructorNeedsTagAttribute), true) : null;
+                       if (atts != null && atts.Length > 0) {
+                               ConstructorNeedsTagAttribute att = (ConstructorNeedsTagAttribute) atts [0];
+                               if (att.NeedsTag)
+                                       newExpr.Parameters.Add (new CodePrimitiveExpression (builder.TagName));
+                       } else if (builder is DataBindingBuilder) {
+                               newExpr.Parameters.Add (new CodePrimitiveExpression (0));
+                               newExpr.Parameters.Add (new CodePrimitiveExpression (1));
+                       }
+
+                       method.Statements.Add (new CodeVariableDeclarationStatement (ctrlTypeRef, "__ctrl"));
+                       CodeAssignStatement assign = new CodeAssignStatement ();
+                       assign.Left = ctrlVar;
+                       assign.Right = newExpr;
+
+                       return assign;
+               }
                
                void InitMethod (ControlBuilder builder, bool isTemplate, bool childrenAsProperties)
                {
                        currentLocation = builder.Location;
                        bool inBuildControlTree = builder is RootBuilder;
                        string tailname = (inBuildControlTree ? "Tree" : ("_" + builder.ID));
+                       bool isProperty = builder.IsProperty;
                        CodeMemberMethod method = new CodeMemberMethod ();
                        builder.Method = method;
                        builder.MethodStatements = method.Statements;
@@ -173,7 +197,7 @@ namespace System.Web.Compilation
                        method.Name = "__BuildControl" + tailname;
                        method.Attributes = MemberAttributes.Private | MemberAttributes.Final;
                        Type type = builder.ControlType;
-
+                       
                        /* in the case this is the __BuildControlTree
                         * method, allow subclasses to insert control
                         * specific code. */
@@ -198,51 +222,54 @@ namespace System.Web.Compilation
                                mainClass.Members.Add (renderMethod);
                        }
                        
-                       if (childrenAsProperties || builder.ControlType == null) {
+                       if (childrenAsProperties || type == null) {
                                string typeString;
-                               if (builder is RootBuilder)
+                               bool isGlobal = true;
+                               bool returnsControl;
+
+                               if (builder is RootBuilder) {
                                        typeString = parser.ClassName;
-                               else {
-                                       if (builder.ControlType != null && builder.IsProperty &&
-                                           !typeof (ITemplate).IsAssignableFrom (builder.ControlType))
-                                               typeString = builder.ControlType.FullName;
-                                       else 
+                                       isGlobal = false;
+                                       returnsControl = false;
+                               } else {
+                                       returnsControl = builder.PropertyBuilderShouldReturnValue;
+                                       if (type != null && builder.IsProperty && !typeof (ITemplate).IsAssignableFrom (type)) {
+                                               typeString = type.FullName;
+                                               isGlobal = !type.IsPrimitive;
+                                       } else 
                                                typeString = "System.Web.UI.Control";
                                        ProcessTemplateChildren (builder);
                                }
+                               CodeTypeReference ctrlTypeRef = new CodeTypeReference (typeString);
+                               if (isGlobal)
+                                       ctrlTypeRef.Options |= CodeTypeReferenceOptions.GlobalReference;
+                               
+                               if (returnsControl) {
+                                       method.ReturnType = ctrlTypeRef;
 
-                               method.Parameters.Add (new CodeParameterDeclarationExpression (typeString, "__ctrl"));
+                                       // $controlType _ctrl = new $controlType ($parameters);
+                                       //
+                                       method.Statements.Add (CreateControlVariable (type, builder, method, ctrlTypeRef));
+                               } else
+                                       method.Parameters.Add (new CodeParameterDeclarationExpression (typeString, "__ctrl"));
                        } else {
+                               CodeTypeReference ctrlTypeRef = new CodeTypeReference (type.FullName);
+                               if (!type.IsPrimitive)
+                                       ctrlTypeRef.Options |= CodeTypeReferenceOptions.GlobalReference;
                                
                                if (typeof (Control).IsAssignableFrom (type))
-                                       method.ReturnType = new CodeTypeReference (typeof (Control));
+                                       method.ReturnType = ctrlTypeRef;
 
-                               // _ctrl = new $controlType ($parameters);
+                               // $controlType _ctrl = new $controlType ($parameters);
                                //
-                               CodeObjectCreateExpression newExpr = new CodeObjectCreateExpression (type);
-
-                               object [] atts = type.GetCustomAttributes (typeof (ConstructorNeedsTagAttribute), true);
-                               if (atts != null && atts.Length > 0) {
-                                       ConstructorNeedsTagAttribute att = (ConstructorNeedsTagAttribute) atts [0];
-                                       if (att.NeedsTag)
-                                               newExpr.Parameters.Add (new CodePrimitiveExpression (builder.TagName));
-                               } else if (builder is DataBindingBuilder) {
-                                       newExpr.Parameters.Add (new CodePrimitiveExpression (0));
-                                       newExpr.Parameters.Add (new CodePrimitiveExpression (1));
-                               }
-
-                               method.Statements.Add (new CodeVariableDeclarationStatement (builder.ControlType, "__ctrl"));
-                               CodeAssignStatement assign = new CodeAssignStatement ();
-                               assign.Left = ctrlVar;
-                               assign.Right = newExpr;
-                               method.Statements.Add (AddLinePragma (assign, builder));
+                               method.Statements.Add (AddLinePragma (CreateControlVariable (type, builder, method, ctrlTypeRef), builder));
                                                                
                                // this.$builderID = _ctrl;
                                //
                                CodeFieldReferenceExpression builderID = new CodeFieldReferenceExpression ();
                                builderID.TargetObject = thisRef;
                                builderID.FieldName = builder.ID;
-                               assign = new CodeAssignStatement ();
+                               CodeAssignStatement assign = new CodeAssignStatement ();
                                assign.Left = builderID;
                                assign.Right = ctrlVar;
                                method.Statements.Add (AddLinePragma (assign, builder));
@@ -1153,7 +1180,8 @@ namespace System.Web.Compilation
                {
                        if (parent == null || child == null)
                                return;
-                       
+
+                       CodeStatementCollection methodStatements = parent.MethodStatements;
                        CodeMethodReferenceExpression m = new CodeMethodReferenceExpression (thisRef, child.Method.Name);
                        CodeMethodInvokeExpression expr = new CodeMethodInvokeExpression (m);
 
@@ -1166,43 +1194,67 @@ namespace System.Web.Compilation
                                PartialCachingAttribute pca = (PartialCachingAttribute) atts [0];
                                CodeTypeReferenceExpression cc = new CodeTypeReferenceExpression("System.Web.UI.StaticPartialCachingControl");
                                CodeMethodInvokeExpression build = new CodeMethodInvokeExpression (cc, "BuildCachedControl");
-                               build.Parameters.Add (new CodeArgumentReferenceExpression("__ctrl"));
-                               build.Parameters.Add (new CodePrimitiveExpression (child.ID));
-#if NET_1_1
+                               CodeExpressionCollection parms = build.Parameters;
+                               
+                               parms.Add (new CodeArgumentReferenceExpression("__ctrl"));
+                               parms.Add (new CodePrimitiveExpression (child.ID));
+
                                if (pca.Shared)
-                                       build.Parameters.Add (new CodePrimitiveExpression (child.ControlType.GetHashCode ().ToString ()));
+                                       parms.Add (new CodePrimitiveExpression (child.ControlType.GetHashCode ().ToString ()));
                                else
-#endif
-                                       build.Parameters.Add (new CodePrimitiveExpression (Guid.NewGuid ().ToString ()));
+                                       parms.Add (new CodePrimitiveExpression (Guid.NewGuid ().ToString ()));
                                        
-                               build.Parameters.Add (new CodePrimitiveExpression (pca.Duration));
-                               build.Parameters.Add (new CodePrimitiveExpression (pca.VaryByParams));
-                               build.Parameters.Add (new CodePrimitiveExpression (pca.VaryByControls));
-                               build.Parameters.Add (new CodePrimitiveExpression (pca.VaryByCustom));
-                               build.Parameters.Add (new CodeDelegateCreateExpression (
+                               parms.Add (new CodePrimitiveExpression (pca.Duration));
+                               parms.Add (new CodePrimitiveExpression (pca.VaryByParams));
+                               parms.Add (new CodePrimitiveExpression (pca.VaryByControls));
+                               parms.Add (new CodePrimitiveExpression (pca.VaryByCustom));
+                               parms.Add (new CodePrimitiveExpression (pca.SqlDependency));
+                               parms.Add (new CodeDelegateCreateExpression (
                                                              new CodeTypeReference (typeof (System.Web.UI.BuildMethod)),
                                                              thisRef, child.Method.Name));
-
-                               parent.MethodStatements.Add (AddLinePragma (build, parent));
+#if NET_4_0
+                               string value = pca.ProviderName;
+                               if (!String.IsNullOrEmpty (value) && String.Compare (OutputCache.DEFAULT_PROVIDER_NAME, value, StringComparison.Ordinal) != 0)
+                                       parms.Add (new CodePrimitiveExpression (value));
+                               else
+                                       parms.Add (new CodePrimitiveExpression (null));
+#endif
+                               methodStatements.Add (AddLinePragma (build, parent));
                                if (parent.HasAspCode)
                                        AddRenderControl (parent);
                                return;
                        }
                                 
                        if (child.IsProperty || parent.ChildrenAsProperties) {
-                               expr.Parameters.Add (new CodeFieldReferenceExpression (ctrlVar, child.TagName));
-                               parent.MethodStatements.Add (AddLinePragma (expr, parent));
+                               if (!child.PropertyBuilderShouldReturnValue) {
+                                       expr.Parameters.Add (new CodeFieldReferenceExpression (ctrlVar, child.TagName));
+                                       parent.MethodStatements.Add (AddLinePragma (expr, parent));
+                               } else {
+                                       string localVarName = parent.GetNextLocalVariableName ("__ctrl");
+                                       methodStatements.Add (new CodeVariableDeclarationStatement (child.Method.ReturnType, localVarName));
+                                       CodeVariableReferenceExpression localVarRef = new CodeVariableReferenceExpression (localVarName);
+                                       CodeAssignStatement assign = new CodeAssignStatement ();
+                                       assign.Left = localVarRef;
+                                       assign.Right = expr;
+                                       methodStatements.Add (AddLinePragma (assign, parent));
+
+                                       assign = new CodeAssignStatement ();
+                                       assign.Left = new CodeFieldReferenceExpression (ctrlVar, child.TagName);
+                                       assign.Right = localVarRef;
+                                       methodStatements.Add (AddLinePragma (assign, parent));
+                               }
+                               
                                return;
                        }
 
-                       parent.MethodStatements.Add (AddLinePragma (expr, parent));
+                       methodStatements.Add (AddLinePragma (expr, parent));
                        CodeFieldReferenceExpression field = new CodeFieldReferenceExpression (thisRef, child.ID);
                        if (parent.ControlType == null || typeof (IParserAccessor).IsAssignableFrom (parent.ControlType))
                                AddParsedSubObjectStmt (parent, field);
                        else {
                                CodeMethodInvokeExpression invoke = new CodeMethodInvokeExpression (ctrlVar, "Add");
                                invoke.Parameters.Add (field);
-                               parent.MethodStatements.Add (AddLinePragma (invoke, parent));
+                               methodStatements.Add (AddLinePragma (invoke, parent));
                        }
                                
                        if (parent.HasAspCode)
@@ -1437,7 +1489,7 @@ namespace System.Web.Compilation
                protected void CreateControlTree (ControlBuilder builder, bool inTemplate, bool childrenAsProperties)
                {
                        EnsureID (builder);
-                       bool isTemplate = (typeof (TemplateBuilder).IsAssignableFrom (builder.GetType ()));
+                       bool isTemplate = builder.IsTemplate;
                        
                        if (!isTemplate && !inTemplate) {
                                CreateField (builder, true);
@@ -1551,8 +1603,8 @@ namespace System.Web.Compilation
                        
                        if ((!isTemplate || builder is RootBuilder) && !String.IsNullOrEmpty (builder.GetAttribute ("meta:resourcekey")))
                                CreateAssignStatementFromAttribute (builder, "meta:resourcekey");
-
-                       if (!childrenAsProperties && typeof (Control).IsAssignableFrom (builder.ControlType))
+                       
+                       if ((childrenAsProperties && builder.PropertyBuilderShouldReturnValue) || (!childrenAsProperties && typeof (Control).IsAssignableFrom (builder.ControlType)))
                                builder.Method.Statements.Add (new CodeMethodReturnStatement (ctrlVar));
 
                        builder.ProcessGeneratedCode (CompileUnit, BaseType, DerivedType, builder.Method, builder.DataBindingMethod);
index 92794037f5351f571a979cc7be7947f13825329b..de0813803f8b4e8e36ee264b13b117967ed73477 100644 (file)
@@ -65,17 +65,23 @@ namespace System.Web.Compilation
                {
                        CodeAttributeDeclaration cad;
                        cad = new CodeAttributeDeclaration ("System.Web.UI.PartialCachingAttribute");
-                       AddPrimitiveAttribute (cad, parser.OutputCacheDuration);
-                       AddPrimitiveAttribute (cad, parser.OutputCacheVaryByParam);
-                       AddPrimitiveAttribute (cad, parser.OutputCacheVaryByControls);
-                       AddPrimitiveAttribute (cad, parser.OutputCacheVaryByCustom);
-                       AddPrimitiveAttribute (cad, parser.OutputCacheShared);
+                       CodeAttributeArgumentCollection arguments = cad.Arguments;
+                       
+                       AddPrimitiveArgument (arguments, parser.OutputCacheDuration);
+                       AddPrimitiveArgument (arguments, parser.OutputCacheVaryByParam);
+                       AddPrimitiveArgument (arguments, parser.OutputCacheVaryByControls);
+                       AddPrimitiveArgument (arguments, parser.OutputCacheVaryByCustom);
+                       AddPrimitiveArgument (arguments, parser.OutputCacheSqlDependency);
+                       AddPrimitiveArgument (arguments, parser.OutputCacheShared);
+#if NET_4_0
+                       arguments.Add (new CodeAttributeArgument ("ProviderName", new CodePrimitiveExpression (parser.ProviderName)));
+#endif
                        mainClass.CustomAttributes.Add (cad);
                }
 
-               void AddPrimitiveAttribute (CodeAttributeDeclaration cad, object obj)
+               void AddPrimitiveArgument (CodeAttributeArgumentCollection arguments, object obj)
                {
-                       cad.Arguments.Add (new CodeAttributeArgument (new CodePrimitiveExpression (obj)));
+                       arguments.Add (new CodeAttributeArgument (new CodePrimitiveExpression (obj)));
                }
 
                protected override void AddStatementsToInitMethodTop (ControlBuilder builder, CodeMemberMethod method)
index f1d4cb4e9861a9058cac88d65e65a9703b3c912e..590ce6dfee083ed755a9c5dd2aed071d239f7f60 100644 (file)
@@ -101,10 +101,10 @@ namespace System.Web.Configuration
                        return prov.Extension;
                }
 
-               internal global::System.Web.Compilation.BuildProvider GetProviderInstanceForExtension (string extension)
+               internal Type GetProviderTypeForExtension (string extension)
                {
 #if NET_4_0
-                       return global::System.Web.Compilation.BuildProvider.GetProviderInstanceForExtension (extension);
+                       return global::System.Web.Compilation.BuildProvider.GetProviderTypeForExtension (extension);
 #else
                        if (String.IsNullOrEmpty (extension))
                                return null;
@@ -116,7 +116,20 @@ namespace System.Web.Configuration
                        Type type = HttpApplication.LoadType (provider.Type);
                        if (type == null)
                                return null;
-                               
+
+                       return type;
+#endif
+               }
+               
+               internal global::System.Web.Compilation.BuildProvider GetProviderInstanceForExtension (string extension)
+               {
+#if NET_4_0
+                       return global::System.Web.Compilation.BuildProvider.GetProviderInstanceForExtension (extension);
+#else
+                       Type type = GetProviderTypeForExtension (extension);
+                       if (type == null)
+                               return null;
+                       
                        return Activator.CreateInstance (type, null) as global::System.Web.Compilation.BuildProvider;
 #endif
                }
index 59cb1113319e2d15fad5ff2feaf33eae4ff5c73a..8c4f3fcd9358fc8285f11587b52995ffd8bb5ed9 100644 (file)
@@ -56,6 +56,8 @@ namespace System.Web.Configuration
                WebConfigurationFileMap map;
                const string MachinePath = ":machine:";
                const string MachineWebPath = ":web:";
+
+               string appVirtualPath;
                
                public virtual object CreateConfigurationContext (string configPath, string locationSubPath)
                {
@@ -189,7 +191,13 @@ namespace System.Web.Configuration
                {
                        string fullPath = (string) hostInitConfigurationParams [1];
                        map = (WebConfigurationFileMap) hostInitConfigurationParams [0];
+                       bool inAnotherApp = (bool) hostInitConfigurationParams [7];
 
+                       if (inAnotherApp)
+                               appVirtualPath = fullPath;
+                       else
+                               appVirtualPath = HttpRuntime.AppDomainAppVirtualPath;
+                       
                        if (locationSubPath == MachineWebPath) {
                                locationSubPath = MachinePath;
                                configPath = MachineWebPath;
@@ -385,7 +393,7 @@ namespace System.Web.Configuration
                                                (String.Compare (normalized, MachineWebPath, StringComparison.Ordinal) == 0) ||
                                                (String.Compare (normalized, "/", StringComparison.Ordinal) == 0) ||
                                                (String.Compare (normalized, "~", StringComparison.Ordinal) == 0) ||
-                                               (String.Compare (normalized, HttpRuntime.AppDomainAppVirtualPath) == 0);
+                                               (String.Compare (normalized, appVirtualPath) == 0);
                                default:
                                        return true;
                        }
@@ -416,7 +424,7 @@ namespace System.Web.Configuration
                                        }
                                }
 #endif
-                               throw new ConfigurationException ("File '" + streamName + "' not found");
+                               return null;
                        }
                                
                        return new FileStream (streamName, FileMode.Open, FileAccess.Read);
index cc4d8d6a0f444ded164037c9ad891ce14d70d0da..00d9f8ec88023e07a2511d52998baeb9f1185d0f 100644 (file)
@@ -50,6 +50,18 @@ namespace System.Web.Configuration {
 
        public static class WebConfigurationManager
        {
+               sealed class ConfigPath 
+               {
+                       public string Path;
+                       public bool InAnotherApp;
+
+                       public ConfigPath (string path, bool inAnotherApp)
+                       {
+                               this.Path = path;
+                               this.InAnotherApp = inAnotherApp;
+                       }
+               }
+               
                const int SAVE_LOCATIONS_CHECK_INTERVAL = 6000; // milliseconds
 
                static readonly char[] pathTrimChars = { '/' };
@@ -326,15 +338,16 @@ namespace System.Web.Configuration {
                        if (String.IsNullOrEmpty (path))
                                path = "/";
 
+                       bool inAnotherApp = false;
                        if (!fweb && !String.IsNullOrEmpty (path))
-                               path = FindWebConfig (path);
+                               path = FindWebConfig (path, out inAnotherApp);
 
                        string confKey = path + site + locationSubPath + server + userName + password;
                        _Configuration conf = null;
                        conf = (_Configuration) configurations [confKey];
                        if (conf == null) {
                                try {
-                                       conf = ConfigurationFactory.Create (typeof (WebConfigurationHost), null, path, site, locationSubPath, server, userName, password);
+                                       conf = ConfigurationFactory.Create (typeof (WebConfigurationHost), null, path, site, locationSubPath, server, userName, password, inAnotherApp);
                                        configurations [confKey] = conf;
                                } catch (Exception ex) {
                                        lock (hasConfigErrorsLock) {
@@ -550,53 +563,78 @@ namespace System.Web.Configuration {
                        
                        return curPath.Substring (0, idx);
                }
-               
+
                internal static string FindWebConfig (string path)
                {
+                       bool dummy;
+
+                       return FindWebConfig (path, out dummy);
+               }
+               
+               internal static string FindWebConfig (string path, out bool inAnotherApp)
+               {
+                       inAnotherApp = false;
+                       
                        if (String.IsNullOrEmpty (path))
                                return path;
-
+                       
+                       string rootPath = HttpRuntime.AppDomainAppVirtualPath;
+                       ConfigPath curPath;
+                       curPath = configPaths [path] as ConfigPath;
+                       if (curPath != null) {
+                               inAnotherApp = curPath.InAnotherApp;
+                               return curPath.Path;
+                       }
+                       
+                       HttpContext ctx = HttpContext.Current;
+                       HttpRequest req = ctx != null ? ctx.Request : null;
+                       string physPath = req != null ? VirtualPathUtility.AppendTrailingSlash (MapPath (req, path)) : null;
+                       
+                       if (physPath != null && !physPath.StartsWith (HttpRuntime.AppDomainAppPath, StringComparison.Ordinal))
+                               inAnotherApp = true;
+                       
                        string dir;
-                       if (path [path.Length - 1] == '/')
+                       if (inAnotherApp || path [path.Length - 1] == '/')
                                dir = path;
                        else {
-                               dir = VirtualPathUtility.GetDirectory (path, false);
-                               if (dir == null)
-                                       return path;
+                               dir = VirtualPathUtility.GetDirectory (path, false);
+                               if (dir == null)
+                                       return path;
                        }
                        
-                       string curPath = configPaths [dir] as string;
-                       if (curPath != null)
-                               return curPath;
+                       curPath = configPaths [dir] as ConfigPath;
+                       if (curPath != null) {
+                               inAnotherApp = curPath.InAnotherApp;
+                               return curPath.Path;
+                       }
                        
-                       HttpContext ctx = HttpContext.Current;
-                       HttpRequest req = ctx != null ? ctx.Request : null;
                        if (req == null)
                                return path;
 
-                       curPath = path;
-                       string rootPath = HttpRuntime.AppDomainAppVirtualPath;
-                       string physPath;
-
-                       while (String.Compare (curPath, rootPath, StringComparison.Ordinal) != 0) {
-                               physPath = MapPath (req, curPath);
+                       curPath = new ConfigPath (path, inAnotherApp);
+                       while (String.Compare (curPath.Path, rootPath, StringComparison.Ordinal) != 0) {
+                               physPath = MapPath (req, curPath.Path);
                                if (physPath == null) {
-                                       curPath = rootPath;
+                                       curPath.Path = rootPath;
                                        break;
                                }
 
                                if (WebConfigurationHost.GetWebConfigFileName (physPath) != null)
                                        break;
                                
-                               curPath = GetParentDir (rootPath, curPath);
-                               if (curPath == null || curPath == "~") {
-                                       curPath = rootPath;
+                               curPath.Path = GetParentDir (rootPath, curPath.Path);
+                               if (curPath.Path == null || curPath.Path == "~") {
+                                       curPath.Path = rootPath;
                                        break;
                                }
                        }
 
-                       configPaths [dir] = curPath;
-                       return curPath;
+                       if (String.Compare (curPath.Path, path, StringComparison.Ordinal) != 0)
+                               configPaths [path] = curPath;
+                       else
+                               configPaths [dir] = curPath;
+                       
+                       return curPath.Path;
                }
                
                static string GetCurrentPath (HttpContext ctx)
index 2530be19ce2a9d91deae96c24b4b07f5d5bf30c8..6ec6245d68de4049d77dd01e7606a21c8655b88e 100644 (file)
@@ -70,6 +70,8 @@ namespace System.Web.SessionState
        internal class SessionInProcHandler : SessionStateStoreProviderBase
        {
                const string CachePrefix = "@@@InProc@";
+               const int CachePrefixLength = 10;
+               
                const Int32 lockAcquireTimeout = 30000;
                
                CacheItemRemovedCallback removedCB;
@@ -356,6 +358,9 @@ namespace System.Web.SessionState
                void OnSessionRemoved (string key, object value, CacheItemRemovedReason reason)
                 {
                        if (expireCallback != null) {
+                               if (key.StartsWith (CachePrefix, StringComparison.OrdinalIgnoreCase))
+                                       key = key.Substring (CachePrefixLength);
+                               
                                if (value is SessionStateStoreData)
                                        expireCallback (key, (SessionStateStoreData)value);
                                else if (value is InProcSessionItem) {
index 1f36abafe6c813bb804471ed8d38955da0bb525d..0a27a71c28ac5b397884cefc5db4e0553ce2c321 100644 (file)
@@ -306,7 +306,13 @@ namespace System.Web.UI.WebControls
                                object o = ViewState ["RepeatLayout"];
                                return (o == null) ? RepeatLayout.Table : (RepeatLayout) o;
                        }
-                       set { ViewState ["RepeatLayout"] = value; }
+                       set {
+#if NET_4_0
+                               if (value == RepeatLayout.OrderedList || value == RepeatLayout.UnorderedList)
+                                       throw new ArgumentOutOfRangeException (String.Format ("DataList does not support the '{0}' layout.", value));
+#endif
+                               ViewState ["RepeatLayout"] = value;
+                       }
                }
 
                [Bindable (true)]
index 2b957f4c5a9eb409e6bac5a613a7e8d5835e25df..9dee6b68199b475461a2601bba69be5212ff4b91 100644 (file)
@@ -1296,13 +1296,12 @@ namespace System.Web.UI.WebControls
                        if(source == null) return null;
                        
                        PropertyDescriptorCollection props = source.GetItemProperties (new PropertyDescriptor[0]);
-                       Type prop_type;
+                       Type prop_type = null;
                        
-                       ArrayList retVal = new ArrayList();
+                       var retVal = new List <AutoGeneratedFieldProperties> ();
                        
                        if (props == null) {
                                object fitem = null;
-                               prop_type = null;
                                PropertyInfo prop_item =  source.DataSource.GetType().GetProperty("Item",
                                                                                                  BindingFlags.Instance | BindingFlags.Static |
                                                                                                  BindingFlags.Public, null, null,
@@ -1338,7 +1337,7 @@ namespace System.Web.UI.WebControls
                        
                        if (props != null && props.Count > 0) {
                                foreach (PropertyDescriptor current in props) {
-                                       if (IsBindableType (current.PropertyType)) {
+                                       if (IsBindableType (current.PropertyType) && (prop_type == null || current.ComponentType == prop_type)) {
                                                AutoGeneratedFieldProperties field = new AutoGeneratedFieldProperties ();
                                                ((IStateManager)field).TrackViewState();
                                                field.Name = current.Name;
@@ -1356,7 +1355,7 @@ namespace System.Web.UI.WebControls
                        }
 
                        if (retVal.Count > 0)
-                               return (AutoGeneratedFieldProperties[]) retVal.ToArray (typeof(AutoGeneratedFieldProperties));
+                               return retVal.ToArray ();
                        else
                                return new AutoGeneratedFieldProperties [0];
                }
index d15e6752f3ac93054310e6e179bf822c2a65c92f..a99a5555c2dc5865ee46042534c84e669ef38236 100644 (file)
@@ -38,41 +38,23 @@ namespace System.Web.UI.WebControls {
 
        [DataBindingHandler("System.Web.UI.Design.WebControls.ListControlDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultEventAttribute ("SelectedIndexChanged")]
-#if !NET_2_0
-       [DefaultPropertyAttribute ("DataSource")]
-#endif
        [Designer("System.Web.UI.Design.WebControls.ListControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        [ParseChildrenAttribute (true, "Items")]
-#if NET_2_0
        [ControlValueProperty ("SelectedValue", null)]
-#endif 
-       public abstract class ListControl :
-#if NET_2_0
-       DataBoundControl, IEditableTextControl, ITextControl
-#else          
-       WebControl
-#endif
+       public abstract class ListControl : DataBoundControl, IEditableTextControl, ITextControl
        {
 
                static readonly object SelectedIndexChangedEvent = new object ();
-#if NET_2_0
                static readonly object TextChangedEvent = new object ();
-#endif
 
                ListItemCollection items;
-#if NET_2_0
                int _selectedIndex = -2;
                string _selectedValue;
-#else          
-               int saved_selected_index = -2;
-               string saved_selected_value;
-#endif
 
                public ListControl () : base (HtmlTextWriterTag.Select)
                {
                }
 
-#if NET_2_0
                [DefaultValue (false)]
                [Themeable (false)]
                [WebSysDescription ("")]
@@ -88,11 +70,8 @@ namespace System.Web.UI.WebControls {
                                        RequiresDataBinding = true;
                        }
                }
-#endif         
                
-#if NET_2_0
                [Themeable (false)]
-#endif
                [DefaultValue(false)]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
@@ -101,37 +80,7 @@ namespace System.Web.UI.WebControls {
                        set { ViewState ["AutoPostBack"] = value; }
                }
 
-#if ONLY_1_1
-               [DefaultValue("")]
-               [WebSysDescription ("")]
-               [WebCategory ("Data")]
-               public virtual string DataMember {
-                       get { return ViewState.GetString ("DataMember", String.Empty); }
-                       set { ViewState ["DataMember"] = value; }
-               }
-
-               object data_source;
-
-               [Bindable(true)]
-               [DefaultValue(null)]
-               [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-               [WebSysDescription ("")]
-               [WebCategory ("Data")]
-               public virtual object DataSource {
-                       get { return data_source; }
-                       set { 
-                               if(value == null || value is IListSource || value is IEnumerable) { 
-                                       data_source = value;
-                                       return;
-                               }
-                               throw new ArgumentException("Invalid DataSource Type");
-                       }
-               }
-#endif         
-
-#if NET_2_0
                [Themeable (false)]
-#endif         
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Data")]
@@ -139,16 +88,12 @@ namespace System.Web.UI.WebControls {
                        get { return ViewState.GetString ("DataTextField", String.Empty); }
                        set { 
                                ViewState ["DataTextField"] = value;
-#if NET_2_0
                                if (Initialized)
                                        RequiresDataBinding = true;
-#endif
                        }
                }
 
-#if NET_2_0
                [Themeable (false)]
-#endif         
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Data")]
@@ -156,16 +101,12 @@ namespace System.Web.UI.WebControls {
                        get { return ViewState.GetString ("DataTextFormatString", String.Empty); }
                        set { 
                                ViewState ["DataTextFormatString"] = value;
-#if NET_2_0
                                if (Initialized)
                                        RequiresDataBinding = true;
-#endif
                        }
                }
 
-#if NET_2_0
                [Themeable (false)]
-#endif         
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Data")]
@@ -173,16 +114,12 @@ namespace System.Web.UI.WebControls {
                        get { return ViewState.GetString ("DataValueField", String.Empty); }
                        set { 
                                ViewState ["DataValueField"] = value;
-#if NET_2_0
                                if (Initialized)
                                        RequiresDataBinding = true;
-#endif
                        }
                }
 
-#if NET_2_0
                [Editor ("System.Web.UI.Design.WebControls.ListItemsCollectionEditor," + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
-#endif         
                [DefaultValue(null)]
                [MergableProperty(false)]
                [PersistenceMode(PersistenceMode.InnerDefaultProperty)]
@@ -205,9 +142,7 @@ namespace System.Web.UI.WebControls {
                [Browsable(false)]
                [DefaultValue(0)]
                [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-#if NET_2_0
                [Themeable (false)]
-#endif         
                [WebSysDescription ("")]
                [WebCategory ("Misc")]
                public virtual int SelectedIndex {
@@ -221,7 +156,6 @@ namespace System.Web.UI.WebControls {
                                return -1;
                        }
                        set {
-#if NET_2_0
                                _selectedIndex = value;
 
                                if (value < -1)
@@ -238,26 +172,6 @@ namespace System.Web.UI.WebControls {
 
                                /* you'd think this would be called, but noooo */
                                //OnSelectedIndexChanged (EventArgs.Empty);
-#else
-                               if (items == null || items.Count == 0) {
-                                       // This will happen when assigning this property
-                                       // before DataBind () is called on the control.
-                                       saved_selected_index = value;
-                                       return;
-                               }
-
-                               if (value < -1 || value >= Items.Count)
-                                       throw new ArgumentOutOfRangeException ("value");
-
-                               ClearSelection ();
-                               if (value == -1)
-                                       return;
-
-                               items [value].Selected = true;
-
-                               /* you'd think this would be called, but noooo */
-                               //OnSelectedIndexChanged (EventArgs.Empty);
-#endif
                        }
                }
 
@@ -275,12 +189,8 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-#if NET_2_0
                [Bindable(true, BindingDirection.TwoWay)]
                [Themeable (false)]
-#else          
-               [Bindable(true)]
-#endif         
                [Browsable(false)]
                [DefaultValue("")]
                [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -294,37 +204,11 @@ namespace System.Web.UI.WebControls {
                                return Items [si].Value;
                        }
                        set {
-#if NET_2_0
                                _selectedValue = value;
                                SetSelectedValue (value);
-#else
-                               ClearSelection ();
-                               if (items == null || items.Count == 0) {
-                                       // This will happen when assigning this property
-                                       // before DataBind () is called on the control.
-                                       saved_selected_value = value;
-                                       return;
-                               }
-
-                               int count = Items.Count;
-                               ListItemCollection coll = Items;
-                               bool thr = true;
-                               for (int i = 0; i < count; i++) {
-                                       if (coll [i].Value == value) {
-                                               coll [i].Selected = true;
-                                               thr = false;
-                                       }
-                               }
-
-                               if (thr) {
-                                       string msg = String.Format ("Argument value is out of range: {0}", value);
-                                       throw new ArgumentOutOfRangeException (msg);
-                               }
-#endif
                        }
                }
 
-#if NET_2_0
                bool SetSelectedValue (string value)
                {
                        if (items != null && items.Count > 0) {
@@ -374,8 +258,6 @@ namespace System.Web.UI.WebControls {
                {
                        base.AddAttributesToRender (w);
                }
-               
-#endif         
 
                public virtual void ClearSelection ()
                {
@@ -390,53 +272,30 @@ namespace System.Web.UI.WebControls {
                protected override void OnDataBinding (EventArgs e)
                {
                        base.OnDataBinding (e);
-#if !NET_2_0
-                       IEnumerable list = DataSourceResolver.ResolveDataSource (DataSource, DataMember);
-                       PerformDataBinding (list);
-#else
                        IEnumerable list = GetData ().ExecuteSelect (DataSourceSelectArguments.Empty);
                        InternalPerformDataBinding (list);
-#endif
                }
 
-#if NET_2_0
-               protected internal
-#else          
-               protected
-#endif         
-               override void OnPreRender (EventArgs e)
+               protected internal override void OnPreRender (EventArgs e)
                {
                        base.OnPreRender (e);
-#if NET_2_0
                        Page page = Page;
                        if (page != null && IsEnabled)
                                page.RegisterEnabledControl (this);
-#endif
                }
 
-#if NET_2_0
                protected virtual void OnTextChanged (EventArgs e)
                {
                        EventHandler handler = (EventHandler) Events [TextChangedEvent];
                        if (handler != null)
                                handler (this, e);
                }
-#endif         
 
-#if NET_2_0
-               protected internal override
-#endif
-               void PerformDataBinding (IEnumerable dataSource)
+               protected internal override void PerformDataBinding (IEnumerable dataSource)
                {
                        if (dataSource == null)
-#if NET_2_0
                                goto setselected;
-#else
-                               return;
-#endif
-#if NET_2_0
                        if (!AppendDataBoundItems)
-#endif
                                Items.Clear ();
 
                        string format = DataTextFormatString;
@@ -475,7 +334,6 @@ namespace System.Web.UI.WebControls {
                                coll.Add (new ListItem (text, val));
                        }
 
-#if NET_2_0
                setselected:
                        if (!String.IsNullOrEmpty (_selectedValue)) {
                                if (!SetSelectedValue (_selectedValue))
@@ -486,20 +344,8 @@ namespace System.Web.UI.WebControls {
                        else if (_selectedIndex >= 0) {
                                SelectedIndex = _selectedIndex;
                        }
-#else
-                       if (saved_selected_value != null) {
-                               SelectedValue = saved_selected_value;
-                               if (saved_selected_index != -2 && saved_selected_index != SelectedIndex)
-                                       throw new ArgumentException ("SelectedIndex and SelectedValue are mutually exclusive.");
-                       }
-                       else if (saved_selected_index != -2) {
-                               SelectedIndex = saved_selected_index;
-                               // No need to check saved_selected_value here, as it's done before.
-                       }
-#endif
                }
 
-#if NET_2_0
                [MonoTODO ("why override?")]
                protected override void PerformSelect ()
                {
@@ -537,8 +383,6 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-#endif         
-
                internal ArrayList GetSelectedIndicesInternal ()
                {
                        ArrayList selected = null;
@@ -568,10 +412,6 @@ namespace System.Web.UI.WebControls {
                        // .NET 2.0+ never returns null. It returns a Triplet with the Third member
                        // set to an instance of ArrayList. Since we don't have a use (at least atm)
                        // for this, we will just return a pair with both members null.
-#if !NET_2_0
-                       if (baseState == null && itemsState == null)
-                               return null;
-#endif
                        return new Pair (baseState, itemsState);
                }
 
@@ -593,13 +433,12 @@ namespace System.Web.UI.WebControls {
                                manager.LoadViewState (itemsState);
                        }
                }
-#if NET_2_0
+
                [MonoTODO ("Not implemented")]
                protected void SetPostDataSelection (int selectedIndex)
                {
                        throw new NotImplementedException ();
                }
-#endif         
 
                protected override void TrackViewState ()
                {
@@ -616,7 +455,6 @@ namespace System.Web.UI.WebControls {
                                handler (this, e);
                }
 
-#if NET_2_0            
                protected internal virtual void VerifyMultiSelect ()
                {
                        if (!MultiSelectOk ())
@@ -627,7 +465,6 @@ namespace System.Web.UI.WebControls {
                {
                        return false;
                }
-#endif         
 
                [WebSysDescription ("")]
                [WebCategory ("Action")]
@@ -636,7 +473,6 @@ namespace System.Web.UI.WebControls {
                        remove { Events.RemoveHandler (SelectedIndexChangedEvent, value); }
                }
 
-#if NET_2_0
                /* sealed in the docs */
                public event EventHandler TextChanged {
                        add {
@@ -674,9 +510,6 @@ namespace System.Web.UI.WebControls {
                                ViewState ["ValidationGroup"] = value;
                        }
                }
-
-       
-#endif
        }
 }
 
index df98ac8028f576114fcc5797f7fb26dfbc53726d..e2dfde75bf9fd271723389819c4f15d79fc5e5d6 100644 (file)
@@ -41,14 +41,9 @@ namespace System.Web.UI.WebControls {
        [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        // attributes
        [ValidationProperty ("SelectedItem")]
-#if NET_2_0
        [SupportsEventValidation]
-#endif
-       public class RadioButtonList : ListControl, IRepeatInfoUser,
-               INamingContainer, IPostBackDataHandler {
-#if !NET_2_0
-               bool need_raise;
-#endif
+       public class RadioButtonList : ListControl, IRepeatInfoUser, INamingContainer, IPostBackDataHandler
+       {
                short tabIndex = 0;
 
                public RadioButtonList ()
@@ -56,9 +51,6 @@ namespace System.Web.UI.WebControls {
 
                }
 
-#if ONLY_1_1
-               [Bindable (true)]
-#endif         
                [DefaultValue (-1)]
                [WebSysDescription ("")]
                [WebCategory ("Layout")]
@@ -75,9 +67,6 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-#if ONLY_1_1
-               [Bindable (true)]
-#endif         
                [DefaultValue (-1)]
                [WebSysDescription ("")]
                [WebCategory ("Layout")]
@@ -94,9 +83,6 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-#if ONLY_1_1
-               [Bindable (true)]
-#endif         
                [DefaultValue (0)]
                [WebSysDescription ("")]
                [WebCategory ("Layout")]
@@ -113,9 +99,6 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-#if ONLY_1_1
-               [Bindable (true)]
-#endif         
                [DefaultValue (RepeatDirection.Vertical)]
                [WebSysDescription ("")]
                [WebCategory ("Layout")]
@@ -132,9 +115,6 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-#if ONLY_1_1
-               [Bindable (true)]
-#endif         
                [DefaultValue (RepeatLayout.Table)]
                [WebSysDescription ("")]
                [WebCategory ("Layout")]
@@ -144,16 +124,19 @@ namespace System.Web.UI.WebControls {
                        }
 
                        set {
-                               if (value != RepeatLayout.Flow && value != RepeatLayout.Table)
+                               bool outOfRange;
+#if NET_4_0
+                               outOfRange = value < RepeatLayout.Table || value > RepeatLayout.OrderedList;
+#else
+                               outOfRange = value < RepeatLayout.Table || value > RepeatLayout.Flow;
+#endif
+                               if (outOfRange)
                                        throw new ArgumentOutOfRangeException ("The radio buttons layout is not one of the RepeatLayout values.");
 
                                ViewState ["RepeatLayout"] = value;
                        }
                }
 
-#if ONLY_1_1
-               [Bindable (true)]
-#endif         
                [DefaultValue (TextAlign.Right)]
                [WebSysDescription ("")]
                [WebCategory ("Appearance")]
@@ -172,31 +155,19 @@ namespace System.Web.UI.WebControls {
 
                // Interface properties
 
-#if NET_2_0
-               protected virtual
-#endif
-               bool HasFooter {
+               protected virtual bool HasFooter {
                        get { return false; }
                }
 
-#if NET_2_0
-               protected virtual
-#endif
-               bool HasHeader {
+               protected virtual bool HasHeader {
                        get { return false; }
                }
 
-#if NET_2_0
-               protected virtual
-#endif
-               bool HasSeparators {
+               protected virtual bool HasSeparators {
                        get { return false; }
                }
 
-#if NET_2_0
-               protected virtual
-#endif
-               int RepeatedItemCount {
+               protected virtual int RepeatedItemCount {
                        get { return Items.Count; }
                }
                
@@ -221,7 +192,6 @@ namespace System.Web.UI.WebControls {
                        return new TableStyle (ViewState);
                }
 
-#if NET_2_0
                // MSDN: Searches the current naming container for a server control 
                // with the specified ID and path offset. The FindControl method 
                // always returns the RadioButtonList object. 
@@ -229,20 +199,13 @@ namespace System.Web.UI.WebControls {
                {
                        return this;
                }
-#endif
 
-#if NET_2_0
-               protected virtual
-#endif
-               Style GetItemStyle (ListItemType itemType, int repeatIndex)
+               protected virtual Style GetItemStyle (ListItemType itemType, int repeatIndex)
                {
                        return null;
                }
 
-#if NET_2_0
-               protected virtual
-#endif
-               void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
+               protected virtual void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
                {
                        ListItem item = Items [repeatIndex];
 
@@ -257,24 +220,19 @@ namespace System.Web.UI.WebControls {
                        radio.AutoPostBack = AutoPostBack;
                        radio.Enabled = IsEnabled;
                        radio.TabIndex = tabIndex;
-#if NET_2_0
                        radio.ValidationGroup = ValidationGroup;
                        radio.CausesValidation = CausesValidation;
                        if (radio.HasAttributes)
                                radio.Attributes.Clear ();
                        if (item.HasAttributes)
                                radio.Attributes.CopyFrom (item.Attributes);
-#endif
+
                        radio.RenderControl (writer);
                }
-#if NET_2_0
-               protected virtual
-#endif
-               bool LoadPostData (string postDataKey, NameValueCollection postCollection)
+
+               protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-#if NET_2_0
                        EnsureDataBound ();
-#endif
                        string val = postCollection [postDataKey];
                        ListItemCollection items = Items;
                        int end = items.Count;
@@ -286,35 +244,21 @@ namespace System.Web.UI.WebControls {
 
                                if (i != selected) {
                                        SelectedIndex = i;
-#if NET_2_0
                                        return true;
-#else
-                                       need_raise = true;
-#endif
                                }
-#if !NET_2_0
-                               return true;
-#endif
                        }
 
                        return false;
                }
 
-#if NET_2_0
-               protected virtual
-#endif
-               void RaisePostDataChangedEvent ()
+               protected virtual void RaisePostDataChangedEvent ()
                {
-#if NET_2_0
                        ValidateEvent (UniqueID, String.Empty);
-                       if (CausesValidation)
-                               Page.Validate (ValidationGroup);
-#endif
+                       Page page = Page;
+                       if (CausesValidation && page != null)
+                               page.Validate (ValidationGroup);
 
-#if !NET_2_0
-                       if (need_raise)
-#endif
-                               OnSelectedIndexChanged (EventArgs.Empty);
+                       OnSelectedIndexChanged (EventArgs.Empty);
                }
 
                bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
@@ -337,20 +281,15 @@ namespace System.Web.UI.WebControls {
                        RenderItem (itemType, repeatIndex, repeatInfo, writer);
                }
 
-#if NET_2_0
-               protected internal
-#else          
-               protected
-#endif         
-               override void Render (HtmlTextWriter writer)
+               protected internal override void Render (HtmlTextWriter writer)
                {
-#if NET_2_0
-                       if (Page != null)
-                               Page.ClientScript.RegisterForEventValidation (UniqueID);
+                       Page page = Page;
+                       if (page != null)
+                               page.ClientScript.RegisterForEventValidation (UniqueID);
 
                        if (Items.Count == 0)
                                return;
-#endif
+
                        RepeatInfo repeat = new RepeatInfo ();
                        repeat.RepeatColumns = RepeatColumns;
                        repeat.RepeatDirection = RepeatDirection;
index ec4b3615bb6ddf3bae335546acb559e5cae1ff2a..47b00056839113f7cd8024e55c4eba3809324b89 100644 (file)
@@ -42,24 +42,64 @@ namespace System.Web.UI.WebControls {
                public void RenderRepeater (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
                {
                        PrintValues (user);
+#if NET_4_0
+                       RepeatLayout layout = RepeatLayout;
+                       bool listLayout = layout == RepeatLayout.OrderedList || layout == RepeatLayout.UnorderedList;
+
+                       if (listLayout) {
+                               if (user != null) {
+                                       if ((user.HasHeader || user.HasFooter || user.HasSeparators))
+                                               throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers or separators.");
+                               }
+
+                               if (OuterTableImplied)
+                                       throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.");
 
-                       if (RepeatDirection == RepeatDirection.Vertical)
-                               RenderVert (w, user, controlStyle, baseControl);
-                       else
+                               int cols = RepeatColumns;
+                               if (cols > 1)
+                                       throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.");
+                       }
+#endif
+                       if (RepeatDirection == RepeatDirection.Vertical) {
+#if NET_4_0
+                               if (listLayout)
+                                       RenderList (w, user, controlStyle, baseControl);
+                               else
+#endif
+                                       RenderVert (w, user, controlStyle, baseControl);
+                       } else {
+#if NET_4_0
+                               if (listLayout)
+                                               throw new InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.");
+#endif
                                RenderHoriz (w, user, controlStyle, baseControl);
+                       }
                }
 
                void RenderBr (HtmlTextWriter w)
                {
-#if NET_2_0
                        w.Write ("<br />");
-#else
-                       // grrr, not xhtml...
-                       w.Write ("<br>");
-#endif
-
                }
+#if NET_4_0
+               void RenderList (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
+               {
+                       int items = user.RepeatedItemCount;
+                       RenderBeginTag (w, controlStyle, baseControl);
 
+                       for (int i = 0; i < items; i++) {
+                               // Style s = null;
+                               // s = user.GetItemStyle (ListItemType.Item, i);
+                               // if (s != null)
+                               //      s.AddAttributesToRender (w);
+                               w.RenderBeginTag (HtmlTextWriterTag.Li);
+                               user.RenderItem (ListItemType.Item, i, this, w);
+                               w.RenderEndTag (); // </li>
+                               w.WriteLine ();
+                       }
+                       
+                       w.RenderEndTag ();
+               }
+#endif
                void RenderVert (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl) 
                {
                        int itms = user.RepeatedItemCount;
@@ -70,16 +110,9 @@ namespace System.Web.UI.WebControls {
                        bool sep = user.HasSeparators;
                        bool oti = OuterTableImplied;
                        int hdr_span = cols * ((sep && cols != 1) ? 2 : 1);
-
                        bool table = RepeatLayout == RepeatLayout.Table && !oti;
-
-#if NET_2_0
                        bool show_empty_trailing_items = true;
                        bool show_empty_trailing_sep = true;
-#else
-                       bool show_empty_trailing_items = false;
-                       bool show_empty_trailing_sep = false;
-#endif
                        
                        if (! oti)
                                RenderBeginTag (w, controlStyle, baseControl);
@@ -189,11 +222,6 @@ namespace System.Web.UI.WebControls {
                                                        s.AddAttributesToRender (w);
                                        
                                                w.RenderBeginTag (HtmlTextWriterTag.Td);
-                                       } else if (oti) {
-#if !NET_2_0
-                                               /* 2.0 doesn't render this <br /> */
-                                               RenderBr (w);
-#endif
                                        }
                                        
                                        user.RenderItem (ListItemType.Separator, r, this, w);
@@ -248,14 +276,8 @@ namespace System.Web.UI.WebControls {
                        int hdr_span = cols * (sep ? 2 : 1);
 
                        bool table = RepeatLayout == RepeatLayout.Table;
-
-#if NET_2_0
                        bool show_empty_trailing_items = true;
                        bool show_empty_trailing_sep = true;
-#else
-                       bool show_empty_trailing_items = false;
-                       bool show_empty_trailing_sep = false;
-#endif
 
                        RenderBeginTag (w, controlStyle, baseControl);
 
@@ -406,10 +428,26 @@ namespace System.Web.UI.WebControls {
                void RenderBeginTag (HtmlTextWriter w, Style s, WebControl wc)
                {
                        WebControl c;
-                       if (RepeatLayout == RepeatLayout.Table)
-                               c = new Table ();
-                       else
-                               c = new Label ();
+                       switch (RepeatLayout) { 
+                               case RepeatLayout.Table:
+                                       c = new Table ();
+                                       break;
+                                       
+                               case RepeatLayout.Flow:
+                                       c = new Label ();
+                                       break;
+#if NET_4_0
+                               case RepeatLayout.OrderedList:
+                                       c = new WebControl (HtmlTextWriterTag.Ol);
+                                       break;
+
+                               case RepeatLayout.UnorderedList:
+                                       c = new WebControl (HtmlTextWriterTag.Ul);
+                                       break;
+#endif
+                               default:
+                                       throw new InvalidOperationException (String.Format ("Unsupported RepeatLayout value '{0}'.", RepeatLayout));
+                       }
 
                        c.ID = wc.ClientID;
                        c.CopyBaseAttributes (wc);
@@ -459,8 +497,13 @@ namespace System.Web.UI.WebControls {
                                return layout;
                        }
                        set {
-                               if (value != RepeatLayout.Flow &&
-                                   value != RepeatLayout.Table)
+                               bool outOfRange;
+#if NET_4_0
+                               outOfRange = value < RepeatLayout.Table || value > RepeatLayout.OrderedList;
+#else
+                               outOfRange = value < RepeatLayout.Table || value > RepeatLayout.Flow;
+#endif
+                               if (outOfRange)
                                        throw new ArgumentOutOfRangeException ();       
                                layout = value;
                        }
index 3efa02b7d99df9e2eb0a3eb19928199256956dd5..61c35ae7d84a19947974f74fab40634e39966577 100644 (file)
@@ -53,6 +53,8 @@ namespace System.Web.UI.WebControls
        [Designer ("System.Web.UI.Design.WebControls.TreeViewDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        public class TreeView: HierarchicalDataBoundControl, IPostBackEventHandler, IPostBackDataHandler, ICallbackEventHandler
        {
+               static readonly char[] postDataSplitChars = {'|'};
+               
                string activeSiteMapPath;
                bool stylesPrepared;
                Style hoverNodeStyle;
@@ -1025,12 +1027,15 @@ namespace System.Web.UI.WebControls
                        if (EnableClientScript && PopulateNodesFromClient) {
                                string states = postCollection [ClientID + "_PopulatedStates"];
                                if (states != null) {
-                                       foreach (string id in states.Split ('|')) {
-                                               if (String.IsNullOrEmpty(id))
-                                                       continue;
+                                       foreach (string id in states.Split (postDataSplitChars, StringSplitOptions.RemoveEmptyEntries)) {
                                                TreeNode node = FindNodeByPos (id);
-                                               if (node != null && node.PopulateOnDemand && !node.Populated)
-                                                       node.Populated = true;
+                                               if (node != null && node.PopulateOnDemand && !node.Populated) {
+                                                       Page page = Page;
+                                                       if (page != null && page.IsCallback)
+                                                               node.Populated = true; // Bug #492307
+                                                       else
+                                                               node.Populate (); // Bug #626829
+                                               }
                                        }
                                }
                                res = true;
@@ -1042,7 +1047,7 @@ namespace System.Web.UI.WebControls
                        if (EnableClientScript) {
                                string states = postCollection [ClientID + "_ExpandStates"];
                                if (states != null) {
-                                       string[] ids = states.Split ('|');
+                                       string[] ids = states.Split (postDataSplitChars, StringSplitOptions.RemoveEmptyEntries);
                                        UnsetExpandStates (Nodes, ids);
                                        SetExpandStates (ids);
                                } else
@@ -1359,8 +1364,9 @@ namespace System.Web.UI.WebControls
                
                void RenderNode (HtmlTextWriter writer, TreeNode node, int level, ArrayList levelLines, bool hasPrevious, bool hasNext)
                {
-                       if (node.PopulateOnDemand && node.HadChildrenBeforePopulating)
-                               throw new InvalidOperationException ("PopulateOnDemand cannot be set to true on a node that already has children.");
+                       // FIXME: disabled for now - needs closer investigation
+                       //if (node.PopulateOnDemand && node.HadChildrenBeforePopulating)
+                       //      throw new InvalidOperationException ("PopulateOnDemand cannot be set to true on a node that already has children.");
                        
                        DecorateNode(node);
                        
index 40fb657780ed2c28f49f2c26e5dc6d00e1811a8e..07f62f931538faca6cebc02aa0f7714a3125b264 100644 (file)
@@ -71,7 +71,7 @@ namespace System.Web.UI
                        LoadConfigDefaults ();
                }
                
-               protected override Type CompileIntoType ()
+               internal override Type CompileIntoType ()
                {
                        return GlobalAsaxCompiler.CompileApplicationType (this);
                }
@@ -98,7 +98,17 @@ namespace System.Web.UI
                internal static ArrayList FileDependencies {
                        get { return dependencies; }
                }               
+#if NET_4_0
+               internal override Type DefaultBaseType {
+                       get {
+                               Type ret = PageParser.DefaultApplicationBaseType;
+                               if (ret == null)
+                                       return base.DefaultBaseType;
 
+                               return ret;
+                       }
+               }
+#endif
                internal override string DefaultBaseTypeName {
                        get { return "System.Web.HttpApplication"; }
                }
index 39f359bd76fb2e56ffe0473caaba40c83be7faab..4480d49092c103169c33048821662de17ef838f1 100644 (file)
@@ -55,6 +55,8 @@ namespace System.Web.UI
                
                Control control;
                ControlCachePolicy cachePolicy;
+               string cacheKey;
+               string cachedData;
                
                protected BasePartialCachingControl()
                {
@@ -99,7 +101,11 @@ namespace System.Web.UI
                        get { return slidingExpiration; }
                        set { slidingExpiration = value; }
                }
-               
+#if NET_4_0
+               internal string ProviderName {
+                       get; set;
+               }
+#endif
                internal abstract Control CreateControl ();
 
                public override void Dispose ()
@@ -110,23 +116,73 @@ namespace System.Web.UI
                        }
                }
 
+               void RetrieveCachedContents ()
+               {
+                       cacheKey = CreateKey ();
+#if NET_4_0
+                       OutputCacheProvider provider = GetProvider ();
+                       cachedData = provider.Get (cacheKey) as string;
+#else
+                       Cache cache = HttpRuntime.InternalCache;
+                       cachedData = cache [cacheKey] as string;
+#endif
+               }
+#if NET_4_0
+               OutputCacheProvider GetProvider ()
+               {
+                       string providerName = ProviderName;
+                       OutputCacheProvider provider;
+
+                       if (String.IsNullOrEmpty (providerName))
+                               provider = OutputCache.DefaultProvider;
+                       else {
+                               provider = OutputCache.GetProvider (providerName);
+                               if (provider == null)
+                                       provider = OutputCache.DefaultProvider;
+                       }
+
+                       return provider;
+               }
+               
+               void OnDependencyChanged (string key, object value, CacheItemRemovedReason reason)
+               {
+                       Console.WriteLine ("{0}.OnDependencyChanged (\"{0}\", {1}, {2})", this, key, value, reason);
+                       GetProvider ().Remove (key);
+               }
+               
+               internal override void InitRecursive (Control namingContainer)
+               {
+                       RetrieveCachedContents ();
+                       if (cachedData == null) {
+                               control = CreateControl ();
+                               Controls.Add (control);
+                       } else
+                               control = null;
+                       
+                       base.InitRecursive (namingContainer);
+               }
+#else
                protected internal override void OnInit (EventArgs e)
                {
                        control = CreateControl ();
                        Controls.Add (control);
                }
-
+#endif
                protected internal override void Render (HtmlTextWriter output)
                {
-                       Cache cache = HttpRuntime.InternalCache;
-                       string key = CreateKey ();
-                       string data = cache [key] as string;
-
-                       if (data != null) {
-                               output.Write (data);
+#if !NET_4_0
+                       RetrieveCachedContents ();
+#endif
+                       if (cachedData != null) {
+                               output.Write (cachedData);
                                return;
                        }
 
+                       if (control == null) {
+                               base.Render (output);
+                               return;
+                       }
+                       
                        HttpContext context = HttpContext.Current;
                        StringWriter writer = new StringWriter ();
                        TextWriter prev = context.Response.SetTextWriter (writer);
@@ -139,11 +195,19 @@ namespace System.Web.UI
                                context.Response.SetTextWriter (prev);
                                output.Write (text);
                        }
-
-                       context.InternalCache.Insert (key, text, dependency,
+#if NET_4_0
+                       OutputCacheProvider provider = GetProvider ();
+                       DateTime utcExpire = DateTime.UtcNow.AddSeconds (duration);
+                       provider.Set (cacheKey, text, utcExpire);;
+                       context.InternalCache.Insert (cacheKey, text, dependency, utcExpire.ToLocalTime (),
+                                                     Cache.NoSlidingExpiration, CacheItemPriority.Normal,
+                                                     null);
+#else
+                       context.InternalCache.Insert (cacheKey, text, dependency,
                                                      DateTime.Now.AddSeconds (duration),
                                                      Cache.NoSlidingExpiration,
                                                      CacheItemPriority.Normal, null);
+#endif
                }
 
                public ControlCachePolicy CachePolicy 
index 17e00d1a089cdb3e4154fb7250684fb86c9b62b4..e9365f72f4098a31c1ea68187ef013bc09e8757f 100644 (file)
 //
 
 using System;
+using System.Web;
+using System.Web.Compilation;
+using System.Web.Configuration;
 
-namespace System.Web.UI {
+namespace System.Web.UI
+{
        public abstract class BaseTemplateParser : TemplateParser
-       {
+       {               
                protected BaseTemplateParser ()
                {
+                       
                }
 
-               protected Type GetReferenceType ()
+               protected Type GetReferencedType (string virtualPath)
                {
-                       throw new NotImplementedException ();
+                       if (String.IsNullOrEmpty (virtualPath))
+                               throw new ArgumentNullException ("virtualPath");
+                       
+                       var pageParserFilter = PageParserFilter;
+                       if (pageParserFilter != null) {
+                               var cfg = WebConfigurationManager.GetSection ("system.web/compilation") as CompilationSection;
+                               if (cfg == null)
+                                       throw new HttpException ("Internal error. Missing configuration section.");
+
+                               string extension = VirtualPathUtility.GetExtension (virtualPath);
+                               Type btype = cfg.BuildProviders.GetProviderTypeForExtension (extension);
+                               VirtualReferenceType reftype;
+
+                               if (btype == null)
+                                       reftype = VirtualReferenceType.Other;
+                               else if (btype == typeof (PageBuildProvider))
+                                       reftype = VirtualReferenceType.Page;
+                               else if (btype == typeof (UserControlBuildProvider))
+                                       reftype = VirtualReferenceType.UserControl;
+                               else if (btype == typeof (MasterPageBuildProvider))
+                                       reftype = VirtualReferenceType.Master;
+                               else
+                                       reftype = VirtualReferenceType.SourceFile;
+                               
+                               if (!pageParserFilter.AllowVirtualReference (virtualPath, reftype))
+                                       throw new HttpException ("The parser does not permit a virtual reference to the UserControl.");
+                       }
+                       
+                       return BuildManager.GetCompiledType (virtualPath);
                }
 
+               [MonoTODO ("We don't do anything here with the no-compile controls.")]
                protected internal Type GetUserControlType (string virtualPath)
                {
-                       throw new NotImplementedException ();
+                       // Documented as a wrapper for the call below, but what does it do?
+                       return GetReferencedType (virtualPath);
                }
        }
 }
index 2027cf20d2733ea2ed1d51ac8fb528c249370a3e..81b51471546bb5ff495ea27dc5c1b64ad13eaa53 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+using System;
+using System.Web;
+using System.Web.Compilation;
+
 namespace System.Web.UI
 {
-       public class BoundPropertyEntry : PropertyEntry {
-               string expression;
-               string expressionPrefix;
-               bool generated;
-               bool useSetAttribute;
-
+       public class BoundPropertyEntry : PropertyEntry
+       {
                internal BoundPropertyEntry ()
                {
                }
+               
+               public string ControlID {
+                       get; set;
+               }
 
+               public Type ControlType {
+                       get; set;
+               }
+               
                public string Expression {
-                       get { return expression; }
-                       set { expression = value; }
+                       get; set;
                }
 
+               public ExpressionBuilder ExpressionBuilder {
+                       get; set;
+               }
+               
                public string ExpressionPrefix {
-                       get { return expressionPrefix; }
-                       set { expressionPrefix = value; }
+                       get; set;
                }
-
+               
+               public string FieldName {
+                       get; set;
+               }
+               
+               public string FormatString {
+                       get; set;
+               }
+               
                public bool Generated {
-                       get { return generated; }
-                       set { generated = value; }
+                       get; set;
+               }
+               
+               public object ParsedExpressionData {
+                       get; set;
                }
 
+               public bool ReadOnlyProperty {
+                       get; set;
+               }
+               
+               public bool TwoWayBound {
+                       get; set;
+               }
+               
                public bool UseSetAttribute {
-                       get { return useSetAttribute; }
-                       set { useSetAttribute = value; }
+                       get; set;
                }
        }
 }
index 4fe6e98d5dba497e60c9def5b198e3afe3c2c46c..053998ea0fcead5fc53a5f22f57021cc91e38880 100644 (file)
@@ -1699,8 +1699,12 @@ namespace System.Web.UI
                        
                        stateMask |= PRERENDERED;
                }
-
-               internal void InitRecursive (Control namingContainer)
+#if NET_4_0
+               internal virtual
+#else
+               internal
+#endif
+               void InitRecursive (Control namingContainer)
                {
 #if MONO_TRACE
                        TraceContext trace = (Context != null && Context.Trace.IsEnabled) ? Context.Trace : null;
index a8910f157e927db852460459f9480c2aeeaf1e4d..c250639cbd28c56862de52b7b3e93437630c9aeb 100644 (file)
@@ -80,8 +80,12 @@ namespace System.Web.UI {
                CodeMemberMethod renderMethod;
                int renderIndex;
                bool isProperty;
+               bool isPropertyWritable;
                ILocation location;
                ArrayList otherTags;
+
+               int localVariableCount = 0;
+               bool? isTemplate;
                
                public ControlBuilder ()
                {
@@ -169,6 +173,10 @@ namespace System.Web.UI {
                        get { return isProperty; }
                }
 
+               internal bool IsPropertyWritable {
+                       get { return isPropertyWritable; }
+               }
+               
                internal ILocation Location {
                        get { return location; }
                        set { location = new _Location (value); }
@@ -235,6 +243,19 @@ namespace System.Web.UI {
                                return typeof (INamingContainer).IsAssignableFrom (type);
                        }
                }
+
+               internal bool IsTemplate {
+                       get {
+                               if (isTemplate == null)
+                                       isTemplate = (typeof (TemplateBuilder).IsAssignableFrom (GetType ()));
+
+                               return isTemplate.Value;
+                       }
+               }
+               
+               internal bool PropertyBuilderShouldReturnValue {
+                       get { return isProperty && isPropertyWritable && RenderMethod == null && !IsTemplate && !(this is CollectionBuilder) && !(this is RootBuilder); }
+               }
                
                ControlBuilder MyNamingContainer {
                        get {
@@ -537,7 +558,6 @@ namespace System.Web.UI {
                                                                    int line,
                                                                    string sourceFileName)
                {
-
                        Type tagType = MapTagType (type);
                        ControlBuilder builder;
                        object [] atts = tagType.GetCustomAttributes (typeof (ControlBuilderAttribute), true);
@@ -597,6 +617,7 @@ namespace System.Web.UI {
                                builder = CreateBuilderFromType (parser, parentBuilder, propType, prop.Name,
                                                                 null, atts, line, fileName);
                                builder.isProperty = true;
+                               builder.isPropertyWritable = prop.CanWrite;
                                if (idx >= 0)
                                        builder.originalTagName = propName;
                                return builder;
@@ -606,6 +627,7 @@ namespace System.Web.UI {
                        builder.fileName = fileName;
                        builder.line = line;
                        builder.isProperty = true;
+                       builder.isPropertyWritable = prop.CanWrite;
                        if (idx >= 0)
                                builder.originalTagName = propName;
                        return builder;
@@ -679,6 +701,12 @@ namespace System.Web.UI {
                        return "_bctrl_" + nextID++;
                }
 
+               internal string GetNextLocalVariableName (string baseName)
+               {
+                       localVariableCount++;
+                       return baseName + localVariableCount.ToString ();
+               }
+               
                internal virtual ControlBuilder CreateSubBuilder (string tagid,
                                                                  IDictionary atts,
                                                                  Type childType,
index 64f8ed2ed69ecc39b4612625289b5d9dab349446..5c56bf1a0734ad11dfea14afc1d9a4a7fd4ce078 100644 (file)
@@ -81,7 +81,19 @@ namespace System.Web.UI
                                bpcc.Duration = value.Minutes;
                        }
                }
-
+#if NET_4_0
+               public string ProviderName {
+                       get {
+                               AssertBasePartialCachingControl ();
+                               return bpcc.ProviderName;
+                       }
+                       
+                       set {
+                               AssertBasePartialCachingControl ();
+                               bpcc.ProviderName = value;
+                       }
+               }
+#endif
                public bool SupportsCaching 
                {
                        get {
index 878e2dcb0b3356fdabf9833b1bab98987fd1bec7..d7057ad5f58770663fecde2e7f96d85bce2e718e 100644 (file)
@@ -44,6 +44,13 @@ namespace System.Web.UI
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public sealed class PageParser : TemplateControlParser
        {
+#if NET_4_0
+               static Type defaultPageBaseType;
+               static Type defaultApplicationBaseType;
+               static Type defaultPageParserFilterType;
+               static Type defaultUserControlBaseType;
+               static bool enableLongStringsAsResources = true;
+#endif
                PagesEnableSessionState enableSessionState = PagesEnableSessionState.True;
                bool enableViewStateMac;
                bool enableViewStateMacSet;
@@ -78,7 +85,56 @@ namespace System.Web.UI
                int maxPageStateFieldLength = -1;
                Type previousPageType;
                string previousPageVirtualPath;
+#if NET_4_0
+               public static bool EnableLongStringsAsResources {
+                       get { return enableLongStringsAsResources; }
+                       set {
+                               BuildManager.AssertPreStartMethodsRunning ();
+                               enableLongStringsAsResources = value;
+                       }
+               }
+               
+               public static Type DefaultPageBaseType {
+                       get { return defaultPageBaseType; }
+                       set {
+                               BuildManager.AssertPreStartMethodsRunning ();
+                               if (value != null && !typeof (Page).IsAssignableFrom (value))
+                                       throw new ArgumentException (String.Format ("The value assigned to property '{0}' is invalid.", "DefaultPageBaseType"));
+                               
+                               defaultPageBaseType = value;
+                       }
+               }
+
+               public static Type DefaultApplicationBaseType {
+                       get { return defaultApplicationBaseType; }
+                       set {
+                               BuildManager.AssertPreStartMethodsRunning ();
+                               if (value != null && !typeof (HttpApplication).IsAssignableFrom (value))
+                                       throw new ArgumentException (String.Format ("The value assigned to property '{0}' is invalid.", "DefaultApplicationBaseType"));
+                               defaultApplicationBaseType = value;
+                       }
+               }
 
+               public static Type DefaultPageParserFilterType {
+                       get { return defaultPageParserFilterType; }
+                       set {
+                               BuildManager.AssertPreStartMethodsRunning ();
+                               if (value != null && !typeof (PageParserFilter).IsAssignableFrom (value))
+                                       throw new ArgumentException (String.Format ("The value assigned to property '{0}' is invalid.", "DefaultPageParserFilterType"));
+                               defaultPageParserFilterType = value;
+                       }
+               }
+
+               public static Type DefaultUserControlBaseType {
+                       get { return defaultUserControlBaseType; }
+                       set {
+                               if (value != null && !typeof (UserControl).IsAssignableFrom (value))
+                                       throw new ArgumentException (String.Format ("The value assigned to property '{0}' is invalid.", "DefaultUserControlBaseType"));
+                               BuildManager.AssertPreStartMethodsRunning ();
+                               defaultUserControlBaseType = value;
+                       }
+               }
+#endif
                public PageParser ()
                {
                        LoadConfigDefaults ();
@@ -459,15 +515,13 @@ namespace System.Web.UI
                        }
                        return retval;
                }
-#if !NET_4_0
-               public static
-#endif
-               Type GetCompiledPageType (string virtualPath, string inputFile, HttpContext context)
+
+               internal Type GetCompiledPageType (string virtualPath, string inputFile, HttpContext context)
                {
                        return BuildManager.GetCompiledType (virtualPath);
                }
                
-               protected override Type CompileIntoType ()
+               internal override Type CompileIntoType ()
                {
                        AspGenerator generator = new AspGenerator (this);
                        return generator.GetCompiledType ();
@@ -509,7 +563,17 @@ namespace System.Web.UI
                internal TraceMode TraceMode {
                        get { return tracemode; }
                }               
+#if NET_4_0
+               internal override Type DefaultBaseType {
+                       get {
+                               Type ret = DefaultPageBaseType;
+                               if (ret == null)
+                                       return base.DefaultBaseType;
 
+                               return ret;
+                       }
+               }
+#endif
                internal override string DefaultBaseTypeName {
                        get { return PagesConfig.PageBaseType; }
                }
index 8a70d0641b50c984a90fe64dcb6edfd4ad6eafea..c92eaa32ff6c9d7521cfb7b9ad92037ded625a67 100644 (file)
@@ -81,7 +81,11 @@ namespace System.Web.UI {
                public int Duration {
                        get { return duration; }
                }
-
+#if NET_4_0
+               public string ProviderName {
+                       get; set;
+               }
+#endif
                public string VaryByParams {
                        get { return varyByParams; }
                }
index b6774dfd4c2054b7d77aa03a5104dba836389675..5c1396e78c63e20c5b1a82eff7d0b796f4e4f99b 100644 (file)
@@ -35,9 +35,10 @@ namespace System.Web.UI {
        // CAS
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-       public class StaticPartialCachingControl : BasePartialCachingControl {
-
+       public class StaticPartialCachingControl : BasePartialCachingControl
+       {
                BuildMethod buildMethod;
+               string sqlDependency;
 
                public StaticPartialCachingControl (string ctrlID, string guid, int duration,
                                string varyByParams, string varyByControls, string varyByCustom,
@@ -53,28 +54,51 @@ namespace System.Web.UI {
                        this.buildMethod = buildMethod;
                }
 
+               public StaticPartialCachingControl (string ctrlID, string guid, int duration, string varyByParams,
+                                                   string varyByControls, string varyByCustom, string sqlDependency,
+                                                   BuildMethod buildMethod)
+                       : this (ctrlID, guid, duration, varyByParams, varyByControls, varyByCustom, buildMethod)
+               {
+                       this.sqlDependency = sqlDependency;
+               }
+#if NET_4_0
+               public StaticPartialCachingControl (string ctrlID, string guid, int duration, string varyByParams,
+                                                   string varyByControls, string varyByCustom, string sqlDependency,
+                                                   BuildMethod buildMethod, string providerName)
+                       : this (ctrlID, guid, duration, varyByParams, varyByControls, varyByCustom, sqlDependency, buildMethod)
+               {
+                       ProviderName = providerName;
+               }
+#endif
                [MonoTODO("Consider sqlDependency parameter")]
                public static void BuildCachedControl (Control parent, string ctrlID, string guid,
-                               int duration, string varyByParams, string varyByControls,
-                               string varyByCustom, string sqlDependency, BuildMethod buildMethod)
+                                                      int duration, string varyByParams, string varyByControls, string varyByCustom,
+                                                      string sqlDependency, BuildMethod buildMethod)
                {
-                       BuildCachedControl (parent, ctrlID, guid,
-                               duration, varyByParams, varyByControls,
-                               varyByCustom, buildMethod);
+                       StaticPartialCachingControl NewControl = new StaticPartialCachingControl (ctrlID, guid, duration,
+                                                                                                 varyByParams, varyByControls, varyByCustom,
+                                                                                                 sqlDependency, buildMethod);
+                       if (parent != null)
+                               parent.Controls.Add (NewControl);
                }
 
-               public static void BuildCachedControl (Control parent, string ctrlID, string guid,
-                               int duration, string varyByParams, string varyByControls,
-                               string varyByCustom, BuildMethod buildMethod)
+               public static void BuildCachedControl (Control parent, string ctrlID, string guid, int duration,
+                                                      string varyByParams, string varyByControls, string varyByCustom,
+                                                      BuildMethod buildMethod)
                {
-                       StaticPartialCachingControl NewControl =
-                               new StaticPartialCachingControl (ctrlID, guid, duration,
-                                               varyByParams, varyByControls, varyByCustom,
-                                               buildMethod);
-
-                       parent.Controls.Add (NewControl);
+                       BuildCachedControl (parent, ctrlID, guid, duration, varyByParams, varyByControls, varyByCustom, null, buildMethod);
                }
-
+#if NET_4_0
+               public static void BuildCachedControl (Control parent, string ctrlID, string guid, int duration,
+                                                      string varyByParams, string varyByControls, string varyByCustom,
+                                                      string sqlDependency, BuildMethod buildMethod, string providerName)
+               {
+                       var ctl = new StaticPartialCachingControl (ctrlID, guid, duration, varyByParams, varyByControls, varyByCustom,
+                                                                  sqlDependency, buildMethod, providerName);
+                       if (parent != null)
+                               parent.Controls.Add (ctl);
+               }
+#endif
                internal override Control CreateControl()
                {
                       return buildMethod ();
index 77011daf4ebe663a2a92f9c7f6163f5f6ddfed08..95c19e456af26b7dd370bff5d0820926fe380bd8 100644 (file)
@@ -159,7 +159,7 @@ namespace System.Web.UI {
                        }
                }
 
-               protected abstract Type CompileIntoType ();
+               internal abstract Type CompileIntoType ();
 
                internal void AddControl (Type type, IDictionary attributes)
                {
@@ -329,107 +329,110 @@ namespace System.Web.UI {
                                        response.Cache.SetValidUntilExpires (true);
                                
                                output_cache = true;
-                               
-                               if (atts ["Duration"] == null)
-                                       ThrowParseException ("The directive is missing a 'duration' attribute.");
-                               if (atts ["VaryByParam"] == null && atts ["VaryByControl"] == null)
-                                       ThrowParseException ("This directive is missing 'VaryByParam' " +
-                                                       "or 'VaryByControl' attribute, which should be set to \"none\", \"*\", " +
-                                                       "or a list of name/value pairs.");
-
-                               foreach (DictionaryEntry entry in atts) {
-                                       string key = (string) entry.Key;
-                                       if (key == null)
-                                               continue;
+                               ProcessOutputCacheAttributes (atts);
+                               return;
+                       }
+
+                       ThrowParseException ("Unknown directive: " + directive);
+               }
+
+               internal virtual void ProcessOutputCacheAttributes (IDictionary atts)
+               {
+                       if (atts ["Duration"] == null)
+                               ThrowParseException ("The directive is missing a 'duration' attribute.");
+                       if (atts ["VaryByParam"] == null && atts ["VaryByControl"] == null)
+                               ThrowParseException ("This directive is missing 'VaryByParam' " +
+                                                    "or 'VaryByControl' attribute, which should be set to \"none\", \"*\", " +
+                                                    "or a list of name/value pairs.");
+
+                       foreach (DictionaryEntry entry in atts) {
+                               string key = (string) entry.Key;
+                               if (key == null)
+                                       continue;
                                        
-                                       switch (key.ToLower (Helpers.InvariantCulture)) {
-                                               case "duration":
-                                                       oc_duration = Int32.Parse ((string) entry.Value);
-                                                       if (oc_duration < 1)
-                                                               ThrowParseException ("The 'duration' attribute must be set " +
-                                                                                    "to a positive integer value");
-                                                       break;
+                               switch (key.ToLower (Helpers.InvariantCulture)) {
+                                       case "duration":
+                                               oc_duration = Int32.Parse ((string) entry.Value);
+                                               if (oc_duration < 1)
+                                                       ThrowParseException ("The 'duration' attribute must be set " +
+                                                                            "to a positive integer value");
+                                               break;
 
-                                               case "sqldependency":
-                                                       oc_sqldependency = (string) entry.Value;
-                                                       break;
+                                       case "sqldependency":
+                                               oc_sqldependency = (string) entry.Value;
+                                               break;
                                                        
-                                               case "nostore":
-                                                       try {
-                                                               oc_nostore = Boolean.Parse ((string) entry.Value);
-                                                               oc_parsed_params |= OutputCacheParsedParams.NoStore;
-                                                       } catch {
-                                                               ThrowParseException ("The 'NoStore' attribute is case sensitive" +
-                                                                                    " and must be set to 'true' or 'false'.");
-                                                       }
-                                                       break;
+                                       case "nostore":
+                                               try {
+                                                       oc_nostore = Boolean.Parse ((string) entry.Value);
+                                                       oc_parsed_params |= OutputCacheParsedParams.NoStore;
+                                               } catch {
+                                                       ThrowParseException ("The 'NoStore' attribute is case sensitive" +
+                                                                            " and must be set to 'true' or 'false'.");
+                                               }
+                                               break;
 
-                                               case "cacheprofile":
-                                                       oc_cacheprofile = (string) entry.Value;
-                                                       oc_parsed_params |= OutputCacheParsedParams.CacheProfile;
-                                                       break;
+                                       case "cacheprofile":
+                                               oc_cacheprofile = (string) entry.Value;
+                                               oc_parsed_params |= OutputCacheParsedParams.CacheProfile;
+                                               break;
                                                        
-                                               case "varybycontentencodings":
-                                                       oc_content_encodings = (string) entry.Value;
-                                                       oc_parsed_params |= OutputCacheParsedParams.VaryByContentEncodings;
-                                                       break;
+                                       case "varybycontentencodings":
+                                               oc_content_encodings = (string) entry.Value;
+                                               oc_parsed_params |= OutputCacheParsedParams.VaryByContentEncodings;
+                                               break;
 
-                                               case "varybyparam":
-                                                       oc_param = (string) entry.Value;
-                                                       if (String.Compare (oc_param, "none", true, Helpers.InvariantCulture) == 0)
-                                                               oc_param = null;
-                                                       break;
-                                               case "varybyheader":
-                                                       oc_header = (string) entry.Value;
-                                                       oc_parsed_params |= OutputCacheParsedParams.VaryByHeader;
-                                                       break;
-                                               case "varybycustom":
-                                                       oc_custom = (string) entry.Value;
-                                                       oc_parsed_params |= OutputCacheParsedParams.VaryByCustom;
-                                                       break;
-                                               case "location":
-                                                       if (!(this is PageParser))
-                                                               goto default;
+                                       case "varybyparam":
+                                               oc_param = (string) entry.Value;
+                                               if (String.Compare (oc_param, "none", true, Helpers.InvariantCulture) == 0)
+                                                       oc_param = null;
+                                               break;
+                                       case "varybyheader":
+                                               oc_header = (string) entry.Value;
+                                               oc_parsed_params |= OutputCacheParsedParams.VaryByHeader;
+                                               break;
+                                       case "varybycustom":
+                                               oc_custom = (string) entry.Value;
+                                               oc_parsed_params |= OutputCacheParsedParams.VaryByCustom;
+                                               break;
+                                       case "location":
+                                               if (!(this is PageParser))
+                                                       goto default;
                                                
-                                                       try {
-                                                               oc_location = (OutputCacheLocation) Enum.Parse (
-                                                                       typeof (OutputCacheLocation), (string) entry.Value, true);
-                                                               oc_parsed_params |= OutputCacheParsedParams.Location;
-                                                       } catch {
-                                                               ThrowParseException ("The 'location' attribute is case sensitive and " +
-                                                                                    "must be one of the following values: Any, Client, " +
-                                                                                    "Downstream, Server, None, ServerAndClient.");
-                                                       }
-                                                       break;
-                                               case "varybycontrol":
-                                                       oc_controls = (string) entry.Value;
-                                                       oc_parsed_params |= OutputCacheParsedParams.VaryByControl;
-                                                       break;
-                                               case "shared":
-                                                       if (this is PageParser)
-                                                               goto default;
-
-                                                       try {
-                                                               oc_shared = Boolean.Parse ((string) entry.Value);
-                                                       } catch {
-                                                               ThrowParseException ("The 'shared' attribute is case sensitive" +
-                                                                                    " and must be set to 'true' or 'false'.");
-                                                       }
-                                                       break;
-                                               default:
-                                                       ThrowParseException ("The '" + key + "' attribute is not " +
-                                                                            "supported by the 'Outputcache' directive.");
-                                                       break;
-                                       }
-                                       
+                                               try {
+                                                       oc_location = (OutputCacheLocation) Enum.Parse (
+                                                               typeof (OutputCacheLocation), (string) entry.Value, true);
+                                                       oc_parsed_params |= OutputCacheParsedParams.Location;
+                                               } catch {
+                                                       ThrowParseException ("The 'location' attribute is case sensitive and " +
+                                                                            "must be one of the following values: Any, Client, " +
+                                                                            "Downstream, Server, None, ServerAndClient.");
+                                               }
+                                               break;
+                                       case "varybycontrol":
+                                               oc_controls = (string) entry.Value;
+                                               oc_parsed_params |= OutputCacheParsedParams.VaryByControl;
+                                               break;
+                                       case "shared":
+                                               if (this is PageParser)
+                                                       goto default;
+
+                                               try {
+                                                       oc_shared = Boolean.Parse ((string) entry.Value);
+                                               } catch {
+                                                       ThrowParseException ("The 'shared' attribute is case sensitive" +
+                                                                            " and must be set to 'true' or 'false'.");
+                                               }
+                                               break;
+                                       default:
+                                               ThrowParseException ("The '" + key + "' attribute is not " +
+                                                                    "supported by the 'Outputcache' directive.");
+                                               break;
                                }
-                               
-                               return;
+                                       
                        }
-
-                       ThrowParseException ("Unknown directive: " + directive);
                }
-
+               
                internal Type LoadType (string typeName)
                {
                        Type type = HttpApplication.LoadType (typeName);
@@ -942,6 +945,11 @@ namespace System.Web.UI {
                internal Type PageParserFilterType {
                        get {
                                if (pageParserFilterType == null) {
+#if NET_4_0
+                                       pageParserFilterType = PageParser.DefaultPageParserFilterType;
+                                       if (pageParserFilterType != null)
+                                               return pageParserFilterType;
+#endif
                                        string typeName = PagesConfig.PageParserFilterType;
                                        if (String.IsNullOrEmpty (typeName))
                                                return null;
@@ -952,8 +960,12 @@ namespace System.Web.UI {
                                return pageParserFilterType;
                        }
                }
-               
-               internal Type DefaultBaseType {
+#if NET_4_0
+               internal virtual
+#else
+               internal
+#endif
+               Type DefaultBaseType {
                        get {
                                Type type = Type.GetType (DefaultBaseTypeName, true);
 
index 7f418c2a9a54e8fe51ec15385b7f65142985d7af..ad5edc2cf9350c2f871b8b5d8802fcf810142ec2 100644 (file)
@@ -39,8 +39,9 @@ namespace System.Web.UI
        internal class UserControlParser : TemplateControlParser
        {
                string masterPage;
-
-
+#if NET_4_0
+               string providerName;
+#endif
                internal UserControlParser (VirtualPath virtualPath, string inputFile, HttpContext context)
                        : this (virtualPath, inputFile, context, null)
                {
@@ -123,7 +124,7 @@ namespace System.Web.UI
                        return ucp.CompileIntoType ();
                }
 
-               protected override Type CompileIntoType ()
+               internal override Type CompileIntoType ()
                {
                        AspGenerator generator = new AspGenerator (this);
                        return generator.GetCompiledType ();
@@ -137,7 +138,23 @@ namespace System.Web.UI
 
                        base.ProcessMainAttributes (atts);
                }
+#if NET_4_0
+               internal override void ProcessOutputCacheAttributes (IDictionary atts)
+               {
+                       providerName = GetString (atts, "ProviderName", null);
+                       base.ProcessOutputCacheAttributes (atts);
+               }
 
+               internal override Type DefaultBaseType {
+                       get {
+                               Type ret = PageParser.DefaultUserControlBaseType;
+                               if (ret == null)
+                                       return base.DefaultBaseType;
+
+                               return ret;
+                       }
+               }
+#endif
                internal override string DefaultBaseTypeName {
                        get { return PagesConfig.UserControlBaseType; }
                }
@@ -149,6 +166,11 @@ namespace System.Web.UI
                internal string MasterPageFile {
                        get { return masterPage; }
                }
+#if NET_4_0
+               internal string ProviderName {
+                       get { return providerName; }
+               }
+#endif
        }
 }
 
index 2281b1254ee6797f211303ccb51dc08f4f822852..525decc9249455f2d03e8e1b96f7220529cd96ef 100644 (file)
@@ -1347,7 +1347,8 @@ namespace System.Web
                                                doProcessHandler = extHandler != null && !extHandler.IsCompleted;
 #endif
                                        }
-                               }
+                               } else
+                                       throw new InvalidOperationException ("No handler for the current request.");
                                if (context.Error != null)
                                        throw new TargetInvocationException(context.Error);
                        } finally {
index 53d09165b075d947d55839ce54ce7840ae3aa8d5..5d9657d1d3aacabe9258939a3957e76e66b18dd5 100644 (file)
@@ -618,6 +618,7 @@ namespace System.Web
                        if (!VirtualPathUtility.IsValidVirtualPath (filePath))
                                throw new HttpException ("'" + HttpUtility.HtmlEncode (filePath) + "' is not a valid virtual path.");
 
+                       filePath = VirtualPathUtility.Canonize (filePath);
                        bool pathRelative = VirtualPathUtility.IsAppRelative (filePath);
                        bool pathAbsolute = pathRelative ? false : VirtualPathUtility.IsAbsolute (filePath);
                        HttpRequest req = Request;
index f4e2e5112dc252065789d95e705cc1a7049ce790..d3818a412bcd2247041d238bdb647aeb2965161b 100644 (file)
@@ -1334,14 +1334,15 @@ namespace System.Web
                                throw HttpException.NewWithCode (String.Format ("'{0}' is not a valid virtual path.", virtualPath), WebEventCodes.RuntimeErrorRequestAbort);
 
                        string appVirtualPath = HttpRuntime.AppDomainAppVirtualPath;
-
                        if (!VirtualPathUtility.IsRooted (virtualPath)) {
                                if (StrUtils.IsNullOrEmpty (baseVirtualDir))
                                        baseVirtualDir = appVirtualPath;
                                virtualPath = VirtualPathUtility.Combine (VirtualPathUtility.AppendTrailingSlash (baseVirtualDir), virtualPath);
-                       }
-                       virtualPath = VirtualPathUtility.ToAbsolute (virtualPath);
-                       
+                               if (!VirtualPathUtility.IsAbsolute (virtualPath))
+                                       virtualPath = VirtualPathUtility.ToAbsolute (virtualPath);
+                       } else if (!VirtualPathUtility.IsAbsolute (virtualPath))
+                               virtualPath = VirtualPathUtility.ToAbsolute (virtualPath);
+
                        if (!allowCrossAppMapping){
                                if (!StrUtils.StartsWith (virtualPath, appVirtualPath, true))
                                        throw HttpException.NewWithCode ("MapPath: Mapping across applications not allowed", WebEventCodes.RuntimeErrorRequestAbort);
@@ -1473,24 +1474,30 @@ namespace System.Web
                {
                        file_path = path;
                        physical_path = null;
+                       original_path = null;
                }
 
                internal void SetCurrentExePath (string path)
                {
                        cached_url = null;
                        current_exe_path = path;
-                       UrlComponents.Path = path;
+                       UrlComponents.Path = path + PathInfo;
                        // recreated on demand
                        root_virtual_dir = null;
                        base_virtual_dir = null;
                        physical_path = null;
                        unescaped_path = null;
+                       original_path = null;
                }
 
                internal void SetPathInfo (string pi)
                {
                        cached_url = null;
                        path_info = pi;
+                       original_path = null;
+
+                       string path = UrlComponents.Path;
+                       UrlComponents.Path = path + PathInfo;
                }
 
                // Headers is ReadOnly, so we need this hack for cookie-less sessions.
index 5b732100425c67b2a8c507e3e8daed0ea1010470..eaf829623dcc860d46331fff031a4b185b760235 100644 (file)
@@ -114,6 +114,7 @@ namespace System.Web
                static Cache cache;
                static Cache internalCache;
                static WaitCallback do_RealProcessRequest;
+               static HttpWorkerRequest.EndOfSendNotification end_of_send_cb;
                static Exception initialException;
                static bool firstRun;
                static bool assemblyMappingEnabled;
@@ -154,7 +155,12 @@ namespace System.Web
                        internalCache = new Cache ();
                        internalCache.DependencyCache = internalCache;
 #endif
-                       do_RealProcessRequest = new WaitCallback (RealProcessRequest);
+                       do_RealProcessRequest = new WaitCallback (state => {
+                               try {
+                                       RealProcessRequest (state);
+                               } catch {}
+                               });
+                       end_of_send_cb = new HttpWorkerRequest.EndOfSendNotification (EndOfSend);
                }
                
 #region AppDomain handling
@@ -489,6 +495,7 @@ namespace System.Web
                                HttpContext.Current = null;
                        } else {
                                context.ApplicationInstance = app;
+                               req.SetEndOfSendNotification (end_of_send_cb, context);
 
                                //
                                // Ask application to service the request
@@ -518,7 +525,11 @@ namespace System.Web
                                HttpApplicationFactory.Recycle (app);
                        }
                }
-               
+
+               static void EndOfSend (HttpWorkerRequest ignored1, object ignored2)
+               {
+               }
+
                //
                // ProcessRequest method is executed in the AppDomain of the application
                //
@@ -595,8 +606,7 @@ namespace System.Web
                        ThreadPool.QueueUserWorkItem (delegate {
                                try {
                                        DoUnload ();
-                               } catch (Exception e){
-                                       Console.Error.WriteLine (e);
+                               } catch {
                                }});
                }
 
index e0c0dd3644d5650426f792fbc9ad1057a5e9bbd3..5be32aebfdb5119650f9489cb9c53849d9cce56c 100644 (file)
@@ -53,12 +53,12 @@ namespace System.Web
                        Exception ex = null;
                        
                        try {
-                               HttpRuntimeSection config;
-
-                               config = (HttpRuntimeSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime");
-                               minFree = config.MinFreeThreads;
-                               minLocalFree = config.MinLocalRequestFreeThreads;
-                               queueLimit = config.AppRequestQueueLimit;
+                               HttpRuntimeSection config = WebConfigurationManager.GetSection ("system.web/httpRuntime") as HttpRuntimeSection;
+                               if (config != null) {
+                                       minFree = config.MinFreeThreads;
+                                       minLocalFree = config.MinLocalRequestFreeThreads;
+                                       queueLimit = config.AppRequestQueueLimit;
+                               }
                        } catch (Exception e) {
                                ex = e;
                        }
index 75606bde438c1143f664636da16125ef638e8655..4e555534b7a4edca5c02053260c089032eb78043 100644 (file)
@@ -19,3 +19,5 @@ Test/standalone-tests/DisabledAttributeRendering.cs
 Test/standalone-tests/GridViewShowHeaderWhenEmpty.cs
 Test/standalone-tests/GridViewSortingStyles.cs
 Test/standalone-tests/SiteMapPathRendering.cs
+Test/standalone-tests/PageParserDefaultTypeProperties.cs
+Test/standalone-tests/ChildrenAsProperties.cs
index 7e94f1368e0a029afa27bd2af909c113de00e885..8e5a166ff7b43649dc3a5ce14dca7ec6134c5d1d 100644 (file)
@@ -268,6 +268,7 @@ System.Web.UI.WebControls/RepeatInfoTest.auto.cs
 System.Web.UI.WebControls/RepeatInfoTest.auto.2.0.cs
 System.Web.UI.WebControls/RepeatInfoTest.auto.4.0.cs
 System.Web.UI.WebControls/RepeatInfoTest.cs
+System.Web.UI.WebControls/RepeatInfoUser.cs
 System.Web.UI.WebControls/RepeaterItemCollectionTest.cs
 System.Web.UI.WebControls/RepeaterTest.cs
 System.Web.UI.WebControls/RoleGroupCollectionTest.cs
index d5e59f9dce50b7940a3e16906fcf3750bb940a77..d7423b6dfd4f60ba98c075023089f4359cac5754 100644 (file)
@@ -38,6 +38,7 @@ using System.Web.UI;
 using System.Web.UI.WebControls;
 
 using NUnit.Framework;
+using MonoTests.Common;
 
 namespace MonoTests.System.Web.UI.WebControls {
 
@@ -333,7 +334,21 @@ namespace MonoTests.System.Web.UI.WebControls {
 
                        Assert.AreEqual (0, dl.Attributes.Count, "Attributes.Count-2");
                }
+#if NET_4_0
+               [Test]
+               public void RepeatLayout_Lists ()
+               {
+                       TestDataList dl = new TestDataList ();
 
+                       AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
+                               dl.RepeatLayout = RepeatLayout.OrderedList;
+                       }, "#A1");
+
+                       AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
+                               dl.RepeatLayout = RepeatLayout.UnorderedList;
+                       }, "#A2");
+               }
+#endif
                [Test]
                public void CleanProperties ()
                {
index 9d31f079f4e5145b6bf83167f5f59cad65ff8fa1..ecdf82387178897008415dae7f86bf9b30ebfa67 100644 (file)
@@ -2,10 +2,12 @@
 
 // THIS IS AUTOGENERATED DO NOT EDIT
 //
+// Generated on Microsoft .NET runtime v4.0.30319.1
+//
 // Authors:
 //    Ben Maurer (bmaurer@novell.com)
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -37,78 +39,11 @@ using System.Web.UI;
 using System.Web.UI.WebControls;
 
 using NUnit.Framework;
+using MonoTests.Helpers;
+
 namespace MonoTests.System.Web.UI.WebControls {
 [TestFixture]
 public class RepeatInfo_Autogen {
-       public class RepeatInfoUser : IRepeatInfoUser {
-
-               private bool footer;
-               private bool header;
-               private bool separators;
-               private int count;
-               private int counter;
-
-
-               public RepeatInfoUser (bool header, bool footer, bool separators, int count)
-               {
-                       this.footer = footer;
-                       this.header = header;
-                       this.separators = separators;
-                       this.count = count;
-               }
-
-               static HtmlTextWriter GetWriter ()
-               {
-                       StringWriter sw = new StringWriter ();
-                       sw.NewLine = "\n";
-                       return new HtmlTextWriter (sw);
-               }
-
-               public static string DoTest (int cols, int cnt, RepeatDirection d, RepeatLayout l, bool OuterTableImplied, bool hdr, bool ftr, bool sep)
-               {
-                       HtmlTextWriter htw = GetWriter ();
-                       RepeatInfo ri = new RepeatInfo ();
-                       ri.RepeatColumns = cols;
-                       ri.RepeatDirection = d;
-                       ri.RepeatLayout = l;
-                       ri.OuterTableImplied = OuterTableImplied;
-                       Style s = new Style ();
-                       if (cols != 3)
-                               s.CssClass = "mainstyle";
-
-                       ri.RenderRepeater (htw, new RepeatInfoUser (hdr, ftr, sep, cnt), s, new DataList ());
-                       return htw.InnerWriter.ToString ();
-               }
-
-
-               public bool HasFooter {
-                       get { return footer; }
-               }
-
-               public bool HasHeader {
-                       get { return header; }
-               }
-               
-               public bool HasSeparators {
-                       get { return separators; }
-               }
-
-               public int RepeatedItemCount {
-                       get { return count; }
-               }
-
-               public Style GetItemStyle (ListItemType itemType, int repeatIndex)
-               {
-                       Style s = new Style ();
-                       s.CssClass = String.Format ("{0}{1}", itemType, repeatIndex);
-                       return s;
-               }
-
-               public void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
-               {
-                       writer.Write ("({0},{1},{2})", counter++, itemType, repeatIndex);
-               }
-       }
 
        [Test]
        public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
@@ -122,8 +57,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
@@ -134,7 +68,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#0");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -147,8 +80,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
@@ -161,7 +93,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#1");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -174,8 +105,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
@@ -188,7 +118,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#2");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -201,8 +130,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
@@ -215,7 +143,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#3");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -228,8 +155,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
@@ -240,7 +166,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#4");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -253,8 +178,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
@@ -275,7 +199,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#5");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -288,8 +211,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
@@ -304,7 +226,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#6");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -317,8 +238,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
@@ -337,7 +257,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#7");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -350,8 +269,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table>
        <tr>
                <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
@@ -368,7 +286,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#8");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -381,8 +298,7 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true);
                string exp = @"<table>
        <tr>
                <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
@@ -399,7 +315,6 @@ public class RepeatInfo_Autogen {
                Assert.AreEqual (exp, v, "#9");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -412,13 +327,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Footer,-1)";
                Assert.AreEqual (exp, v, "#10");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -431,13 +344,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)";
                Assert.AreEqual (exp, v, "#11");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -450,13 +361,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)";
                Assert.AreEqual (exp, v, "#12");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -469,13 +378,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)";
                Assert.AreEqual (exp, v, "#13");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -488,13 +395,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Footer,-1)";
                Assert.AreEqual (exp, v, "#14");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -507,13 +412,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)";
                Assert.AreEqual (exp, v, "#15");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -526,13 +429,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)(8,Footer,-1)";
                Assert.AreEqual (exp, v, "#16");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -545,13 +446,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)(14,Footer,-1)";
                Assert.AreEqual (exp, v, "#17");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -564,13 +463,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)(18,Footer,-1)";
                Assert.AreEqual (exp, v, "#18");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_ftr_sep ()
        {
@@ -583,13 +480,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)(14,Footer,-1)";
                Assert.AreEqual (exp, v, "#19");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -602,13 +497,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#20");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -621,13 +514,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#21");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -640,13 +531,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#22");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -659,13 +548,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#23");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -678,13 +565,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#24");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -697,13 +582,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#25");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -716,13 +599,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br />(8,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#26");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -735,13 +616,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br />(14,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#27");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -754,13 +633,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br />(18,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#28");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -773,13 +650,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true);
                string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br />(14,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#29");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -792,13 +667,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Footer,-1)";
                Assert.AreEqual (exp, v, "#30");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -811,13 +684,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)";
                Assert.AreEqual (exp, v, "#31");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -830,13 +701,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)";
                Assert.AreEqual (exp, v, "#32");
        }
 
-
        [Test]
        public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -849,13 +718,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)";
                Assert.AreEqual (exp, v, "#33");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -868,13 +735,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Footer,-1)";
                Assert.AreEqual (exp, v, "#34");
        }
 
-
        [Test]
        public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -887,13 +752,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)";
                Assert.AreEqual (exp, v, "#35");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -906,13 +769,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)(8,Footer,-1)";
                Assert.AreEqual (exp, v, "#36");
        }
 
-
        [Test]
        public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -925,13 +786,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)(14,Footer,-1)";
                Assert.AreEqual (exp, v, "#37");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -944,13 +803,11 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)(18,Footer,-1)";
                Assert.AreEqual (exp, v, "#38");
        }
 
-
        [Test]
        public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_ftr_sep ()
        {
@@ -963,4702 +820,3963 @@ public class RepeatInfo_Autogen {
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true);
                string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)(14,Footer,-1)";
                Assert.AreEqual (exp, v, "#39");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#40");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#41");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(4,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#42");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td></td>
-       </tr><tr>
-               <td colspan=""10"" class=""Footer-1"">(10,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#43");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#44");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(10,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#45");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#46");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#47");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#48");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#49");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#50");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(2,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#51");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(4,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#52");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(10,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#53");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#54");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(10,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#55");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item2"">(3,Item,2)</td><td class=""Separator2"">(4,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item3"">(7,Item,3)</td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#56");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item4"">(3,Item,4)</td><td class=""Separator4"">(4,Separator,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item5"">(7,Item,5)</td><td class=""Separator5"">(8,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(9,Item,2)</td><td class=""Separator2"">(10,Separator,2)</td><td class=""Item6"">(11,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item3"">(12,Item,3)</td><td class=""Separator3"">(13,Separator,3)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#57");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item6"">(5,Item,6)</td><td class=""Separator6"">(6,Separator,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item7"">(11,Item,7)</td><td class=""Separator7"">(12,Separator,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(13,Item,2)</td><td class=""Separator2"">(14,Separator,2)</td><td class=""Item5"">(15,Item,5)</td><td class=""Separator5"">(16,Separator,5)</td><td class=""Item8"">(17,Item,8)</td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#58");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item5"">(5,Item,5)</td><td class=""Separator5"">(6,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item6"">(11,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td></td><td></td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#59");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#60");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#61");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#62");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#63");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#64");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#65");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#66");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br />(14,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#67");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br />(18,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#68");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br />(14,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#69");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#70");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#71");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#72");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#73");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#74");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#75");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)<br />(5,Item,1)(6,Separator,1)(7,Item,3)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#76");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)<br />(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)<br />(9,Item,2)(10,Separator,2)(11,Item,6)<br />(12,Item,3)(13,Separator,3)<br />(14,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#77");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)<br />(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)<br />(18,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#78");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_hdr_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)<br />(12,Item,2)(13,Separator,2)<br />(14,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#79");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
+               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#80");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td></td>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td>
+               <td class=""Item0"">(1,Item,0)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#81");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(3,Footer,-1)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(4,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#82");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
+               <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td colspan=""10"" class=""Footer-1"">(9,Footer,-1)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td></td>
+       </tr><tr>
+               <td colspan=""10"" class=""Footer-1"">(10,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#83");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Footer-1"">(0,Footer,-1)</td>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#84");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td>
        </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
        </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
        </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td><td></td>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
        </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(9,Footer,-1)</td>
+               <td class=""Item4"">(9,Item,4)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(10,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#85");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
        </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#86");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
        </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
        </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
+               <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
        </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td>
+               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#87");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table>
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
        </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
        </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td>
+               <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#88");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true);
                string exp = @"<table>
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
        </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
        </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td>
+               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#89");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_0itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#90");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_1itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#91");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_2itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(4,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#92");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_5itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(10,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#93");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_0itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#94");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_5itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(10,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#95");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_4itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)(7,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item2"">(3,Item,2)</td><td class=""Separator2"">(4,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#96");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_7itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)(13,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item4"">(3,Item,4)</td><td class=""Separator4"">(4,Separator,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item5"">(7,Item,5)</td><td class=""Separator5"">(8,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(9,Item,2)</td><td class=""Separator2"">(10,Separator,2)</td><td class=""Item6"">(11,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item3"">(12,Item,3)</td><td class=""Separator3"">(13,Separator,3)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#97");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_9itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)(17,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item6"">(5,Item,6)</td><td class=""Separator6"">(6,Separator,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item7"">(11,Item,7)</td><td class=""Separator7"">(12,Separator,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(13,Item,2)</td><td class=""Separator2"">(14,Separator,2)</td><td class=""Item5"">(15,Item,5)</td><td class=""Separator5"">(16,Separator,5)</td><td class=""Item8"">(17,Item,8)</td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#98");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_7itms_vert_tbl_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)(13,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item5"">(5,Item,5)</td><td class=""Separator5"">(6,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item6"">(11,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td></td><td></td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#99");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_0itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#100");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#101");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_2itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#102");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_5itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#103");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_0itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#104");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_5itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#105");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_4itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br />(7,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br />(8,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#106");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_7itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br />(14,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#107");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_9itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br />(17,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br />(18,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#108");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_7itms_horiz_flow_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br />(14,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#109");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_0itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#110");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_1itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#111");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_2itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#112");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_0cols_5itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#113");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_0itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#114");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_1cols_5itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)<br />(10,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#115");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_4itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)(7,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)<br />(5,Item,1)(6,Separator,1)(7,Item,3)<br />(8,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#116");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_2cols_7itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)(13,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)<br />(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)<br />(9,Item,2)(10,Separator,2)(11,Item,6)<br />(12,Item,3)(13,Separator,3)<br />(14,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#117");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_9itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)(17,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)<br />(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)<br />(18,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#118");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_ftr_sep ()
+       public void RepeatInfo_3cols_7itms_vert_flow_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
+               // OuterTableImplied : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)(13,Footer,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)<br />(12,Item,2)(13,Separator,2)<br />(14,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#119");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#120");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#121");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(3,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#122");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
-       </tr><tr>
-               <td colspan=""10"" class=""Footer-1"">(9,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#123");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#124");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(9,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#125");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#126");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#127");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#128");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#129");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#130");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#131");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(3,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#132");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(9,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#133");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#134");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(9,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#135");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item2"">(2,Item,2)</td><td class=""Separator2"">(3,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item3"">(6,Item,3)</td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#136");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item4"">(2,Item,4)</td><td class=""Separator4"">(3,Separator,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item5"">(6,Item,5)</td><td class=""Separator5"">(7,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(8,Item,2)</td><td class=""Separator2"">(9,Separator,2)</td><td class=""Item6"">(10,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item3"">(11,Item,3)</td><td class=""Separator3"">(12,Separator,3)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#137");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item6"">(4,Item,6)</td><td class=""Separator6"">(5,Separator,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item7"">(10,Item,7)</td><td class=""Separator7"">(11,Separator,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td class=""Item5"">(14,Item,5)</td><td class=""Separator5"">(15,Separator,5)</td><td class=""Item8"">(16,Item,8)</td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#138");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item5"">(4,Item,5)</td><td class=""Separator5"">(5,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item6"">(10,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item2"">(11,Item,2)</td><td class=""Separator2"">(12,Separator,2)</td><td></td><td></td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#139");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#140");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#141");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#142");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#143");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#144");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#145");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#146");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#147");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br />(17,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#148");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#149");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#150");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#151");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#152");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#153");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#154");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#155");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)<br />(4,Item,1)(5,Separator,1)(6,Item,3)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#156");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)<br />(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)<br />(8,Item,2)(9,Separator,2)(10,Item,6)<br />(11,Item,3)(12,Separator,3)<br />(13,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#157");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)<br />(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)<br />(17,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#158");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_ftr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_hdr_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
+               // Header            : True
                // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)<br />(11,Item,2)(12,Separator,2)<br />(13,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#159");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
+               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#160");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td></td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td></td>
+               <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#161");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td></td>
+               <td colspan=""4"" class=""Footer-1"">(3,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#162");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td></td>
+               <td colspan=""10"" class=""Footer-1"">(9,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#163");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+               <td colspan=""2"" class=""Footer-1"">(0,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#164");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
        </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
        </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
        </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
+               <td class=""Item4"">(8,Item,4)</td><td></td>
        </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td><td></td>
+               <td colspan=""2"" class=""Footer-1"">(9,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#165");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
        </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td></td>
+               <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#166");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
        </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
+               <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
        </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
        </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td>
+               <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#167");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table>
        <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
        </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+               <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
        </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td><td></td>
+               <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#168");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true);
                string exp = @"<table>
        <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
        </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
        </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
        </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+               <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#169");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Footer,-1)";
                Assert.AreEqual (exp, v, "#170");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Footer,-1)";
                Assert.AreEqual (exp, v, "#171");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)";
                Assert.AreEqual (exp, v, "#172");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
                Assert.AreEqual (exp, v, "#173");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Footer,-1)";
                Assert.AreEqual (exp, v, "#174");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
                Assert.AreEqual (exp, v, "#175");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)(7,Footer,-1)";
                Assert.AreEqual (exp, v, "#176");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)(13,Footer,-1)";
                Assert.AreEqual (exp, v, "#177");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)(17,Footer,-1)";
                Assert.AreEqual (exp, v, "#178");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)(13,Footer,-1)";
                Assert.AreEqual (exp, v, "#179");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#180");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#181");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#182");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#183");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#184");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br /></span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#185");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br /></span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br />(7,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#186");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#187");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br /></span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br />(17,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#188");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
                Assert.AreEqual (exp, v, "#189");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Footer,-1)";
                Assert.AreEqual (exp, v, "#190");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Footer,-1)";
                Assert.AreEqual (exp, v, "#191");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)";
                Assert.AreEqual (exp, v, "#192");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
                Assert.AreEqual (exp, v, "#193");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Footer,-1)";
                Assert.AreEqual (exp, v, "#194");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)";
                Assert.AreEqual (exp, v, "#195");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)(7,Footer,-1)";
                Assert.AreEqual (exp, v, "#196");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)(13,Footer,-1)";
                Assert.AreEqual (exp, v, "#197");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)(17,Footer,-1)";
                Assert.AreEqual (exp, v, "#198");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_sep ()
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
-               // Footer            : False
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)(13,Footer,-1)";
                Assert.AreEqual (exp, v, "#199");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#200");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#201");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#202");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#203");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#204");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#205");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#206");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#207");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#208");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#209");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#210");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#211");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#212");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#213");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#214");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(2,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(4,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(6,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(8,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(9,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#215");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item2"">(3,Item,2)</td><td class=""Separator2"">(4,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item3"">(7,Item,3)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#216");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item4"">(3,Item,4)</td><td class=""Separator4"">(4,Separator,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item5"">(7,Item,5)</td><td class=""Separator5"">(8,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(9,Item,2)</td><td class=""Separator2"">(10,Separator,2)</td><td class=""Item6"">(11,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item3"">(12,Item,3)</td><td class=""Separator3"">(13,Separator,3)</td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#217");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item6"">(5,Item,6)</td><td class=""Separator6"">(6,Separator,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item7"">(11,Item,7)</td><td class=""Separator7"">(12,Separator,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(13,Item,2)</td><td class=""Separator2"">(14,Separator,2)</td><td class=""Item5"">(15,Item,5)</td><td class=""Separator5"">(16,Separator,5)</td><td class=""Item8"">(17,Item,8)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#218");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item5"">(5,Item,5)</td><td class=""Separator5"">(6,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item6"">(11,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td></td><td></td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#219");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
-               Assert.AreEqual (exp, v, "#220");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#221");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#222");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#223");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
-               Assert.AreEqual (exp, v, "#224");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#225");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#226");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#227");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#228");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#229");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
-               Assert.AreEqual (exp, v, "#230");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#231");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#232");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#233");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
-               Assert.AreEqual (exp, v, "#234");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#235");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)<br />(5,Item,1)(6,Separator,1)(7,Item,3)</span>";
-               Assert.AreEqual (exp, v, "#236");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)<br />(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)<br />(9,Item,2)(10,Separator,2)(11,Item,6)<br />(12,Item,3)(13,Separator,3)</span>";
-               Assert.AreEqual (exp, v, "#237");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)<br />(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)</span>";
-               Assert.AreEqual (exp, v, "#238");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_hdr_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, true);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)<br />(12,Item,2)(13,Separator,2)</span>";
-               Assert.AreEqual (exp, v, "#239");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
-
+       <tr>
+               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
 </table>";
                Assert.AreEqual (exp, v, "#240");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#241");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(3,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#242");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
+       </tr><tr>
+               <td colspan=""10"" class=""Footer-1"">(9,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#243");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
-
+       <tr>
+               <td colspan=""2"" class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
 </table>";
                Assert.AreEqual (exp, v, "#244");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
@@ -5670,51 +4788,51 @@ public class RepeatInfo_Autogen {
                <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
        </tr><tr>
                <td class=""Item4"">(8,Item,4)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(9,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#245");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
        </tr><tr>
                <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#246");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
@@ -5724,26 +4842,26 @@ public class RepeatInfo_Autogen {
                <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
        </tr><tr>
                <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#247");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table>
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
@@ -5751,26 +4869,26 @@ public class RepeatInfo_Autogen {
                <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
        </tr><tr>
                <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#248");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_sep ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true);
                string exp = @"<table>
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
@@ -5778,1492 +4896,13589 @@ public class RepeatInfo_Autogen {
                <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
        </tr><tr>
                <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td>
        </tr>
 </table>";
                Assert.AreEqual (exp, v, "#249");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_0itms_vert_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#250");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_1itms_vert_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#251");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_2itms_vert_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(3,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#252");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_0cols_5itms_vert_tbl_ftr_sep ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(9,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#253");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_1cols_0itms_vert_tbl_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#254");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_1cols_5itms_vert_tbl_ftr_sep ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
-               Assert.AreEqual (exp, v, "#255");
-       }
-
-
-       [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_sep ()
-       {
-               // cols              : 2
-               // cnt               : 4
-               // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : True
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(9,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#255");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item2"">(2,Item,2)</td><td class=""Separator2"">(3,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#256");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_2cols_7itms_vert_tbl_ftr_sep ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item4"">(2,Item,4)</td><td class=""Separator4"">(3,Separator,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item5"">(6,Item,5)</td><td class=""Separator5"">(7,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(8,Item,2)</td><td class=""Separator2"">(9,Separator,2)</td><td class=""Item6"">(10,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item3"">(11,Item,3)</td><td class=""Separator3"">(12,Separator,3)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#257");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_3cols_9itms_vert_tbl_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item6"">(4,Item,6)</td><td class=""Separator6"">(5,Separator,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item7"">(10,Item,7)</td><td class=""Separator7"">(11,Separator,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td class=""Item5"">(14,Item,5)</td><td class=""Separator5"">(15,Separator,5)</td><td class=""Item8"">(16,Item,8)</td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#258");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_sep ()
+       public void RepeatInfo_3cols_7itms_vert_tbl_ftr_sep ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)";
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item5"">(4,Item,5)</td><td class=""Separator5"">(5,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item6"">(10,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item2"">(11,Item,2)</td><td class=""Separator2"">(12,Separator,2)</td><td></td><td></td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td>
+       </tr>
+</table>";
                Assert.AreEqual (exp, v, "#259");
        }
 
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#260");
+       }
 
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#261");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#262");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_ftr_sep ()
        {
                // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#263");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
+               // Footer            : True
                // Separator         : True
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#264");
+       }
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#260");
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#265");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#266");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#267");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br />(17,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#268");
        }
 
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br />(13,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#269");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#270");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#271");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#272");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#273");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#274");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)<br />(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#275");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)<br />(4,Item,1)(5,Separator,1)(6,Item,3)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#276");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)<br />(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)<br />(8,Item,2)(9,Separator,2)(10,Item,6)<br />(11,Item,3)(12,Separator,3)<br />(13,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#277");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)<br />(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)<br />(17,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#278");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)<br />(11,Item,2)(12,Separator,2)<br />(13,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#279");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_ftr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#320");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#321");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#322");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#323");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#324");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#325");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#326");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#327");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#328");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#329");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#330");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)";
+               Assert.AreEqual (exp, v, "#331");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)";
+               Assert.AreEqual (exp, v, "#332");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               Assert.AreEqual (exp, v, "#333");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#334");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               Assert.AreEqual (exp, v, "#335");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)";
+               Assert.AreEqual (exp, v, "#336");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)";
+               Assert.AreEqual (exp, v, "#337");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)";
+               Assert.AreEqual (exp, v, "#338");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)";
+               Assert.AreEqual (exp, v, "#339");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#340");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#341");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#342");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#343");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#344");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#345");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#346");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#347");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#348");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#349");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#350");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)";
+               Assert.AreEqual (exp, v, "#351");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)";
+               Assert.AreEqual (exp, v, "#352");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               Assert.AreEqual (exp, v, "#353");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#354");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)";
+               Assert.AreEqual (exp, v, "#355");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)";
+               Assert.AreEqual (exp, v, "#356");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)";
+               Assert.AreEqual (exp, v, "#357");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)";
+               Assert.AreEqual (exp, v, "#358");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)";
+               Assert.AreEqual (exp, v, "#359");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#400");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#401");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#402");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#403");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#404");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#405");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#406");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#407");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#408");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(13,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#409");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#410");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#411");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#412");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#413");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#414");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(2,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(4,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(6,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(8,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(9,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#415");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item2"">(3,Item,2)</td><td class=""Separator2"">(4,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#416");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item4"">(3,Item,4)</td><td class=""Separator4"">(4,Separator,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item5"">(7,Item,5)</td><td class=""Separator5"">(8,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(9,Item,2)</td><td class=""Separator2"">(10,Separator,2)</td><td class=""Item6"">(11,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item3"">(12,Item,3)</td><td class=""Separator3"">(13,Separator,3)</td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#417");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item6"">(5,Item,6)</td><td class=""Separator6"">(6,Separator,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item7"">(11,Item,7)</td><td class=""Separator7"">(12,Separator,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(13,Item,2)</td><td class=""Separator2"">(14,Separator,2)</td><td class=""Item5"">(15,Item,5)</td><td class=""Separator5"">(16,Separator,5)</td><td class=""Item8"">(17,Item,8)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#418");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item5"">(5,Item,5)</td><td class=""Separator5"">(6,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item6"">(11,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td></td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#419");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#420");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#421");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#422");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#423");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#424");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)<br />(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)<br />(9,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#425");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#426");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br />(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br />(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#427");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#428");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br />(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br />(13,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#429");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
+               Assert.AreEqual (exp, v, "#430");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#431");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#432");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#433");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
+               Assert.AreEqual (exp, v, "#434");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Separator,0)<br />(3,Item,1)<br />(4,Separator,1)<br />(5,Item,2)<br />(6,Separator,2)<br />(7,Item,3)<br />(8,Separator,3)<br />(9,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#435");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)<br />(5,Item,1)(6,Separator,1)(7,Item,3)</span>";
+               Assert.AreEqual (exp, v, "#436");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)<br />(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)<br />(9,Item,2)(10,Separator,2)(11,Item,6)<br />(12,Item,3)(13,Separator,3)</span>";
+               Assert.AreEqual (exp, v, "#437");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)<br />(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)</span>";
+               Assert.AreEqual (exp, v, "#438");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)<br />(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)<br />(12,Item,2)(13,Separator,2)</span>";
+               Assert.AreEqual (exp, v, "#439");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_hdr_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+
+</table>";
+               Assert.AreEqual (exp, v, "#480");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#481");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#482");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#483");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+
+</table>";
+               Assert.AreEqual (exp, v, "#484");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#485");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#486");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#487");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#488");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#489");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#490");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)";
+               Assert.AreEqual (exp, v, "#491");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)";
+               Assert.AreEqual (exp, v, "#492");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
+               Assert.AreEqual (exp, v, "#493");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#494");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
+               Assert.AreEqual (exp, v, "#495");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)";
+               Assert.AreEqual (exp, v, "#496");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)";
+               Assert.AreEqual (exp, v, "#497");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)";
+               Assert.AreEqual (exp, v, "#498");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)";
+               Assert.AreEqual (exp, v, "#499");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#500");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#501");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#502");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#503");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#504");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#505");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#506");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#507");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#508");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#509");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#510");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)";
+               Assert.AreEqual (exp, v, "#511");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)";
+               Assert.AreEqual (exp, v, "#512");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
+               Assert.AreEqual (exp, v, "#513");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#514");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
+               Assert.AreEqual (exp, v, "#515");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)";
+               Assert.AreEqual (exp, v, "#516");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)";
+               Assert.AreEqual (exp, v, "#517");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)";
+               Assert.AreEqual (exp, v, "#518");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
+               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)";
+               Assert.AreEqual (exp, v, "#519");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+
+</table>";
+               Assert.AreEqual (exp, v, "#560");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#561");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#562");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#563");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+
+</table>";
+               Assert.AreEqual (exp, v, "#564");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#565");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#566");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#567");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#568");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#569");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+
+</table>";
+               Assert.AreEqual (exp, v, "#570");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#571");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#572");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#573");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+
+</table>";
+               Assert.AreEqual (exp, v, "#574");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Separator0"">(1,Separator,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Separator1"">(3,Separator,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td>
+       </tr><tr>
+               <td class=""Separator2"">(5,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td>
+       </tr><tr>
+               <td class=""Separator3"">(7,Separator,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(8,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#575");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item2"">(2,Item,2)</td><td class=""Separator2"">(3,Separator,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#576");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item4"">(2,Item,4)</td><td class=""Separator4"">(3,Separator,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item5"">(6,Item,5)</td><td class=""Separator5"">(7,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(8,Item,2)</td><td class=""Separator2"">(9,Separator,2)</td><td class=""Item6"">(10,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item3"">(11,Item,3)</td><td class=""Separator3"">(12,Separator,3)</td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#577");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item6"">(4,Item,6)</td><td class=""Separator6"">(5,Separator,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item7"">(10,Item,7)</td><td class=""Separator7"">(11,Separator,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td class=""Item5"">(14,Item,5)</td><td class=""Separator5"">(15,Separator,5)</td><td class=""Item8"">(16,Item,8)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#578");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item5"">(4,Item,5)</td><td class=""Separator5"">(5,Separator,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item6"">(10,Item,6)</td><td></td>
+       </tr><tr>
+               <td class=""Item2"">(11,Item,2)</td><td class=""Separator2"">(12,Separator,2)</td><td></td><td></td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#579");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#580");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#581");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#582");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#583");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#584");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#585");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#586");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#587");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#588");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#589");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#590");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#591");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#592");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#593");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#594");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#595");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)<br />(4,Item,1)(5,Separator,1)(6,Item,3)</span>";
+               Assert.AreEqual (exp, v, "#596");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)<br />(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)<br />(8,Item,2)(9,Separator,2)(10,Item,6)<br />(11,Item,3)(12,Separator,3)</span>";
+               Assert.AreEqual (exp, v, "#597");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)<br />(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)</span>";
+               Assert.AreEqual (exp, v, "#598");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
+               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)<br />(11,Item,2)(12,Separator,2)</span>";
+               Assert.AreEqual (exp, v, "#599");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_sep ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_sep ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_sep ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_sep ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_sep ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_sep ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_sep ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : False
+               // Separator         : True
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, true);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#640");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#641");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(3,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#642");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
+       </tr><tr>
+               <td colspan=""5"" class=""Footer-1"">(6,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#643");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#644");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(6,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#645");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#646");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(7,Item,6)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#647");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#648");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#649");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Footer,-1)";
+               Assert.AreEqual (exp, v, "#650");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)";
+               Assert.AreEqual (exp, v, "#651");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)";
+               Assert.AreEqual (exp, v, "#652");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
+               Assert.AreEqual (exp, v, "#653");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Footer,-1)";
+               Assert.AreEqual (exp, v, "#654");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
+               Assert.AreEqual (exp, v, "#655");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)(5,Footer,-1)";
+               Assert.AreEqual (exp, v, "#656");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)(8,Footer,-1)";
+               Assert.AreEqual (exp, v, "#657");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)(10,Footer,-1)";
+               Assert.AreEqual (exp, v, "#658");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)(8,Footer,-1)";
+               Assert.AreEqual (exp, v, "#659");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#660");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#661");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#662");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#663");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#664");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#665");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#666");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#667");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br />(10,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#668");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#669");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Footer,-1)";
+               Assert.AreEqual (exp, v, "#670");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)";
+               Assert.AreEqual (exp, v, "#671");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)";
+               Assert.AreEqual (exp, v, "#672");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
+               Assert.AreEqual (exp, v, "#673");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Footer,-1)";
+               Assert.AreEqual (exp, v, "#674");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
+               Assert.AreEqual (exp, v, "#675");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)(5,Footer,-1)";
+               Assert.AreEqual (exp, v, "#676");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)(8,Footer,-1)";
+               Assert.AreEqual (exp, v, "#677");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)(10,Footer,-1)";
+               Assert.AreEqual (exp, v, "#678");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)(8,Footer,-1)";
+               Assert.AreEqual (exp, v, "#679");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#720");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#721");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(3,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#722");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
+       </tr><tr>
+               <td colspan=""5"" class=""Footer-1"">(6,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#723");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#724");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(6,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#725");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#726");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(7,Item,6)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#727");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#728");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#729");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#730");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#731");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(3,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#732");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(6,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#733");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#734");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(6,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#735");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#736");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item4"">(2,Item,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item5"">(4,Item,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Item6"">(6,Item,6)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#737");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item6"">(3,Item,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item7"">(6,Item,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(7,Item,2)</td><td class=""Item5"">(8,Item,5)</td><td class=""Item8"">(9,Item,8)</td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#738");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item5"">(3,Item,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item6"">(6,Item,6)</td>
+       </tr><tr>
+               <td class=""Item2"">(7,Item,2)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#739");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#740");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#741");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#742");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#743");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#744");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#745");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#746");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#747");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br />(10,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#748");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#749");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#750");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#751");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#752");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#753");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#754");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#755");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,2)<br />(3,Item,1)(4,Item,3)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#756");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,4)<br />(3,Item,1)(4,Item,5)<br />(5,Item,2)(6,Item,6)<br />(7,Item,3)<br />(8,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#757");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,6)<br />(4,Item,1)(5,Item,4)(6,Item,7)<br />(7,Item,2)(8,Item,5)(9,Item,8)<br />(10,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#758");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,5)<br />(4,Item,1)(5,Item,4)(6,Item,6)<br />(7,Item,2)<br />(8,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#759");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_hdr_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#800");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#801");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#802");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
+       </tr><tr>
+               <td colspan=""5"" class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#803");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#804");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#805");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#806");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(6,Item,6)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#807");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#808");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#809");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Footer,-1)";
+               Assert.AreEqual (exp, v, "#810");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Footer,-1)";
+               Assert.AreEqual (exp, v, "#811");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Footer,-1)";
+               Assert.AreEqual (exp, v, "#812");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
+               Assert.AreEqual (exp, v, "#813");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Footer,-1)";
+               Assert.AreEqual (exp, v, "#814");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
+               Assert.AreEqual (exp, v, "#815");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)(4,Footer,-1)";
+               Assert.AreEqual (exp, v, "#816");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)(7,Footer,-1)";
+               Assert.AreEqual (exp, v, "#817");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)(9,Footer,-1)";
+               Assert.AreEqual (exp, v, "#818");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)(7,Footer,-1)";
+               Assert.AreEqual (exp, v, "#819");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#820");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#821");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#822");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#823");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#824");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#825");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#826");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#827");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br />(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#828");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#829");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Footer,-1)";
+               Assert.AreEqual (exp, v, "#830");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Footer,-1)";
+               Assert.AreEqual (exp, v, "#831");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Footer,-1)";
+               Assert.AreEqual (exp, v, "#832");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
+               Assert.AreEqual (exp, v, "#833");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Footer,-1)";
+               Assert.AreEqual (exp, v, "#834");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
+               Assert.AreEqual (exp, v, "#835");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)(4,Footer,-1)";
+               Assert.AreEqual (exp, v, "#836");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)(7,Footer,-1)";
+               Assert.AreEqual (exp, v, "#837");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)(9,Footer,-1)";
+               Assert.AreEqual (exp, v, "#838");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Flow
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)(7,Footer,-1)";
+               Assert.AreEqual (exp, v, "#839");
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, true, false);
+
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#880");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_horiz_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#881");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_horiz_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#882");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_horiz_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
+       </tr><tr>
+               <td colspan=""5"" class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#883");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_horiz_tbl_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#884");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_horiz_tbl_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#885");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_horiz_tbl_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#886");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_horiz_tbl_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(6,Item,6)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#887");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_horiz_tbl_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#888");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_horiz_tbl_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+       </tr><tr>
+               <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#889");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_vert_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#890");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_1itms_vert_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 1
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(1,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#891");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_2itms_vert_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 2
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(2,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#892");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_5itms_vert_tbl_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#893");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_0itms_vert_tbl_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 0
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Footer-1"">(0,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#894");
+       }
+
+       [Test]
+       public void RepeatInfo_1cols_5itms_vert_tbl_ftr ()
+       {
+               // cols              : 1
+               // cnt               : 5
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td>
+       </tr><tr>
+               <td class=""Footer-1"">(5,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#895");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_4itms_vert_tbl_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 4
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item2"">(1,Item,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#896");
+       }
+
+       [Test]
+       public void RepeatInfo_2cols_7itms_vert_tbl_ftr ()
+       {
+               // cols              : 2
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item4"">(1,Item,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Item5"">(3,Item,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Item6"">(5,Item,6)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr><tr>
+               <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#897");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_9itms_vert_tbl_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 9
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item6"">(2,Item,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item7"">(5,Item,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(6,Item,2)</td><td class=""Item5"">(7,Item,5)</td><td class=""Item8"">(8,Item,8)</td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#898");
+       }
+
+       [Test]
+       public void RepeatInfo_3cols_7itms_vert_tbl_ftr ()
+       {
+               // cols              : 3
+               // cnt               : 7
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : Table
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item5"">(2,Item,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item6"">(5,Item,6)</td>
+       </tr><tr>
+               <td class=""Item2"">(6,Item,2)</td><td></td><td></td>
+       </tr><tr>
+               <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#899");
+       }
+
+       [Test]
+       public void RepeatInfo_0cols_0itms_horiz_flow_ftr ()
+       {
+               // cols              : 0
+               // cnt               : 0
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : Flow
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#900");
+       }
 
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#261");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#901");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_2itms_horiz_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#262");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#902");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_5itms_horiz_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#263");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#903");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_1cols_0itms_horiz_flow_ftr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#264");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#904");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_1cols_5itms_horiz_flow_ftr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#265");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#905");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_2cols_4itms_horiz_flow_ftr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#266");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#906");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_2cols_7itms_horiz_flow_ftr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#267");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#907");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_3cols_9itms_horiz_flow_ftr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#268");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br />(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#908");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_sep ()
+       public void RepeatInfo_3cols_7itms_horiz_flow_ftr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#269");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#909");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_0itms_vert_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"";
-               Assert.AreEqual (exp, v, "#270");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#910");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_1itms_vert_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)";
-               Assert.AreEqual (exp, v, "#271");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#911");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_2itms_vert_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)";
-               Assert.AreEqual (exp, v, "#272");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#912");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_0cols_5itms_vert_flow_ftr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
-               Assert.AreEqual (exp, v, "#273");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#913");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_1cols_0itms_vert_flow_ftr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"";
-               Assert.AreEqual (exp, v, "#274");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#914");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_1cols_5itms_vert_flow_ftr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)";
-               Assert.AreEqual (exp, v, "#275");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#915");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_2cols_4itms_vert_flow_ftr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)";
-               Assert.AreEqual (exp, v, "#276");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,2)<br />(2,Item,1)(3,Item,3)<br />(4,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#916");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_2cols_7itms_vert_flow_ftr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)";
-               Assert.AreEqual (exp, v, "#277");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,4)<br />(2,Item,1)(3,Item,5)<br />(4,Item,2)(5,Item,6)<br />(6,Item,3)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#917");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_3cols_9itms_vert_flow_ftr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)";
-               Assert.AreEqual (exp, v, "#278");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,6)<br />(3,Item,1)(4,Item,4)(5,Item,7)<br />(6,Item,2)(7,Item,5)(8,Item,8)<br />(9,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#918");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_sep ()
+       public void RepeatInfo_3cols_7itms_vert_flow_ftr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true);
-               string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)";
-               Assert.AreEqual (exp, v, "#279");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
+               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,5)<br />(3,Item,1)(4,Item,4)(5,Item,6)<br />(6,Item,2)<br />(7,Footer,-1)</span>";
+               Assert.AreEqual (exp, v, "#919");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : False
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-</table>";
-               Assert.AreEqual (exp, v, "#280");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#281");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#282");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#283");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_ftr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-</table>";
-               Assert.AreEqual (exp, v, "#284");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_ftr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#285");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_ftr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#286");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_ftr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#287");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_ftr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#288");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_ftr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(12,Item,6)</td><td></td><td></td><td></td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#289");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-</table>";
-               Assert.AreEqual (exp, v, "#290");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#291");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#292");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_ftr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#293");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_ftr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-</table>";
-               Assert.AreEqual (exp, v, "#294");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_ftr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Separator0"">(1,Separator,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Separator1"">(3,Separator,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td>
-       </tr><tr>
-               <td class=""Separator2"">(5,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td>
-       </tr><tr>
-               <td class=""Separator3"">(7,Separator,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(8,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#295");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_ftr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
-
+               // Footer            : True
+               // Separator         : False
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item2"">(2,Item,2)</td><td class=""Separator2"">(3,Separator,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item3"">(6,Item,3)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#296");
-       }
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
 
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_ftr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item4"">(2,Item,4)</td><td class=""Separator4"">(3,Separator,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item5"">(6,Item,5)</td><td class=""Separator5"">(7,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(8,Item,2)</td><td class=""Separator2"">(9,Separator,2)</td><td class=""Item6"">(10,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item3"">(11,Item,3)</td><td class=""Separator3"">(12,Separator,3)</td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#297");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_ftr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item6"">(4,Item,6)</td><td class=""Separator6"">(5,Separator,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item7"">(10,Item,7)</td><td class=""Separator7"">(11,Separator,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td class=""Item5"">(14,Item,5)</td><td class=""Separator5"">(15,Separator,5)</td><td class=""Item8"">(16,Item,8)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#298");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_ftr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item5"">(4,Item,5)</td><td class=""Separator5"">(5,Separator,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item6"">(10,Item,6)</td><td></td>
-       </tr><tr>
-               <td class=""Item2"">(11,Item,2)</td><td class=""Separator2"">(12,Separator,2)</td><td></td><td></td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#299");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#300");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#301");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#302");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#303");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_ftr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#304");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_ftr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br />(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)<br />(8,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#305");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_ftr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#306");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_ftr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br />(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br />(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#307");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_ftr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#308");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_ftr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br />(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br />(12,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#309");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#310");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#311");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#312");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_ftr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#313");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_ftr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#314");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_ftr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Separator,0)<br />(2,Item,1)<br />(3,Separator,1)<br />(4,Item,2)<br />(5,Separator,2)<br />(6,Item,3)<br />(7,Separator,3)<br />(8,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#315");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_ftr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)<br />(4,Item,1)(5,Separator,1)(6,Item,3)</span>";
-               Assert.AreEqual (exp, v, "#316");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_ftr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)<br />(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)<br />(8,Item,2)(9,Separator,2)(10,Item,6)<br />(11,Item,3)(12,Separator,3)</span>";
-               Assert.AreEqual (exp, v, "#317");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_ftr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)<br />(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)</span>";
-               Assert.AreEqual (exp, v, "#318");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_sep ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_ftr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
-               // Footer            : False
-               // Separator         : True
+               // Footer            : True
+               // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, true, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true);
-               string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)<br />(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)<br />(11,Item,2)(12,Separator,2)</span>";
-               Assert.AreEqual (exp, v, "#319");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
@@ -7271,24 +18486,20 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#320");
+               Assert.AreEqual (exp, v, "#960");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
@@ -7296,26 +18507,22 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
                <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(2,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#321");
+               Assert.AreEqual (exp, v, "#961");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
@@ -7323,26 +18530,22 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
                <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(3,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#322");
+               Assert.AreEqual (exp, v, "#962");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
@@ -7350,26 +18553,22 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
                <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
-       </tr><tr>
-               <td colspan=""5"" class=""Footer-1"">(6,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#323");
+               Assert.AreEqual (exp, v, "#963");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
@@ -7377,24 +18576,20 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#324");
+               Assert.AreEqual (exp, v, "#964");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
@@ -7402,11 +18597,10 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Header-1"">(0,Header,-1)</td>
@@ -7420,16 +18614,13 @@ public class RepeatInfo_Autogen {
                <td class=""Item3"">(4,Item,3)</td>
        </tr><tr>
                <td class=""Item4"">(5,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(6,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#325");
+               Assert.AreEqual (exp, v, "#965");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
@@ -7437,11 +18628,10 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
@@ -7449,16 +18639,13 @@ public class RepeatInfo_Autogen {
                <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
        </tr><tr>
                <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#326");
+               Assert.AreEqual (exp, v, "#966");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
@@ -7466,11 +18653,10 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
@@ -7482,16 +18668,13 @@ public class RepeatInfo_Autogen {
                <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
        </tr><tr>
                <td class=""Item6"">(7,Item,6)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#327");
+               Assert.AreEqual (exp, v, "#967");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
@@ -7499,11 +18682,10 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table>
        <tr>
                <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
@@ -7513,16 +18695,13 @@ public class RepeatInfo_Autogen {
                <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
        </tr><tr>
                <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#328");
+               Assert.AreEqual (exp, v, "#968");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
@@ -7530,11 +18709,10 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
                string exp = @"<table>
        <tr>
                <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
@@ -7544,16 +18722,13 @@ public class RepeatInfo_Autogen {
                <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
        </tr><tr>
                <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#329");
+               Assert.AreEqual (exp, v, "#969");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
@@ -7561,18 +18736,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Footer,-1)";
-               Assert.AreEqual (exp, v, "#330");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#970");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
@@ -7580,18 +18753,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)";
-               Assert.AreEqual (exp, v, "#331");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)";
+               Assert.AreEqual (exp, v, "#971");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
@@ -7599,18 +18770,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)";
-               Assert.AreEqual (exp, v, "#332");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)";
+               Assert.AreEqual (exp, v, "#972");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
@@ -7618,18 +18787,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
-               Assert.AreEqual (exp, v, "#333");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
+               Assert.AreEqual (exp, v, "#973");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
@@ -7637,18 +18804,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Footer,-1)";
-               Assert.AreEqual (exp, v, "#334");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#974");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
@@ -7656,18 +18821,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
-               Assert.AreEqual (exp, v, "#335");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
+               Assert.AreEqual (exp, v, "#975");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
@@ -7675,18 +18838,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)(5,Footer,-1)";
-               Assert.AreEqual (exp, v, "#336");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)";
+               Assert.AreEqual (exp, v, "#976");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
@@ -7694,18 +18855,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)(8,Footer,-1)";
-               Assert.AreEqual (exp, v, "#337");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)";
+               Assert.AreEqual (exp, v, "#977");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
@@ -7713,18 +18872,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)(10,Footer,-1)";
-               Assert.AreEqual (exp, v, "#338");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)";
+               Assert.AreEqual (exp, v, "#978");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
@@ -7732,18 +18889,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Table
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)(8,Footer,-1)";
-               Assert.AreEqual (exp, v, "#339");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)";
+               Assert.AreEqual (exp, v, "#979");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
@@ -7751,18 +18906,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#340");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#980");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
@@ -7770,18 +18923,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#341");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#981");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
@@ -7789,18 +18940,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#342");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#982");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
@@ -7808,18 +18957,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#343");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#983");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
@@ -7827,18 +18974,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#344");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#984");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
@@ -7846,18 +18991,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#345");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#985");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
@@ -7865,18 +19008,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#346");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#986");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
@@ -7884,18 +19025,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#347");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#987");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
@@ -7903,18 +19042,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br />(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#348");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#988");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
@@ -7922,18 +19059,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#349");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#989");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
@@ -7941,18 +19076,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Footer,-1)";
-               Assert.AreEqual (exp, v, "#350");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#990");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
@@ -7960,18 +19093,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)";
-               Assert.AreEqual (exp, v, "#351");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)";
+               Assert.AreEqual (exp, v, "#991");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
@@ -7979,18 +19110,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)";
-               Assert.AreEqual (exp, v, "#352");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)";
+               Assert.AreEqual (exp, v, "#992");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
@@ -7998,18 +19127,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
-               Assert.AreEqual (exp, v, "#353");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
+               Assert.AreEqual (exp, v, "#993");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
@@ -8017,18 +19144,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Footer,-1)";
-               Assert.AreEqual (exp, v, "#354");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)";
+               Assert.AreEqual (exp, v, "#994");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
@@ -8036,18 +19161,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)";
-               Assert.AreEqual (exp, v, "#355");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
+               Assert.AreEqual (exp, v, "#995");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
@@ -8055,18 +19178,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)(5,Footer,-1)";
-               Assert.AreEqual (exp, v, "#356");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)";
+               Assert.AreEqual (exp, v, "#996");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
@@ -8074,18 +19195,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)(8,Footer,-1)";
-               Assert.AreEqual (exp, v, "#357");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)";
+               Assert.AreEqual (exp, v, "#997");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
@@ -8093,18 +19212,16 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)(10,Footer,-1)";
-               Assert.AreEqual (exp, v, "#358");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)";
+               Assert.AreEqual (exp, v, "#998");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_ftr ()
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
@@ -8112,4651 +19229,3878 @@ public class RepeatInfo_Autogen {
                // RepeatLayout      : Flow
                // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)(8,Footer,-1)";
-               Assert.AreEqual (exp, v, "#359");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
+               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)";
+               Assert.AreEqual (exp, v, "#999");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#360");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(2,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#361");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(3,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#362");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
-       </tr><tr>
-               <td colspan=""5"" class=""Footer-1"">(6,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#363");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#364");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(6,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#365");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#366");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#367");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#368");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#369");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
-               // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
-               // Footer            : True
-               // Separator         : False
-
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#370");
-       }
+               // RepeatDirection   : Vertical
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : True
+               // Footer            : False
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
 
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(2,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#371");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(3,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#372");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(6,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#373");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#374");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(6,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#375");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#376");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item4"">(2,Item,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item5"">(4,Item,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Item6"">(6,Item,6)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#377");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item6"">(3,Item,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item7"">(6,Item,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(7,Item,2)</td><td class=""Item5"">(8,Item,5)</td><td class=""Item8"">(9,Item,8)</td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#378");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item5"">(3,Item,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item6"">(6,Item,6)</td>
-       </tr><tr>
-               <td class=""Item2"">(7,Item,2)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#379");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#380");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#381");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#382");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#383");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#384");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#385");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#386");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#387");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br />(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#388");
-       }
-
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
 
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#389");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#390");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#391");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#392");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#393");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#394");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br />(6,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#395");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,2)<br />(3,Item,1)(4,Item,3)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#396");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,4)<br />(3,Item,1)(4,Item,5)<br />(5,Item,2)(6,Item,6)<br />(7,Item,3)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#397");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,6)<br />(4,Item,1)(5,Item,4)(6,Item,7)<br />(7,Item,2)(8,Item,5)(9,Item,8)<br />(10,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#398");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_hdr_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
                // Header            : True
-               // Footer            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,5)<br />(4,Item,1)(5,Item,4)(6,Item,6)<br />(7,Item,2)<br />(8,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#399");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
+               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#400");
+               Assert.AreEqual (exp, v, "#1040");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td>
+               <td class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
+               <td class=""Item0"">(1,Item,0)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#401");
+               Assert.AreEqual (exp, v, "#1041");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#402");
+               Assert.AreEqual (exp, v, "#1042");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
+               <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td colspan=""5"" class=""Footer-1"">(5,Footer,-1)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#403");
+               Assert.AreEqual (exp, v, "#1043");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Footer-1"">(0,Footer,-1)</td>
+               <td class=""Header-1"">(0,Header,-1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#404");
+               Assert.AreEqual (exp, v, "#1044");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td>
+               <td class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
+               <td class=""Item0"">(1,Item,0)</td>
        </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
+               <td class=""Item1"">(2,Item,1)</td>
        </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
+               <td class=""Item2"">(3,Item,2)</td>
        </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
+               <td class=""Item3"">(4,Item,3)</td>
        </tr><tr>
-               <td class=""Footer-1"">(5,Footer,-1)</td>
+               <td class=""Item4"">(5,Item,4)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#405");
+               Assert.AreEqual (exp, v, "#1045");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
        </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td>
+               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#406");
+               Assert.AreEqual (exp, v, "#1046");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
        </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
        </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td></td>
+               <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
        </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td>
+               <td class=""Item6"">(7,Item,6)</td><td></td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#407");
+               Assert.AreEqual (exp, v, "#1047");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table>
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
        </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
+               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
        </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td>
+               <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#408");
+               Assert.AreEqual (exp, v, "#1048");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
                string exp = @"<table>
        <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
        </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
        </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
+               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
        </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td>
+               <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#409");
+               Assert.AreEqual (exp, v, "#1049");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_0itms_vert_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Footer,-1)";
-               Assert.AreEqual (exp, v, "#410");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1050");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_1itms_vert_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Footer,-1)";
-               Assert.AreEqual (exp, v, "#411");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1051");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_2itms_vert_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Footer,-1)";
-               Assert.AreEqual (exp, v, "#412");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1052");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_5itms_vert_tbl_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
-               Assert.AreEqual (exp, v, "#413");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1053");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_0itms_vert_tbl_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Footer,-1)";
-               Assert.AreEqual (exp, v, "#414");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1054");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_5itms_vert_tbl_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
-               Assert.AreEqual (exp, v, "#415");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(3,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(4,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(5,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1055");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_4itms_vert_tbl_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)(4,Footer,-1)";
-               Assert.AreEqual (exp, v, "#416");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item3"">(4,Item,3)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1056");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_7itms_vert_tbl_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)(7,Footer,-1)";
-               Assert.AreEqual (exp, v, "#417");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item4"">(2,Item,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item5"">(4,Item,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(5,Item,2)</td><td class=""Item6"">(6,Item,6)</td>
+       </tr><tr>
+               <td class=""Item3"">(7,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1057");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_9itms_vert_tbl_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)(9,Footer,-1)";
-               Assert.AreEqual (exp, v, "#418");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item6"">(3,Item,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item7"">(6,Item,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(7,Item,2)</td><td class=""Item5"">(8,Item,5)</td><td class=""Item8"">(9,Item,8)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1058");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_7itms_vert_tbl_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)(7,Footer,-1)";
-               Assert.AreEqual (exp, v, "#419");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
+               string exp = @"<table>
+       <tr>
+               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
+       </tr><tr>
+               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item5"">(3,Item,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item6"">(6,Item,6)</td>
+       </tr><tr>
+               <td class=""Item2"">(7,Item,2)</td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1059");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_0itms_horiz_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#420");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#1060");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#421");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#1061");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_2itms_horiz_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#422");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#1062");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_5itms_horiz_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#423");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#1063");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_0itms_horiz_flow_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#424");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
+               Assert.AreEqual (exp, v, "#1064");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_5itms_horiz_flow_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#425");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#1065");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_4itms_horiz_flow_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#426");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#1066");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_7itms_horiz_flow_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#427");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#1067");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_9itms_horiz_flow_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br />(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#428");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#1068");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_7itms_horiz_flow_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#429");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#1069");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_0itms_vert_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Footer,-1)";
-               Assert.AreEqual (exp, v, "#430");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
+               Assert.AreEqual (exp, v, "#1070");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_1itms_vert_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Footer,-1)";
-               Assert.AreEqual (exp, v, "#431");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#1071");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_2itms_vert_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Footer,-1)";
-               Assert.AreEqual (exp, v, "#432");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#1072");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_0cols_5itms_vert_flow_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
-               Assert.AreEqual (exp, v, "#433");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#1073");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_0itms_vert_flow_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Footer,-1)";
-               Assert.AreEqual (exp, v, "#434");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
+               Assert.AreEqual (exp, v, "#1074");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_1cols_5itms_vert_flow_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)";
-               Assert.AreEqual (exp, v, "#435");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#1075");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_4itms_vert_flow_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)(4,Footer,-1)";
-               Assert.AreEqual (exp, v, "#436");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,2)<br />(3,Item,1)(4,Item,3)</span>";
+               Assert.AreEqual (exp, v, "#1076");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_2cols_7itms_vert_flow_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)(7,Footer,-1)";
-               Assert.AreEqual (exp, v, "#437");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,4)<br />(3,Item,1)(4,Item,5)<br />(5,Item,2)(6,Item,6)<br />(7,Item,3)</span>";
+               Assert.AreEqual (exp, v, "#1077");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_9itms_vert_flow_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)(9,Footer,-1)";
-               Assert.AreEqual (exp, v, "#438");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,6)<br />(4,Item,1)(5,Item,4)(6,Item,7)<br />(7,Item,2)(8,Item,5)(9,Item,8)</span>";
+               Assert.AreEqual (exp, v, "#1078");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_ftr ()
+       public void RepeatInfo_3cols_7itms_vert_flow_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
-               // Header            : False
-               // Footer            : True
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)(7,Footer,-1)";
-               Assert.AreEqual (exp, v, "#439");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
+               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,5)<br />(4,Item,1)(5,Item,4)(6,Item,6)<br />(7,Item,2)</span>";
+               Assert.AreEqual (exp, v, "#1079");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#440");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 1
-               // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
-               // Separator         : False
-
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#441");
-       }
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : False
+               // Header            : True
+               // Footer            : False
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
 
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#442");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
-       </tr><tr>
-               <td colspan=""5"" class=""Footer-1"">(5,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#443");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#444");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(5,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#445");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#446");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#447");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#448");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#449");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#450");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(1,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#451");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(2,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#452");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(5,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#453");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Footer-1"">(0,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#454");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
-       </tr><tr>
-               <td class=""Footer-1"">(5,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#455");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
-               // Separator         : False
-
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item2"">(1,Item,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#456");
-       }
+               // Header            : True
+               // Footer            : False
+               // Separator         : False
+
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
+       }
 
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item4"">(1,Item,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Item5"">(3,Item,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Item6"">(5,Item,6)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td></td>
-       </tr><tr>
-               <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#457");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item6"">(2,Item,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item7"">(5,Item,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(6,Item,2)</td><td class=""Item5"">(7,Item,5)</td><td class=""Item8"">(8,Item,8)</td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#458");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item5"">(2,Item,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item6"">(5,Item,6)</td>
-       </tr><tr>
-               <td class=""Item2"">(6,Item,2)</td><td></td><td></td>
-       </tr><tr>
-               <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#459");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#460");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#461");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#462");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#463");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#464");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#465");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#466");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#467");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br />(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#468");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#469");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#470");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#471");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#472");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_hdr ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#473");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_hdr ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#474");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_hdr ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br />(5,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#475");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_hdr ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,2)<br />(2,Item,1)(3,Item,3)<br />(4,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#476");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_hdr ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,4)<br />(2,Item,1)(3,Item,5)<br />(4,Item,2)(5,Item,6)<br />(6,Item,3)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#477");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_hdr ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,6)<br />(3,Item,1)(4,Item,4)(5,Item,7)<br />(6,Item,2)(7,Item,5)(8,Item,8)<br />(9,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#478");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_ftr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_hdr ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
-               // Header            : False
-               // Footer            : True
+               // Header            : True
+               // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, true, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false);
-               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,5)<br />(3,Item,1)(4,Item,4)(5,Item,6)<br />(6,Item,2)<br />(7,Footer,-1)</span>";
-               Assert.AreEqual (exp, v, "#479");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers, or separators.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
-       </tr>
+
 </table>";
-               Assert.AreEqual (exp, v, "#480");
+               Assert.AreEqual (exp, v, "#1120");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
+               <td class=""Item0"">(0,Item,0)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#481");
+               Assert.AreEqual (exp, v, "#1121");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#482");
+               Assert.AreEqual (exp, v, "#1122");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#483");
+               Assert.AreEqual (exp, v, "#1123");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr>
+
 </table>";
-               Assert.AreEqual (exp, v, "#484");
+               Assert.AreEqual (exp, v, "#1124");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
+               <td class=""Item0"">(0,Item,0)</td>
        </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
+               <td class=""Item1"">(1,Item,1)</td>
        </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
+               <td class=""Item2"">(2,Item,2)</td>
        </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
+               <td class=""Item3"">(3,Item,3)</td>
        </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
+               <td class=""Item4"">(4,Item,4)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#485");
+               Assert.AreEqual (exp, v, "#1125");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
        </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
+               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#486");
+               Assert.AreEqual (exp, v, "#1126");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
        </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
+               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
        </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+               <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
        </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td></td>
+               <td class=""Item6"">(6,Item,6)</td><td></td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#487");
+               Assert.AreEqual (exp, v, "#1127");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table>
        <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
        </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
        </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
+               <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#488");
+               Assert.AreEqual (exp, v, "#1128");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
                string exp = @"<table>
        <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
        </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
+               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
        </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
+               <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#489");
+               Assert.AreEqual (exp, v, "#1129");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)";
-               Assert.AreEqual (exp, v, "#490");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#1130");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)";
-               Assert.AreEqual (exp, v, "#491");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)";
+               Assert.AreEqual (exp, v, "#1131");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)";
-               Assert.AreEqual (exp, v, "#492");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,1)";
+               Assert.AreEqual (exp, v, "#1132");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
-               Assert.AreEqual (exp, v, "#493");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
+               Assert.AreEqual (exp, v, "#1133");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)";
-               Assert.AreEqual (exp, v, "#494");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#1134");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
-               Assert.AreEqual (exp, v, "#495");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
+               Assert.AreEqual (exp, v, "#1135");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)";
-               Assert.AreEqual (exp, v, "#496");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)";
+               Assert.AreEqual (exp, v, "#1136");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)";
-               Assert.AreEqual (exp, v, "#497");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)";
+               Assert.AreEqual (exp, v, "#1137");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)";
-               Assert.AreEqual (exp, v, "#498");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)";
+               Assert.AreEqual (exp, v, "#1138");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)";
-               Assert.AreEqual (exp, v, "#499");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)";
+               Assert.AreEqual (exp, v, "#1139");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
-               Assert.AreEqual (exp, v, "#500");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#1140");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#501");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#1141");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#502");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#1142");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#503");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#1143");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
-               Assert.AreEqual (exp, v, "#504");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#1144");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#505");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br /></span>";
+               Assert.AreEqual (exp, v, "#1145");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#506");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br /></span>";
+               Assert.AreEqual (exp, v, "#1146");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#507");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#1147");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#508");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br /></span>";
+               Assert.AreEqual (exp, v, "#1148");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#509");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br /></span>";
+               Assert.AreEqual (exp, v, "#1149");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)";
-               Assert.AreEqual (exp, v, "#510");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#1150");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)";
-               Assert.AreEqual (exp, v, "#511");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)";
+               Assert.AreEqual (exp, v, "#1151");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)";
-               Assert.AreEqual (exp, v, "#512");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,1)";
+               Assert.AreEqual (exp, v, "#1152");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
-               Assert.AreEqual (exp, v, "#513");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
+               Assert.AreEqual (exp, v, "#1153");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)";
-               Assert.AreEqual (exp, v, "#514");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"";
+               Assert.AreEqual (exp, v, "#1154");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)";
-               Assert.AreEqual (exp, v, "#515");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
+               Assert.AreEqual (exp, v, "#1155");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)";
-               Assert.AreEqual (exp, v, "#516");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)";
+               Assert.AreEqual (exp, v, "#1156");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)";
-               Assert.AreEqual (exp, v, "#517");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)";
+               Assert.AreEqual (exp, v, "#1157");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)";
-               Assert.AreEqual (exp, v, "#518");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)";
+               Assert.AreEqual (exp, v, "#1158");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr ()
+       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
                // OuterTableImplied : True
-               // Header            : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false);
-               string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)";
-               Assert.AreEqual (exp, v, "#519");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
+               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)";
+               Assert.AreEqual (exp, v, "#1159");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#520");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#521");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#522");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#523");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#524");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#525");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#526");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#527");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#528");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(7,Item,6)</td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#529");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#530");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#531");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#532");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ul_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#533");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ul_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#534");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ul_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(3,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(4,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(5,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#535");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item3"">(4,Item,3)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#536");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item4"">(2,Item,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item5"">(4,Item,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(5,Item,2)</td><td class=""Item6"">(6,Item,6)</td>
-       </tr><tr>
-               <td class=""Item3"">(7,Item,3)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#537");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item6"">(3,Item,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item7"">(6,Item,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(7,Item,2)</td><td class=""Item5"">(8,Item,5)</td><td class=""Item8"">(9,Item,8)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#538");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : UnorderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false);
-               string exp = @"<table>
-       <tr>
-               <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td>
-       </tr><tr>
-               <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item5"">(3,Item,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item6"">(6,Item,6)</td>
-       </tr><tr>
-               <td class=""Item2"">(7,Item,2)</td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#539");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
-               Assert.AreEqual (exp, v, "#540");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#541");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#542");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#543");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>";
-               Assert.AreEqual (exp, v, "#544");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#545");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#546");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,1)<br />(3,Item,2)(4,Item,3)<br />(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#547");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
-               // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatDirection   : Horizontal
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)(8,Item,7)(9,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#548");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,1)(3,Item,2)<br />(4,Item,3)(5,Item,4)(6,Item,5)<br />(7,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#549");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_vert_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
-               Assert.AreEqual (exp, v, "#550");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_vert_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#551");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_vert_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#552");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_vert_ol_otrtblimp ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#553");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_vert_ol_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br /></span>";
-               Assert.AreEqual (exp, v, "#554");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_vert_ol_otrtblimp ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)<br />(2,Item,1)<br />(3,Item,2)<br />(4,Item,3)<br />(5,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#555");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,2)<br />(3,Item,1)(4,Item,3)</span>";
-               Assert.AreEqual (exp, v, "#556");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol_otrtblimp ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Header,-1)<br />(1,Item,0)(2,Item,4)<br />(3,Item,1)(4,Item,5)<br />(5,Item,2)(6,Item,6)<br />(7,Item,3)</span>";
-               Assert.AreEqual (exp, v, "#557");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,6)<br />(4,Item,1)(5,Item,4)(6,Item,7)<br />(7,Item,2)(8,Item,5)(9,Item,8)</span>";
-               Assert.AreEqual (exp, v, "#558");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_hdr ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol_otrtblimp ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
-               // OuterTableImplied : False
-               // Header            : True
+               // RepeatLayout      : OrderedList
+               // OuterTableImplied : True
+               // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, true, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false);
-               string exp = @"<span>(0,Header,-1)<br />(1,Item,0)(2,Item,3)(3,Item,5)<br />(4,Item,1)(5,Item,4)(6,Item,6)<br />(7,Item,2)</span>";
-               Assert.AreEqual (exp, v, "#559");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_0itms_horiz_tbl ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
 
 </table>";
-               Assert.AreEqual (exp, v, "#560");
+               Assert.AreEqual (exp, v, "#1200");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_1itms_horiz_tbl ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#561");
+               Assert.AreEqual (exp, v, "#1201");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_2itms_horiz_tbl ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#562");
+               Assert.AreEqual (exp, v, "#1202");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_5itms_horiz_tbl ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#563");
+               Assert.AreEqual (exp, v, "#1203");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_1cols_0itms_horiz_tbl ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
 
 </table>";
-               Assert.AreEqual (exp, v, "#564");
+               Assert.AreEqual (exp, v, "#1204");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_1cols_5itms_horiz_tbl ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td>
@@ -12770,24 +23114,22 @@ public class RepeatInfo_Autogen {
                <td class=""Item4"">(4,Item,4)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#565");
+               Assert.AreEqual (exp, v, "#1205");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_2cols_4itms_horiz_tbl ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
@@ -12795,24 +23137,22 @@ public class RepeatInfo_Autogen {
                <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#566");
+               Assert.AreEqual (exp, v, "#1206");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_2cols_7itms_horiz_tbl ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table class=""mainstyle"">
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
@@ -12824,24 +23164,22 @@ public class RepeatInfo_Autogen {
                <td class=""Item6"">(6,Item,6)</td><td></td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#567");
+               Assert.AreEqual (exp, v, "#1207");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_3cols_9itms_horiz_tbl ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table>
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
@@ -12851,24 +23189,22 @@ public class RepeatInfo_Autogen {
                <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#568");
+               Assert.AreEqual (exp, v, "#1208");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp ()
+       public void RepeatInfo_3cols_7itms_horiz_tbl ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
                string exp = @"<table>
        <tr>
                <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
@@ -12878,1467 +23214,1345 @@ public class RepeatInfo_Autogen {
                <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
        </tr>
 </table>";
-               Assert.AreEqual (exp, v, "#569");
+               Assert.AreEqual (exp, v, "#1209");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_0itms_vert_tbl ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"";
-               Assert.AreEqual (exp, v, "#570");
+</table>";
+               Assert.AreEqual (exp, v, "#1210");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_1itms_vert_tbl ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)";
-               Assert.AreEqual (exp, v, "#571");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1211");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_2itms_vert_tbl ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,1)";
-               Assert.AreEqual (exp, v, "#572");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1212");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_0cols_5itms_vert_tbl ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
-               Assert.AreEqual (exp, v, "#573");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1213");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_1cols_0itms_vert_tbl ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"";
-               Assert.AreEqual (exp, v, "#574");
+</table>";
+               Assert.AreEqual (exp, v, "#1214");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_1cols_5itms_vert_tbl ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
-               Assert.AreEqual (exp, v, "#575");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td>
+       </tr><tr>
+               <td class=""Item1"">(1,Item,1)</td>
+       </tr><tr>
+               <td class=""Item2"">(2,Item,2)</td>
+       </tr><tr>
+               <td class=""Item3"">(3,Item,3)</td>
+       </tr><tr>
+               <td class=""Item4"">(4,Item,4)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1215");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_2cols_4itms_vert_tbl ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)";
-               Assert.AreEqual (exp, v, "#576");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item2"">(1,Item,2)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Item3"">(3,Item,3)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1216");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_2cols_7itms_vert_tbl ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)";
-               Assert.AreEqual (exp, v, "#577");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table class=""mainstyle"">
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item4"">(1,Item,4)</td>
+       </tr><tr>
+               <td class=""Item1"">(2,Item,1)</td><td class=""Item5"">(3,Item,5)</td>
+       </tr><tr>
+               <td class=""Item2"">(4,Item,2)</td><td class=""Item6"">(5,Item,6)</td>
+       </tr><tr>
+               <td class=""Item3"">(6,Item,3)</td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1217");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_3cols_9itms_vert_tbl ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)";
-               Assert.AreEqual (exp, v, "#578");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item6"">(2,Item,6)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item7"">(5,Item,7)</td>
+       </tr><tr>
+               <td class=""Item2"">(6,Item,2)</td><td class=""Item5"">(7,Item,5)</td><td class=""Item8"">(8,Item,8)</td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1218");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp ()
+       public void RepeatInfo_3cols_7itms_vert_tbl ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Table
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)";
-               Assert.AreEqual (exp, v, "#579");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
+               string exp = @"<table>
+       <tr>
+               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item5"">(2,Item,5)</td>
+       </tr><tr>
+               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item6"">(5,Item,6)</td>
+       </tr><tr>
+               <td class=""Item2"">(6,Item,2)</td><td></td><td></td>
+       </tr>
+</table>";
+               Assert.AreEqual (exp, v, "#1219");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_0cols_0itms_horiz_flow ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#580");
+               Assert.AreEqual (exp, v, "#1220");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_0cols_1itms_horiz_flow ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#581");
+               Assert.AreEqual (exp, v, "#1221");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_0cols_2itms_horiz_flow ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#582");
+               Assert.AreEqual (exp, v, "#1222");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_0cols_5itms_horiz_flow ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#583");
+               Assert.AreEqual (exp, v, "#1223");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_1cols_0itms_horiz_flow ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#584");
+               Assert.AreEqual (exp, v, "#1224");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_1cols_5itms_horiz_flow ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#585");
+               Assert.AreEqual (exp, v, "#1225");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_2cols_4itms_horiz_flow ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#586");
+               Assert.AreEqual (exp, v, "#1226");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_2cols_7itms_horiz_flow ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#587");
+               Assert.AreEqual (exp, v, "#1227");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_3cols_9itms_horiz_flow ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#588");
+               Assert.AreEqual (exp, v, "#1228");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp ()
+       public void RepeatInfo_3cols_7itms_horiz_flow ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false);
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
                string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#589");
+               Assert.AreEqual (exp, v, "#1229");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_0cols_0itms_vert_flow ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"";
-               Assert.AreEqual (exp, v, "#590");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#1230");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_0cols_1itms_vert_flow ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)";
-               Assert.AreEqual (exp, v, "#591");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
+               Assert.AreEqual (exp, v, "#1231");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_0cols_2itms_vert_flow ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,1)";
-               Assert.AreEqual (exp, v, "#592");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)</span>";
+               Assert.AreEqual (exp, v, "#1232");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_0cols_5itms_vert_flow ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
-               Assert.AreEqual (exp, v, "#593");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#1233");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_1cols_0itms_vert_flow ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"";
-               Assert.AreEqual (exp, v, "#594");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle""></span>";
+               Assert.AreEqual (exp, v, "#1234");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_1cols_5itms_vert_flow ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)";
-               Assert.AreEqual (exp, v, "#595");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)</span>";
+               Assert.AreEqual (exp, v, "#1235");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_2cols_4itms_vert_flow ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)";
-               Assert.AreEqual (exp, v, "#596");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,2)<br />(2,Item,1)(3,Item,3)</span>";
+               Assert.AreEqual (exp, v, "#1236");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_2cols_7itms_vert_flow ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)";
-               Assert.AreEqual (exp, v, "#597");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,4)<br />(2,Item,1)(3,Item,5)<br />(4,Item,2)(5,Item,6)<br />(6,Item,3)</span>";
+               Assert.AreEqual (exp, v, "#1237");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_3cols_9itms_vert_flow ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)";
-               Assert.AreEqual (exp, v, "#598");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,6)<br />(3,Item,1)(4,Item,4)(5,Item,7)<br />(6,Item,2)(7,Item,5)(8,Item,8)</span>";
+               Assert.AreEqual (exp, v, "#1238");
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp ()
+       public void RepeatInfo_3cols_7itms_vert_flow ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
                // RepeatLayout      : Flow
-               // OuterTableImplied : True
+               // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
-
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false);
-               string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)";
-               Assert.AreEqual (exp, v, "#599");
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
+               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,5)<br />(3,Item,1)(4,Item,4)(5,Item,6)<br />(6,Item,2)</span>";
+               Assert.AreEqual (exp, v, "#1239");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ul ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-
-</table>";
-               Assert.AreEqual (exp, v, "#600");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ul ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#601");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ul ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#602");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ul ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#603");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ul ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-
-</table>";
-               Assert.AreEqual (exp, v, "#604");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ul ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#605");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ul ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#606");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ul ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#607");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ul ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#608");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ul ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td>
-       </tr><tr>
-               <td class=""Item6"">(6,Item,6)</td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#609");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_tbl ()
+       public void RepeatInfo_0cols_0itms_vert_ul ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
+               string exp = @"<ul class=""mainstyle"">
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-
-</table>";
-               Assert.AreEqual (exp, v, "#610");
+</ul>";
+               Assert.AreEqual (exp, v, "#1250");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_tbl ()
+       public void RepeatInfo_0cols_1itms_vert_ul ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
+               string exp = @"<ul class=""mainstyle"">
+       <li>(0,Item,0)</li>
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#611");
+</ul>";
+               Assert.AreEqual (exp, v, "#1251");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_tbl ()
+       public void RepeatInfo_0cols_2itms_vert_ul ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
+               string exp = @"<ul class=""mainstyle"">
+       <li>(0,Item,0)</li>
+       <li>(1,Item,1)</li>
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#612");
+</ul>";
+               Assert.AreEqual (exp, v, "#1252");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_tbl ()
+       public void RepeatInfo_0cols_5itms_vert_ul ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
+               string exp = @"<ul class=""mainstyle"">
+       <li>(0,Item,0)</li>
+       <li>(1,Item,1)</li>
+       <li>(2,Item,2)</li>
+       <li>(3,Item,3)</li>
+       <li>(4,Item,4)</li>
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#613");
+</ul>";
+               Assert.AreEqual (exp, v, "#1253");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_tbl ()
+       public void RepeatInfo_1cols_0itms_vert_ul ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
+               string exp = @"<ul class=""mainstyle"">
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-
-</table>";
-               Assert.AreEqual (exp, v, "#614");
+</ul>";
+               Assert.AreEqual (exp, v, "#1254");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_tbl ()
+       public void RepeatInfo_1cols_5itms_vert_ul ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
+               string exp = @"<ul class=""mainstyle"">
+       <li>(0,Item,0)</li>
+       <li>(1,Item,1)</li>
+       <li>(2,Item,2)</li>
+       <li>(3,Item,3)</li>
+       <li>(4,Item,4)</li>
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td>
-       </tr><tr>
-               <td class=""Item1"">(1,Item,1)</td>
-       </tr><tr>
-               <td class=""Item2"">(2,Item,2)</td>
-       </tr><tr>
-               <td class=""Item3"">(3,Item,3)</td>
-       </tr><tr>
-               <td class=""Item4"">(4,Item,4)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#615");
+</ul>";
+               Assert.AreEqual (exp, v, "#1255");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ul ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item2"">(1,Item,2)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Item3"">(3,Item,3)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#616");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ul ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table class=""mainstyle"">
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item4"">(1,Item,4)</td>
-       </tr><tr>
-               <td class=""Item1"">(2,Item,1)</td><td class=""Item5"">(3,Item,5)</td>
-       </tr><tr>
-               <td class=""Item2"">(4,Item,2)</td><td class=""Item6"">(5,Item,6)</td>
-       </tr><tr>
-               <td class=""Item3"">(6,Item,3)</td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#617");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ul ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item6"">(2,Item,6)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item7"">(5,Item,7)</td>
-       </tr><tr>
-               <td class=""Item2"">(6,Item,2)</td><td class=""Item5"">(7,Item,5)</td><td class=""Item8"">(8,Item,8)</td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#618");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_tbl ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ul ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Table
+               // RepeatLayout      : UnorderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.UnorderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false);
-               string exp = @"<table>
-       <tr>
-               <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item5"">(2,Item,5)</td>
-       </tr><tr>
-               <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item6"">(5,Item,6)</td>
-       </tr><tr>
-               <td class=""Item2"">(6,Item,2)</td><td></td><td></td>
-       </tr>
-</table>";
-               Assert.AreEqual (exp, v, "#619");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_0itms_horiz_ol ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#620");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_1itms_horiz_ol ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#621");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_2itms_horiz_ol ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#622");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_0cols_5itms_horiz_ol ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#623");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_0itms_horiz_ol ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#624");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_1cols_5itms_horiz_ol ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)<br /></span>";
-               Assert.AreEqual (exp, v, "#625");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_horiz_ol ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br /></span>";
-               Assert.AreEqual (exp, v, "#626");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_horiz_ol ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br />(2,Item,2)(3,Item,3)<br />(4,Item,4)(5,Item,5)<br />(6,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#627");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_horiz_ol ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)(7,Item,7)(8,Item,8)<br /></span>";
-               Assert.AreEqual (exp, v, "#628");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_horiz_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_horiz_ol ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Horizontal
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br />(3,Item,3)(4,Item,4)(5,Item,5)<br />(6,Item,6)<br /></span>";
-               Assert.AreEqual (exp, v, "#629");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.")
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_0itms_vert_flow ()
+       public void RepeatInfo_0cols_0itms_vert_ol ()
        {
                // cols              : 0
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
+               string exp = @"<ol class=""mainstyle"">
 
-               string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#630");
+</ol>";
+               Assert.AreEqual (exp, v, "#1270");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_1itms_vert_flow ()
+       public void RepeatInfo_0cols_1itms_vert_ol ()
        {
                // cols              : 0
                // cnt               : 1
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
+               string exp = @"<ol class=""mainstyle"">
+       <li>(0,Item,0)</li>
 
-               string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)</span>";
-               Assert.AreEqual (exp, v, "#631");
+</ol>";
+               Assert.AreEqual (exp, v, "#1271");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_2itms_vert_flow ()
+       public void RepeatInfo_0cols_2itms_vert_ol ()
        {
                // cols              : 0
                // cnt               : 2
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
+               string exp = @"<ol class=""mainstyle"">
+       <li>(0,Item,0)</li>
+       <li>(1,Item,1)</li>
 
-               string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)</span>";
-               Assert.AreEqual (exp, v, "#632");
+</ol>";
+               Assert.AreEqual (exp, v, "#1272");
        }
 
-
        [Test]
-       public void RepeatInfo_0cols_5itms_vert_flow ()
+       public void RepeatInfo_0cols_5itms_vert_ol ()
        {
                // cols              : 0
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
+               string exp = @"<ol class=""mainstyle"">
+       <li>(0,Item,0)</li>
+       <li>(1,Item,1)</li>
+       <li>(2,Item,2)</li>
+       <li>(3,Item,3)</li>
+       <li>(4,Item,4)</li>
 
-               string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#633");
+</ol>";
+               Assert.AreEqual (exp, v, "#1273");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_0itms_vert_flow ()
+       public void RepeatInfo_1cols_0itms_vert_ol ()
        {
                // cols              : 1
                // cnt               : 0
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
+               string exp = @"<ol class=""mainstyle"">
 
-               string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle""></span>";
-               Assert.AreEqual (exp, v, "#634");
+</ol>";
+               Assert.AreEqual (exp, v, "#1274");
        }
 
-
        [Test]
-       public void RepeatInfo_1cols_5itms_vert_flow ()
+       public void RepeatInfo_1cols_5itms_vert_ol ()
        {
                // cols              : 1
                // cnt               : 5
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
+               string exp = @"<ol class=""mainstyle"">
+       <li>(0,Item,0)</li>
+       <li>(1,Item,1)</li>
+       <li>(2,Item,2)</li>
+       <li>(3,Item,3)</li>
+       <li>(4,Item,4)</li>
 
-               string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)<br />(1,Item,1)<br />(2,Item,2)<br />(3,Item,3)<br />(4,Item,4)</span>";
-               Assert.AreEqual (exp, v, "#635");
+</ol>";
+               Assert.AreEqual (exp, v, "#1275");
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_4itms_vert_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_4itms_vert_ol ()
        {
                // cols              : 2
                // cnt               : 4
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,2)<br />(2,Item,1)(3,Item,3)</span>";
-               Assert.AreEqual (exp, v, "#636");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_2cols_7itms_vert_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_2cols_7itms_vert_ol ()
        {
                // cols              : 2
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,4)<br />(2,Item,1)(3,Item,5)<br />(4,Item,2)(5,Item,6)<br />(6,Item,3)</span>";
-               Assert.AreEqual (exp, v, "#637");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_9itms_vert_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_9itms_vert_ol ()
        {
                // cols              : 3
                // cnt               : 9
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,6)<br />(3,Item,1)(4,Item,4)(5,Item,7)<br />(6,Item,2)(7,Item,5)(8,Item,8)</span>";
-               Assert.AreEqual (exp, v, "#638");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
-
        [Test]
-       public void RepeatInfo_3cols_7itms_vert_flow ()
+       [ExpectedException (typeof (global::System.InvalidOperationException))]
+       public void RepeatInfo_3cols_7itms_vert_ol ()
        {
                // cols              : 3
                // cnt               : 7
                // RepeatDirection   : Vertical
-               // RepeatLayout      : Flow
+               // RepeatLayout      : OrderedList
                // OuterTableImplied : False
                // Header            : False
                // Footer            : False
                // Separator         : False
 
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.OrderedList, false, false, false, false);
 
-               string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false);
-               string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,5)<br />(3,Item,1)(4,Item,4)(5,Item,6)<br />(6,Item,2)</span>";
-               Assert.AreEqual (exp, v, "#639");
+               // Exception: System.InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.")
        }
 
 
index 746e627ca4fbd94c6f02c4d63570360288b96849..f1bfcb7114b6c9a93bcd2ee1e662c239e7378471 100644 (file)
@@ -1,10 +1,11 @@
 //
 // Autogen RepeatInfoTest.auto.cs
 //
-// Author:
+// Authors:
 //     Ben Maurer <bmaurer@novell.com>
+//     Marek Habersack <mhabersack@novell.com>
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -31,80 +32,28 @@ using System.Web.UI;
 using System.Web.UI.WebControls;
 using System;
 using System.IO;
+using System.Text;
 
+using MonoTests.Helpers;
 
 class X {
-       //
-       // KEEP THIS IN SYNC WITH THE ONE IN QUOTES!
-       //
-       public class RepeatInfoUser : IRepeatInfoUser {
-
-               private bool footer;
-               private bool header;
-               private bool separators;
-               private int count;
-               private int counter;
-
-
-               public RepeatInfoUser (bool header, bool footer, bool separators, int count)
-               {
-                       this.footer = footer;
-                       this.header = header;
-                       this.separators = separators;
-                       this.count = count;
-               }
-
-               static HtmlTextWriter GetWriter ()
-               {
-                       StringWriter sw = new StringWriter ();
-                       sw.NewLine = "\n";
-                       return new HtmlTextWriter (sw);
-               }
-
-               public static string DoTest (int cols, int cnt, RepeatDirection d, RepeatLayout l, bool OuterTableImplied, bool hdr, bool ftr, bool sep)
-               {
-                       HtmlTextWriter htw = GetWriter ();
-                       RepeatInfo ri = new RepeatInfo ();
-                       ri.RepeatColumns = cols;
-                       ri.RepeatDirection = d;
-                       ri.RepeatLayout = l;
-                       ri.OuterTableImplied = OuterTableImplied;
-                       // get some variation in if we use style or not
-                       Style s = new Style ();
-                       if (cols != 3)
-                               s.CssClass = "mainstyle";
-                       
-                       ri.RenderRepeater (htw, new RepeatInfoUser (hdr, ftr, sep, cnt), s, new DataList ());
-                       return htw.InnerWriter.ToString ();
-               }
-
-
-               public bool HasFooter {
-                       get { return footer; }
-               }
-
-               public bool HasHeader {
-                       get { return header; }
-               }
-               
-               public bool HasSeparators {
-                       get { return separators; }
-               }
-
-               public int RepeatedItemCount {
-                       get { return count; }
-               }
+       static string GetLayoutName (RepeatLayout layout)
+       {
+               switch (layout) {
+                       case RepeatLayout.Flow:
+                               return "flow";
 
-               public Style GetItemStyle (ListItemType itemType, int repeatIndex)
-               {
-                       Style s = new Style ();
-                       s.CssClass = String.Format ("{0}{1}", itemType, repeatIndex);
-                       return s;
-               }
+                       case RepeatLayout.Table:
+                               return "tbl";
+#if NET_4_0
+                       case RepeatLayout.OrderedList:
+                               return "ol";
 
-               public void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
-               {
-                       writer.Write ("({0},{1},{2})", counter++, itemType, repeatIndex);
+                       case RepeatLayout.UnorderedList:
+                               return "ul";
+#endif
+                       default:
+                               throw new InvalidOperationException ("Unsupported layout value: " + layout);
                }
        }
 
@@ -115,14 +64,17 @@ class X {
 #else
                Console.WriteLine ("#if NET_2_0 && !NET_4_0");
 #endif
+               bool isMono = Type.GetType ("Mono.Runtime", false) != null;
 
                Console.WriteLine (@"
 // THIS IS AUTOGENERATED DO NOT EDIT
 //
+// Generated on {0} runtime v{1}
+//
 // Authors:
 //    Ben Maurer (bmaurer@novell.com)
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -154,80 +106,12 @@ using System.Web.UI;
 using System.Web.UI.WebControls;
 
 using NUnit.Framework;
-namespace MonoTests.System.Web.UI.WebControls {
-[TestFixture]
-public class RepeatInfo_Autogen {
-       public class RepeatInfoUser : IRepeatInfoUser {
-
-               private bool footer;
-               private bool header;
-               private bool separators;
-               private int count;
-               private int counter;
+using MonoTests.Helpers;
 
-
-               public RepeatInfoUser (bool header, bool footer, bool separators, int count)
-               {
-                       this.footer = footer;
-                       this.header = header;
-                       this.separators = separators;
-                       this.count = count;
-               }
-
-               static HtmlTextWriter GetWriter ()
-               {
-                       StringWriter sw = new StringWriter ();
-                       sw.NewLine = ""\n"";
-                       return new HtmlTextWriter (sw);
-               }
-
-               public static string DoTest (int cols, int cnt, RepeatDirection d, RepeatLayout l, bool OuterTableImplied, bool hdr, bool ftr, bool sep)
-               {
-                       HtmlTextWriter htw = GetWriter ();
-                       RepeatInfo ri = new RepeatInfo ();
-                       ri.RepeatColumns = cols;
-                       ri.RepeatDirection = d;
-                       ri.RepeatLayout = l;
-                       ri.OuterTableImplied = OuterTableImplied;
-                       Style s = new Style ();
-                       if (cols != 3)
-                               s.CssClass = ""mainstyle"";
-
-                       ri.RenderRepeater (htw, new RepeatInfoUser (hdr, ftr, sep, cnt), s, new DataList ());
-                       return htw.InnerWriter.ToString ();
-               }
-
-
-               public bool HasFooter {
-                       get { return footer; }
-               }
-
-               public bool HasHeader {
-                       get { return header; }
-               }
-               
-               public bool HasSeparators {
-                       get { return separators; }
-               }
-
-               public int RepeatedItemCount {
-                       get { return count; }
-               }
-
-               public Style GetItemStyle (ListItemType itemType, int repeatIndex)
-               {
-                       Style s = new Style ();
-                       s.CssClass = String.Format (""{0}{1}"", itemType, repeatIndex);
-                       return s;
-               }
-
-               public void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
-               {
-                       writer.Write (""({0},{1},{2})"", counter++, itemType, repeatIndex);
-               }
-       }");
-               
-               
+namespace MonoTests.System.Web.UI.WebControls {{
+[TestFixture]
+public class RepeatInfo_Autogen {{
+", isMono ? "Mono" : "Microsoft .NET", Environment.Version);           
                int num = 0;
                int [][] combos = {
                        new int [] {0, 0},
@@ -241,31 +125,46 @@ public class RepeatInfo_Autogen {
                        new int [] {3, 9},
                        new int [] {3, 7}
                };
-               
-               
-               for (int i = 0; i < (1 << 6); i ++) {
-                       RepeatDirection d = (RepeatDirection) (i & (1 << 0));
-                       RepeatLayout l    = (RepeatLayout)    ((i & (1 << 1)) >> 1);
-                       bool oti          =                   (i & (1 << 2)) == 0;
-                       bool hdr          =                   (i & (1 << 3)) == 0;
-                       bool ftr          =                   (i & (1 << 4)) == 0;
-                       bool sep          =                   (i & (1 << 5)) == 0;
+#if NET_4_0
+               int ntests = 1 << 7;
+               int lcount = -1;
+#else
+               int ntests = 1 << 6;
+#endif
+               RepeatDirection d;
+               RepeatLayout l;
+               bool oti, hdr, ftr, sep;
+               StringBuilder sb = new StringBuilder ();
+
+               for (int i = 0; i < ntests; i ++) {
+                       d = (RepeatDirection) (i & (1 << 0));
+#if NET_4_0
+                       if ((i % 2) == 0)
+                               lcount++;
+                       l = (RepeatLayout) (lcount % 4);
+#else
+                       l = (RepeatLayout) ((i & (1 << 1)) >> 1);
+#endif
+                       oti = (i & (1 << 3)) == 0;
+                       hdr = (i & (1 << 4)) == 0;
+                       ftr = (i & (1 << 5)) == 0;
+                       sep = (i & (1 << 6)) == 0;
 
                        foreach (int [] col_cnt in combos) {
                                string nm = String.Format ("RepeatInfo_{0}cols_{1}itms_{2}_{3}{4}{5}{6}{7}",
                                                col_cnt [0],
                                                col_cnt [1],
                                                d == RepeatDirection.Vertical ? "vert" : "horiz",
-                                               l == RepeatLayout.Flow ? "flow" : "tbl",
-                                               oti ? "_otrtblimp" : "",
-                                               hdr ? "_hdr" : "",
-                                               ftr ? "_ftr" : "",
-                                               sep ? "_sep" : "");
-                               Console.WriteLine (@"
-       [Test]
+                                               GetLayoutName (l),
+                                               oti ? "_otrtblimp" : String.Empty,
+                                               hdr ? "_hdr" : String.Empty,
+                                               ftr ? "_ftr" : String.Empty,
+                                               sep ? "_sep" : String.Empty);
+                               sb.Length = 0;
+                               sb.AppendFormat (@"
        public void {0} ()
        {{
-               // cols              : {1}
+               // cols              : {1}
                // cnt               : {2}
                // RepeatDirection   : {3}
                // RepeatLayout      : {4}
@@ -284,25 +183,13 @@ public class RepeatInfo_Autogen {
                                                ftr,
                                                sep
                                        );
-                               string exp = RepeatInfoUser.DoTest (col_cnt [0], col_cnt [1], d, l, oti, hdr, ftr, sep).Replace (@"""", @"""""");
-                               Console.WriteLine (@"
-               string v = RepeatInfoUser.DoTest ({0}, {1}, RepeatDirection.{2}, RepeatLayout.{3}, {4}, {5}, {6}, {7});
-               string exp = @""{8}"";
-               Assert.AreEqual (exp, v, ""#{9}"");
-       }}
-",
-                                               
-                                               col_cnt [0],
-                                               col_cnt [1],
-                                               d,
-                                               l,
-                                               oti ? "true" : "false",
-                                               hdr ? "true" : "false",
-                                               ftr ? "true" : "false",
-                                               sep ? "true" : "false",
-                                               exp,
-                                               num ++
-                                       );
+                               try {
+                                       string exp = RepeatInfoUser.DoTest (col_cnt [0], col_cnt [1], d, l, oti, hdr, ftr, sep).Replace (@"""", @"""""");
+                                       BuildTestCode (sb, null, col_cnt [0], col_cnt [1], d, l, oti, hdr, ftr, sep, exp, num++);
+                               } catch (Exception ex) {
+                                       BuildTestCode (sb, ex, col_cnt [0], col_cnt [1], d, l, oti, hdr, ftr, sep, null, num++);
+                               }
+                               Console.WriteLine (sb.ToString ());
                        }
                }
                Console.WriteLine (@"
@@ -310,4 +197,37 @@ public class RepeatInfo_Autogen {
 }
 #endif");
        }
+
+       static void BuildTestCode (StringBuilder sb, Exception ex, int cols, int cnt, RepeatDirection d, RepeatLayout l, bool oti, bool hdr, bool ftr, bool sep, string exp, int num)
+       {
+               if (ex == null) {
+                       sb.Insert (0, "\t[Test]");
+               } else {
+                       sb.Insert (0, String.Format ("\t[ExpectedException (typeof (global::{0}))]", ex.GetType ().FullName));
+                       sb.Insert (0, "\t[Test]\n");
+               }
+
+               sb.AppendFormat (@"
+               string v = global::MonoTests.Helpers.RepeatInfoUser.DoTest ({0}, {1}, RepeatDirection.{2}, RepeatLayout.{3}, {4}, {5}, {6}, {7});
+",
+                       cols,
+                       cnt,
+                       d,
+                       l,
+                       oti ? "true" : "false",
+                       hdr ? "true" : "false",
+                       ftr ? "true" : "false",
+                       sep ? "true" : "false");
+               if (ex == null) {
+                       sb.AppendFormat (@"             string exp = @""{0}"";
+               Assert.AreEqual (exp, v, ""#{1}"");
+       }}
+", exp, num);
+               } else {
+                       sb.AppendFormat (@"
+               // Exception: {0} (""{1}"")
+       }}
+", ex.GetType ().FullName, ex.Message);
+               }
+       }
 }
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoUser.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoUser.cs
new file mode 100644 (file)
index 0000000..b5c5aa0
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Authors:
+//     Ben Maurer <bmaurer@novell.com>
+//
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.IO;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace MonoTests.Helpers
+{
+       public class RepeatInfoUser : IRepeatInfoUser
+       {
+               bool footer;
+               bool header;
+               bool separators;
+               int count;
+               int counter;
+
+               public RepeatInfoUser (bool header, bool footer, bool separators, int count)
+               {
+                       this.footer = footer;
+                       this.header = header;
+                       this.separators = separators;
+                       this.count = count;
+               }
+
+               static HtmlTextWriter GetWriter ()
+               {
+                       StringWriter sw = new StringWriter ();
+                       sw.NewLine = "\n";
+                       return new HtmlTextWriter (sw);
+               }
+
+               public static string DoTest (int cols, int cnt, RepeatDirection d, RepeatLayout l, bool OuterTableImplied, bool hdr, bool ftr, bool sep)
+               {
+                       HtmlTextWriter htw = GetWriter ();
+                       RepeatInfo ri = new RepeatInfo ();
+                       ri.RepeatColumns = cols;
+                       ri.RepeatDirection = d;
+                       ri.RepeatLayout = l;
+                       ri.OuterTableImplied = OuterTableImplied;
+                       // get some variation in if we use style or not
+                       Style s = new Style ();
+                       if (cols != 3)
+                               s.CssClass = "mainstyle";
+                       
+                       ri.RenderRepeater (htw, new RepeatInfoUser (hdr, ftr, sep, cnt), s, new DataList ());
+                       return htw.InnerWriter.ToString ();
+               }
+
+
+               public bool HasFooter {
+                       get { return footer; }
+               }
+
+               public bool HasHeader {
+                       get { return header; }
+               }
+               
+               public bool HasSeparators {
+                       get { return separators; }
+               }
+
+               public int RepeatedItemCount {
+                       get { return count; }
+               }
+
+               public Style GetItemStyle (ListItemType itemType, int repeatIndex)
+               {
+                       Style s = new Style ();
+                       s.CssClass = String.Format ("{0}{1}", itemType, repeatIndex);
+                       return s;
+               }
+
+               public void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
+               {
+                       writer.Write ("({0},{1},{2})", counter++, itemType, repeatIndex);
+               }
+       }
+}
index 1456437da92edec807ba10c2c8b10c2226532b96..4e3bec0e7a06e7d77efafb3a991b627be7eb4117 100644 (file)
@@ -241,6 +241,7 @@ namespace MonoTests.System.Web.UI.WebControls {
 
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
+               [Ignore ("Pending more investigation (see FIXME at the top of TreeView.RenderNode)")]
                public void PopulateOnDemand_With_ChildNodes ()
                {
                        WebTest t = new WebTest (PageInvoker.CreateOnLoad (PopulateOnDemand_With_ChildNodes_OnLoad));
index 74a79b3d81374f9ae7d2e20a7dbd42fdf2876bc9..73d93254befe99a6c4caa8c8ea623752fc460e21 100644 (file)
@@ -38,6 +38,8 @@ using System.IO;
 using System.Threading;
 using System.Globalization;
 
+using MonoTests.Common;
+
 namespace MonoTests.System.Web {
 
        [TestFixture]
@@ -204,9 +206,38 @@ namespace MonoTests.System.Web {
                        Assert.AreEqual (Path.Combine (appBase, "DIR" + Path.DirectorySeparatorChar + "Web.config"),
                                r.MapPath ("Web.config", "~/DIR", false), "test11");
                }
-       }
        
+               [Test]
+               [Category ("NunitWeb")]
+               [ExpectedException (typeof (ArgumentException))]
+               public void Test_MapPath_InvalidBase_1 ()
+               {
+                       WebTest t = new WebTest (new HandlerInvoker (new HandlerDelegate (
+                               MapPathDelegate_InvalidBase_1)));
+                       t.Run ();
+               }
+
+               static public void MapPathDelegate_InvalidBase_1 ()
+               {
+                       HttpContext.Current.Request.MapPath ("Web.config", "something", true);
+               }
 
+               [Test]
+               [Category ("NunitWeb")]
+               [ExpectedException (typeof (ArgumentException))]
+               public void Test_MapPath_InvalidBase_2 ()
+               {
+                       WebTest t = new WebTest (new HandlerInvoker (new HandlerDelegate (
+                               MapPathDelegate_InvalidBase_2)));
+                       t.Run ();
+               }
+
+               static public void MapPathDelegate_InvalidBase_2 ()
+               {
+                       HttpContext.Current.Request.MapPath ("Web.config", "something", false);
+               }
+       }
+       
        [TestFixture]
        public class Test_HttpFakeRequest {
                class FakeHttpWorkerRequest : HttpWorkerRequest {
@@ -506,8 +537,8 @@ namespace MonoTests.System.Web {
                }
                
                [Test] 
-        [Category ("NotWorking")]
-        public void Test_RequestFields ()
+       [Category ("NotWorking")]
+       public void Test_RequestFields ()
                {
                        HttpContext c = Cook (1);
 
index 0188aea855a76780f4e80c28ee2bb61016c10457..0dea47886783990dbfa60259c2fce561618b3696 100644 (file)
@@ -36,7 +36,9 @@ namespace TestMonoWeb
                        // Just for testing..
                        Thread.Sleep(100);
                        _completed = true;
-                       _callback(this);
+                       try {
+                               _callback(this);
+                       } catch {}
                }
        }
 }
index 2465a7976d5e7433c4215256e370e2d61272fc64..0b1254fa5ea893be677c4e74d039c91de9eef0ef 100644 (file)
@@ -35,7 +35,11 @@ namespace MonoTests.SystemWeb.Framework
                {
                        _done = new AutoResetEvent (false);
                        _doNext = new AutoResetEvent (false);
-                       ThreadPool.QueueUserWorkItem (new WaitCallback (AsyncRun), null);
+                       ThreadPool.QueueUserWorkItem (new WaitCallback (param => {
+                               try {
+                                       AsyncRun (param);
+                               } catch {}
+                               }), null);
                }
 
                public AppDomain AppDomain
index 8710166855d955c27eb078ebbf473ac9a50a6b4e..37183fe91c3e9acbe84742de8743989b47cffd85 100644 (file)
@@ -155,7 +155,8 @@ namespace StandAloneRunnerSupport
                                                        formValues = ExtractFormAndHiddenControls (previousResponse);
                                                else
                                                        formValues = null;
-                                               
+
+                                               SetRunnerDomainData (tri.AppDomainData, runner.Domain);
                                                response = runner.Run (tri.Url, tri.PathInfo, tri.PostValues, formValues);
                                                if (tri.Callback == null)
                                                        continue;
@@ -195,6 +196,25 @@ namespace StandAloneRunnerSupport
                        }
                }
 
+               void SetRunnerDomainData (object[] data, AppDomain domain)
+               {
+                       int len = data != null ? data.Length : 0;
+                       if (len == 0)
+                               return;
+
+                       if (len % 2 != 0)
+                               throw new ArgumentException ("Must have an even number of elements.", "data");
+
+                       string name;
+                       for (int i = 0; i < len; i += 2) {
+                               name = data [i] as string;
+                               if (String.IsNullOrEmpty (name))
+                                       throw new InvalidOperationException (String.Format ("Name at index {0} must not be null or empty.", i));
+
+                               domain.SetData (name, data [i + 1]);
+                       }
+               }
+               
                string[] ExtractFormAndHiddenControls (Response response)
                 {
                         HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument ();
index a4c3957532081f79ef76dde88e9a1a165945f2db..8c7e1549abdb6b872dcb97f1925f6db895358c2c 100644 (file)
@@ -73,7 +73,15 @@ namespace StandAloneRunnerSupport
                public bool Redirected {
                        get; set;
                }
-               
+#if BUG_IN_THE_RUNTIME_IS_FIXED
+               public SerializedDictionary <string, object> AppDomainData {
+                       get; set;
+               }
+#else
+               public object[] AppDomainData {
+                       get; set;
+               }
+#endif         
                public TestRunItem ()
                : this (null, null, null)
                {}
diff --git a/mcs/class/System.Web/Test/standalone-tests/ChildrenAsProperties.cs b/mcs/class/System.Web/Test/standalone-tests/ChildrenAsProperties.cs
new file mode 100644 (file)
index 0000000..f8da7e0
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// Authors:
+//   Marek Habersack (mhabersack@novell.com)
+//
+// (C) 2010 Novell, Inc http://novell.com/
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Web.Util;
+
+using StandAloneRunnerSupport;
+using StandAloneTests;
+
+using NUnit.Framework;
+
+namespace StandAloneTests.ChildrenAsProperties
+{
+       [TestCase ("ChildrenAsProperties", "PagesSection.ChildrenAsProperties")]
+       public sealed class Test_01 : ITestCase
+       {
+               public string PhysicalPath {
+                       get { return Path.Combine (Consts.BasePhysicalDir, "ChildrenAsProperties"); }
+               }
+               
+               public string VirtualPath  {
+                       get { return "/"; }
+               }
+
+               public bool SetUp (List <TestRunItem> runItems)
+               {
+                       runItems.Add (new TestRunItem ("default.aspx", Default_Aspx));
+                       return true;
+               }
+               
+               void Default_Aspx (string result, TestRunItem runItem)
+               {
+                       string originalHtml = "<div>12345snap test snap</div>\n<div>123454444</div>\n";
+                       Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
+               }
+       }
+}
diff --git a/mcs/class/System.Web/Test/standalone-tests/PageParserDefaultTypeProperties.cs b/mcs/class/System.Web/Test/standalone-tests/PageParserDefaultTypeProperties.cs
new file mode 100644 (file)
index 0000000..ff26c31
--- /dev/null
@@ -0,0 +1,127 @@
+//
+// Authors:
+//   Marek Habersack (mhabersack@novell.com)
+//
+// (C) 2010 Novell, Inc http://novell.com/
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Configuration.Provider;
+using System.IO;
+using System.Web;
+using System.Web.Hosting;
+
+using StandAloneRunnerSupport;
+using StandAloneTests;
+
+using NUnit.Framework;
+
+namespace StandAloneTests.PageParserDefaultTypeProperties
+{
+       [TestCase ("PageParserDefaultTypeProperties 01", "Tests for PageParser.Default*Type properties")]
+       public sealed class PageParserDefaultTypeProperties_01 : ITestCase
+       {
+               static string[] expectedMessages_1 = {
+                       "1: DefaultApplicationBaseType: set",
+                       "1: DefaultPageBaseType: set",
+                       "1: DefaultPageParserFilterType: set",
+                       "1: DefaultUserControlBaseType: set"
+               };
+
+               static string[] expectedMessages_2 = {
+                       "2: DefaultApplicationBaseType: exception 'System.ArgumentException' thrown.",
+                       "2: DefaultPageBaseType: exception 'System.ArgumentException' thrown.",
+                       "2: DefaultPageParserFilterType: exception 'System.ArgumentException' thrown.",
+                       "2: DefaultUserControlBaseType: exception 'System.ArgumentException' thrown."
+               };
+
+               static string[] expectedMessages_3 = {
+                       "3: DefaultApplicationBaseType: set",
+                       "3: DefaultPageBaseType: set",
+                       "3: DefaultPageParserFilterType: set",
+                       "3: DefaultUserControlBaseType: set"
+               };
+               
+               public string PhysicalPath {
+                       get {
+                               return Path.Combine (Consts.BasePhysicalDir, "PageParserDefaultTypeProperties");
+                       }
+               }
+               
+               public string VirtualPath  {
+                       get { return "/"; }
+               }
+
+               public bool SetUp (List <TestRunItem> runItems)
+               {
+                       runItems.Add (
+                               new TestRunItem ("/default.aspx", "Set correct values", Default_Aspx_1) {
+                                       AppDomainData = new object[] { "TestNumber", 1 }
+                               }
+                       );
+                       runItems.Add (
+                               new TestRunItem ("/default.aspx", "Set invalid values", Default_Aspx_2) {
+                                       AppDomainData = new object[] { "TestNumber", 2 }
+                               }
+                       );
+                       runItems.Add (
+                               new TestRunItem ("/default.aspx", "Set null values", Default_Aspx_3) {
+                                       AppDomainData = new object[] { "TestNumber", 3 }
+                               }
+                       );
+                       
+                       return true;
+               }
+
+               void Default_Aspx_1 (string result, TestRunItem runItem)
+               {
+                       CheckResults (runItem.TestRunData as List <string>, expectedMessages_1);
+               }
+
+               void Default_Aspx_2 (string result, TestRunItem runItem)
+               {
+                       CheckResults (runItem.TestRunData as List <string>, expectedMessages_2);
+               }
+
+               void Default_Aspx_3 (string result, TestRunItem runItem)
+               {
+                       CheckResults (runItem.TestRunData as List <string>, expectedMessages_3);
+               }
+               
+               void CheckResults (List <string> messages, string[] expectedMessages)
+               {
+                       Assert.IsNotNull (messages, "#A1");
+
+                       int len = messages.Count;
+                       if (expectedMessages.Length != len)
+                               Assert.Fail ("Expected {0} messages, found {1}", expectedMessages.Length, len);
+                       
+                       for (int i = 0; i < len; i++)
+                               Assert.AreEqual (expectedMessages [i], messages [i], "#A2-" + i.ToString ());
+               }
+       }
+}
+#endif
\ No newline at end of file
index a59ab4edd056da9dc9add1ec3c64445ee9768e91..bc150d8aae7b5570ba3f2a4bd23fc64b4d66aadb 100644 (file)
@@ -76,12 +76,11 @@ namespace StandAloneTests.RegisterBuildProvider
                        Assert.IsNotNull (messages, "#A1");
 
                        int len = messages.Count;
-                       int i = 0;
-                       for (; i < len; i++)
+                       if (expectedMessages.Length != len)
+                               Assert.Fail ("Expected {0} messages, found {1}", expectedMessages.Length, len);
+                       
+                       for (int i = 0; i < len; i++)
                                Assert.AreEqual (expectedMessages [i], messages [i], "#A2-" + i.ToString ());
-
-                       if (i != len)
-                               Assert.Fail ("Expected {0} messages, found {1}", i, len);
                }
        }
 }
diff --git a/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/default.aspx b/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/default.aspx
new file mode 100644 (file)
index 0000000..57d8527
--- /dev/null
@@ -0,0 +1,21 @@
+<%@ Page Language="C#" CodeFile="default.aspx.cs" Inherits="testwebemailcontrols.Default" %>
+
+<%@ Register Src="test.ascx" TagName="test" TagPrefix="tester"  %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head runat="server">
+       <title>Default</title>
+</head>
+<body>
+       <form id="form1" runat="server">
+       <!--START--><%= AppDomain.CurrentDomain.GetData ("BEGIN_CODE_MARKER") %><tester:test id="testertest" runat="server" stringSlam="string">
+               <slam State="4444" Text="snap test snap"></slam>
+               <stringBuilderSlam Length="0"/>
+               <dateTimeSlam/>
+               <intSlam/>
+       </tester:test><%= AppDomain.CurrentDomain.GetData ("END_CODE_MARKER") %><!--END-->
+               <asp:Button id="button1" runat="server" Text="Click me!" OnClick="button1Clicked" />
+       </form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/default.aspx.cs b/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/default.aspx.cs
new file mode 100644 (file)
index 0000000..2101ba0
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+using System.Web;
+using System.Web.UI;
+
+namespace testwebemailcontrols
+{
+       public partial class Default : System.Web.UI.Page
+       {
+               public virtual void button1Clicked (object sender, EventArgs args)
+               {
+                       button1.Text = "You clicked me";
+               }
+       }
+}
diff --git a/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/test.ascx b/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/test.ascx
new file mode 100644 (file)
index 0000000..e35d483
--- /dev/null
@@ -0,0 +1,3 @@
+<%@ Control Language="C#" CodeFile="test.ascx.cs" Inherits="testwebemailcontrols.test" %>
+<div>12345<%= slam.Text %></div>
+<div>12345<%= slam.State %></div>
diff --git a/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/test.ascx.cs b/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/test.ascx.cs
new file mode 100644 (file)
index 0000000..7628ea4
--- /dev/null
@@ -0,0 +1,65 @@
+
+using System;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.ComponentModel;
+
+namespace testwebemailcontrols
+{
+       public partial class test : System.Web.UI.UserControl
+       {
+        private ctlItem _slam;
+        StringBuilder _stringBuilderSlam;
+        string _stringSlam;
+        int _intSlam;
+        DateTime _dateTimeSlam;
+        
+        [PersistenceModeAttribute(PersistenceMode.InnerProperty)]
+        public ctlItem slam
+        {
+            get { return _slam; }
+            set { _slam = value; }
+        }
+
+       public StringBuilder stringBuilderSlam {
+           get { return _stringBuilderSlam; }
+           set { _stringBuilderSlam = value; }
+       }
+    
+       public string stringSlam {
+           get { return _stringSlam; }
+           set { _stringSlam = value; }
+       }
+       
+       public int intSlam {
+           get { return _intSlam; }
+           set { _intSlam = value; }
+       }
+
+       public DateTime dateTimeSlam {
+           get { return _dateTimeSlam; }
+           set { _dateTimeSlam = value; }
+       }
+       
+        public class ctlItem
+        {
+            string _Text = "123";
+            string _state = "345";
+
+            public string State
+            {
+                get { return _state; }
+                set { _state = value; }
+            }
+
+            [PersistenceMode(PersistenceMode.InnerDefaultProperty)]
+            public string Text
+            {
+                get { return _Text; }
+                set { _Text = value; }
+            }
+        }
+       }
+}
+
diff --git a/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/web.config b/mcs/class/System.Web/Test/standalone/ChildrenAsProperties/web.config
new file mode 100644 (file)
index 0000000..fb0e1b7
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+       <system.web>
+               <compilation debug="true" />
+               <customErrors mode="RemoteOnly" />
+       </system.web>
+</configuration>
\ No newline at end of file
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Makefile b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Makefile
new file mode 100644 (file)
index 0000000..34938ef
--- /dev/null
@@ -0,0 +1,32 @@
+thisdir = class/System.Web/Test/standalone/PageParserDefaultTypeProperties
+include ../../../../../build/rules.make
+
+APPLICATION_ASSEMBLY = bin/test.dll
+
+APPLICATION_ASSEMBLY_SOURCES = \
+       default.aspx.cs \
+       default.aspx.designer.cs \
+       Properties/AssemblyInfo.cs \
+       PreStartMethods.cs
+
+APPLICATION_ASSEMBLY_MCS_FLAGS = \
+       -debug:full \
+       -r:System.Web.dll
+
+VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+
+ifndef VALID_PROFILE
+all:
+else
+all: $(EXTERNAL_ASSEMBLY) $(APPLICATION_ASSEMBLY)
+
+$(APPLICATION_ASSEMBLY): bin/.stamp $(APPLICATION_ASSEMBLY_SOURCES)
+       $(CSCOMPILE) $(APPLICATION_ASSEMBLY_MCS_FLAGS) $(APPLICATION_ASSEMBLY_SOURCES) -target:library -out:$(APPLICATION_ASSEMBLY)
+
+bin/.stamp:
+       install -d -m 755 bin/
+       touch bin/.stamp
+endif
+
+clean:
+       rm -rf bin/
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/PreStartMethods.cs b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/PreStartMethods.cs
new file mode 100644 (file)
index 0000000..caaee91
--- /dev/null
@@ -0,0 +1,164 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Configuration;
+using System.Web.UI;
+
+namespace PageParserDefaultTypeProperties
+{
+       public class MyHttpApplication : HttpApplication
+       { }
+
+       public class MyPage : Page
+       {}
+
+       public class MyPageParserFilter : PageParserFilter
+       {
+               public override bool AllowBaseType (Type baseType)
+               {
+                       return true;
+               }
+
+               public override bool AllowCode {
+                       get {
+                               return true;
+                       }
+               }
+
+               public override bool AllowControl (Type controlType, ControlBuilder builder)
+               {
+                       return true;
+               }
+
+               public override bool AllowServerSideInclude (string includeVirtualPath)
+               {
+                       return true;
+               }
+
+               public override bool AllowVirtualReference (string referenceVirtualPath, VirtualReferenceType referenceType)
+               {
+                       return true;
+               }
+
+               public override CompilationMode GetCompilationMode (CompilationMode current)
+               {
+                       return current;
+               }
+
+               public override int NumberOfControlsAllowed {
+                       get {
+                               return 1000;
+                       }
+               }
+
+               public override int NumberOfDirectDependenciesAllowed {
+                       get {
+                               return 1000;
+                       }
+               }
+
+               public override int TotalNumberOfDependenciesAllowed {
+                       get {
+                               return 1000;
+                       }
+               }
+       }
+
+       public class MyUserControl : UserControl
+       { }
+
+       public class PreStartMethods
+       {
+               static readonly Dictionary <int, List <Type>> tests = new Dictionary<int, List<Type>> {
+                       {1, new List <Type> { typeof (MyHttpApplication), typeof (MyPage), typeof (MyPageParserFilter), typeof (MyUserControl)}},
+                       {2, new List <Type> { typeof (string), typeof (string), typeof (string), typeof (string)}},
+                       {3, new List <Type> { null, null, null, null}}
+               };
+
+               static int currentTestNumber;
+               
+               public static List<string> Info {
+                       get;
+                       private set;
+               }
+
+               static PreStartMethods ()
+               {
+                       Info = new List<string> ();
+                       AppDomain.CurrentDomain.SetData ("TestRunData", Info);
+               }
+
+               static bool DetermineTestNumber ()
+               {
+                       object o = AppDomain.CurrentDomain.GetData ("TestNumber");
+                       if (o == null || !(o is int)) {
+#if DEBUG
+                               currentTestNumber = 2;
+                               return true;
+#else
+                               return false;
+#endif
+                       }
+
+                       currentTestNumber = (int) o;
+                       return true;
+               }
+               public static void PreStartMethod ()
+               {
+                       currentTestNumber = -1;
+                       if (!DetermineTestNumber ()) {
+                               Log ("PreStartMethod: test number cannot be determined.");
+                               return;
+                       }
+
+                       List <Type> data;
+                       if (tests.TryGetValue (currentTestNumber, out data))
+                               AssignValues (data);
+                       else
+                               Log ("PreStartMethod: unknown test number {0}", currentTestNumber);
+               }
+
+               static void AssignValues (List <Type> types)
+               {
+                       try {
+                               PageParser.DefaultApplicationBaseType = types [0];
+                               Log ("DefaultApplicationBaseType: set");
+                       } catch (Exception ex) {
+                               Log ("DefaultApplicationBaseType: exception '{0}' thrown.", ex.GetType ());
+                       }
+
+                       try {
+                               PageParser.DefaultPageBaseType = types [1];
+                               Log ("DefaultPageBaseType: set");
+                       } catch (Exception ex) {
+                               Log ("DefaultPageBaseType: exception '{0}' thrown.", ex.GetType ());
+                       }
+
+                       try {
+                               PageParser.DefaultPageParserFilterType= types [2];
+                               Log ("DefaultPageParserFilterType: set");
+                       } catch (Exception ex) {
+                               Log ("DefaultPageParserFilterType: exception '{0}' thrown.", ex.GetType ());
+                       }
+
+                       try {
+                               PageParser.DefaultUserControlBaseType = types [3];
+                               Log ("DefaultUserControlBaseType: set");
+                       } catch (Exception ex) {
+                               Log ("DefaultUserControlBaseType: exception '{0}' thrown.", ex.GetType ());
+                       }
+               }
+
+               static void Log (string format, params object [] parms)
+               {
+                       string formatted;
+                       if (parms != null && parms.Length > 0)
+                               formatted = String.Format (format, parms);
+                       else
+                               formatted = format;
+                       
+                       Info.Add (String.Format ("{0}: {1}", currentTestNumber, formatted));
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Properties/AssemblyInfo.cs b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..a2a3754
--- /dev/null
@@ -0,0 +1,38 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Web;
+
+[assembly: PreApplicationStartMethod (typeof (PageParserDefaultTypeProperties.PreStartMethods), "PreStartMethod")]
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle ("PageParserDefaultTypeProperties")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("PageParserDefaultTypeProperties")]
+[assembly: AssemblyCopyright ("Copyright Â©  2010")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible (false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid ("1ea18be1-779b-4ae0-ba4a-44eceaf8d7d0")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyFileVersion ("1.0.0.0")]
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Web.config b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Web.config
new file mode 100644 (file)
index 0000000..104b906
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<configuration>
+       <system.web>
+               <compilation debug="true" targetFramework="4.0" />
+       </system.web>
+</configuration>
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx
new file mode 100644 (file)
index 0000000..bf672aa
--- /dev/null
@@ -0,0 +1,14 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="PageParserDefaultTypeProperties._default" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+    <title></title>
+</head>
+<body>
+    <form id="form1" runat="server">
+    <pre runat="server" id="log" />
+    </form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx.cs b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx.cs
new file mode 100644 (file)
index 0000000..ef1a13a
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace PageParserDefaultTypeProperties
+{
+       public partial class _default : MyPage
+       {
+               protected void Page_Load (object sender, EventArgs e)
+               {
+                       var sb = new StringBuilder ();
+                       foreach (string s in PreStartMethods.Info)
+                               sb.AppendLine (s);
+
+                       log.InnerText = sb.ToString ();
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx.designer.cs b/mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/default.aspx.designer.cs
new file mode 100644 (file)
index 0000000..d2928c9
--- /dev/null
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated. 
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace PageParserDefaultTypeProperties {
+    
+    
+    public partial class _default {
+        
+        /// <summary>
+        /// form1 control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+        
+        /// <summary>
+        /// log control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlGenericControl log;
+    }
+}
index 39cab2f3639a5e400bf08735ea3ae6770ee2cc9b..3606f834cdcb8dfbbb1aae61fb63e35038672329 100644 (file)
@@ -146,7 +146,7 @@ webForm.WebForm_DoPostBackWithOptions = function  (options) {
 
 webForm.WebForm_DoCallback = function (id, arg, callback, ctx, errorCallback, useAsync)
 {
-       var qs = webForm.__theFormPostData + "__CALLBACKTARGET=" + id + "&__CALLBACKARGUMENT=" + encodeURIComponent(arg);
+       var qs = webForm.__theFormPostData + "__CALLBACKID=" + id + "&__CALLBACKPARAM=" + encodeURIComponent(arg);
 
        if (webForm._form["__EVENTVALIDATION"])
                qs += "&__EVENTVALIDATION=" + encodeURIComponent(webForm._form["__EVENTVALIDATION"].value);
index 7cc29aad08e88ce030607649280808ad3111b09a..a45267757f14264f3df7c6f279d091bcf9c532e3 100644 (file)
@@ -241,7 +241,7 @@ namespace Mono.Xml.Xsl
                        if (o is XPathNodeIterator)
                                return GetDocument ((iter.NamespaceManager as XsltCompiledContext), (XPathNodeIterator)o, baseUri);
                        else
-                               return GetDocument ((iter.NamespaceManager as XsltCompiledContext), o is IFormattable ? ((IFormattable) o).ToString (null, CultureInfo.InvariantCulture) : o.ToString (), baseUri);
+                               return GetDocument ((iter.NamespaceManager as XsltCompiledContext), o is IFormattable ? ((IFormattable) o).ToString (null, CultureInfo.InvariantCulture) : (o != null ? o.ToString () : null), baseUri);
                }
                
                static string VoidBaseUriFlag = "&^)(*&%*^$&$VOID!BASE!URI!";
index e0bfd505886ea366c446a6920dac0a1667ec50b4..710e9ed7d4a10cf0fead77f81fcb2edd2c26c903 100644 (file)
@@ -141,7 +141,7 @@ namespace System.Xml
                        if (index < 0 && !considerDefaultNamespace)
                                return new XmlQualifiedName (name);
                        string ns = reader.LookupNamespace (index < 0 ? String.Empty : name.Substring (0, index));
-                       if (ns == null)
+                       if (ns == null && index > 0)
                                throw new ArgumentException ("Invalid qualified name.");
                        return new XmlQualifiedName (index < 0 ? name : name.Substring (index + 1), ns);
                }
index bf36030b03bfda5ab3bbf73cfe37c9fd70f7e11c..88176709af2271f8f7f9b2eff8cf17bcef380178 100644 (file)
@@ -963,7 +963,7 @@ namespace System.Xml
                {
                        bool isEmpty = IsEmptyElement;
                        ReadStartElement ();
-                       object obj = ValueAs (isEmpty ? String.Empty : ReadContentString (false), type, resolver);
+                       object obj = ValueAs (isEmpty ? String.Empty : ReadContentString (false), type, resolver, false);
                        if (!isEmpty)
                                ReadEndElement ();
                        return obj;
@@ -971,7 +971,10 @@ namespace System.Xml
 
                public virtual object ReadElementContentAs (Type type, IXmlNamespaceResolver resolver, string localName, string namespaceURI)
                {
+                       bool isEmpty = IsEmptyElement;
                        ReadStartElement (localName, namespaceURI);
+                       if (isEmpty)
+                               return ValueAs (String.Empty, type, resolver, false);
                        object obj = ReadContentAs (type, resolver);
                        ReadEndElement ();
                        return obj;
@@ -979,20 +982,33 @@ namespace System.Xml
 
                public virtual object ReadContentAs (Type type, IXmlNamespaceResolver resolver)
                {
-                       return ValueAs (ReadContentString (), type, resolver);
+                       return ValueAs (ReadContentString (), type, resolver, false);
                }
 
-               private object ValueAs (string text, Type type, IXmlNamespaceResolver resolver)
+               private object ValueAs (string text, Type type, IXmlNamespaceResolver resolver, bool isArrayItem)
                {
                        try {
                                if (type == typeof (object))
                                        return text;
+                               if (type.IsArray && !isArrayItem) {
+                                       var elemType = type.GetElementType ();
+                                       var sarr = text.Split ((string []) null, StringSplitOptions.RemoveEmptyEntries);
+                                       var ret = Array.CreateInstance (elemType, sarr.Length);
+                                       for (int i = 0; i < ret.Length; i++)
+                                               ret.SetValue (ValueAs (sarr [i], elemType, resolver, true), i);
+                                       return ret;
+                               }
+
                                if (type == typeof (XmlQualifiedName)) {
                                        if (resolver != null)
                                                return XmlQualifiedName.Parse (text, resolver, true);
                                        else
                                                return XmlQualifiedName.Parse (text, this, true);
                                }
+                               if (type == typeof (Uri))
+                                       return XmlConvert.ToUri (text);
+                               if (type == typeof (TimeSpan))
+                                       return XmlConvert.ToTimeSpan (text);
                                if (type == typeof (DateTimeOffset))
                                        return XmlConvert.ToDateTimeOffset (text);
 
old mode 100644 (file)
new mode 100755 (executable)
index b546811..066e762
@@ -390,12 +390,16 @@ namespace System.Xml
                                ns = String.Empty;
 
 #if NET_2_0
-                       switch (Settings.ConformanceLevel) {
-                       case ConformanceLevel.Document:
-                       case ConformanceLevel.Fragment:
-                               XmlConvert.VerifyNCName (localName);
-                               break;
+                       if (Settings != null) {
+                               switch (Settings.ConformanceLevel) {
+                               case ConformanceLevel.Document:
+                               case ConformanceLevel.Fragment:
+                                       XmlConvert.VerifyNCName (localName);
+                                       break;
+                               }
                        }
+                       else
+                               XmlConvert.VerifyNCName (localName);
 #else
                        XmlConvert.VerifyNCName (localName);
 #endif
@@ -676,6 +680,8 @@ namespace System.Xml
                                WriteValue ((float) value);
                        else if (value is TimeSpan) // undocumented
                                WriteString (XmlConvert.ToString ((TimeSpan) value));
+                       else if (value is Uri)
+                               WriteString (((Uri) value).ToString ());
                        else if (value is XmlQualifiedName) {
                                XmlQualifiedName qname = (XmlQualifiedName) value;
                                if (!qname.Equals (XmlQualifiedName.Empty)) {
index 1f6ee9bb39a8fc5c061b77b491600d4c0cd7290b..68577e16198226e4b0878e188df46de13cb214ff 100644 (file)
@@ -2218,6 +2218,24 @@ namespace MonoTests.System.Xml
                        var q = (XmlQualifiedName) xr.ReadElementContentAs (typeof (XmlQualifiedName), xr as IXmlNamespaceResolver);\r
                        Assert.AreEqual ("urn:foo", q.Namespace, "#1");\r
                }\r
+\r
+               [Test]\r
+               public void ReadElementContentAsArray ()\r
+               {\r
+                       var sw = new StringWriter ();\r
+                       var xw = XmlWriter.Create (sw);\r
+                       xw.WriteStartElement ("root");\r
+                       xw.WriteAttributeString ("xmlns", "b", "http://www.w3.org/2000/xmlns/", "urn:bar");\r
+                       var arr = new XmlQualifiedName [] { new XmlQualifiedName ("foo"), new XmlQualifiedName ("bar", "urn:bar") };\r
+                       xw.WriteValue (arr);\r
+                       xw.Close ();\r
+                       var xr = XmlReader.Create (new StringReader (sw.ToString ()));\r
+                       xr.MoveToContent ();\r
+                       var ret = xr.ReadElementContentAs (typeof (XmlQualifiedName []), null) as XmlQualifiedName [];\r
+                       Assert.IsNotNull (ret, "#1");\r
+                       Assert.AreEqual (arr [0], ret [0], "#2");\r
+                       Assert.AreEqual (arr [1], ret [1], "#3");\r
+               }\r
 #endif\r
        }\r
 }\r
index e6c13db1e5f9111098c490ea2338b440863ecda8..511fcbff37dfb003960a2c6e3a366093076fee3f 100644 (file)
@@ -134,10 +134,10 @@ namespace Mono.Http
                                return null;
 
                        lock (cache) {
-                               NtlmSession ds = (NtlmSession) cache [request.RequestUri];
+                               NtlmSession ds = (NtlmSession) cache [request];
                                if (ds == null) {
                                        ds = new NtlmSession ();
-                                       cache.Add (request.RequestUri, ds);
+                                       cache.Add (request, ds);
                                }
 
                                return ds.Authenticate (header, webRequest, credentials);
index 111cab15e797238f302c5009f9006fb0274c9510..75d7784cfbbb28b6dbb369d38ebd893e40230d99 100644 (file)
@@ -39,15 +39,30 @@ namespace System.Collections.Concurrent
        [DebuggerTypeProxy (typeof (CollectionDebuggerView<>))]
        public class BlockingCollection<T> : IEnumerable<T>, ICollection, IEnumerable, IDisposable
        {
+               const int spinCount = 5;
+
                readonly IProducerConsumerCollection<T> underlyingColl;
                readonly int upperBound;
 
                AtomicBoolean isComplete;
                long completeId;
 
+               /* The whole idea of the collection is to use these two long values in a transactional
+                * to track and manage the actual data inside the underlying lock-free collection
+                * instead of directly working with it or using external locking.
+                *
+                * They are manipulated with CAS and are guaranteed to increase over time and use
+                * of the instance thus preventing ABA problems.
+                */
                long addId = long.MinValue;
                long removeId = long.MinValue;
 
+               /* These events are used solely for the purpose of having an optimized sleep cycle when
+                * the BlockingCollection have to wait on an external event (Add or Remove for instance)
+                */
+               ManualResetEventSlim mreAdd = new ManualResetEventSlim (true);
+               ManualResetEventSlim mreRemove = new ManualResetEventSlim (true);
+
                #region ctors
                public BlockingCollection ()
                        : this (new ConcurrentQueue<T> (), -1)
@@ -75,106 +90,118 @@ namespace System.Collections.Concurrent
                #region Add & Remove (+ Try)
                public void Add (T item)
                {
-                       Add (item, null);
+                       Add (item, CancellationToken.None);
                }
 
                public void Add (T item, CancellationToken token)
-               {
-                       Add (item, () => token.IsCancellationRequested);
-               }
-
-               void Add (T item, Func<bool> cancellationFunc)
                {
                        SpinWait sw = new SpinWait ();
+                       long cachedAddId;
 
                        while (true) {
-                               long cachedAddId = addId;
+                               token.ThrowIfCancellationRequested ();
+
+                               cachedAddId = addId;
                                long cachedRemoveId = removeId;
 
                                if (upperBound != -1) {
                                        if (cachedAddId - cachedRemoveId > upperBound) {
-                                               sw.SpinOnce ();
+                                               if (sw.Count <= spinCount) {
+                                                       sw.SpinOnce ();
+                                               } else {
+                                                       if (mreRemove.IsSet)
+                                                               continue;
+                                                       if (cachedRemoveId != removeId)
+                                                               continue;
+
+                                                       mreRemove.Wait (token);
+                                                       mreRemove.Reset ();
+                                               }
+
                                                continue;
                                        }
                                }
 
                                // Check our transaction id against completed stored one
                                if (isComplete.Value && cachedAddId >= completeId)
-                                       throw new InvalidOperationException ("The BlockingCollection<T> has"
-                                                                            + " been marked as complete with regards to additions.");
-
+                                       ThrowCompleteException ();
                                if (Interlocked.CompareExchange (ref addId, cachedAddId + 1, cachedAddId) == cachedAddId)
                                        break;
-
-                               if (cancellationFunc != null && cancellationFunc ())
-                                       throw new OperationCanceledException ("CancellationToken triggered");
                        }
 
+                       if (isComplete.Value && cachedAddId >= completeId)
+                               ThrowCompleteException ();
+
+                       while (!underlyingColl.TryAdd (item));
 
-                       if (!underlyingColl.TryAdd (item))
-                               throw new InvalidOperationException ("The underlying collection didn't accept the item.");
+                       if (!mreAdd.IsSet)
+                               mreAdd.Set ();
                }
 
                public T Take ()
                {
-                       return Take (null);
+                       return Take (CancellationToken.None);
                }
 
                public T Take (CancellationToken token)
-               {
-                       return Take (() => token.IsCancellationRequested);
-               }
-
-               T Take (Func<bool> cancellationFunc)
                {
                        SpinWait sw = new SpinWait ();
 
                        while (true) {
+                               token.ThrowIfCancellationRequested ();
+
                                long cachedRemoveId = removeId;
                                long cachedAddId = addId;
 
                                // Empty case
                                if (cachedRemoveId == cachedAddId) {
                                        if (IsCompleted)
-                                               throw new OperationCanceledException ("The BlockingCollection<T> has"
-                                                                                     + " been marked as complete with regards to additions.");
+                                               ThrowCompleteException ();
+
+                                       if (sw.Count <= spinCount) {
+                                               sw.SpinOnce ();
+                                       } else {
+                                               if (cachedAddId != addId)
+                                                       continue;
+                                               if (IsCompleted)
+                                                       ThrowCompleteException ();
+
+                                               mreAdd.Wait (token);
+                                               mreAdd.Reset ();
+                                       }
 
-                                       sw.SpinOnce ();
                                        continue;
                                }
 
                                if (Interlocked.CompareExchange (ref removeId, cachedRemoveId + 1, cachedRemoveId) == cachedRemoveId)
                                        break;
-
-                               if (cancellationFunc != null && cancellationFunc ())
-                                       throw new OperationCanceledException ("The CancellationToken has had cancellation requested.");
                        }
 
                        T item;
                        while (!underlyingColl.TryTake (out item));
 
+                       if (!mreRemove.IsSet)
+                               mreRemove.Set ();
+
                        return item;
                }
 
                public bool TryAdd (T item)
                {
-                       return TryAdd (item, null, null);
+                       return TryAdd (item, () => false, CancellationToken.None);
                }
 
-               bool TryAdd (T item, Func<bool> contFunc, CancellationToken? token)
+               bool TryAdd (T item, Func<bool> contFunc, CancellationToken token)
                {
                        do {
-                               if (token.HasValue && token.Value.IsCancellationRequested)
-                                       throw new OperationCanceledException ("The CancellationToken has had cancellation requested.");
+                               token.ThrowIfCancellationRequested ();
 
                                long cachedAddId = addId;
                                long cachedRemoveId = removeId;
 
-                               if (upperBound != -1) {
-                                       if (cachedAddId - cachedRemoveId > upperBound) {
+                               if (upperBound != -1)
+                                       if (cachedAddId - cachedRemoveId > upperBound)
                                                continue;
-                                       }
-                               }
 
                                // Check our transaction id against completed stored one
                                if (isComplete.Value && cachedAddId >= completeId)
@@ -184,11 +211,13 @@ namespace System.Collections.Concurrent
                                if (Interlocked.CompareExchange (ref addId, cachedAddId + 1, cachedAddId) != cachedAddId)
                                        continue;
 
-                               if (!underlyingColl.TryAdd (item))
-                                       throw new InvalidOperationException ("The underlying collection didn't accept the item.");
+                               while (!underlyingColl.TryAdd (item));
+
+                               if (!mreAdd.IsSet)
+                                       mreAdd.Set ();
 
                                return true;
-                       } while (contFunc != null && contFunc ());
+                       } while (contFunc ());
 
                        return false;
                }
@@ -201,7 +230,7 @@ namespace System.Collections.Concurrent
                public bool TryAdd (T item, int millisecondsTimeout)
                {
                        Stopwatch sw = Stopwatch.StartNew ();
-                       return TryAdd (item, () => sw.ElapsedMilliseconds < millisecondsTimeout, null);
+                       return TryAdd (item, () => sw.ElapsedMilliseconds < millisecondsTimeout, CancellationToken.None);
                }
 
                public bool TryAdd (T item, int millisecondsTimeout, CancellationToken token)
@@ -212,16 +241,15 @@ namespace System.Collections.Concurrent
 
                public bool TryTake (out T item)
                {
-                       return TryTake (out item, null, null);
+                       return TryTake (out item, () => false, CancellationToken.None);
                }
 
-               bool TryTake (out T item, Func<bool> contFunc, CancellationToken? token)
+               bool TryTake (out T item, Func<bool> contFunc, CancellationToken token)
                {
                        item = default (T);
 
                        do {
-                               if (token.HasValue && token.Value.IsCancellationRequested)
-                                       throw new OperationCanceledException ("The CancellationToken has had cancellation requested.");
+                               token.ThrowIfCancellationRequested ();
 
                                long cachedRemoveId = removeId;
                                long cachedAddId = addId;
@@ -237,8 +265,11 @@ namespace System.Collections.Concurrent
                                if (Interlocked.CompareExchange (ref removeId, cachedRemoveId + 1, cachedRemoveId) != cachedRemoveId)
                                        continue;
 
-                               return underlyingColl.TryTake (out item);
-                       } while (contFunc != null && contFunc ());
+                               while (!underlyingColl.TryTake (out item));
+
+                               if (!mreRemove.IsSet)
+                                       mreRemove.Set ();
+                       } while (contFunc ());
 
                        return false;
                }
@@ -253,7 +284,7 @@ namespace System.Collections.Concurrent
                        item = default (T);
                        Stopwatch sw = Stopwatch.StartNew ();
 
-                       return TryTake (out item, () => sw.ElapsedMilliseconds < millisecondsTimeout, null);
+                       return TryTake (out item, () => sw.ElapsedMilliseconds < millisecondsTimeout, CancellationToken.None);
                }
 
                public bool TryTake (out T item, int millisecondsTimeout, CancellationToken token)
@@ -449,9 +480,18 @@ namespace System.Collections.Concurrent
 
                public void CompleteAdding ()
                {
-                 // No further add beside that point
-                 completeId = addId;
-                 isComplete.Value = true;
+                       // No further add beside that point
+                       completeId = addId;
+                       isComplete.Value = true;
+                       // Wakeup some operation in case this has an impact
+                       mreAdd.Set ();
+                       mreRemove.Set ();
+               }
+
+               void ThrowCompleteException ()
+               {
+                       throw new InvalidOperationException ("The BlockingCollection<T> has"
+                                                            + " been marked as complete with regards to additions.");
                }
 
                void ICollection.CopyTo (Array array, int index)
index a95f58dce4f5e4f4a17e98b0b06f2fb4553b68cc..f54bbb2cddfcf99e0bf57b3028f41c18549f256b 100644 (file)
@@ -41,25 +41,18 @@ namespace System.Collections.Concurrent
        [DebuggerTypeProxy (typeof (CollectionDebuggerView<>))]
        public class ConcurrentBag<T> : IProducerConsumerCollection<T>, IEnumerable<T>, IEnumerable
        {
-               const int multiplier = 2;
                const int hintThreshold = 20;
                
-               int size = Environment.ProcessorCount + 1;
                int count;
                
                // We only use the add hints when number of slot is above hintThreshold
                // so to not waste memory space and the CAS overhead
                ConcurrentQueue<int> addHints = new ConcurrentQueue<int> ();
                
-               CyclicDeque<T>[] container;
-               
-               object syncLock = new object ();
+               ConcurrentDictionary<int, CyclicDeque<T>> container = new ConcurrentDictionary<int, CyclicDeque<T>> ();
                
                public ConcurrentBag ()
                {
-                       container = new CyclicDeque<T>[size];
-                       for (int i = 0; i < container.Length; i++)
-                               container[i] = new CyclicDeque<T> ();
                }
                
                public ConcurrentBag (IEnumerable<T> enumerable) : this ()
@@ -68,25 +61,23 @@ namespace System.Collections.Concurrent
                                Add (item);
                }
                
-               public bool TryAdd (T item)
-               {
-                       Add (item);
-                       
-                       return true;
-               }
-               
                public void Add (T item)
                {
-                       Interlocked.Increment (ref count);
-                       GrowIfNecessary ();
-                       
                        int index;
                        CyclicDeque<T> bag = GetBag (out index);
                        bag.PushBottom (item);
                        
                        // Cache operation ?
-                       if (size > hintThreshold)
+                       if (container.Count > hintThreshold)
                                addHints.Enqueue (index);
+
+                       Interlocked.Increment (ref count);
+               }
+
+               bool IProducerConsumerCollection<T>.TryAdd (T element)
+               {
+                       Add (element);
+                       return true;
                }
                
                public bool TryTake (out T item)
@@ -98,16 +89,16 @@ namespace System.Collections.Concurrent
 
                        int hintIndex;
                        CyclicDeque<T> bag = GetBag (out hintIndex);
-                       bool hintEnabled = size > hintThreshold;
+                       bool hintEnabled = container.Count > hintThreshold;
                        
                        if (bag == null || bag.PopBottom (out item) != PopResult.Succeed) {
-                               for (int i = 0; i < container.Length; i++) {
+                               foreach (var other in container) {
                                        // Try to retrieve something based on a hint
                                        bool result = hintEnabled && addHints.TryDequeue (out hintIndex) && container[hintIndex].PopTop (out item) == PopResult.Succeed;
 
                                        // We fall back to testing our slot
-                                       if (!result && container[i] != null)
-                                               result = container[i].PopTop (out item) == PopResult.Succeed;
+                                       if (!result && other.Value != bag)
+                                               result = other.Value.PopTop (out item) == PopResult.Succeed;
                                        
                                        // If we found something, stop
                                        if (result) {
@@ -152,19 +143,16 @@ namespace System.Collections.Concurrent
                        return GetEnumeratorInternal ();
                }
                
-               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
+               public IEnumerator<T> GetEnumerator ()
                {
                        return GetEnumeratorInternal ();
                }
                
                IEnumerator<T> GetEnumeratorInternal ()
                {
-                       for (int i = 0; i < size; i++) {
-                               CyclicDeque<T> bag = container[i];
-                               foreach (T item in bag.GetEnumerable ()) {
+                       foreach (var bag in container)
+                               foreach (T item in bag.Value.GetEnumerable ())
                                        yield return item;
-                               }
-                       }
                }
                
                void System.Collections.ICollection.CopyTo (Array array, int index)
@@ -209,40 +197,17 @@ namespace System.Collections.Concurrent
                        
                int GetIndex ()
                {
-                       return Thread.CurrentThread.ManagedThreadId - 1;
-               }
-               
-               void GrowIfNecessary ()
-               {
-                       int index = GetIndex ();
-                       int currentSize = size;
-                       
-                       while (index > currentSize - 1) {
-                               currentSize = size;
-                               Grow (currentSize);
-                       }
+                       return Thread.CurrentThread.ManagedThreadId;
                }
-               
-               CyclicDeque<T> GetBag (out int i)
-               {                       
-                       i = GetIndex ();
-                       
-                       return i < container.Length ? (container[i] == null) ? (container[i] = new CyclicDeque<T> ()) : container[i] : null;
-               }
-               
-               void Grow (int referenceSize)
-               {
-                       lock (syncLock) {
-                               if (referenceSize != size)
-                                       return;
-                               
-                               CyclicDeque<T>[] slice = new CyclicDeque<T>[size * multiplier];
-                               int i = 0;
-                               Array.Copy (container, slice, container.Length);
                                
-                               container = slice;
-                               size = slice.Length;
-                       }
+               CyclicDeque<T> GetBag (out int index)
+               {
+                       index = GetIndex ();
+                       CyclicDeque<T> value;
+                       if (container.TryGetValue (index, out value))
+                               return value;
+
+                       return container.GetOrAdd (index, new CyclicDeque<T> ());
                }
        }
 }
index 2c35cebe5090f1f23aeb47de1abe3a40ed38932e..e021bb062594b144eb6bf21008721807f49b0fec 100644 (file)
@@ -48,18 +48,19 @@ namespace System.ComponentModel
                                attrList = attributes;
                }
                
-#if NET_2_0
                public AttributeCollection (params Attribute[] attributes)
-#else
-               public AttributeCollection (Attribute[] attributes)
-#endif
                {
                        if (attributes != null)
                                for (int i = 0; i < attributes.Length; i++)
                                        attrList.Add (attributes[i]);
                }
 
-#if NET_2_0
+#if NET_4_0
+               protected AttributeCollection ()
+               {
+               }
+#endif
+
                public static AttributeCollection FromExisting (AttributeCollection existing, params Attribute [] newAttributes)
                {
                        if (existing == null)
@@ -70,7 +71,6 @@ namespace System.ComponentModel
                                ret.attrList.AddRange (newAttributes);
                        return ret;
                }
-#endif
 
                public bool Contains (Attribute attr)
                {
@@ -190,5 +190,22 @@ namespace System.ComponentModel
                                return (Attribute) attrList [index];
                        }
                }
+
+#if NET_4_0
+               Attribute [] attributes_arr;
+
+               // MSDN doesn't mention it, but this property is returning the same instance always.
+               protected virtual Attribute [] Attributes {
+                       get {
+                               if (attrList == null || attrList.Count == 0)
+                                       return null;
+
+                               if (attributes_arr == null)
+                                       attributes_arr = (Attribute[]) attrList.ToArray (typeof (Attribute));
+
+                               return attributes_arr;
+                       }
+               }
+#endif
        }
 }
index 149dbd961e9eff4327a984bc7d3f2bb72ecb5a5a..b0c72d397a084b4ee565bfd26251c3890b93c77e 100644 (file)
@@ -88,11 +88,7 @@ namespace System.ComponentModel
                {
                        string culture_string = value as string;
                        if (culture_string != null) {
-#if NET_2_0
                                if (String.Compare (culture_string, "(Default)", false) == 0)
-#else
-                               if (String.Compare (culture_string, "(Default)", true) == 0)
-#endif
                                        return CultureInfo.InvariantCulture;
 
                                try {
@@ -156,5 +152,13 @@ namespace System.ComponentModel
                        return true;
                }
 
+#if NET_4_0
+               protected virtual string GetCultureName (CultureInfo culture)
+               {
+                       // .Net doesn't throw ArgumentNullException here, ugh.
+                       return culture.Name;
+               }
+#endif
+
        }
 }
index f9041c3b2bd467d824a8e34f3547ea690cbddb33..68bdc9be41e18e50d152599ea16e670e3de7fa74 100644 (file)
@@ -518,8 +518,10 @@ namespace System.Net.Mail {
                        try {
                                writer = new StreamWriter(filename);
 
+                               // FIXME: See how Microsoft fixed the bug about envelope senders, and how it actually represents the info in .eml file headers
+                               //        For all we know, defaultFrom may be the envelope sender
+                               // For now, we are no worse than some versions of .NET
                                MailAddress from = message.From;
-
                                if (from == null)
                                        from = defaultFrom;
                                
@@ -596,14 +598,16 @@ namespace System.Net.Mail {
                        
                        if (authMechs != AuthMechs.None)
                                Authenticate ();
-                       
-                       MailAddress from = message.From;
 
-                       if (from == null)
-                               from = defaultFrom;
+                       // The envelope sender: use 'Sender:' in preference of 'From:'
+                       MailAddress sender = message.Sender;
+                       if (sender == null)
+                               sender = message.From;
+                       if (sender == null)
+                               sender = defaultFrom;
                        
                        // MAIL FROM:
-                       status = SendCommand ("MAIL FROM:<" + from.Address + '>');
+                       status = SendCommand ("MAIL FROM:<" + sender.Address + '>');
                        if (IsError (status)) {
                                throw new SmtpException (status.StatusCode, status.Description);
                        }
@@ -649,6 +653,10 @@ namespace System.Net.Mail {
                        dt = dt.Remove (dt.Length - 3, 1);
                        SendHeader (HeaderName.Date, dt);
 
+                       MailAddress from = message.From;
+                       if (from == null)
+                               from = defaultFrom;
+
                        SendHeader (HeaderName.From, EncodeAddress (from));
                        SendHeader (HeaderName.To, EncodeAddresses (message.To));
                        if (message.CC.Count > 0)
index 09eb8408b69f8da75cab8942f6636bb97890274a..fd34e6bf437d5415b2cf2acd7acccc86caea6fba 100644 (file)
@@ -58,31 +58,30 @@ namespace System.Net.Mime {
                {
                        if (contentType == null)
                                throw new ArgumentNullException ("contentType");
-                       if (contentType.Length < 1)
+                       if (contentType.Length == 0)
                                throw new ArgumentException ("contentType");
 
-                       int index = contentType.IndexOf (';');
-                       if (index > 0) {
-                               string[] split = contentType.Split (';');
-                               this.MediaType = split[0].Trim ();
-                               for (int i = 1; i < split.Length; i++)
-                                       Parse (split[i]);
-                       }
-                       else {
-                               this.MediaType = contentType.Trim ();
-                       }
+                       string[] split = contentType.Split (';');
+                       this.MediaType = split[0].Trim ();
+                       for (int i = 1; i < split.Length; i++)
+                               Parse (split[i].Trim ());
                }
 
                // parse key=value pairs like:
                // "charset=us-ascii"
+               static char [] eq = new char [] { '=' };
                void Parse (string pair)
                {
-                       if (pair == null || pair.Length < 1)
+                       if (String.IsNullOrEmpty (pair))
                                return;
 
-                       string[] split = pair.Split ('=');
-                       if (split.Length == 2)
-                               parameters.Add (split[0].Trim (), split[1].Trim ());
+                       string [] split = pair.Split (eq, 2);
+                       string key = split [0].Trim ();
+                       string val =  (split.Length > 1) ? split [1].Trim () : "";
+                       int l = val.Length;
+                       if (l >= 2 && val [0] == '"' && val [l - 1] == '"')
+                               val = val.Substring (1, l - 2);
+                       parameters.Add (key, val);
                }
 
                #endregion // Constructors
index d3be931cbb03bcaa45d7fb5be6a47c17f8a1d0c1..fa94ef6a189a62e64b05645425c3aa6b0a68fea4 100644 (file)
@@ -479,7 +479,7 @@ namespace System.Net.NetworkInformation {
                        if (!Socket.SupportsIPv4)
                                throw new NetworkInformationException ();
                        Win32_MIB_IPSTATS stats;
-                       GetIPStatisticsEx (out stats, AF_INET);
+                       GetIpStatisticsEx (out stats, AF_INET);
                        return new Win32IPGlobalStatistics (stats);
                }
 
@@ -488,7 +488,7 @@ namespace System.Net.NetworkInformation {
                        if (!Socket.OSSupportsIPv6)
                                throw new NetworkInformationException ();
                        Win32_MIB_IPSTATS stats;
-                       GetIPStatisticsEx (out stats, AF_INET6);
+                       GetIpStatisticsEx (out stats, AF_INET6);
                        return new Win32IPGlobalStatistics (stats);
                }
 
@@ -575,7 +575,7 @@ namespace System.Net.NetworkInformation {
                static extern int GetIcmpStatisticsEx (out Win32_MIB_ICMP_EX pStats, int dwFamily);
 
                [DllImport ("Iphlpapi.dll")]
-               static extern int GetIPStatisticsEx (out Win32_MIB_IPSTATS pStats, int dwFamily);
+               static extern int GetIpStatisticsEx (out Win32_MIB_IPSTATS pStats, int dwFamily);
 
                // Win32 structures
 
index 2ba59ef1a52b6b7677bdf8b2b9d2a1cb31618f63..1745dd4b7b35d1ae6aad5effbdc477f6a3cea9aa 100644 (file)
@@ -29,6 +29,7 @@
 #if NET_2_0
 using System.Collections.Specialized;
 using System.Globalization;
+using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
        public abstract class IPGlobalStatistics {
@@ -219,6 +220,7 @@ namespace System.Net.NetworkInformation {
                }
        }
 
+       [StructLayout (LayoutKind.Sequential)]
        struct Win32_MIB_IPSTATS
        {
                public int Forwarding;
index c7371067612c98bfac9195a5458a3b0d9fd70fb0..58a6189086e2bbfaa1e4a9165a45db823f4aed4b 100644 (file)
@@ -481,7 +481,7 @@ namespace System.Net.NetworkInformation {
                                                        MacOsStructs.sockaddr_dl sockaddrdl = (MacOsStructs.sockaddr_dl) Marshal.PtrToStructure (addr.ifa_addr, typeof (MacOsStructs.sockaddr_dl));
 
                                                        macAddress = new byte [(int) sockaddrdl.sdl_alen];
-                                                       Array.Copy (sockaddrdl.sdl_data, sockaddrdl.sdl_nlen, macAddress, 0, macAddress.Length);
+                                                       Array.Copy (sockaddrdl.sdl_data, sockaddrdl.sdl_alen, macAddress, 0, macAddress.Length);
                                                        index = sockaddrdl.sdl_index;
 
                                                        int hwtype = (int) sockaddrdl.sdl_type;
index a7c970c1e1daebdeabf9eb579c25730edaaa64d1..9bc5107163480d2eb453ec5b176cf21ad54aafe1 100644 (file)
@@ -35,6 +35,7 @@ using System.Globalization;
 using System.ComponentModel;
 using System.Net.Sockets;
 using System.Security.Principal;
+using System.Security.Cryptography;
 using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
@@ -64,7 +65,7 @@ namespace System.Net.NetworkInformation {
                };
                static readonly string PingBinPath;
                const int default_timeout = 4000; // 4 sec.
-               const int identifier = 1; // no need to be const, but there's no place to change it.
+               ushort identifier;
 
                // This value is correct as of Linux kernel version 2.6.25.9
                // See /usr/include/linux/capability.h
@@ -103,6 +104,11 @@ namespace System.Net.NetworkInformation {
                
                public Ping ()
                {
+                       // Generate a new random 16 bit identifier for every ping
+                       RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider ();
+                       byte [] randomIdentifier = new byte [2];
+                       rng.GetBytes (randomIdentifier);
+                       identifier = (ushort)(randomIdentifier [0] + (randomIdentifier [1] << 8));
                }
   
                [DllImport ("libc", EntryPoint="capget")]
@@ -398,7 +404,7 @@ namespace System.Net.NetworkInformation {
                        }
 
                        // to be sent
-                       public IcmpMessage (byte type, byte code, short identifier, short sequence, byte [] data)
+                       public IcmpMessage (byte type, byte code, ushort identifier, ushort sequence, byte [] data)
                        {
                                bytes = new byte [data.Length + 8];
                                bytes [0] = type;
@@ -422,18 +428,18 @@ namespace System.Net.NetworkInformation {
                                get { return bytes [1]; }
                        }
 
-                       public byte Identifier {
-                               get { return (byte) (bytes [4] + (bytes [5] << 8)); }
+                       public ushort Identifier {
+                               get { return (ushort) (bytes [4] + (bytes [5] << 8)); }
                        }
 
-                       public byte Sequence {
-                               get { return (byte) (bytes [6] + (bytes [7] << 8)); }
+                       public ushort Sequence {
+                               get { return (ushort) (bytes [6] + (bytes [7] << 8)); }
                        }
 
                        public byte [] Data {
                                get {
                                        byte [] data = new byte [bytes.Length - 8];
-                                       Buffer.BlockCopy (bytes, 0, data, 0, data.Length);
+                                       Buffer.BlockCopy (bytes, 8, data, 0, data.Length);
                                        return data;
                                }
                        }
index 70c0e73d37bfae7bc2d17085cc73f6b580794a78..6764954e7e95f8f2228723294d9cd6f893fc5968 100644 (file)
@@ -96,14 +96,20 @@ namespace System.Net
                bool getResponseCalled;
                Exception saved_exc;
                object locker = new object ();
-               bool is_ntlm_auth;
                bool finished_reading;
                internal WebConnection WebConnection;
                DecompressionMethods auto_decomp;
                int maxResponseHeadersLength;
                static int defaultMaxResponseHeadersLength;
                int readWriteTimeout = 300000; // ms
-               
+
+               enum NtlmAuthState {
+                       None,
+                       Challenge,
+                       Response
+               }
+               NtlmAuthState ntlm_auth_state;
+
                // Constructors
                static HttpWebRequest ()
                {
@@ -160,10 +166,6 @@ namespace System.Net
                
                // Properties
 
-               internal bool UsesNtlmAuthentication {
-                       get { return is_ntlm_auth; }
-               }
-
                public string Accept {
                        get { return webHeaders ["Accept"]; }
                        set {
@@ -960,10 +962,17 @@ namespace System.Net
                                webHeaders.RemoveAndAdd ("Transfer-Encoding", "chunked");
                                webHeaders.RemoveInternal ("Content-Length");
                        } else if (contentLength != -1) {
-                               if (contentLength > 0)
-                                       continue100 = true;
-                               webHeaders.SetInternal ("Content-Length", contentLength.ToString ());
+                               if (ntlm_auth_state != NtlmAuthState.Challenge) {
+                                       if (contentLength > 0)
+                                               continue100 = true;
+
+                                       webHeaders.SetInternal ("Content-Length", contentLength.ToString ());
+                               } else {
+                                       webHeaders.SetInternal ("Content-Length", "0");
+                               }
                                webHeaders.RemoveInternal ("Transfer-Encoding");
+                       } else {
+                               webHeaders.RemoveInternal ("Content-Length");
                        }
 
                        if (actualVersion == HttpVersion.Version11 && continue100 &&
@@ -1107,9 +1116,11 @@ namespace System.Net
                        if (bodyBuffer != null) {
                                // The body has been written and buffered. The request "user"
                                // won't write it again, so we must do it.
-                               writeStream.Write (bodyBuffer, 0, bodyBufferLength);
-                               bodyBuffer = null;
-                               writeStream.Close ();
+                               if (ntlm_auth_state != NtlmAuthState.Challenge) {
+                                       writeStream.Write (bodyBuffer, 0, bodyBufferLength);
+                                       bodyBuffer = null;
+                                       writeStream.Close ();
+                               }
                        } else if (method != "HEAD" && method != "GET" && method != "MKCOL" && method != "CONNECT" &&
                                        method != "TRACE") {
                                if (getResponseCalled && !writeStream.RequestWritten)
@@ -1185,6 +1196,7 @@ namespace System.Net
                                }
                        }
                        r.Reset ();
+                       finished_reading = false;
                        haveResponse = false;
                        webResponse.ReadAll ();
                        webResponse = null;
@@ -1237,7 +1249,7 @@ namespace System.Net
                                try {
                                        redirected = CheckFinalStatus (r);
                                        if (!redirected) {
-                                               if (is_ntlm_auth && authCompleted && webResponse != null
+                                               if (ntlm_auth_state != NtlmAuthState.None && authCompleted && webResponse != null
                                                        && (int)webResponse.StatusCode < 400) {
                                                        WebConnectionStream wce = webResponse.GetResponseStream () as WebConnectionStream;
                                                        if (wce != null) {
@@ -1256,7 +1268,7 @@ namespace System.Net
                                                r.DoCallback ();
                                        } else {
                                                if (webResponse != null) {
-                                                       if (is_ntlm_auth) {
+                                                       if (ntlm_auth_state != NtlmAuthState.None) {
                                                                HandleNtlmAuth (r);
                                                                return;
                                                        }
@@ -1316,18 +1328,21 @@ namespace System.Net
                                return false;
                        webHeaders [(isProxy) ? "Proxy-Authorization" : "Authorization"] = auth.Message;
                        authCompleted = auth.Complete;
-                       is_ntlm_auth = (auth.Module.AuthenticationType == "NTLM");
+                       bool is_ntlm = (auth.Module.AuthenticationType == "NTLM");
+                       if (is_ntlm)
+                               ntlm_auth_state = (NtlmAuthState)((int) ntlm_auth_state + 1);
                        return true;
                }
 
                // Returns true if redirected
                bool CheckFinalStatus (WebAsyncResult result)
                {
-                       if (result.GotException)
+                       if (result.GotException) {
+                               bodyBuffer = null;
                                throw result.Exception;
+                       }
 
                        Exception throwMe = result.Exception;
-                       bodyBuffer = null;
 
                        HttpWebResponse resp = result.Response;
                        WebExceptionStatus protoError = WebExceptionStatus.ProtocolError;
@@ -1339,10 +1354,17 @@ namespace System.Net
                                        if (!usedPreAuth && CheckAuthorization (webResponse, code)) {
                                                // Keep the written body, so it can be rewritten in the retry
                                                if (InternalAllowBuffering) {
-                                                       bodyBuffer = writeStream.WriteBuffer;
-                                                       bodyBufferLength = writeStream.WriteBufferLength;
+                                                       // NTLM: This is to avoid sending data in the 'challenge' request
+                                                       // We save it in the first request (first 401), don't send anything
+                                                       // in the challenge request and send it in the response request along
+                                                       // with the buffers kept form the first request.
+                                                       if (ntlm_auth_state != NtlmAuthState.Response) {
+                                                               bodyBuffer = writeStream.WriteBuffer;
+                                                               bodyBufferLength = writeStream.WriteBufferLength;
+                                                       }
                                                        return true;
                                                } else if (method != "PUT" && method != "POST") {
+                                                       bodyBuffer = null;
                                                        return true;
                                                }
                                                
@@ -1350,6 +1372,7 @@ namespace System.Net
                                                writeStream = null;
                                                webResponse.Close ();
                                                webResponse = null;
+                                               bodyBuffer = null;
 
                                                throw new WebException ("This request requires buffering " +
                                                                        "of data for authentication or " +
@@ -1357,6 +1380,7 @@ namespace System.Net
                                        }
                                }
 
+                               bodyBuffer = null;
                                if ((int) code >= 400) {
                                        string err = String.Format ("The remote server returned an error: ({0}) {1}.",
                                                                    (int) code, webResponse.StatusDescription);
@@ -1373,6 +1397,7 @@ namespace System.Net
                                }
                        }
 
+                       bodyBuffer = null;
                        if (throwMe == null) {
                                bool b = false;
                                int c = (int) code;
index b277d9f89cc9430d8633987824445e1783f177e6..35f0aeea14e7d309fa478320614f80933b7c25e9 100644 (file)
@@ -400,6 +400,19 @@ namespace System.Net
                        object sender;
                        string host;
                        static bool is_macosx = System.IO.File.Exists (MSX.OSX509Certificates.SecurityLibrary);
+                       static X509RevocationMode revocation_mode;
+
+                       static ChainValidationHelper ()
+                       {
+                               revocation_mode = X509RevocationMode.NoCheck;
+                               try {
+                                       string str = Environment.GetEnvironmentVariable ("MONO_X509_REVOCATION_MODE");
+                                       if (String.IsNullOrEmpty (str))
+                                               return;
+                                       revocation_mode = (X509RevocationMode) Enum.Parse (typeof (X509RevocationMode), str, true);
+                               } catch {
+                               }
+                       }
 
                        public ChainValidationHelper (object sender)
                        {
@@ -430,6 +443,7 @@ namespace System.Net
 
                                X509Chain chain = new X509Chain ();
                                chain.ChainPolicy = new X509ChainPolicy ();
+                               chain.ChainPolicy.RevocationMode = revocation_mode;
                                for (int i = 1; i < certs.Count; i++) {
                                        X509Certificate2 c2 = new X509Certificate2 (certs [i].RawData);
                                        chain.ChainPolicy.ExtraStore.Add (c2);
index e160f50e26da336f732ed3cfa45391df71bb432e..cbce8bcdf10fcfede1815328138a84be296c8d5d 100644 (file)
@@ -533,8 +533,12 @@ namespace System.Net
                                fStream = File.OpenRead (fileName);
                                request = SetupRequest (address, method, true);
                                reqStream = request.GetRequestStream ();
-                               byte [] realBoundary = Encoding.ASCII.GetBytes ("--" + boundary + "\r\n");
-                               reqStream.Write (realBoundary, 0, realBoundary.Length);
+                               byte [] bytes_boundary = Encoding.ASCII.GetBytes (boundary);
+                               reqStream.WriteByte ((byte) '-');
+                               reqStream.WriteByte ((byte) '-');
+                               reqStream.Write (bytes_boundary, 0, bytes_boundary.Length);
+                               reqStream.WriteByte ((byte) '\r');
+                               reqStream.WriteByte ((byte) '\n');
                                string partHeaders = String.Format ("Content-Disposition: form-data; " +
                                                                    "name=\"file\"; filename=\"{0}\"\r\n" +
                                                                    "Content-Type: {1}\r\n\r\n",
@@ -549,7 +553,13 @@ namespace System.Net
 
                                reqStream.WriteByte ((byte) '\r');
                                reqStream.WriteByte ((byte) '\n');
-                               reqStream.Write (realBoundary, 0, realBoundary.Length);
+                               reqStream.WriteByte ((byte) '-');
+                               reqStream.WriteByte ((byte) '-');
+                               reqStream.Write (bytes_boundary, 0, bytes_boundary.Length);
+                               reqStream.WriteByte ((byte) '-');
+                               reqStream.WriteByte ((byte) '-');
+                               reqStream.WriteByte ((byte) '\r');
+                               reqStream.WriteByte ((byte) '\n');
                                reqStream.Close ();
                                reqStream = null;
                                resultBytes = ReadAll (request, userToken);
index 6cb5e1c7f2d9786bd07c435051c29cc80561f57e..0b55b9c68961a0af238d84da9cde34d4f9d57dfe 100644 (file)
@@ -90,7 +90,8 @@ namespace System.Net
                 static WebConnection ()
                 {
                         Type type = Type.GetType ("MonoTouch.ObjCRuntime.Runtime, monotouch");
-                        start_wwan = type.GetMethod ("StartWWAN");
+                       if (type != null)
+                               start_wwan = type.GetMethod ("StartWWAN");
                 }
 #endif
 
@@ -100,7 +101,11 @@ namespace System.Net
                        buffer = new byte [4096];
                        readState = ReadState.None;
                        Data = new WebConnectionData ();
-                       initConn = new WaitCallback (InitConnection);
+                       initConn = new WaitCallback (state => {
+                               try {
+                                       InitConnection (state);
+                               } catch {}
+                               });
                        queue = group.Queue;
                        abortHelper = new AbortHelper ();
                        abortHelper.Connection = this;
@@ -1041,6 +1046,8 @@ namespace System.Net
                                        socket = null;
                                }
 
+                               if (ntlm_authenticated)
+                                       ResetNtlm ();
                                busy = false;
                                Data = new WebConnectionData ();
                                if (sendNext)
index 184927f654240f606fdc207cce914f66a9a2c2bb..ceeadb9108ec32120b8713b5f58701bad60910e8 100644 (file)
 
 namespace System.Net 
 {
-       public enum WebExceptionStatus 
+#if MOONLIGHT && INSIDE_SYSTEM
+       internal
+#else
+       public
+#endif
+       enum WebExceptionStatus 
        {
                Success = 0,
                NameResolutionFailure = 1,
index 8b7efcc3eccc5c360d381a7aa637783191ccccaa..a1e7efba17776ea92183cba34b3f91ebad82ee55 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // Barrier.cs
 //  
@@ -25,6 +24,8 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
 using System;
 
 namespace System.Threading
@@ -35,8 +36,9 @@ namespace System.Threading
                Action<Barrier> postPhaseAction;
                
                int participants;
+               bool cleaned;
                CountdownEvent cntd;
-               AtomicBoolean cleaned = new AtomicBoolean ();
+               ManualResetEventSlim postPhaseEvt = new ManualResetEventSlim ();
                long phase;
                
                public Barrier (int participants) : this (participants, null)
@@ -66,14 +68,14 @@ namespace System.Threading
                                        cntd.Dispose ();
                                        cntd = null;
                                }
-                               cleaned = null;
                                postPhaseAction = null;
+                               cleaned = true;
                        }
                }
                        
                void InitCountdownEvent ()
                {
-                       cleaned = new AtomicBoolean ();
+                       postPhaseEvt = new ManualResetEventSlim (false);
                        cntd = new CountdownEvent (participants);
                }
                
@@ -89,7 +91,7 @@ namespace System.Threading
                
                public long AddParticipants (int participantCount)
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        
                        if (participantCount < 0)
@@ -113,48 +115,55 @@ namespace System.Threading
                
                public void RemoveParticipants (int participantCount)
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        if (participantCount < 0)
                                throw new ArgumentOutOfRangeException ("participantCount");
                        
                        if (cntd.Signal (participantCount))
-                               PostPhaseAction (cleaned);
+                               PostPhaseAction (postPhaseEvt);
 
                        Interlocked.Add (ref participants, -participantCount);
                }
                
                public void SignalAndWait ()
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        SignalAndWait ((c) => { c.Wait (); return true; });
                }
                
+               public void SignalAndWait (CancellationToken token)
+               {
+                       if (cleaned)
+                               throw GetDisposed ();
+                       SignalAndWait ((c) => { c.Wait (token); return true; });
+               }
+
                public bool SignalAndWait (int millisecondTimeout)
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        return SignalAndWait ((c) => c.Wait (millisecondTimeout));
                }
-               
+
                public bool SignalAndWait (TimeSpan ts)
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        return SignalAndWait ((c) => c.Wait (ts));
                }
                
                public bool SignalAndWait (int millisecondTimeout, CancellationToken token)
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        return SignalAndWait ((c) => c.Wait (millisecondTimeout, token));
                }
                
                public bool SignalAndWait (TimeSpan ts, CancellationToken token)
                {
-                       if (cleaned == null)
+                       if (cleaned)
                                throw GetDisposed ();
                        return SignalAndWait ((c) => c.Wait (ts, token));
                }
@@ -162,40 +171,43 @@ namespace System.Threading
                bool SignalAndWait (Func<CountdownEvent, bool> associate)
                {
                        bool result;
-                       AtomicBoolean cl = cleaned;
                        CountdownEvent temp = cntd;
+                       ManualResetEventSlim evt = postPhaseEvt;
                        
                        if (!temp.Signal ()) {
-                               result = Wait (associate, temp, cl);
+                               result = Wait (associate, temp, evt);
                        } else {
                                result = true;
-                               PostPhaseAction (cl);
+                               PostPhaseAction (evt);
                        }
                        
                        return result;
                }
                
-               bool Wait (Func<CountdownEvent, bool> associate, CountdownEvent temp, AtomicBoolean cl)
+               bool Wait (Func<CountdownEvent, bool> associate, CountdownEvent temp, ManualResetEventSlim evt)
                {
                        if (!associate (temp))
                                return false;
                        
-                       SpinWait sw = new SpinWait ();
-                       while (!cl.Value)
-                               sw.SpinOnce ();
+                       evt.Wait ();
                        
                        return true;
                }
                
-               void PostPhaseAction (AtomicBoolean cl)
+               void PostPhaseAction (ManualResetEventSlim evt)
                {
-                       if (postPhaseAction != null)
-                               postPhaseAction (this);
+                       if (postPhaseAction != null) {
+                               try {
+                                       postPhaseAction (this);
+                               } catch (Exception e) {
+                                       throw new BarrierPostPhaseException (e);
+                               }
+                       }
                        
                        InitCountdownEvent ();
-                       
-                       cl.Value = true;
                        phase++;
+
+                       evt.Set ();
                }
                
                public long CurrentPhaseNumber {
diff --git a/mcs/class/System/System.Threading/BarrierPostPhaseException.cs b/mcs/class/System/System.Threading/BarrierPostPhaseException.cs
new file mode 100644 (file)
index 0000000..3d22cbf
--- /dev/null
@@ -0,0 +1,66 @@
+// 
+// BarrierPostPhaseException.cs
+//  
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+// 
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
+using System;
+using System.Runtime.Serialization;
+
+namespace System.Threading
+{
+       [SerializableAttribute]
+       public class BarrierPostPhaseException : Exception
+       {
+               const string DefaultMessage = "An exception has occured during the postphase action";
+
+               public BarrierPostPhaseException () : this (DefaultMessage)
+               {
+
+               }
+               
+               public BarrierPostPhaseException (Exception ex) : this (DefaultMessage, ex)
+               {
+
+               }
+
+               public BarrierPostPhaseException (string message) : base (message)
+               {
+
+               }
+
+               public BarrierPostPhaseException (string message, Exception ex) : base (message, ex)
+               {
+
+               }
+
+               protected BarrierPostPhaseException (SerializationInfo infos, StreamingContext context) : base (infos, context)
+               {
+
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index 89a5088e140c589a7f82a15fddf1cadb100e8a86..ec5a4b9ce8eed4539502d9b5b77e2928117d2946 100644 (file)
@@ -967,6 +967,7 @@ System.Threading/SemaphoreFullException.cs
 System.Threading/ThreadExceptionEventArgs.cs
 System.Threading/ThreadExceptionEventHandler.cs
 System.Threading/Barrier.cs
+System.Threading/BarrierPostPhaseException.cs
 System.Timers/ElapsedEventArgs.cs
 System.Timers/ElapsedEventHandler.cs
 System.Timers/Timer.cs
@@ -1026,7 +1027,7 @@ System/UriData.cs
 System.Collections.Concurrent/BlockingCollection.cs
 System.Collections.Concurrent/ConcurrentBag.cs
 
-../corlib/System.Threading.Tasks/Internal/CyclicDeque.cs
+../corlib/System.Threading.Tasks/CyclicDeque.cs
 ../corlib/System.Threading/AtomicBoolean.cs
 
 ../corlib/System.Collections/CollectionDebuggerView.cs
index f94788cfd00c95ce6da8bd54684fa1a476c71d46..d950223ff29382a65528f675a127d82a4fdb40d2 100644 (file)
@@ -392,6 +392,10 @@ namespace System {
                                                path = path.Remove (pos + 1, path.Length - pos - 1);
                        }
                        
+                       // 6 g)
+                       while (path.StartsWith ("/../"))
+                               path = path.Substring (3);
+                       
                        if (!userEscaped)
                                path = EscapeString (path);
                }               
index 300dafba14e4417da6712c5314d4d3286fd59ab3..7a948b464f107e27448bd44c9f7dd9db9fa01699 100644 (file)
@@ -70,7 +70,7 @@ namespace System {
                        if ((format < UriFormat.UriEscaped) || (format > UriFormat.SafeUnescaped))
                                throw new ArgumentOutOfRangeException ("format");
 
-                       Match m = uri_regex.Match (uri.OriginalString);
+                       Match m = uri_regex.Match (uri.OriginalString.Trim ());
 
                        string scheme = scheme_name;
                        int dp = default_port;
index c383fe9aa5be382ee25e6717c22af9e86b2b76f8..6fe50454f58e07e12a5290eaebe939fe022be46d 100644 (file)
@@ -110,6 +110,7 @@ System.Collections.Specialized/StringCollectionTest.cs
 System.Collections.Specialized/StringDictionaryTest.cs
 System.ComponentModel/ArrayConverterTests.cs
 System.ComponentModel/AsyncOperationManagerTest.cs
+System.ComponentModel/AttributeCollectionTest.cs
 System.ComponentModel/AttributeProviderAttributeTest.cs
 System.ComponentModel/BackgroundWorkerTest.cs
 System.ComponentModel/BindingListTest.cs
@@ -250,6 +251,7 @@ System.Net.Mail/SmtpClientTest.cs
 System.Net.Mail/SmtpExceptionTest.cs
 System.Net.Mail/SmtpPermissionTest.cs
 System.Net.Mail/SmtpPermissionAttributeTest.cs
+System.Net.Mail/SmtpServer.cs
 System.Net.Mime/ContentDispositionTest.cs
 System.Net.Mime/ContentTypeTest.cs
 System.Net.NetworkInformation/PhysicalAddressTest.cs
diff --git a/mcs/class/System/Test/System.ComponentModel/AttributeCollectionTest.cs b/mcs/class/System/Test/System.ComponentModel/AttributeCollectionTest.cs
new file mode 100644 (file)
index 0000000..9badf43
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// AttributeCollectionTest.cs
+//
+// Author:
+//     Carlos Alberto Cortez <calberto.cortez@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.ComponentModel;
+using NUnit.Framework;
+
+namespace MonoTests.System.ComponentModel {
+
+       [TestFixture]
+       public class AttributeCollectionTest {
+
+#if NET_4_0
+               [Test]
+               public void Ctor_4_0 ()
+               {
+                       CustomAttributeCollection attr_coll = new CustomAttributeCollection ();
+                       Attribute [] attributes = attr_coll.GetAttributes ();
+                       Assert.AreEqual (true, attributes == null, "#A0");
+               }
+
+               [Test]
+               public void AttributesTest ()
+               {
+                       SerializableAttribute serializable_attr = new SerializableAttribute ();
+                       FlagsAttribute flags_attr = new FlagsAttribute ();
+
+                       CustomAttributeCollection attr_coll = new CustomAttributeCollection (serializable_attr, flags_attr);
+                       Attribute [] attributes = attr_coll.GetAttributes ();
+                       Assert.AreEqual (true, attributes != null, "#A0");
+                       Assert.AreEqual (2, attributes.Length, "#A1");
+
+                       // The property is supposed to be giving us the same instance in all the invocations
+                       Assert.AreSame (attributes, attr_coll.GetAttributes (), "#A2");
+               }
+
+               class CustomAttributeCollection : AttributeCollection
+               {
+                       public CustomAttributeCollection (params Attribute [] attributes)
+                               : base (attributes)
+                       {
+                       }
+
+                       public CustomAttributeCollection ()
+                               : base ()
+                       {
+                       }
+
+                       public Attribute [] GetAttributes ()
+                       {
+                               return Attributes;
+                       }
+               }
+#endif
+       }
+}
+
index 20df9a4f441ef66accecb6e3c3638a8ca170ae9a..6c6f89df0a253d210374343a9e740d7c44f872c6 100644 (file)
@@ -73,9 +73,6 @@ namespace MonoTests.System.ComponentModel {
 
                        a = new ComplexBindingPropertiesAttribute ("source");
                        Assert.IsFalse (0 == a.GetHashCode (), "2");
-
-                       a = new ComplexBindingPropertiesAttribute ();
-                       Assert.IsFalse (0 == a.GetHashCode (), "3");
                }
 
                [Test]
index cfd281ada1f3a47f74617959eee8c2e9fce3c46b..d14caa7ba04557e13401f7460dc64d8e56841b01 100644 (file)
@@ -207,5 +207,27 @@ namespace MonoTests.System.ComponentModel
                                get { return "english"; }
                        }
                }
+
+#if NET_4_0
+               [Test]
+               public void GetCultureName ()
+               {
+                       CustomCultureInfoConverter custom_converter = new CustomCultureInfoConverter ();
+
+                       CultureInfo fr_culture = CultureInfo.GetCultureInfo ("fr-FR");
+                       Assert.AreEqual (fr_culture.Name, custom_converter.GetCultureName (fr_culture), "#A1");
+
+                       CultureInfo es_culture = CultureInfo.GetCultureInfo ("es-MX");
+                       Assert.AreEqual (es_culture.Name, custom_converter.GetCultureName (es_culture), "#A2");
+               }
+
+               class CustomCultureInfoConverter : CultureInfoConverter
+               {
+                       public new string GetCultureName (CultureInfo culture)
+                       {
+                               return base.GetCultureName (culture);
+                       }
+               }
+#endif
        }
 }
index f16794017dd93c8039bc35d8af8f3f0445f3d0da..17e489e239ab8adf3a0745bd19ef9590e27418bb 100644 (file)
@@ -65,9 +65,6 @@ namespace MonoTests.System.ComponentModel {
 
                        a = new DefaultBindingPropertyAttribute ("test");
                        Assert.IsFalse (0 == a.GetHashCode (), "1");
-
-                       a = new DefaultBindingPropertyAttribute ();
-                       Assert.IsFalse (0 == a.GetHashCode (), "2");
                }
 
                [Test]
index 3e3f2a79b6e97cd44ccf6de2ceb0f22f80d2be43..5f824d482914d1ebb8a5d20f67e736953e7b16ad 100644 (file)
@@ -290,8 +290,12 @@ namespace MonoTests.System.Configuration {
                        // such cases.
 #if TARGET_JVM
                        string expected = "MonoTests.System.Configuration.ProviderPoker, System.Test, Version=0.0.0.0";
+#else
+#if NET_4_0
+                       string expected = "MonoTests.System.Configuration.ProviderPoker, System_test_net_4_0, Version=0.0.0.0";
 #else
                        string expected = "MonoTests.System.Configuration.ProviderPoker, System_test_net_2_0, Version=0.0.0.0";
+#endif
 #endif
                        Assert.AreEqual (expected, new SettingsProviderAttribute (typeof (ProviderPoker)).ProviderTypeName.Substring (0, expected.Length), "#1");
                        TestSettings2 settings = new TestSettings2 ();
index 49c7a4bf6b4d5791d3a1762a91985dc20d8e3d44..7c70b5d6cb119bc848d978a674b78314e8c36693 100644 (file)
@@ -800,7 +800,12 @@ namespace MonoTests.System.Diagnostics
                {
                        Process p = new Process ();
                        p.StartInfo = GetCrossPlatformStartInfo ();
+                       p.StartInfo.UseShellExecute = false;
+                       p.StartInfo.RedirectStandardOutput = true;
+                       p.StartInfo.RedirectStandardError = true;
                        p.Start ();
+                       p.BeginErrorReadLine();
+                       p.BeginOutputReadLine();
                        p.WaitForExit ();
                        String.IsNullOrEmpty (p.ExitCode + "");
                        
index e1f7fe013354254c09ff62c4bf1a81ff0b6a57bf..250236643f5320049f200db7ed9599366ea26e9b 100644 (file)
@@ -12,6 +12,7 @@ using System;
 using System.IO;
 using System.Net.Mail;
 using System.Net.Mime;
+using System.Threading;
 
 namespace MonoTests.System.Net.Mail
 {
@@ -354,6 +355,41 @@ namespace MonoTests.System.Net.Mail
                {
                        Assert.IsFalse (smtp.UseDefaultCredentials);
                }
+
+               [Test]
+               public void Deliver ()
+               {
+                       var server = new SmtpServer ();
+                       var client = new SmtpClient ("localhost", server.EndPoint.Port);
+                       var msg = new MailMessage ("foo@example.com", "bar@example.com", "hello", "howdydoo\r\n");
+
+                       Thread t = new Thread (server.Run);
+                       t.Start ();
+                       client.Send (msg);
+                       t.Join ();
+
+                       Assert.AreEqual ("<foo@example.com>", server.mail_from);
+                       Assert.AreEqual ("<bar@example.com>", server.rcpt_to);
+               }
+
+               [Test]
+               public void Deliver_Envelope ()
+               {
+                       var server = new SmtpServer ();
+                       var client = new SmtpClient ("localhost", server.EndPoint.Port);
+                       var msg = new MailMessage ("foo@example.com", "bar@example.com", "hello", "howdydoo\r\n");
+
+                       msg.Sender = new MailAddress ("baz@example.com");
+
+                       Thread t = new Thread (server.Run);
+                       t.Start ();
+                       client.Send (msg);
+                       t.Join ();
+
+                       Assert.AreEqual ("<baz@example.com>", server.mail_from);
+                       Assert.AreEqual ("<bar@example.com>", server.rcpt_to);
+               }
+
        }
 }
 #endif
diff --git a/mcs/class/System/Test/System.Net.Mail/SmtpServer.cs b/mcs/class/System/Test/System.Net.Mail/SmtpServer.cs
new file mode 100644 (file)
index 0000000..48f6943
--- /dev/null
@@ -0,0 +1,135 @@
+//
+// SmtpServer.cs - Dummy SMTP server used to test SmtpClient
+//
+// Author:
+//   Raja R Harinath <harinath@hurrynot.org>
+//
+
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Net;
+using System.Net.Mail;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading;
+
+namespace MonoTests.System.Net.Mail {
+       public class SmtpServer
+       {
+               public string mail_from, rcpt_to;
+               public StringBuilder data;
+
+               TcpListener server;
+               public IPEndPoint EndPoint {
+                       get { return (IPEndPoint) server.LocalEndpoint; }
+               }
+
+               public SmtpServer ()
+               {
+                       server = new TcpListener (0);
+                       server.Start (1);
+               }
+
+               private static void WriteNS (NetworkStream ns, string s)
+               {
+                       Trace ("response", s);
+                       byte [] bytes = Encoding.ASCII.GetBytes (s);
+                       ns.Write (bytes, 0, bytes.Length);
+               }
+
+               public void Run ()
+               {
+                       string s;
+                       using (TcpClient client = server.AcceptTcpClient ()) {
+                               Trace ("connection", EndPoint.Port);
+                               using (NetworkStream ns = client.GetStream ()) {
+                                       WriteNS (ns, "220 localhost\r\n");
+                                       using (StreamReader r = new StreamReader (ns, Encoding.UTF8)) {
+                                               while ((s = r.ReadLine ()) != null && Dispatch (ns, r, s))
+                                                       ;
+                                       }
+                               }
+                       }
+               }
+
+               // return false == terminate
+               public bool Dispatch (NetworkStream ns, StreamReader r, string s)
+               {
+                       Trace ("command", s);
+                       if (s.Length < 4) {
+                               WriteNS (ns, "502 Huh\r\n");
+                               return false;
+                       }
+
+                       bool retval = true;
+                       switch (s.Substring (0, 4)) {
+                       case "HELO":
+                               break;
+                       case "QUIT":
+                               WriteNS (ns, "221 Quit\r\n");
+                               return false;
+                       case "MAIL":
+                               mail_from = s.Substring (10);
+                               break;
+                       case "RCPT":
+                               rcpt_to = s.Substring (8);
+                               break;
+                       case "DATA":
+                               WriteNS (ns, "354 Continue\r\n");
+                               data = new StringBuilder ();
+                               while ((s = r.ReadLine ()) != null) {
+                                       if (s == ".")
+                                               break;
+                                       data.AppendLine (s);
+                               }
+                               Trace ("end of data", s);
+                               retval = (s != null);
+                               break;
+                       default:
+                               WriteNS (ns, "502 Huh\r\n");
+                               return true;
+                       }
+
+                       WriteNS (ns, "250 OK\r\n");
+                       return retval;
+               }
+
+               [Conditional ("TEST")]
+               static void Trace (string key, object value)
+               {
+                       Console.Error.WriteLine ("{0}: {1}", key, value);
+               }
+
+#if TEST
+               static void DoTest (SmtpServer s, SmtpClient c, MailMessage m)
+               {
+                       Thread t = new Thread (s.Run);
+                       t.Start ();
+                       c.Send (m);
+                       t.Join ();
+
+                       Console.WriteLine ("Message From: {0}", m.From);
+                       Console.WriteLine ("Message Sender: {0}", m.Sender);
+                       Console.WriteLine ("Mail From: {0}", s.mail_from);
+                       Console.WriteLine ("Rcpt To: {0}", s.rcpt_to);
+                       Console.WriteLine ("-------------------------------------");
+                       Console.Write (s.data);
+                       Console.WriteLine ("-------------------------------------");
+               }
+
+               static void Main ()
+               {
+                       var server = new SmtpServer ();
+                       var client = new SmtpClient ("localhost", server.EndPoint.Port);
+                       var msg = new MailMessage ("foo@example.com", "bar@example.com", "hello", "howdydoo");
+
+                       DoTest (server, client, msg);
+
+                       msg.Sender = new MailAddress ("baz@example.com");
+
+                       DoTest (server, client, msg);
+               }
+#endif
+       }
+}
index a4aa8af91b555e970f65e59d54df9aac4457e478..76faae962bff81024ca34d9fdb8cba53cfeb9c89 100644 (file)
@@ -337,7 +337,11 @@ namespace MonoTests.System.Net
                        0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00,
                        0x49, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x20, 0x56, 0x65,
+#if NET_4_0
+                       0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x34, 0x2e, 0x30, 0x2e, 0x30,
+#else
                        0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x32, 0x2e, 0x30, 0x2e, 0x30,
+#endif
                        0x2e, 0x30, 0x2c, 0x20, 0x43, 0x75, 0x6c, 0x74, 0x75, 0x72, 0x65,
                        0x3d, 0x6e, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6c, 0x2c, 0x20, 0x50,
                        0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x54, 0x6f, 0x6b,
index 383b36a788bb829c62f827724dd9039da82730ed..9645dc97317ce24333685d2bfc3829db70077bcb 100644 (file)
@@ -42,6 +42,21 @@ namespace MonoTests.System.Net {
                [Test]
                public void Serialization ()
                {
+#if NET_4_0
+                       string result1 = "<IPermission class=\"System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\"\n" + 
+"version=\"1\">\n" + 
+"<ConnectAccess>\n" + 
+"<URI uri=\"Hello\"/>\n" + 
+"</ConnectAccess>\n" + 
+"</IPermission>\n";
+
+                       string result2 = "<IPermission class=\"System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\"\n" + 
+"version=\"1\">\n" + 
+"<AcceptAccess>\n" + 
+"<URI uri=\"Hello\"/>\n" + 
+"</AcceptAccess>\n" + 
+"</IPermission>\n";
+#else
                        string result1 = "<IPermission class=\"System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\"\n" + 
 "version=\"1\">\n" + 
 "<ConnectAccess>\n" + 
@@ -55,7 +70,7 @@ namespace MonoTests.System.Net {
 "<URI uri=\"Hello\"/>\n" + 
 "</AcceptAccess>\n" + 
 "</IPermission>\n";
-           
+#endif   
                        WebPermission pp = new WebPermission (NetworkAccess.Connect, "Hello");
                        Assert.AreEqual (result1, pp.ToXml ().ToString ().Replace ("\r", ""));
                        
index 5b0263bfd23f3e611cd377a6813c5670f2a24d22..7de43392dbe85c1bcc2f9b140c0fa40323f80e6c 100644 (file)
@@ -33,7 +33,7 @@ using System.Threading;
 namespace MonoTests.System.Threading {
 
        [TestFixture]
-       public class BarrierTest {
+       public class BarrierTests {
                Barrier barrier;
                const int participants = 10;
                bool triggered;
index 00baf03212d4dfaf15ce76961621f88598c83562..2c9d43cd32a7f3dd2fef231efc678a7c0897aadc 100644 (file)
@@ -69,6 +69,7 @@ namespace MonoTests.System
 
                        uri = new Uri("  \r  \n http://test.com\r\n \r\r  ");
                        Assert.AreEqual ("http://test.com/", uri.ToString(), "#k0");
+                       Assert.AreEqual ("http", uri.GetComponents (UriComponents.Scheme, UriFormat.UriEscaped), "#k0-gc");
 
                        uri = new Uri ("http://contoso.com?subject=uri");
                        Assert.AreEqual ("/", uri.AbsolutePath, "#k1");
@@ -156,6 +157,7 @@ namespace MonoTests.System
                        uri = new Uri (new Uri("http://www.contoso.com/xxx/yyy/index.htm"), "../../../foo/bar/Hello World.htm?x=0:8", false);
 #if NET_2_0
                        Assert.AreEqual ("http://www.contoso.com/foo/bar/Hello%20World.htm?x=0:8", uri.AbsoluteUri, "#rel9");
+                       Assert.AreEqual ("/foo/bar/Hello%20World.htm", uri.AbsolutePath, "#rel9-path");
 #else
                        Assert.AreEqual ("http://www.contoso.com/../foo/bar/Hello%20World.htm?x=0:8", uri.AbsoluteUri, "#rel9");
 #endif
diff --git a/mcs/class/aot-compiler/Makefile b/mcs/class/aot-compiler/Makefile
new file mode 100644 (file)
index 0000000..1198ab8
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# This directory is used to AOT the C# compiler to speed up the rest of the class libs build
+# It should be run after the assemblies the compiler depends on have been compiled, since
+# the AOT image has a dependency on the exact assembly versions used to produce it.
+#
+
+thisdir = class/aot-compiler
+
+include ../../build/rules.make
+
+the_libdir = $(topdir)/class/lib/$(PROFILE)/
+
+ifeq (net_2_0, $(PROFILE))
+mcs_exe = $(the_libdir)/gmcs.exe
+else ifeq (net_4_0, $(PROFILE))
+mcs_exe = $(the_libdir)/dmcs.exe
+endif
+
+mcs_aot_image = $(mcs_exe)$(PLATFORM_AOT_SUFFIX)
+
+mscorlib_dll = $(the_libdir)/mscorlib.dll
+mscorlib_aot_image = $(mscorlib_dll)$(PLATFORM_AOT_SUFFIX)
+
+PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+
+ifdef PLATFORM_AOT_SUFFIX
+Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
+$(mcs_aot_image): $(mcs_exe)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mcs_exe)
+
+$(mscorlib_aot_image): $(mscorlib_dll)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mscorlib_dll)
+
+ifdef ENABLE_AOT
+
+ifeq (net_2_0, $(PROFILE))
+all-local: $(mscorlib_aot_image) $(mcs_aot_image)
+endif
+
+ifeq (net_4_0, $(PROFILE))
+all-local: $(mscorlib_aot_image) $(mcs_aot_image)
+endif
+
+clean-local:
+       -rm -f $(mscorlib_aot_image) $(mcs_aot_image)
+
+install-local:
+       $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
+       $(INSTALL_LIB) $(mscorlib_aot_image) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
+       $(INSTALL_LIB) $(mcs_aot_image) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
+
+endif
+
+endif
+
+dist-local: dist-default
index 50e13221d7ac0e8f1f0eff4a9820ea3654ee8002..aa1bf43561c9e0357000cc9ae7f0785cffb955f4 100644 (file)
@@ -1 +1,4 @@
 /*.log
+/foo.txt
+/foo2.txt
+/test.resources
index 5cfc30433fde8ac9965f173a6083a83f86ec6af9..2958b636a024f7aff2c9b759ee7f18274d7b5889 100644 (file)
@@ -11,8 +11,6 @@ LIBRARY_USE_INTERMEDIATE_FILE = yes
 LIBRARY_COMPILE = $(BOOT_COMPILE)
 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 
-AOT_IN_PROFILES = net_2_0 net_4_0
-
 RESOURCE_FILES = \
        resources/collation.core.bin \
        resources/collation.tailoring.bin \
index 5c83c25e34e74dcf51f90368d095dab53cc0b81e..e340b9e885796f463dc4e698b3462d531fc327bf 100644 (file)
@@ -28,6 +28,7 @@
 
 #if NET_4_0
 using System;
+using System.IO;
 using System.Runtime.InteropServices;
 using System.Runtime.ConstrainedExecution;
 
@@ -41,8 +42,15 @@ namespace Microsoft.Win32.SafeHandles {
 
                protected override bool ReleaseHandle ()
                {
-                       throw new NotImplementedException ();
+                       // Need to release an unmanaged pointer *only* in Windows.
+                       if (Path.DirectorySeparatorChar == '\\')
+                               return RegCloseKey (handle) == 0;
+
+                       return true;
                }
+
+               [DllImport ("advapi32.dll", CharSet = CharSet.Unicode, EntryPoint="RegCloseKey")]
+               static extern int RegCloseKey (IntPtr keyHandle);
        }
 }
 #endif
index 7ad0630a585eb4cdc79dcc9488e574b480d6e7f9..31a4dc681400e7d48ea4c16bb79ae5fa992f3153 100644 (file)
@@ -35,6 +35,7 @@
 using System;
 using System.Text;
 using System.Runtime.InteropServices;
+using Microsoft.Win32.SafeHandles;
 
 namespace Microsoft.Win32 {
 
@@ -62,6 +63,8 @@ namespace Microsoft.Win32 {
 
 #if NET_4_0
                RegistryKey CreateSubKey (RegistryKey rkey, string keyname, RegistryOptions options);
+               RegistryKey FromHandle (SafeRegistryHandle handle);
+               IntPtr GetHandle (RegistryKey key);
 #endif
        }
 }
index 2dab10c46c1da548a32c188133f4fbbacee5378d..1c202aa6717aa4464a23dcf97444fa1297b73b13 100644 (file)
@@ -39,6 +39,8 @@ using System.Runtime.InteropServices;
 using System.Security;
 using System.Text;
 using System.Security.AccessControl;
+using System.Security.Permissions;
+using Microsoft.Win32.SafeHandles;
 
 namespace Microsoft.Win32
 {
@@ -53,6 +55,9 @@ namespace Microsoft.Win32
                // RegistryKey object
                //
                object handle;
+#if NET_4_0
+               SafeRegistryHandle safe_handle;
+#endif
 
                object hive; // the RegistryHive if the key represents a base key
                readonly string qname;  // the fully qualified registry key name
@@ -105,7 +110,11 @@ namespace Microsoft.Win32
                ///     Dispose of registry key object. Close the 
                ///     key if it's still open.
                /// </summary>
+#if NET_4_0
+               public void Dispose ()
+#else
                void IDisposable.Dispose ()
+#endif
                {
                        GC.SuppressFinalize (this);
                        Close ();
@@ -154,6 +163,9 @@ namespace Microsoft.Win32
                        
                        RegistryApi.Close (this);
                        handle = null;
+#if NET_4_0
+                       safe_handle = null;
+#endif
                }
                
                
@@ -180,6 +192,31 @@ namespace Microsoft.Win32
                        }
                }
 
+#if NET_4_0
+               [ComVisible (false)]
+               [MonoTODO ("Not implemented in Unix")]
+               public SafeRegistryHandle Handle {
+                       get {
+                               AssertKeyStillValid ();
+
+                               if (safe_handle == null) {
+                                       IntPtr h = RegistryApi.GetHandle (this);
+                                       safe_handle = new SafeRegistryHandle (h, true);
+                               }
+
+                               return safe_handle;
+                       }
+               }
+
+               [ComVisible (false)]
+               [MonoLimitation ("View is ignored in Mono.")]
+               public RegistryView View {
+                       get {
+                               return RegistryView.Default;
+                       }
+               }
+#endif
+
                
                /// <summary>
                ///     Set a registry value.
@@ -374,6 +411,14 @@ namespace Microsoft.Win32
                ///     Delete a sub tree (node, and values alike).
                /// </summary>
                public void DeleteSubKeyTree(string subkey)
+               {
+                       DeleteSubKeyTree (subkey, true);
+               }
+
+#if NET_4_0
+               public
+#endif
+               void DeleteSubKeyTree (string subkey, bool throwOnMissingSubKey)
                {
                        // Note: this is done by deleting sub-nodes recursively.
                        // The preformance is not very good. There may be a 
@@ -384,9 +429,13 @@ namespace Microsoft.Win32
                        AssertKeyNameLength (subkey);
                        
                        RegistryKey child = OpenSubKey (subkey, true);
-                       if (child == null)
+                       if (child == null) {
+                               if (!throwOnMissingSubKey)
+                                       return;
+
                                throw new ArgumentException ("Cannot delete a subkey tree"
                                        + " because the subkey does not exist.");
+                       }
 
                        child.DeleteChildKeysAndValues ();
                        child.Close ();
@@ -449,6 +498,27 @@ namespace Microsoft.Win32
                        AssertKeyStillValid ();
                        return RegistryApi.GetValueNames (this);
                }
+
+#if NET_4_0
+               [ComVisible (false)]
+               [SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+               [MonoTODO ("Not implemented on unix")]
+               public static RegistryKey FromHandle (SafeRegistryHandle handle)
+               {
+                       if (handle == null)
+                               throw new ArgumentNullException ("handle");
+
+                       return RegistryApi.FromHandle (handle);
+               }
+
+               [ComVisible (false)]
+               [SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+               [MonoTODO ("Not implemented on unix")]
+               public static RegistryKey FromHandle (SafeRegistryHandle handle, RegistryKey view)
+               {
+                       return FromHandle (handle);
+               }
+#endif
                
                
                [MonoTODO ("Not implemented on unix")]
@@ -459,6 +529,41 @@ namespace Microsoft.Win32
                        return RegistryApi.OpenRemoteBaseKey (hKey, machineName);
                }
 
+#if NET_4_0
+               [ComVisible (false)]
+               [MonoTODO ("Not implemented on unix")]
+               public static RegistryKey OpenRemoteBaseKey (RegistryHive hKey, string machineName, RegistryView view)
+               {
+                       if (machineName == null)
+                               throw new ArgumentNullException ("machineName");
+                       return RegistryApi.OpenRemoteBaseKey (hKey, machineName);
+               }
+
+               [ComVisible (false)]
+               [MonoLimitation ("View is ignored in Mono")]
+               public static RegistryKey OpenBaseKey (RegistryHive hKey, RegistryView view)
+               {
+                       switch (hKey) {
+                               case RegistryHive.ClassesRoot:
+                                       return Registry.ClassesRoot;
+                               case RegistryHive.CurrentConfig:
+                                       return Registry.CurrentConfig;
+                               case RegistryHive.CurrentUser:
+                                       return Registry.CurrentUser;
+                               case RegistryHive.DynData:
+                                       return Registry.DynData;
+                               case RegistryHive.LocalMachine:
+                                       return Registry.LocalMachine;
+                               case RegistryHive.PerformanceData:
+                                       return Registry.PerformanceData;
+                               case RegistryHive.Users:
+                                       return Registry.Users;
+                       }
+
+                       throw new ArgumentException ("hKey");
+               }
+#endif
+
                [ComVisible (false)]
                [MonoLimitation ("permissionCheck is ignored in Mono")]
                public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck)
@@ -511,7 +616,7 @@ namespace Microsoft.Win32
 
                // returns the key handle for the win32 implementation and the
                // KeyHandler for the unix implementation
-               internal object Handle {
+               internal object InternalHandle {
                        get { return handle; }
                }
 
index ef84cd6f40a04343ba2f207b4a7998b2b1bfe9c7..ff0c7255b30df5ce6e4598c852df90bd5f8a47fd 100644 (file)
@@ -40,6 +40,9 @@ namespace Microsoft.Win32
                DWord,
                MultiString = 7,
                QWord = 11,
+#if NET_4_0
+               None = 12
+#endif
        }
 }
 
index 6d8362776cbd0f823f8c52787a6efdd0a951770e..c056fa73ce2ddf663917fd02ad6cae8d402f54ee 100644 (file)
@@ -41,6 +41,7 @@
 
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Globalization;
 using System.IO;
 using System.Text;
@@ -48,6 +49,7 @@ using System.Runtime.InteropServices;
 using System.Reflection;
 using System.Security;
 using System.Threading;
+using Microsoft.Win32.SafeHandles;
 
 namespace Microsoft.Win32 {
 
@@ -547,6 +549,46 @@ namespace Microsoft.Win32 {
                        return vals;
                }
 
+               public int GetSubKeyCount ()
+               {
+                       return GetSubKeyNames ().Length;
+               }
+
+               public string [] GetSubKeyNames ()
+               {
+                       DirectoryInfo selfDir = new DirectoryInfo (ActualDir);
+                       DirectoryInfo[] subDirs = selfDir.GetDirectories ();
+                       string[] subKeyNames;
+
+                       // for volatile keys (cannot contain non-volatile subkeys) or keys
+                       // without *any* presence in the volatile key section, we can do it simple.
+                       if (IsVolatile || !Directory.Exists (GetVolatileDir (Dir))) {
+                               subKeyNames = new string[subDirs.Length];
+                               for (int i = 0; i < subDirs.Length; i++) {
+                                       DirectoryInfo subDir = subDirs[i];
+                                       subKeyNames[i] = subDir.Name;
+                               }
+                               return subKeyNames;
+                       }
+
+                       // We may have the entries repeated, so keep just one of each one.
+                       DirectoryInfo volatileDir = new DirectoryInfo (GetVolatileDir (Dir));
+                       DirectoryInfo [] volatileSubDirs = volatileDir.GetDirectories ();
+                       Dictionary<string,string> dirs = new Dictionary<string,string> ();
+
+                       foreach (DirectoryInfo dir in subDirs)
+                               dirs [dir.Name] = dir.Name;
+                       foreach (DirectoryInfo volDir in volatileSubDirs)
+                               dirs [volDir.Name] = volDir.Name;
+
+                       subKeyNames = new string [dirs.Count];
+                       int j = 0;
+                       foreach (KeyValuePair<string,string> entry in dirs)
+                               subKeyNames[j++] = entry.Value;
+
+                       return subKeyNames;
+               }
+
                //
                // This version has to do argument validation based on the valueKind
                //
@@ -811,6 +853,13 @@ namespace Microsoft.Win32 {
 
                        return result;
                }
+
+#if NET_4_0
+               public RegistryKey FromHandle (SafeRegistryHandle handle)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
                
                public void Flush (RegistryKey rkey)
                {
@@ -861,7 +910,7 @@ namespace Microsoft.Win32 {
                        KeyHandler self = KeyHandler.Lookup (rkey, true);
                        if (self == null)
                                throw RegistryKey.CreateMarkedForDeletionException ();
-                       return Directory.GetDirectories (self.Dir).Length;
+                       return self.GetSubKeyCount ();
                }
                
                public int ValueCount (RegistryKey rkey)
@@ -906,14 +955,7 @@ namespace Microsoft.Win32 {
                public string [] GetSubKeyNames (RegistryKey rkey)
                {
                        KeyHandler self = KeyHandler.Lookup (rkey, true);
-                       DirectoryInfo selfDir = new DirectoryInfo (self.Dir);
-                       DirectoryInfo[] subDirs = selfDir.GetDirectories ();
-                       string[] subKeyNames = new string[subDirs.Length];
-                       for (int i = 0; i < subDirs.Length; i++) {
-                               DirectoryInfo subDir = subDirs[i];
-                               subKeyNames[i] = subDir.Name;
-                       }
-                       return subKeyNames;
+                       return self.GetSubKeyNames ();
                }
                
                public string [] GetValueNames (RegistryKey rkey)
@@ -954,6 +996,13 @@ namespace Microsoft.Win32 {
                        // key was removed since it was opened or it does not exist.
                        return RegistryValueKind.Unknown;
                }
+
+#if NET_4_0
+               public IntPtr GetHandle (RegistryKey key)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
                
        }
 }
index 41236f29e671931139f1827ce682fddc11ec4803..4ad202c5194885962dd71565a6dfb4edd4c06e61 100644 (file)
@@ -41,6 +41,7 @@ using System.IO;
 using System.Runtime.InteropServices;
 using System.Security;
 using System.Text;
+using Microsoft.Win32.SafeHandles;
 
 namespace Microsoft.Win32
 {
@@ -134,14 +135,14 @@ namespace Microsoft.Win32
                                ref int data, ref int dataSize);
 
                // Returns our handle from the RegistryKey
-               static IntPtr GetHandle (RegistryKey key)
+               public IntPtr GetHandle (RegistryKey key)
                {
-                       return (IntPtr) key.Handle;
+                       return (IntPtr) key.InternalHandle;
                }
 
                static bool IsHandleValid (RegistryKey key)
                {
-                       return key.Handle != null;
+                       return key.InternalHandle != null;
                }
 
                public RegistryValueKind GetValueKind (RegistryKey rkey, string name)
@@ -423,10 +424,28 @@ namespace Microsoft.Win32
                {
                        if (!IsHandleValid (rkey))
                                return;
+#if NET_4_0
+                       SafeRegistryHandle safe_handle = rkey.Handle;
+                       if (safe_handle != null) {
+                               // closes the unmanaged pointer for us.
+                               safe_handle.Close ();
+                               return;
+                       }
+#endif
                        IntPtr handle = GetHandle (rkey);
                        RegCloseKey (handle);
                }
 
+#if NET_4_0
+               public RegistryKey FromHandle (SafeRegistryHandle handle)
+               {
+                       // At this point we can't tell whether the key is writable
+                       // or not (nor the name), so we let the error check code handle it later, as
+                       // .Net seems to do.
+                       return new RegistryKey (handle.DangerousGetHandle (), String.Empty, true);
+               }
+#endif
+
                public RegistryKey CreateSubKey (RegistryKey rkey, string keyName)
                {
                        IntPtr handle = GetHandle (rkey);
@@ -570,6 +589,8 @@ namespace Microsoft.Win32
                                        throw new SecurityException ();
                                case Win32ResultCode.NetworkPathNotFound:
                                        throw new IOException ("The network path was not found.");
+                               case Win32ResultCode.InvalidHandle:
+                                       throw new IOException ("Invalid handle.");
                                default:
                                        // unidentified system exception
                                        throw new SystemException ();
index fa96d1f97f8b8bf1655e10d4b09f42d0b06632f7..1d0cbdaa8598b3fc0113fa868725955a03d86d38 100644 (file)
@@ -52,6 +52,7 @@ namespace Microsoft.Win32
                public const int Success = 0;
                public const int FileNotFound = 2;
                public const int AccessDenied = 5;
+               public const int InvalidHandle = 6;
                public const int InvalidParameter = 87;
                public const int MoreData = 234;
                public const int NetworkPathNotFound = 53;
index fb0774cee2ea84a6e69134fbfa6b13bc0f294fd6..40984d16e5562c503207d8bfd11d6dddcda5544a 100644 (file)
@@ -1,4 +1,4 @@
-// ConcurrentSkipList.cs
+// ConcurrentDictionary.cs
 //
 // Copyright (c) 2009 Jérémie "Garuma" Laval
 //
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
 using System;
 using System.Threading;
 using System.Collections;
 using System.Collections.Generic;
 using System.Runtime.Serialization;
 
-#if NET_4_0 || BOOTSTRAP_NET_4_0
-
 namespace System.Collections.Concurrent
 {
        public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>,
          ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>,
          IDictionary, ICollection, IEnumerable
        {
-               class Pair
-               {
-                       public readonly TKey Key;
-                       public TValue Value;
-
-                       public Pair (TKey key, TValue value)
-                       {
-                               Key = key;
-                               Value = value;
-                       }
-
-                       public override bool Equals (object obj)
-                       {
-                               Pair rhs = obj as Pair;
-                               return rhs == null ? false : Key.Equals (rhs.Key) && Value.Equals (rhs.Value);
-                       }
-
-                       public override int GetHashCode ()
-                       {
-                               return Key.GetHashCode ();
-                       }
-               }
-
-               class Basket: List<Pair>
-               {
-                       public SpinLock Lock = new SpinLock (true);
-               }
-
-               // Assumption: a List<T> is never empty
-               ConcurrentSkipList<Basket> container
-                       = new ConcurrentSkipList<Basket> ((value) => value[0].GetHashCode ());
-               int count;
                IEqualityComparer<TKey> comparer;
 
+               SplitOrderedList<KeyValuePair<TKey, TValue>> internalDictionary = new SplitOrderedList<KeyValuePair<TKey, TValue>> ();
+
                public ConcurrentDictionary () : this (EqualityComparer<TKey>.Default)
                {
                }
@@ -127,41 +97,7 @@ namespace System.Collections.Concurrent
 
                public bool TryAdd (TKey key, TValue value)
                {
-                       if (key == null)
-                               throw new ArgumentNullException ("key");
-                       Basket basket;
-                       bool taken = false;
-
-                       // Add a value to an existing basket
-                       if (TryGetBasket (key, out basket)) {
-                               try {
-                                       basket.Lock.Enter (ref taken);
-
-                                       foreach (var p in basket) {
-                                               if (comparer.Equals (p.Key, key))
-                                                       return false;
-                                       }
-                                       basket.Add (new Pair (key, value));
-                               } finally {
-                                       if (taken)
-                                               basket.Lock.Exit ();
-                               }
-                       } else {
-                               // Add a new basket
-                               basket = new Basket ();
-                               basket.Add (new Pair (key, value));
-
-                               if (container.TryAdd (basket)) {
-                                       Interlocked.Increment (ref count);
-                                       return true;
-                               } else {
-                                       return false;
-                               }
-                       }
-
-                       Interlocked.Increment (ref count);
-
-                       return true;
+                       return internalDictionary.Insert (Hash (key), Make (key, value));
                }
 
                void ICollection<KeyValuePair<TKey,TValue>>.Add (KeyValuePair<TKey, TValue> pair)
@@ -171,27 +107,9 @@ namespace System.Collections.Concurrent
 
                public TValue AddOrUpdate (TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
                {
-                       Basket basket;
-                       TValue temp = default (TValue);
-                       bool taken = false;
-
-                       if (!TryGetBasket (key, out basket)) {
-                               Add (key, (temp = addValueFactory (key)));
-                       } else {
-                               try {
-                                       basket.Lock.Enter (ref taken);
-
-                                       Pair pair = basket.Find ((p) => comparer.Equals (p.Key, key));
-                                       if (pair == null)
-                                               throw new InvalidOperationException ("pair is null, shouldn't be");
-                                       pair.Value = (temp = updateValueFactory (key, pair.Value));
-                               } finally {
-                                       if (taken)
-                                               basket.Lock.Exit ();
-                               }
-                       }
-
-                       return temp;
+                       return internalDictionary.InsertOrUpdate (Hash (key),
+                                                                 () => Make (key, addValueFactory (key)),
+                                                                 (e) => Make (key, updateValueFactory (key, e.Value))).Value;
                }
 
                public TValue AddOrUpdate (TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
@@ -210,51 +128,16 @@ namespace System.Collections.Concurrent
 
                public bool TryGetValue (TKey key, out TValue value)
                {
-                       Basket basket;
-                       value = default (TValue);
-                       bool taken = false;
-
-                       if (!TryGetBasket (key, out basket))
-                               return false;
+                       KeyValuePair<TKey, TValue> pair;
+                       bool result = internalDictionary.Find (Hash (key), out pair);
+                       value = pair.Value;
 
-                       try {
-                               basket.Lock.Enter (ref taken);
-
-                               Pair pair = basket.Find ((p) => comparer.Equals (p.Key, key));
-                               if (pair == null)
-                                       return false;
-                               value = pair.Value;
-                       } finally {
-                               if (taken)
-                                       basket.Lock.Exit ();
-                       }
-
-                       return true;
+                       return result;
                }
 
                public bool TryUpdate (TKey key, TValue newValue, TValue comparand)
                {
-                       Basket basket;
-                       bool taken = false;
-
-                       if (!TryGetBasket (key, out basket))
-                               return false;
-
-                       try {
-                               basket.Lock.Enter (ref taken);
-
-                               Pair pair = basket.Find ((p) => comparer.Equals (p.Key, key));
-                               if (pair.Value.Equals (comparand)) {
-                                       pair.Value = newValue;
-
-                                       return true;
-                               }
-                       } finally {
-                               if (taken)
-                                       basket.Lock.Exit ();
-                       }
-
-                       return false;
+                       return internalDictionary.CompareExchange (Hash (key), Make (key, newValue), (e) => e.Value.Equals (comparand));
                }
 
                public TValue this[TKey key] {
@@ -262,93 +145,26 @@ namespace System.Collections.Concurrent
                                return GetValue (key);
                        }
                        set {
-                               Basket basket;
-                               bool taken = false;
-
-                               if (!TryGetBasket (key, out basket)) {
-                                       Add (key, value);
-                                       return;
-                               }
-
-                               try {
-                                       basket.Lock.Enter (ref taken);
-
-                                       Pair pair = basket.Find ((p) => comparer.Equals (p.Key, key));
-                                       if (pair == null)
-                                               throw new InvalidOperationException ("pair is null, shouldn't be");
-                                       pair.Value = value;
-                               } finally {
-                                       if (taken)
-                                               basket.Lock.Exit ();
-                               }
+                               AddOrUpdate (key, (_) => value, (_, __) => value);
                        }
                }
 
                public TValue GetOrAdd (TKey key, Func<TKey, TValue> valueFactory)
                {
-                       Basket basket;
-                       TValue temp = default (TValue);
-
-                       if (TryGetBasket (key, out basket)) {
-                               Pair pair = null;
-                               bool taken = false;
-
-                               try {
-                                       basket.Lock.Enter (ref taken);
-
-                                       pair = basket.Find ((p) => comparer.Equals (p.Key, key));
-                                       if (pair != null)
-                                               temp = pair.Value;
-                               } finally {
-                                       if (taken)
-                                               basket.Lock.Exit ();
-                               }
-
-                               if (pair == null)
-                                       Add (key, (temp = valueFactory (key)));
-                       } else {
-                               Add (key, (temp = valueFactory (key)));
-                       }
-
-                       return temp;
+                       return internalDictionary.InsertOrGet (Hash (key), Make (key, default(TValue)), () => Make (key, valueFactory (key))).Value;
                }
 
                public TValue GetOrAdd (TKey key, TValue value)
                {
-                       return GetOrAdd (key, (_) => value);
+                       return internalDictionary.InsertOrGet (Hash (key), Make (key, value), null).Value;
                }
 
-               public bool TryRemove(TKey key, out TValue value)
+               public bool TryRemove (TKey key, out TValue value)
                {
-                       value = default (TValue);
-                       Basket b;
-                       bool taken = false;
-
-                       if (!TryGetBasket (key, out b))
-                               return false;
-
-                       try {
-                               b.Lock.Enter (ref taken);
-
-                               TValue temp = default (TValue);
-                               // Should always be == 1 but who know
-                               bool result = b.RemoveAll ((p) => {
-                                       bool r = comparer.Equals (p.Key, key);
-                                       if (r) temp = p.Value;
-                                       return r;
-                               }) >= 1;
-                               value = temp;
-
-                               if (result)
-                                       Interlocked.Decrement (ref count);
-
-                               return result;
-                       } finally {
-                               if (taken)
-                                       b.Lock.Exit ();
-                       }
-
-                       return false;
+                       KeyValuePair<TKey, TValue> data;
+                       bool result = internalDictionary.Delete (Hash (key), out data);
+                       value = data.Value;
+                       return result;
                }
 
                bool Remove (TKey key)
@@ -370,7 +186,8 @@ namespace System.Collections.Concurrent
 
                public bool ContainsKey (TKey key)
                {
-                       return container.ContainsFromHash (key.GetHashCode ());
+                       KeyValuePair<TKey, TValue> dummy;
+                       return internalDictionary.Find (Hash (key), out dummy);
                }
 
                bool IDictionary.Contains (object key)
@@ -429,18 +246,18 @@ namespace System.Collections.Concurrent
                public void Clear()
                {
                        // Pronk
-                       container = new ConcurrentSkipList<Basket> ((value) => value [0].GetHashCode ());
+                       internalDictionary = new SplitOrderedList<KeyValuePair<TKey, TValue>> ();
                }
 
                public int Count {
                        get {
-                               return count;
+                               return internalDictionary.Count;
                        }
                }
 
                public bool IsEmpty {
                        get {
-                               return count == 0;
+                               return Count == 0;
                        }
                }
 
@@ -496,12 +313,12 @@ namespace System.Collections.Concurrent
                        if (arr == null)
                                return;
 
-                       CopyTo (arr, startIndex, count);
+                       CopyTo (arr, startIndex, Count);
                }
 
                void CopyTo (KeyValuePair<TKey, TValue>[] array, int startIndex)
                {
-                       CopyTo (array, startIndex, count);
+                       CopyTo (array, startIndex, Count);
                }
 
                void ICollection<KeyValuePair<TKey, TValue>>.CopyTo (KeyValuePair<TKey, TValue>[] array, int startIndex)
@@ -511,28 +328,11 @@ namespace System.Collections.Concurrent
 
                void CopyTo (KeyValuePair<TKey, TValue>[] array, int startIndex, int num)
                {
-                       // TODO: This is quite unsafe as the count value will likely change during
-                       // the copying. Watchout for IndexOutOfRange thingies
-                       if (array.Length <= count + startIndex)
-                               throw new InvalidOperationException ("The array isn't big enough");
+                       foreach (var kvp in this) {
+                               array [startIndex++] = kvp;
 
-                       int i = startIndex;
-
-                       foreach (Basket b in container) {
-                               bool taken = false;
-
-                               try {
-                                       b.Lock.Enter (ref taken);
-
-                                       foreach (Pair p in b) {
-                                               if (i >= num)
-                                                       break;
-                                               array[i++] = new KeyValuePair<TKey, TValue> (p.Key, p.Value);
-                                       }
-                               } finally {
-                                       if (taken)
-                                               b.Lock.Exit ();
-                               }
+                               if (--num <= 0)
+                                       return;
                        }
                }
 
@@ -548,19 +348,7 @@ namespace System.Collections.Concurrent
 
                IEnumerator<KeyValuePair<TKey, TValue>> GetEnumeratorInternal ()
                {
-                       foreach (Basket b in container) {
-                               bool taken = false;
-
-                               try {
-                                       b.Lock.Enter (ref taken);
-
-                                       foreach (Pair p in b)
-                                               yield return new KeyValuePair<TKey, TValue> (p.Key, p.Value);
-                               } finally {
-                                       if (taken)
-                                               b.Lock.Exit ();
-                               }
-                       }
+                       return internalDictionary.GetEnumerator ();
                }
 
                IDictionaryEnumerator IDictionary.GetEnumerator ()
@@ -619,7 +407,6 @@ namespace System.Collections.Concurrent
                        }
                }
 
-
                bool IDictionary.IsFixedSize {
                        get {
                                return false;
@@ -630,13 +417,14 @@ namespace System.Collections.Concurrent
                        get { return true; }
                }
 
-               bool TryGetBasket (TKey key, out Basket basket)
+               static KeyValuePair<U, V> Make<U, V> (U key, V value)
                {
-                       basket = null;
-                       if (!container.GetFromHash (key.GetHashCode (), out basket))
-                               return false;
+                       return new KeyValuePair<U, V> (key, value);
+               }
 
-                       return true;
+               uint Hash (TKey key)
+               {
+                       return (uint)comparer.GetHashCode (key);
                }
        }
 }
index 0f1873fed53ce08f8c8102ae3e7f3a5c996ad2ef..5c4f1923ae7d0718a290e47c80bf0f2e3e7ffbc4 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // ConcurrentQueue.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,8 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
 using System;
 using System.Threading;
 using System.Collections;
@@ -58,8 +59,6 @@ namespace System.Collections.Concurrent
                
                public void Enqueue (T item)
                {
-                       Interlocked.Increment (ref count);
-                       
                        Node node  = new Node ();
                        node.Value = item;
                        
@@ -84,6 +83,8 @@ namespace System.Collections.Concurrent
                        }
                        // At this point we added correctly our node, now we have to update tail. If it fails then it will be done by another thread
                        Interlocked.CompareExchange (ref tail, node, oldTail);
+
+                       Interlocked.Increment (ref count);
                }
                
                bool IProducerConsumerCollection<T>.TryAdd (T item)
@@ -96,6 +97,7 @@ namespace System.Collections.Concurrent
                {
                        value = default (T);
                        bool advanced = false;
+
                        while (!advanced) {
                                Node oldHead = head;
                                Node oldTail = tail;
@@ -119,6 +121,7 @@ namespace System.Collections.Concurrent
                        }
 
                        Interlocked.Decrement (ref count);
+
                        return true;
                }
                
@@ -145,11 +148,6 @@ namespace System.Collections.Concurrent
                        return (IEnumerator)InternalGetEnumerator ();
                }
                
-               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
-               {
-                       return InternalGetEnumerator ();
-               }
-               
                public IEnumerator<T> GetEnumerator ()
                {
                        return InternalGetEnumerator ();
index e8c637f7ebd5d2b46797da33bb0b148c1cda880a..1c0b8adcf492926de058ebfac87cc5c761783d01 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // ConcurrentSkipList.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Threading;
 using System.Collections;
index c045d06b6e40d188630e3603a0c89da2bdb394d3..edc3c5c1f6a77fd741574d4e34147ea960f2a831 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // ConcurrentStack.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,8 @@
 //
 //
 
+#if NET_4_0
+
 using System;
 using System.Threading;
 using System.Collections;
@@ -172,16 +173,11 @@ namespace System.Collections.Concurrent
                        return (IEnumerator)InternalGetEnumerator ();
                }
                
-               IEnumerator<T> IEnumerable<T>.GetEnumerator ()
-               {
-                       return InternalGetEnumerator ();
-               }
-               
                public IEnumerator<T> GetEnumerator ()
                {
                        return InternalGetEnumerator ();
                }
-               
+
                IEnumerator<T> InternalGetEnumerator ()
                {
                        Node my_head = head;
index b9f10598bdbb7130f6f6165a444690a7d757aa41..3e632727deede9be53aa0d2c31db2969051f4108 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // IConcurrentCollection.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Collections;
 using System.Collections.Generic;
diff --git a/mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs b/mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs
new file mode 100644 (file)
index 0000000..58b9137
--- /dev/null
@@ -0,0 +1,398 @@
+// SplitOrderedList.cs
+//
+// Copyright (c) 2010 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+//
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+
+namespace System.Collections.Concurrent
+{
+       internal class SplitOrderedList<T>
+       {
+               static readonly byte[] reverseTable = {
+                       0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240, 8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248, 4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244, 12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243, 11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251, 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247, 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255
+               };
+
+               static readonly byte[] logTable = {
+                       0xFF, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+               };
+
+               class Node 
+               {
+                       public readonly bool Marked;
+                       public readonly uint Key;
+                       public T Data;
+                       
+                       public Node Next;
+                       
+                       public Node (uint key, T data)
+                               : this (false)
+                       {
+                               this.Key = key;
+                               this.Data = data;
+                       }
+                       
+                       protected Node (bool marked)
+                       {
+                               this.Marked = marked;
+                       }
+               }
+               
+               class MarkedNode : Node
+               {
+                       public MarkedNode (Node wrapped) : base (true)
+                       {
+                               Next = wrapped;
+                       }
+               }
+
+               const int MaxLoad = 5;
+               const int SegmentSize = 50;
+
+               [ThreadStatic]
+               Node[] segmentCache;
+
+               Node head;
+               Node tail;
+               
+               Node[][] buckets = new Node[10][];
+               int count;
+               int size = 1;
+
+               ManualResetEventSlim mres = new ManualResetEventSlim (true);
+               SpinLock mresLock = new SpinLock ();
+               
+               public SplitOrderedList ()
+               {
+                       head = new Node (0, default (T));
+                       tail = new Node (uint.MaxValue, default (T));
+                       head.Next = tail;
+                       SetBucket (0, head);
+               }
+
+               public int Count {
+                       get {
+                               return count;
+                       }
+               }
+
+               public T InsertOrUpdate (uint key, Func<T> addGetter, Func<T, T> updateGetter)
+               {
+                       Node current;
+                       bool result = InsertInternal (key, default (T), addGetter, out current);
+
+                       if (result)
+                               return current.Data;
+
+                       // FIXME: this should have a CAS-like behavior
+                       return current.Data = updateGetter (current.Data);
+               }
+               
+               public bool Insert (uint key, T data)
+               {
+                       Node current;
+                       return InsertInternal (key, data, null, out current);
+               }
+
+               public T InsertOrGet (uint key, T data, Func<T> dataCreator)
+               {
+                       Node current;
+                       InsertInternal (key, data, dataCreator, out current);
+                       return current.Data;
+               }
+
+               bool InsertInternal (uint key, T data, Func<T> dataCreator, out Node current)
+               {
+                       Node node = new Node (ComputeRegularKey (key), data);
+                       uint b = key % (uint)size;
+                       
+                       if (GetBucket (b) == null)
+                               InitializeBucket (b);
+                       if (!ListInsert (node, GetBucket (b), out current, dataCreator))
+                               return false;
+
+                       int csize = size;
+                       if (Interlocked.Increment (ref count) / csize > MaxLoad)
+                               Interlocked.CompareExchange (ref size, 2 * csize, csize);
+
+                       current = node;
+
+                       return true;
+               }
+               
+               public bool Find (uint key, out T data)
+               {
+                       Node node;
+                       uint b = key % (uint)size;
+                       data = default (T);
+
+                       if (GetBucket (b) == null)
+                               InitializeBucket (b);
+
+                       if (!ListFind (ComputeRegularKey (key), GetBucket (b), out node))
+                               return false;
+
+                       data = node.Data;
+
+                       return !node.Marked;
+               }
+
+               public bool CompareExchange (uint key, T data, Func<T, bool> check)
+               {
+                       Node node;
+                       uint b = key % (uint)size;
+
+                       if (GetBucket (b) == null)
+                               InitializeBucket (b);
+
+                       if (!ListFind (ComputeRegularKey (key), GetBucket (b), out node))
+                               return false;
+
+                       if (!check (node.Data))
+                               return false;
+
+                       node.Data = data;
+
+                       return true;
+               }
+
+               public bool Delete (uint key, out T data)
+               {
+                       uint b = key % (uint)size;
+                       if (GetBucket (b) == null)
+                               InitializeBucket (b);
+
+                       if (!ListDelete (GetBucket (b), ComputeRegularKey (key), out data))
+                               return false;
+
+                       Interlocked.Decrement (ref count);
+                       return true;
+               }
+
+               public IEnumerator<T> GetEnumerator ()
+               {
+                       Node node = head.Next;
+
+                       while (node != tail) {
+                               while (node.Marked || (node.Key & 1) == 0) {
+                                       node = node.Next;
+                                       if (node == tail)
+                                               yield break;
+                               }
+                               yield return node.Data;
+                               node = node.Next;
+                       }
+               }
+
+               void InitializeBucket (uint b)
+               {
+                       Node current;
+                       uint parent = GetParent (b);
+                       if (GetBucket (parent) == null)
+                               InitializeBucket ((uint)parent);
+
+                       Node dummy = new Node (ComputeDummyKey (b), default (T));
+                       if (!ListInsert (dummy, GetBucket (parent), out current, null))
+                               dummy = current;
+
+                       SetBucket (b, dummy);
+               }
+               
+               // Turn v's MSB off
+               uint GetParent (uint v)
+               {
+                       uint t, tt;
+                       
+                       // Find MSB position in v
+                       var pos = (tt = v >> 16) > 0 ?
+                               (t = tt >> 8) > 0 ? 24 + logTable[t] : 16 + logTable[tt] :
+                               (t = v >> 8) > 0 ? 8 + logTable[t] : logTable[v];
+
+                       return (uint)(v & ~(1 << pos));
+               }
+
+               // Reverse integer bits and make sure LSB is set
+               uint ComputeRegularKey (uint key)
+               {
+                       return ComputeDummyKey (key | 0x80000000);
+               }
+               
+               // Reverse integer bits
+               uint ComputeDummyKey (uint key)
+               {
+                       return ((uint)reverseTable[key & 0xff] << 24) | 
+                               ((uint)reverseTable[(key >> 8) & 0xff] << 16) | 
+                               ((uint)reverseTable[(key >> 16) & 0xff] << 8) |
+                               ((uint)reverseTable[(key >> 24) & 0xff]);
+               }
+
+               // Bucket storage is abstracted in a simple two-layer tree to avoid too much memory resize
+               Node GetBucket (uint index)
+               {
+                       int segment = (int)(index / SegmentSize);
+                       CheckSegment (segment);
+                       if (buckets[segment] == null)
+                               return null;
+
+                       return buckets[segment][index % SegmentSize];
+               }
+
+               void SetBucket (uint index, Node node)
+               {
+                       int segment = (int)(index / SegmentSize);
+                       CheckSegment (segment);
+                       if (buckets[segment] == null) {
+                               // Cache segment creation in case CAS fails
+                               Node[] newSegment = segmentCache == null ? new Node[SegmentSize] : segmentCache;
+                               segmentCache = Interlocked.CompareExchange (ref buckets[segment], newSegment, null) == null ? null : newSegment;
+                       }
+                       buckets[segment][index % SegmentSize] = node;
+               }
+
+               // When we run out of space for bucket storage, we use a lock-based array resize
+               void CheckSegment (int segment)
+               {
+                       while (segment >= buckets.Length) {
+                               bool shouldResize = false;
+                               bool taken = false;
+                               try {
+                                       mresLock.Enter (ref taken);
+                                       if (mres.IsSet) {
+                                               shouldResize = true;
+                                               mres.Reset ();
+                                       }
+                               } finally {
+                                       if (taken)
+                                               mresLock.Exit ();
+                               }
+
+                               if (shouldResize) {
+                                       Array.Resize (ref buckets, buckets.Length * 2);
+                                       mres.Set ();
+                               } else {
+                                       mres.Wait ();
+                               }
+                       }
+               }
+               
+               Node ListSearch (uint key, ref Node left, Node h)
+               {
+                       Node leftNodeNext = null, rightNode = null;
+                       
+               search_again:
+                       do {
+                               Node t = h;
+                               Node tNext = h.Next;
+                               
+                               do {
+                                       if (!tNext.Marked) {
+                                               left = t;
+                                               leftNodeNext = tNext;
+                                       }
+                                       
+                                       t = tNext.Marked ? tNext.Next : tNext;
+                                       if (t == tail)
+                                               break;
+                                       
+                                       tNext = t.Next;
+                               } while (tNext.Marked || t.Key < key);
+                               
+                               rightNode = t;
+                               
+                               if (leftNodeNext == rightNode) {
+                                       if (rightNode != tail && rightNode.Next.Marked)
+                                               goto search_again;
+                                       else 
+                                               return rightNode;
+                               }
+                               
+                               if (Interlocked.CompareExchange (ref left.Next, rightNode, leftNodeNext) == leftNodeNext) {
+                                       if (rightNode != tail && rightNode.Next.Marked)
+                                               goto search_again;
+                                       else
+                                               return rightNode;
+                               }
+                       } while (true);
+               }
+       
+               bool ListDelete (Node startPoint, uint key, out T data)
+               {
+                       Node rightNode = null, rightNodeNext = null, leftNode = null;
+                       data = default (T);
+                       
+                       do {
+                               rightNode = ListSearch (key, ref leftNode, startPoint);
+                               if (rightNode == tail || rightNode.Key != key)
+                                       return false;
+
+                               data = rightNode.Data;
+                               
+                               rightNodeNext = rightNode.Next;
+                               if (!rightNodeNext.Marked)
+                                       if (Interlocked.CompareExchange (ref rightNode.Next, new MarkedNode (rightNodeNext), rightNodeNext) == rightNodeNext)
+                                               break;
+                       } while (true);
+                       
+                       if (Interlocked.CompareExchange (ref leftNode.Next, rightNode, rightNodeNext) != rightNodeNext)
+                               rightNode = ListSearch (rightNode.Key, ref leftNode, startPoint);
+                       
+                       return true;
+               }
+               
+               bool ListInsert (Node newNode, Node startPoint, out Node current, Func<T> dataCreator)
+               {
+                       uint key = newNode.Key;
+                       Node rightNode = null, leftNode = null;
+                       
+                       do {
+                               rightNode = current = ListSearch (key, ref leftNode, startPoint);
+                               if (rightNode != tail && rightNode.Key == key)
+                                       return false;
+                               
+                               newNode.Next = rightNode;
+                               if (dataCreator != null)
+                                       newNode.Data = dataCreator ();
+                               if (Interlocked.CompareExchange (ref leftNode.Next, newNode, rightNode) == rightNode)
+                                       return true;
+                       } while (true);
+               }
+               
+               bool ListFind (uint key, Node startPoint, out Node data)
+               {
+                       Node rightNode = null, leftNode = null;
+                       data = null;
+                       
+                       rightNode = ListSearch (key, ref leftNode, startPoint);
+                       data = rightNode;
+                       
+                       return rightNode != tail && rightNode.Key == key;
+               }
+       }
+}
+
+#endif
index a37ad1fa061573d8f5f5d227738a5203a37572a7..5efe84a48d6408c8180fbee0c98ec2c55e85d052 100644 (file)
@@ -155,10 +155,11 @@ namespace System.IO {
                static StreamReader TryOpen (string name)
                {
                        if (File.Exists (name))
-                               return new StreamReader (name, Encoding.ASCII);
+                               return new StreamReader (name);
                        return null;
                }
 
+               static char [] space = { ' ' };
                static DriveInfo [] LinuxGetDrives ()
                {
                        using (StreamReader mounts = TryOpen ("/proc/mounts")){
@@ -168,27 +169,42 @@ namespace System.IO {
                                while ((line = mounts.ReadLine ()) != null){
                                        if (line.StartsWith ("rootfs"))
                                                continue;
-                                       int p;
-
-                                       p = line.IndexOf (' ');
-                                       if (p == -1)
-                                               continue;
-                                       string rest = line.Substring (p+1);
-                                       p = rest.IndexOf (' ');
-                                       if (p == -1)
+                                       string [] parts = line.Split (space, 4);
+                                       if (parts.Length < 3)
                                                continue;
-                                       string path = rest.Substring (0, p);
-                                       rest = rest.Substring (p+1);
-                                       p = rest.IndexOf (' ');
-                                       if (p == -1)
-                                               continue;
-                                       string fstype = rest.Substring (0, p);
+                                       string path = Unescape (parts [1]);
+                                       string fstype = parts [2];
                                        drives.Add (new DriveInfo (_DriveType.Linux, path, fstype));
                                }
 
                                return (DriveInfo []) drives.ToArray (typeof (DriveInfo));
                        }
                }
+
+               static string Unescape (string path)
+               {
+                       StringBuilder sb = null;
+                       int start = 0;
+                       do {
+                               int slash = path.IndexOf ('\\', start);
+                               if (slash >= 0) {
+                                       if (sb == null)
+                                               sb = new StringBuilder ();
+                                       string str = path.Substring (start, slash - start);
+                                       sb.Append (path.Substring (start, slash - start));
+                                       char c = (char) ((path [slash + 1] - '0') << 6);
+                                       c += (char) ((path [slash + 2] - '0') << 3);
+                                       c += (char) (path [slash + 3] - '0');
+                                       sb.Append (c);
+                                       start = slash + 4;
+                                       continue;
+                               }
+                               if (start == 0)
+                                       return path;
+                               sb.Append (path.Substring (start));
+                               return sb.ToString ();
+                       } while (true);
+               }
                
                static DriveInfo [] UnixGetDrives ()
                {
index 685951cffdab0e0fc5f66ba3d71218c414e76b56..9b8144996964ffc729a9224fc8e05878fe148773 100644 (file)
@@ -473,14 +473,19 @@ namespace System.Reflection.Emit
                [ComVisible (true)]
                public ConstructorBuilder DefineDefaultConstructor (MethodAttributes attributes)
                {
-                       Type parent_type;
+                       Type parent_type, old_parent_type;
 
                        if (parent != null)
                                parent_type = parent;
                        else
                                parent_type = pmodule.assemblyb.corlib_object_type;
 
+                       old_parent_type = parent_type;
                        parent_type = parent_type.InternalResolve ();
+                       /*This avoids corlib to have self references.*/
+                       if (parent_type == typeof (object) || parent_type == typeof (ValueType))
+                               parent_type = old_parent_type;
+
                        ConstructorInfo parent_constructor =
                                parent_type.GetConstructor (
                                        BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
index 74eaf7d04c158feaf5b91b3a221e839d0ee6ddfd..80e6a141239497a3737239517f5ae33e5bb3e653 100644 (file)
@@ -43,9 +43,17 @@ namespace System.Reflection {
        public sealed
 #endif
        class CustomAttributeData {
+               class LazyCAttrData {
+                       internal Assembly assembly;
+                       internal IntPtr data;
+                       internal uint data_length;
+               }
+
                ConstructorInfo ctorInfo;
                IList<CustomAttributeTypedArgument> ctorArgs;
                IList<CustomAttributeNamedArgument> namedArgs;
+               LazyCAttrData lazyData;
+
 
 #if NET_4_0
                protected CustomAttributeData ()
@@ -53,17 +61,34 @@ namespace System.Reflection {
                }
 #endif
 
-               internal CustomAttributeData (ConstructorInfo ctorInfo, object [] ctorArgs, object [] namedArgs)
+               internal CustomAttributeData (ConstructorInfo ctorInfo, Assembly assembly, IntPtr data, uint data_length)
                {
                        this.ctorInfo = ctorInfo;
-                       
-                       this.ctorArgs = Array.AsReadOnly<CustomAttributeTypedArgument> 
-                               (ctorArgs != null ? UnboxValues<CustomAttributeTypedArgument> (ctorArgs) : new CustomAttributeTypedArgument [0]);
-                       
-                       this.namedArgs = Array.AsReadOnly<CustomAttributeNamedArgument> 
-                               (namedArgs != null ? UnboxValues<CustomAttributeNamedArgument> (namedArgs) : new CustomAttributeNamedArgument [0]);
+                       this.lazyData = new LazyCAttrData ();
+                       this.lazyData.assembly = assembly;
+                       this.lazyData.data = data;
+                       this.lazyData.data_length = data_length;
                }
 
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               static extern void ResolveArgumentsInternal (ConstructorInfo ctor, Assembly assembly, IntPtr data, uint data_length, out object[] ctorArgs, out object[] namedArgs); 
+
+               void ResolveArguments ()
+               {
+                       object[] ctor_args, named_args;
+                       if (lazyData == null)
+                               return;
+
+                       ResolveArgumentsInternal (ctorInfo, lazyData.assembly, lazyData.data, lazyData.data_length, out ctor_args, out named_args);
+
+                       this.ctorArgs = Array.AsReadOnly<CustomAttributeTypedArgument>
+                               (ctor_args != null ? UnboxValues<CustomAttributeTypedArgument> (ctor_args) : new CustomAttributeTypedArgument [0]);
+                       this.namedArgs = Array.AsReadOnly<CustomAttributeNamedArgument> 
+                               (named_args != null ? UnboxValues<CustomAttributeNamedArgument> (named_args) : new CustomAttributeNamedArgument [0]);
+                       
+                       lazyData = null;
+               }
+               
                [ComVisible (true)]
                public
 #if NET_4_0
@@ -82,6 +107,7 @@ namespace System.Reflection {
 #endif
                IList<CustomAttributeTypedArgument> ConstructorArguments {
                        get {
+                               ResolveArguments ();
                                return ctorArgs;
                        }
                }
@@ -92,6 +118,7 @@ namespace System.Reflection {
 #endif
                IList<CustomAttributeNamedArgument> NamedArguments {
                        get {
+                               ResolveArguments ();
                                return namedArgs;
                        }
                }
index df0becc0f61dac3dcc642cd7b66ff309d01d63a3..5a0572936adf4727b1ce13fddf8734733707c4a4 100644 (file)
@@ -60,8 +60,13 @@ namespace System.Reflection {
                        }
                }
 
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern Type ResolveType ();
+
                public override Type FieldType { 
                        get {
+                               if (type == null)
+                                       type = ResolveType ();
                                return type;
                        }
                }
@@ -120,7 +125,7 @@ namespace System.Reflection {
                }
 
                public override string ToString () {
-                       return String.Format ("{0} {1}", type, name);
+                       return String.Format ("{0} {1}", FieldType, name);
                }
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
@@ -144,9 +149,9 @@ namespace System.Reflection {
                        CheckGeneric ();
                        if (val != null) {
                                object newVal;
-                               newVal = binder.ChangeType (val, type, culture);
+                               newVal = binder.ChangeType (val, FieldType, culture);
                                if (newVal == null)
-                                       throw new ArgumentException ("Object type " + val.GetType() + " cannot be converted to target type: " + type, "val");
+                                       throw new ArgumentException ("Object type " + val.GetType() + " cannot be converted to target type: " + FieldType, "val");
                                val = newVal;
                        }
                        SetValueInternal (this, obj, val);
index 833c893e4b859fd80deb6ca507c2ca1443c1ea23..3bb09bc7a056db8b2e691cbb5139fcd7386e641f 100644 (file)
@@ -40,6 +40,7 @@ namespace System.Reflection {
        
        internal struct MonoPropertyInfo {
                public Type parent;
+               public Type declaring_type;
                public String name;
                public MethodInfo get_method;
                public MethodInfo set_method;
@@ -134,7 +135,7 @@ namespace System.Reflection {
                public override Type DeclaringType {
                        get {
                                CachePropertyInfo (PInfo.DeclaringType);
-                               return info.parent;
+                               return info.declaring_type;
                        }
                }
                
index fa0344c771e185b9b0bf8ce078f780851b8e666d..913f61ee1abceb45d62b7aeec9b8d2415b653eaa 100644 (file)
@@ -1066,6 +1066,8 @@ namespace System.Runtime.InteropServices
                                throw new ArgumentNullException ("t");
                        if (!t.IsSubclassOf (typeof (MulticastDelegate)) || (t == typeof (MulticastDelegate)))
                                throw new ArgumentException ("Type is not a delegate", "t");
+                       if (t.IsGenericType)
+                               throw new ArgumentException ("The specified Type must not be a generic type definition.");
                        if (ptr == IntPtr.Zero)
                                throw new ArgumentNullException ("ptr");
 
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs
new file mode 100644 (file)
index 0000000..9622824
--- /dev/null
@@ -0,0 +1,59 @@
+// System.Runtime.InteropServices.TypeIdentifierAttribute.cs
+// 
+// Name: Rodrigo Kumpera <rkumpera@novell.com>
+// 
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_0
+
+using System;
+
+namespace System.Runtime.InteropServices {
+       [AttributeUsageAttribute (AttributeTargets.Struct | AttributeTargets.Enum |
+                AttributeTargets.Interface | AttributeTargets.Delegate,
+               Inherited = false)]
+       public sealed class TypeIdentifierAttribute : Attribute {
+               string scope;
+               string identifier;
+
+               public TypeIdentifierAttribute ()
+               {
+               }
+
+               public TypeIdentifierAttribute (string scope, string identifier)
+               {
+                       this.scope = scope;
+                       this.identifier = identifier;
+               }               
+
+               public string Scope {
+                       get { return scope; }
+               }
+
+               public string Identifier {
+                       get { return identifier; }
+               }
+       }
+}
+
+#endif
index 033977fb79c17b464cc33647a063830f5c65caca..9fc2f723a1fb5fb930cd8321dfe1b07636893d1d 100644 (file)
@@ -267,7 +267,12 @@ namespace System.Runtime.Remoting.Channels
                public virtual IMessageCtrl AsyncProcessMessage (IMessage reqMsg, IMessageSink replySink) 
                {
                        AsyncRequest req = new AsyncRequest (reqMsg, replySink);
-                       ThreadPool.QueueUserWorkItem (new WaitCallback (SendAsyncMessage), req);
+                       ThreadPool.QueueUserWorkItem (new WaitCallback ((data) => {
+                               try {
+                                       SendAsyncMessage (data);
+                               } catch {}
+                               }
+                               ), req);
                        return null;
                }
                
index ca52953270878766b5b489ab51073759f0430b68..6d9aeadbd687c106709a6aad6ea0426213c3b102 100644 (file)
@@ -67,7 +67,11 @@ namespace System.Runtime.Remoting.Contexts {
                bool frozen;
                
                static int global_count;
-               static Hashtable namedSlots = new Hashtable ();
+
+               /* Wrap this in a nested class so its not constructed during shutdown */
+               class NamedSlots {
+                       public static Hashtable namedSlots = new Hashtable ();
+               }
 
                static DynamicPropertyCollection global_dynamic_properties;
                DynamicPropertyCollection context_dynamic_properties;
@@ -354,19 +358,19 @@ namespace System.Runtime.Remoting.Contexts {
                
                public static LocalDataStoreSlot AllocateNamedDataSlot (string name)
                {
-                       lock (namedSlots.SyncRoot)
+                       lock (NamedSlots.namedSlots.SyncRoot)
                        {
                                LocalDataStoreSlot slot = AllocateDataSlot ();
-                               namedSlots.Add (name, slot);
+                               NamedSlots.namedSlots.Add (name, slot);
                                return slot;
                        }
                }
                
                public static void FreeNamedDataSlot (string name)
                {
-                       lock (namedSlots.SyncRoot)
+                       lock (NamedSlots.namedSlots.SyncRoot)
                        {
-                               namedSlots.Remove (name);
+                               NamedSlots.namedSlots.Remove (name);
                        }
                }
                
@@ -384,9 +388,9 @@ namespace System.Runtime.Remoting.Contexts {
                
                public static LocalDataStoreSlot GetNamedDataSlot (string name)
                {
-                       lock (namedSlots.SyncRoot)
+                       lock (NamedSlots.namedSlots.SyncRoot)
                        {
-                               LocalDataStoreSlot slot = namedSlots [name] as LocalDataStoreSlot;
+                               LocalDataStoreSlot slot = NamedSlots.namedSlots [name] as LocalDataStoreSlot;
                                if (slot == null) return AllocateNamedDataSlot (name);
                                else return slot;
                        }
index ed064e430643ee5c0beef8393de236f6228684ff..4ff584de5c4b22f8f911227513cde5be0556545e 100644 (file)
@@ -62,7 +62,12 @@ namespace System.Runtime.Remoting.Messaging
                public IMessageCtrl AsyncProcessMessage (IMessage msg, IMessageSink replySink)
                {
                        object[] parms = new object[] {msg, replySink};
-                       ThreadPool.QueueUserWorkItem (new WaitCallback (ExecuteAsyncMessage), parms);
+                       ThreadPool.QueueUserWorkItem (new WaitCallback ((data) => {
+                               try {
+                                       ExecuteAsyncMessage (data);
+                               } catch {}
+                               }
+                               ), parms);
                        return null;
                }
                
index f7f4fb5cf4454ae6624101a102fe623aee06ca4c..57f770516d2ce76cc1d12bda500da9410d38a447 100644 (file)
@@ -206,13 +206,13 @@ namespace System.Runtime.Serialization.Formatters.Binary {
                        WriteBinaryHeader (writer, headers!=null);
 
                        if (graph is IMethodCallMessage) {
-                               MessageFormatter.WriteMethodCall (writer, graph, headers, surrogate_selector, context, assembly_format, type_format);
+                               MessageFormatter.WriteMethodCall (writer, graph, headers, this);
                        }
                        else if (graph is IMethodReturnMessage)  {
-                               MessageFormatter.WriteMethodResponse (writer, graph, headers, surrogate_selector, context, assembly_format, type_format);
+                               MessageFormatter.WriteMethodResponse (writer, graph, headers, this);
                        }
                        else {
-                               ObjectWriter serializer = new ObjectWriter (surrogate_selector, context, assembly_format, type_format);
+                               ObjectWriter serializer = new ObjectWriter (this);
                                serializer.WriteObjectGraph (writer, graph, headers);
                        }
                        writer.Flush();
index 8d9a0d46d6a6e51a2223ac887ae2c92258a501d5..6bae636035af8058fd7ce72afad473d601c98c66 100644 (file)
@@ -41,7 +41,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
 {
        internal class MessageFormatter
        {
-               public static void WriteMethodCall (BinaryWriter writer, object obj, Header[] headers, ISurrogateSelector surrogateSelector, StreamingContext context, FormatterAssemblyStyle assemblyFormat, FormatterTypeStyle typeFormat)
+               public static void WriteMethodCall (BinaryWriter writer, object obj, Header[] headers, BinaryFormatter formatter)
                {
                        IMethodCallMessage call = (IMethodCallMessage)obj;
                        writer.Write ((byte) BinaryElement.MethodCall);
@@ -133,14 +133,14 @@ namespace System.Runtime.Serialization.Formatters.Binary
 
                        if (info != null)
                        {
-                               ObjectWriter objectWriter = new ObjectWriter (surrogateSelector, context, assemblyFormat, typeFormat);
+                               ObjectWriter objectWriter = new ObjectWriter (formatter);
                                objectWriter.WriteObjectGraph (writer, info, headers);
                        }
                        else
                                writer.Write ((byte) BinaryElement.End);
                }
 
-               public static void WriteMethodResponse (BinaryWriter writer, object obj, Header[] headers, ISurrogateSelector surrogateSelector, StreamingContext context, FormatterAssemblyStyle assemblyFormat, FormatterTypeStyle typeFormat)
+               public static void WriteMethodResponse (BinaryWriter writer, object obj, Header[] headers, BinaryFormatter formatter)
                {
                        IMethodReturnMessage resp = (IMethodReturnMessage)obj;
                        writer.Write ((byte) BinaryElement.MethodResponse);
@@ -262,7 +262,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
 
                        if (info != null)
                        {
-                               ObjectWriter objectWriter = new ObjectWriter (surrogateSelector, context, assemblyFormat, typeFormat);
+                               ObjectWriter objectWriter = new ObjectWriter (formatter);
                                objectWriter.WriteObjectGraph (writer, info, headers);
                        }
                        else
index 7fdfc9168a2fcc2d710ea7e8ee57e9951cb16c68..f7f71db0fdaf8209d809e9b7a9d18efe6368ef22 100644 (file)
@@ -51,6 +51,16 @@ namespace System.Runtime.Serialization.Formatters.Binary
                {
                        return true;
                }
+
+#if NET_4_0
+               public void BindToName (string assemblyName, string typeName)
+               {
+                       if (assemblyName != null)
+                               TypeAssemblyName = assemblyName;
+                       if (typeName != null)
+                               InstanceTypeName = typeName;
+               }
+#endif
                
                public abstract bool RequiresTypes { get; }
        }
@@ -219,6 +229,9 @@ namespace System.Runtime.Serialization.Formatters.Binary
                StreamingContext _context;
                FormatterAssemblyStyle _assemblyFormat;
                FormatterTypeStyle _typeFormat;
+#if NET_4_0
+               SerializationBinder _binder;
+#endif
                byte[] arrayBuffer;
                int ArrayBufferLength = 4096;
                SerializationObjectManager _manager;
@@ -235,13 +248,16 @@ namespace System.Runtime.Serialization.Formatters.Binary
                        }
                }
                
-               public ObjectWriter (ISurrogateSelector surrogateSelector, StreamingContext context, FormatterAssemblyStyle assemblyFormat, FormatterTypeStyle typeFormat)
+               public ObjectWriter (BinaryFormatter formatter)
                {
-                       _surrogateSelector = surrogateSelector;
-                       _context = context;
-                       _assemblyFormat = assemblyFormat;
-                       _typeFormat = typeFormat;
-                       _manager = new SerializationObjectManager (context);
+                       _surrogateSelector = formatter.SurrogateSelector;
+                       _context = formatter.Context;
+                       _assemblyFormat = formatter.AssemblyFormat;
+                       _typeFormat = formatter.TypeFormat;
+                       _manager = new SerializationObjectManager (formatter.Context);
+#if NET_4_0
+                       _binder = formatter.Binder;
+#endif
                }
 
                public void WriteObjectGraph (BinaryWriter writer, object obj, Header[] headers)
@@ -357,7 +373,12 @@ namespace System.Runtime.Serialization.Formatters.Binary
                private void GetObjectData (object obj, out TypeMetadata metadata, out object data)
                {
                        Type instanceType = obj.GetType();
-
+#if NET_4_0
+                       string binderAssemblyName = null;
+                       string binderTypeName = null;
+                       if (_binder != null)
+                               _binder.BindToName (instanceType, out binderAssemblyName, out binderTypeName);
+#endif
                        // Check if the formatter has a surrogate selector, if it does, 
                        // check if the surrogate selector handles objects of the given type. 
 
@@ -370,6 +391,11 @@ namespace System.Runtime.Serialization.Formatters.Binary
                                        SerializationInfo info = new SerializationInfo (instanceType, new FormatterConverter ());
                                        surrogate.GetObjectData (obj, info, _context);
                                        metadata = new SerializableTypeMetadata (instanceType, info);
+#if NET_4_0
+                                       if (_binder != null)
+                                               metadata.BindToName (binderAssemblyName, binderTypeName);
+#endif
+
                                        data = info;
                                        return;
                                }
@@ -388,6 +414,11 @@ namespace System.Runtime.Serialization.Formatters.Binary
                                SerializationInfo info = new SerializationInfo (instanceType, new FormatterConverter ());
                                ser.GetObjectData (info, _context);
                                metadata = new SerializableTypeMetadata (instanceType, info);
+#if NET_4_0
+                               if (_binder != null)
+                                       metadata.BindToName (binderAssemblyName, binderTypeName);
+#endif
+
                                data = info;
                        } 
                        else 
@@ -398,6 +429,11 @@ namespace System.Runtime.Serialization.Formatters.Binary
                                        // Don't cache metadata info when the Context property is not null sice
                                        // we can't control the number of possible contexts in this case
                                        metadata = new MemberTypeMetadata (instanceType, _context);
+#if NET_4_0
+                                       if (_binder != null)
+                                               metadata.BindToName (binderAssemblyName, binderTypeName);
+#endif
+
                                        return;
                                }
                                
@@ -420,6 +456,10 @@ namespace System.Runtime.Serialization.Formatters.Binary
 
                                        if (metadata == null) {
                                                metadata = CreateMemberTypeMetadata (instanceType);
+#if NET_4_0
+                                               if (_binder != null)
+                                                       metadata.BindToName (binderAssemblyName, binderTypeName);
+#endif
                                        }
 
                                        typesTable [instanceType] = metadata;
index 75390deb112bc7f505b5cda7626dbd2b085d3193..032ab2e5f2716fe39ffb204dd6e59c20b85cfb9e 100644 (file)
@@ -33,6 +33,7 @@ using System;
 using System.Collections;
 using System.Reflection;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 using System.Runtime.Serialization.Formatters;
 using System.Globalization;
 
@@ -176,7 +177,6 @@ namespace System.Runtime.Serialization
                        return obj;
                }
                
-#if NET_1_1
 
                public static void CheckTypeSecurity (Type t, TypeFilterLevel securityLevel)
                {
@@ -207,6 +207,16 @@ namespace System.Runtime.Serialization
                        
                        return GetUninitializedObject (type);
                }
+
+#if NET_4_0
+               // This method was introduced in .Net due to a bug serializing objects with circular references
+               // which we don't appear to have, so we just return the same object.
+               // See http://support.microsoft.com/kb/927495/en-us/ in case of doubt.
+               [ComVisible (false)]
+               public static ISerializationSurrogate GetSurrogateForCyclicalReference (ISerializationSurrogate innerSurrogate)
+               {
+                       return innerSurrogate;
+               }
 #endif
        }
 }
index f14402985db5a5377415da29f72ef096616bf4eb..f91c311ea3346486b815195a2a5f4bd29a056ab8 100644 (file)
@@ -42,5 +42,13 @@ namespace System.Runtime.Serialization
                }
 
                public abstract Type BindToType (string assemblyName, string typeName);
+
+#if NET_4_0
+               public virtual void BindToName (Type serializedType, out string assemblyName, out string typeName)
+               {
+                       assemblyName = null;
+                       typeName = null;
+               }
+#endif
        }
 }
index 2e92f1c7ca75504b839cd92f82164127a2a2cf01..f2d2b5627712d086ba75e44e1f7a980113097c35 100644 (file)
@@ -46,6 +46,11 @@ namespace System.Runtime.Serialization
 
                string assemblyName; // the assembly being serialized
                string fullTypeName; // the type being serialized.
+#if NET_4_0
+               Type objectType;
+               bool isAssemblyNameSetExplicit;
+               bool isFullTypeNameSetExplicit;
+#endif
 
                IFormatterConverter converter;
                
@@ -55,6 +60,9 @@ namespace System.Runtime.Serialization
                        assemblyName = type.Assembly.FullName;
                        fullTypeName = type.FullName;
                        converter = new FormatterConverter ();
+#if NET_4_0
+                       objectType = type;
+#endif
                }
                
                /* used by the runtime */
@@ -65,6 +73,9 @@ namespace System.Runtime.Serialization
                        assemblyName = type.Assembly.FullName;
                        fullTypeName = type.FullName;
                        converter = new FormatterConverter ();
+#if NET_4_0
+                       objectType = type;
+#endif
 
                        for (int i = 0; i < len; i++) {
                                serialized.Add (data [i].Name, data [i]);
@@ -85,6 +96,9 @@ namespace System.Runtime.Serialization
                        this.converter = converter;
                        assemblyName = type.Assembly.FullName;
                        fullTypeName = type.FullName;
+#if NET_4_0
+                       objectType = type;
+#endif
                }
 
                // Properties
@@ -96,6 +110,9 @@ namespace System.Runtime.Serialization
                                if (value == null)
                                        throw new ArgumentNullException ("Argument is null.");
                                assemblyName = value;
+#if NET_4_0
+                               isAssemblyNameSetExplicit = true;
+#endif
                        }
                }
                
@@ -107,6 +124,9 @@ namespace System.Runtime.Serialization
                                if ( value == null)
                                        throw new ArgumentNullException ("Argument is null.");
                                fullTypeName = value;
+#if NET_4_0
+                               isFullTypeNameSetExplicit = true;
+#endif
                        }
                }
                
@@ -115,6 +135,26 @@ namespace System.Runtime.Serialization
                        get { return serialized.Count; }
                }
 
+#if NET_4_0
+               public bool IsAssemblyNameSetExplicit {
+                       get {
+                               return isAssemblyNameSetExplicit;
+                       }
+               }
+
+               public bool IsFullTypeNameSetExplicit {
+                       get {
+                               return isFullTypeNameSetExplicit;
+                       }
+               }
+
+               public Type ObjectType {
+                       get {
+                               return objectType;
+                       }
+               }
+#endif
+
                // Methods
                public void AddValue (string name, object value, Type type)
                {
@@ -161,6 +201,11 @@ namespace System.Runtime.Serialization
 
                        fullTypeName = type.FullName;
                        assemblyName = type.Assembly.FullName;
+#if NET_4_0
+                       objectType = type;
+                       isAssemblyNameSetExplicit = false;
+                       isFullTypeNameSetExplicit = false;
+#endif
                }
 
                public SerializationInfoEnumerator GetEnumerator ()
index 1b722349dc96b4630dff60c61a22c13277c0179c..f1b2b5280e730d3d09af829af50312c9d7aef244 100644 (file)
@@ -31,7 +31,6 @@ using System.Runtime.InteropServices;
 
 [Serializable]
 [MonoLimitation ("Serialization format not compatible with .NET")]
-[MonoLimitation ("EncoderFallback is not handled")]
 [ComVisible (true)]
 public class UTF8Encoding : Encoding
 {
@@ -51,9 +50,9 @@ public class UTF8Encoding : Encoding
        {
                emitIdentifier = encoderShouldEmitUTF8Identifier;
                if (throwOnInvalidBytes)
-                       SetFallbackInternal (null, DecoderFallback.ExceptionFallback);
+                       SetFallbackInternal (EncoderFallback.ExceptionFallback, DecoderFallback.ExceptionFallback);
                else
-                       SetFallbackInternal (null, DecoderFallback.StandardSafeFallback);
+                       SetFallbackInternal (EncoderFallback.StandardSafeFallback, DecoderFallback.StandardSafeFallback);
 
                web_name = body_name = header_name = "utf-8";
                encoding_name = "Unicode (UTF-8)";
@@ -68,7 +67,7 @@ public class UTF8Encoding : Encoding
 
        // Internal version of "GetByteCount" which can handle a rolling
        // state between multiple calls to this method.
-       private static int InternalGetByteCount (char[] chars, int index, int count, ref char leftOver, bool flush)
+       private static int InternalGetByteCount (char[] chars, int index, int count, EncoderFallback fallback, ref char leftOver, bool flush)
        {
                // Validate the parameters.
                if (chars == null) {
@@ -92,15 +91,17 @@ public class UTF8Encoding : Encoding
 
                unsafe {
                        fixed (char* cptr = chars) {
-                               return InternalGetByteCount (cptr + index, count, ref leftOver, flush);
+                               return InternalGetByteCount (cptr + index, count, fallback, ref leftOver, flush);
                        }
                }
        }
 
-       private unsafe static int InternalGetByteCount (char* chars, int count, ref char leftOver, bool flush)
+       private unsafe static int InternalGetByteCount (char* chars, int count, EncoderFallback fallback, ref char leftOver, bool flush)
        {
                int length = 0;
                char* end = chars + count;
+               char* start = chars;
+               EncoderFallbackBuffer buffer = null;
                while (chars < end) {
                        if (leftOver == 0) {
                                for (; chars < end; chars++) {
@@ -126,7 +127,12 @@ public class UTF8Encoding : Encoding
                                                // leading surrogate. In NET_2_0 it
                                                // uses fallback. In NET_1_1 we output
                                                // wrong surrogate.
-                                               length += 3;
+                                               char [] fallback_chars = GetFallbackChars (chars, start, fallback, ref buffer);
+                                               fixed (char *fb_chars = fallback_chars) {
+                                                       char dummy = '\0';
+                                                       length += InternalGetByteCount (fb_chars, fallback_chars.Length, fallback, ref dummy, true);
+                                               }
+
                                                leftOver = '\0';
                                        }
                                }
@@ -141,7 +147,11 @@ public class UTF8Encoding : Encoding
                                        // invalid, but we have to do something.
                                        // We write out the surrogate start and then
                                        // re-visit the current character again.
-                                       length += 3;
+                                       char [] fallback_chars = GetFallbackChars (chars, start, fallback, ref buffer);
+                                       fixed (char *fb_chars = fallback_chars) {
+                                               char dummy = '\0';
+                                               length += InternalGetByteCount (fb_chars, fallback_chars.Length, fallback, ref dummy, true);
+                                       }
                                }
                                leftOver = '\0';
                        }
@@ -156,11 +166,27 @@ public class UTF8Encoding : Encoding
                return length;
        }
 
+       unsafe static char [] GetFallbackChars (char *chars, char *start, EncoderFallback fallback, ref EncoderFallbackBuffer buffer)
+       {
+               if (buffer == null)
+                       buffer = fallback.CreateFallbackBuffer ();
+
+               buffer.Fallback (*chars, (int) (chars - start));
+
+               char [] fallback_chars = new char [buffer.Remaining];
+               for (int i = 0; i < fallback_chars.Length; i++)
+                       fallback_chars [i] = buffer.GetNextChar ();
+
+               buffer.Reset ();
+
+               return fallback_chars;
+       }
+
        // Get the number of bytes needed to encode a character buffer.
        public override int GetByteCount (char[] chars, int index, int count)
        {
                char dummy = '\0';
-               return InternalGetByteCount (chars, index, count, ref dummy, true);
+               return InternalGetByteCount (chars, index, count, EncoderFallback, ref dummy, true);
        }
 
 
@@ -173,7 +199,7 @@ public class UTF8Encoding : Encoding
                if (count == 0)
                        return 0;
                char dummy = '\0';
-               return InternalGetByteCount (chars, count, ref dummy, true);
+               return InternalGetByteCount (chars, count, EncoderFallback, ref dummy, true);
        }
 
        #endregion
@@ -184,8 +210,9 @@ public class UTF8Encoding : Encoding
        // state between multiple calls to this method.
        private static int InternalGetBytes (char[] chars, int charIndex,
                                             int charCount, byte[] bytes,
-                                            int byteIndex, ref char leftOver,
-                                            bool flush)
+                                            int byteIndex,
+                                                EncoderFallback fallback, ref EncoderFallbackBuffer buffer,
+                                                ref char leftOver, bool flush)
        {
                // Validate the parameters.
                if (chars == null) {
@@ -219,20 +246,23 @@ public class UTF8Encoding : Encoding
                                if (bytes.Length == byteIndex)
                                        return InternalGetBytes (
                                                cptr + charIndex, charCount, 
-                                               null, 0, ref leftOver, flush);
+                                               null, 0, fallback, ref buffer, ref leftOver, flush);
                                fixed (byte *bptr = bytes) {
                                        return InternalGetBytes (
                                                cptr + charIndex, charCount,
                                                bptr + byteIndex, bytes.Length - byteIndex,
+                                               fallback, ref buffer,
                                                ref leftOver, flush);
                                }
                        }
                }
        }
 
-       private unsafe static int InternalGetBytes (char* chars, int count, byte* bytes, int bcount, ref char leftOver, bool flush)
+       private unsafe static int InternalGetBytes (char* chars, int count, byte* bytes, int bcount, EncoderFallback fallback, ref EncoderFallbackBuffer buffer, ref char leftOver, bool flush)
        {
                char* end = chars + count;
+               char* start = chars;
+               byte* start_bytes = bytes;
                byte* end_bytes = bytes + bcount;
                while (chars < end) {
                        if (leftOver == 0) {
@@ -265,12 +295,14 @@ public class UTF8Encoding : Encoding
                                                // leading surrogate. In NET_2_0 it
                                                // uses fallback. In NET_1_1 we output
                                                // wrong surrogate.
-                                               if (bytes + 2 >= end_bytes)
+                                               char [] fallback_chars = GetFallbackChars (chars, start, fallback, ref buffer); 
+                                               char dummy = '\0';
+                                               if (bytes + InternalGetByteCount (fallback_chars, 0, fallback_chars.Length, fallback, ref dummy, true) > end_bytes)
                                                        goto fail_no_space;
-                                               bytes [0] = (byte) (0xE0 | (ch >> 12));
-                                               bytes [1] = (byte) (0x80 | ((ch >> 6) & 0x3F));
-                                               bytes [2] = (byte) (0x80 | (ch & 0x3F));
-                                               bytes += 3;
+                                               fixed (char *fb_chars = fallback_chars) {
+                                                       bytes += InternalGetBytes (fb_chars, fallback_chars.Length, bytes, bcount - (int) (bytes - start_bytes), fallback, ref buffer, ref dummy, true);
+                                               }
+
                                                leftOver = '\0';
                                        }
                                }
@@ -292,13 +324,15 @@ public class UTF8Encoding : Encoding
                                        // invalid, but we have to do something.
                                        // We write out the surrogate start and then
                                        // re-visit the current character again.
-                                       int ch = leftOver;
-                                       if (bytes + 2 >= end_bytes)
+                                       char [] fallback_chars = GetFallbackChars (chars, start, fallback, ref buffer); 
+                                       char dummy = '\0';
+                                       if (bytes + InternalGetByteCount (fallback_chars, 0, fallback_chars.Length, fallback, ref dummy, true) > end_bytes)
                                                goto fail_no_space;
-                                       bytes [0] = (byte) (0xE0 | (ch >> 12));
-                                       bytes [1] = (byte) (0x80 | ((ch >> 6) & 0x3F));
-                                       bytes [2] = (byte) (0x80 | (ch & 0x3F));
-                                       bytes += 3;
+                                       fixed (char *fb_chars = fallback_chars) {
+                                               InternalGetBytes (fb_chars, fallback_chars.Length, bytes, bcount - (int) (bytes - start_bytes), fallback, ref buffer, ref dummy, true);
+                                       }
+
+                                       leftOver = '\0';
                                }
                                leftOver = '\0';
                        }
@@ -328,7 +362,8 @@ fail_no_space:
                                                                 byte[] bytes, int byteIndex)
        {
                char leftOver = '\0';
-               return InternalGetBytes (chars, charIndex, charCount, bytes, byteIndex, ref leftOver, true);
+               EncoderFallbackBuffer buffer = null;
+               return InternalGetBytes (chars, charIndex, charCount, bytes, byteIndex, EncoderFallback, ref buffer, ref leftOver, true);
        }
 
        // Convenience wrappers for "GetBytes".
@@ -358,14 +393,16 @@ fail_no_space:
                unsafe {
                        fixed (char* cptr = s) {
                                char dummy = '\0';
+                               EncoderFallbackBuffer buffer = null;
                                if (bytes.Length == byteIndex)
                                        return InternalGetBytes (
                                                cptr + charIndex, charCount,
-                                               null, 0, ref dummy, true);
+                                               null, 0, EncoderFallback, ref buffer, ref dummy, true);
                                fixed (byte *bptr = bytes) {
                                        return InternalGetBytes (
                                                cptr + charIndex, charCount,
                                                bptr + byteIndex, bytes.Length - byteIndex,
+                                               EncoderFallback, ref buffer,
                                                ref dummy, true);
                                }
                        }
@@ -389,10 +426,11 @@ fail_no_space:
                        return 0;
 
                char dummy = '\0';
+               EncoderFallbackBuffer buffer = null;
                if (byteCount == 0)
-                       return InternalGetBytes (chars, charCount, null, 0, ref dummy, true);
+                       return InternalGetBytes (chars, charCount, null, 0, EncoderFallback, ref buffer, ref dummy, true);
                else
-                       return InternalGetBytes (chars, charCount, bytes, byteCount, ref dummy, true);
+                       return InternalGetBytes (chars, charCount, bytes, byteCount, EncoderFallback, ref buffer, ref dummy, true);
        }
 
        #endregion
@@ -836,7 +874,7 @@ fail_no_space:
        // Get a UTF8-specific encoder that is attached to this instance.
        public override Encoder GetEncoder ()
        {
-               return new UTF8Encoder (emitIdentifier);
+               return new UTF8Encoder (EncoderFallback, emitIdentifier);
        }
 
        // Get the UTF8 preamble.
@@ -924,8 +962,9 @@ fail_no_space:
                private char leftOverForConv;
 
                // Constructor.
-               public UTF8Encoder (bool emitIdentifier)
+               public UTF8Encoder (EncoderFallback fallback, bool emitIdentifier)
                {
+                       Fallback = fallback;
 //                     this.emitIdentifier = emitIdentifier;
                        leftOverForCount = '\0';
                        leftOverForConv = '\0';
@@ -935,27 +974,29 @@ fail_no_space:
                public override int GetByteCount (char[] chars, int index,
                                         int count, bool flush)
                {
-                       return InternalGetByteCount (chars, index, count, ref leftOverForCount, flush);
+                       return InternalGetByteCount (chars, index, count, Fallback, ref leftOverForCount, flush);
                }
                public override int GetBytes (char[] chars, int charIndex,
                                         int charCount, byte[] bytes, int byteIndex, bool flush)
                {
                        int result;
-                       result = InternalGetBytes (chars, charIndex, charCount, bytes, byteIndex, ref leftOverForConv, flush);
+                       EncoderFallbackBuffer buffer = null;
+                       result = InternalGetBytes (chars, charIndex, charCount, bytes, byteIndex, Fallback, ref buffer, ref leftOverForConv, flush);
 //                     emitIdentifier = false;
                        return result;
                }
 
                public unsafe override int GetByteCount (char* chars, int count, bool flush)
                {
-                       return InternalGetByteCount (chars, count, ref leftOverForCount, flush);
+                       return InternalGetByteCount (chars, count, Fallback, ref leftOverForCount, flush);
                }
 
                public unsafe override int GetBytes (char* chars, int charCount,
                        byte* bytes, int byteCount, bool flush)
                {
                        int result;
-                       result = InternalGetBytes (chars, charCount, bytes, byteCount, ref leftOverForConv, flush);
+                       EncoderFallbackBuffer buffer = null;
+                       result = InternalGetBytes (chars, charCount, bytes, byteCount, Fallback, ref buffer, ref leftOverForConv, flush);
 //                     emitIdentifier = false;
                        return result;
                }
diff --git a/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs b/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
new file mode 100644 (file)
index 0000000..61d6c26
--- /dev/null
@@ -0,0 +1,173 @@
+// 
+// CyclicDeque.cs
+//  
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+// 
+// Copyright (c) 2009 Jérémie "Garuma" Laval
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+using System;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace System.Threading.Tasks
+{
+       internal enum PopResult {
+               Succeed,
+               Empty,
+               Abort
+       }
+
+       internal interface IDequeOperations<T>
+       {
+               void PushBottom (T obj);
+               PopResult PopBottom (out T obj);
+               PopResult PopTop (out T obj);
+       }
+
+       internal class CyclicDeque<T> : IDequeOperations<T>
+       {
+               const int BaseSize = 11;
+               
+               long bottom;
+               long top;
+               long upperBound;
+               CircularArray<T> array = new CircularArray<T> (BaseSize);
+               
+               public void PushBottom (T obj)
+               {
+                       /* Read is implemented as a simple load operation on 64bits
+                        * so no need to make the distinction ourselves
+                        */
+                       long b = Interlocked.Read (ref bottom);
+                       var a = array;
+                       
+                       // Take care of growing
+                       if (b - upperBound >= a.Size - 1) {
+                               upperBound = Interlocked.Read (ref top);
+                               a = a.Grow (b, upperBound);
+                               Interlocked.Exchange (ref array, a);
+                       }
+                       
+                       // Register the new value
+                       a[b] = obj;
+                       Interlocked.Increment (ref bottom);
+               }
+               
+               public PopResult PopBottom (out T obj)
+               {
+                       obj = default (T);
+                       
+                       long b = Interlocked.Decrement (ref bottom);
+                       var a = array;
+                       long t = Interlocked.Read (ref top);
+                       long size = b - t;
+                       
+                       if (size < 0) {
+                               // Set bottom to t
+                               Interlocked.Add (ref bottom, t - b);
+                               return PopResult.Empty;
+                       }
+                       
+                       obj = a[b];
+                       if (size > 0)
+                               return PopResult.Succeed;
+                       Interlocked.Add (ref bottom, t + 1 - b);
+                       
+                       if (Interlocked.CompareExchange (ref top, t + 1, t) != t)
+                               return PopResult.Empty;
+                       
+                       return PopResult.Succeed;
+               }
+               
+               public PopResult PopTop (out T obj)
+               {
+                       obj = default (T);
+                       
+                       long t = Interlocked.Read (ref top);
+                       long b = Interlocked.Read (ref bottom);
+                       
+                       if (b - t <= 0)
+                               return PopResult.Empty;
+                       
+                       if (Interlocked.CompareExchange (ref top, t + 1, t) != t)
+                               return PopResult.Abort;
+                       
+                       var a = array;
+                       obj = a[t];
+                       
+                       return PopResult.Succeed;
+               }
+               
+               public IEnumerable<T> GetEnumerable ()
+               {
+                       var a = array;
+                       return a.GetEnumerable ();
+               }
+       }
+       
+       internal class CircularArray<T>
+       {
+               readonly int baseSize;
+               readonly int size;
+               readonly T[] segment;
+               
+               public CircularArray (int baseSize)
+               {
+                       this.baseSize = baseSize;
+                       this.size = 1 << baseSize;
+                       this.segment = new T[size];
+               }
+               
+               public long Size {
+                       get {
+                               return size;
+                       }
+               }
+               
+               public T this[long index] {
+                       get {
+                               return segment[index % Size];
+                       }
+                       set {
+                               segment[index % Size] = value;
+                       }
+               }
+               
+               public CircularArray<T> Grow (long bottom, long top)
+               {
+                       var grow = new CircularArray<T> (baseSize + 1);
+                       
+                       for (long i = top; i < bottom; i++) {
+                               grow[i] = this[i];
+                       }
+                       
+                       return grow;
+               }
+               
+               public IEnumerable<T> GetEnumerable ()
+               {
+                       return ((IEnumerable<T>)segment);
+               }
+       }
+}
+#endif
index ecb11b2b868ddb5d98bc135d51836ca38169cf81..295354fd609e97943e588ca143cb96e3203c2a6a 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // Future.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 
 namespace System.Threading.Tasks
diff --git a/mcs/class/corlib/System.Threading.Tasks/IScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/IScheduler.cs
new file mode 100644 (file)
index 0000000..e316bbd
--- /dev/null
@@ -0,0 +1,41 @@
+// IScheduler.cs
+//
+// Copyright (c) 2008 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+//
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+using System;
+using System.Threading;
+using System.Collections.Generic;
+
+namespace System.Threading.Tasks
+{
+       internal interface IScheduler: IDisposable
+       {
+               void AddWork (Task t);
+               void ParticipateUntil (Task task);
+               bool ParticipateUntil (Task task, Func<bool> predicate);
+               void ParticipateUntil (Func<bool> predicate);
+               void PulseAll ();
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Internal/ChangeLog b/mcs/class/corlib/System.Threading.Tasks/Internal/ChangeLog
deleted file mode 100644 (file)
index 5f10ffe..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-2010-04-19  Jérémie Laval  <jeremie.laval@gmail.com>
-
-       * ThreadWorker.cs: Cleanup and refactoring
-
diff --git a/mcs/class/corlib/System.Threading.Tasks/Internal/CyclicDeque.cs b/mcs/class/corlib/System.Threading.Tasks/Internal/CyclicDeque.cs
deleted file mode 100644 (file)
index 98ebf35..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
-// 
-// CyclicDeque.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2009 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace System.Threading.Tasks
-{
-  internal enum PopResult      {
-               Succeed,
-               Empty,
-               Abort
-       }
-
-       internal interface IDequeOperations<T>
-       {
-               void PushBottom (T obj);
-               PopResult PopBottom (out T obj);
-               PopResult PopTop (out T obj);
-       }
-       
-       internal interface IValueReader
-       {
-               long Read (ref long value);
-       }
-       
-       internal class CyclicDeque<T> : IDequeOperations<T>
-       {
-               readonly IValueReader reader;
-               const int BaseSize = 11;
-               
-               class Reader32 : IValueReader
-               {
-                       public long Read (ref long value)
-                       {
-                               return Interlocked.Read (ref value);
-                       }
-               }
-               
-               class Reader64 : IValueReader
-               {
-                       public long Read (ref long value)
-                       {
-                               return value;
-                       }
-               }
-               
-               public CyclicDeque ()
-               {
-                       // We do the distinction between 32bits and 64bits
-                       if (IntPtr.Size == 4)
-                               reader = new Reader32 ();
-                       else
-                               reader = new Reader64 ();
-               }
-               
-               long bottom;
-               long top;
-               long upperBound;
-               CircularArray<T> array = new CircularArray<T> (BaseSize);
-               
-               public void PushBottom (T obj)
-               {
-                       long b = reader.Read (ref bottom);
-                       var a = array;
-                       
-                       // Take care of growing
-                       if (b - upperBound >= a.Size - 1) {
-                               upperBound = reader.Read (ref top);
-                               a = a.Grow (b, upperBound);
-                               Interlocked.Exchange (ref array, a);
-                       }
-                       
-                       // Register the new value
-                       a[b] = obj;
-                       Interlocked.Increment (ref bottom);
-               }
-               
-               public PopResult PopBottom (out T obj)
-               {
-                       obj = default (T);
-                       
-                       long b = Interlocked.Decrement (ref bottom);
-                       var a = array;
-                       long t = reader.Read (ref top);
-                       long size = b - t;
-                       
-                       if (size < 0) {
-                               // Set bottom to t
-                               Interlocked.Add (ref bottom, t - b);
-                               return PopResult.Empty;
-                       }
-                       
-                       obj = a[b];
-                       if (size > 0)
-                               return PopResult.Succeed;
-                       Interlocked.Add (ref bottom, t + 1 - b);
-                       
-                       if (Interlocked.CompareExchange (ref top, t + 1, t) != t)
-                               return PopResult.Empty;
-                       
-                       return PopResult.Succeed;
-               }
-               
-               public PopResult PopTop (out T obj)
-               {
-                       obj = default (T);
-                       
-                       long t = reader.Read (ref top);
-                       long b = reader.Read (ref bottom);
-                       
-                       if (b - t <= 0)
-                               return PopResult.Empty;
-                       
-                       if (Interlocked.CompareExchange (ref top, t + 1, t) != t)
-                               return PopResult.Abort;
-                       
-                       var a = array;
-                       obj = a[t];
-                       
-                       return PopResult.Succeed;
-               }
-               
-               public IEnumerable<T> GetEnumerable ()
-               {
-                       var a = array;
-                       return a.GetEnumerable ();
-               }
-       }
-       
-       internal class CircularArray<T>
-       {
-               readonly int baseSize;
-               readonly int size;
-               readonly T[] segment;
-               
-               public CircularArray (int baseSize)
-               {
-                       this.baseSize = baseSize;
-                       this.size = 1 << baseSize;
-                       this.segment = new T[size];
-               }
-               
-               public long Size {
-                       get {
-                               return size;
-                       }
-               }
-               
-               public T this[long index] {
-                       get {
-                               return segment[index % Size];
-                       }
-                       set {
-                               segment[index % Size] = value;
-                       }
-               }
-               
-               public CircularArray<T> Grow (long bottom, long top)
-               {
-                       var grow = new CircularArray<T> (baseSize + 1);
-                       
-                       for (long i = top; i < bottom; i++) {
-                               grow[i] = this[i];
-                       }
-                       
-                       return grow;
-               }
-               
-               public IEnumerable<T> GetEnumerable ()
-               {
-                       return ((IEnumerable<T>)segment);
-               }
-       }
-}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Internal/IScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/Internal/IScheduler.cs
deleted file mode 100644 (file)
index 536f368..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
-// IScheduler.cs
-//
-// Copyright (c) 2008 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Threading;
-using System.Collections.Generic;
-
-namespace System.Threading.Tasks
-{
-       internal interface IScheduler: IDisposable
-       {
-               void AddWork (Task t);
-               void ParticipateUntil (Task task);
-               bool ParticipateUntil (Task task, Func<bool> predicate);
-               void ParticipateUntil (Func<bool> predicate);
-               void PulseAll ();
-       }
-}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Internal/Scheduler.cs b/mcs/class/corlib/System.Threading.Tasks/Internal/Scheduler.cs
deleted file mode 100644 (file)
index 5b65790..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
-// Scheduler.cs
-//
-// Copyright (c) 2008 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Collections.Concurrent;
-
-namespace System.Threading.Tasks
-{
-       internal class Scheduler: TaskScheduler, IScheduler
-       {
-               IProducerConsumerCollection<Task> workQueue;
-               ThreadWorker[]        workers;
-               bool                  isPulsable = true;
-
-               public Scheduler ()
-                       : this (Environment.ProcessorCount, 0, ThreadPriority.Normal)
-               {
-                       
-               }
-               
-               public Scheduler (int maxWorker, int maxStackSize, ThreadPriority priority)
-               {
-                       workQueue = new ConcurrentQueue<Task> ();
-                       workers = new ThreadWorker [maxWorker];
-                       
-                       for (int i = 0; i < maxWorker; i++) {
-                               workers [i] = new ThreadWorker (this, workers, workQueue, maxStackSize, priority);
-                       }
-               }
-               
-               public void AddWork (Task t)
-               {
-                       // Add to the shared work pool
-                       workQueue.TryAdd (t);
-                       // Wake up some worker if they were asleep
-                       PulseAll ();
-               }
-               
-               public void ParticipateUntil (Task task)
-               {
-                       if (AreTasksFinished (task))
-                               return;
-                       
-                       ParticipateUntil (delegate {
-                               return AreTasksFinished (task);
-                       });
-               }
-               
-               public bool ParticipateUntil (Task task, Func<bool> predicate)
-               {
-                       if (AreTasksFinished (task))
-                               return false;
-                       
-                       bool isFromPredicate = false;
-                       
-                       ParticipateUntil (delegate {
-                               if (predicate ()) {
-                                       isFromPredicate = true;
-                                       return true;
-                               }
-                               return AreTasksFinished (task); 
-                       });
-                               
-                       return isFromPredicate;
-               }
-               
-               // Called with Task.WaitAll(someTasks) or Task.WaitAny(someTasks) so that we can remove ourselves
-               // also when our wait condition is ok
-               public void ParticipateUntil (Func<bool> predicate)
-               {       
-                       ThreadWorker.WorkerMethod (predicate, workQueue, workers);
-               }
-               
-               public void PulseAll ()
-               {
-                       if (isPulsable) {
-                               foreach (ThreadWorker worker in workers) {
-                                       if (worker != null)
-                                               worker.Pulse ();        
-                               }
-                       }
-               }
-               
-               public void InhibitPulse ()
-               {
-                       isPulsable = false;
-               }
-               
-               public void UnInhibitPulse () 
-               {
-                       isPulsable = true;
-               }
-
-               public void Dispose ()
-               {
-                       foreach (ThreadWorker w in workers) {
-                               w.Dispose ();
-                       }
-               }
-               
-               bool AreTasksFinished (Task parent)
-               {
-                       return parent.IsCompleted;
-               }
-
-               #region Scheduler dummy stubs
-               protected override System.Collections.Generic.IEnumerable<Task> GetScheduledTasks ()
-               {
-                       throw new System.NotImplementedException();
-               }
-
-               protected internal override void QueueTask (Task task)
-               {
-                       throw new System.NotImplementedException();
-               }
-
-               protected internal override bool TryDequeue (Task task)
-               {
-                       throw new System.NotImplementedException();
-               }
-
-               protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued)
-               {
-                       throw new System.NotImplementedException();
-               }
-               
-               public override int MaximumConcurrencyLevel {
-                       get {
-                               return base.MaximumConcurrencyLevel;
-                       }
-               }
-               #endregion
-       }
-}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Internal/SchedulerProxy.cs b/mcs/class/corlib/System.Threading.Tasks/Internal/SchedulerProxy.cs
deleted file mode 100644 (file)
index 713a61c..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
-// 
-// SchedulerProxy.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2009 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace System.Threading.Tasks
-{
-       
-       internal class SchedulerProxy : IScheduler
-       {
-               TaskScheduler scheduler;
-               
-               public SchedulerProxy (TaskScheduler scheduler)
-               {
-                       this.scheduler = scheduler;
-               }
-               
-               #region IScheduler implementation
-               public void AddWork (Task t)
-               {
-                       scheduler.QueueTask (t);
-               }
-               
-               public void ParticipateUntil (Task task)
-               {
-                       ParticipateUntil (() => task.IsCompleted);
-               }
-               
-               public bool ParticipateUntil (Task task, Func<bool> predicate)
-               {
-                       bool fromPredicate = false;
-                       
-                       ParticipateUntil (() => {
-                               if (predicate ()) {
-                                       fromPredicate = true;
-                                       return true;
-                               }
-                               
-                               return task.IsCompleted;
-                       });
-                       
-                       return fromPredicate;
-               }
-               
-               public void ParticipateUntil (Func<bool> predicate)
-               {
-                       SpinWait sw = new SpinWait ();
-                       
-                       while (!predicate ())
-                               sw.SpinOnce ();
-               }
-               
-               public void PulseAll ()
-               {
-                       
-               }
-               #endregion
-
-               #region IDisposable implementation
-               public void Dispose ()
-               {
-                       scheduler = null;
-               }
-               #endregion
-
-       }
-}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Internal/ThreadWorker.cs b/mcs/class/corlib/System.Threading.Tasks/Internal/ThreadWorker.cs
deleted file mode 100644 (file)
index e44d03d..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
-// ThreadWorker.cs
-//
-// Copyright (c) 2008 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Threading;
-using System.Collections.Concurrent;
-
-namespace System.Threading.Tasks
-{
-       internal class ThreadWorker : IDisposable
-       {
-               static Random r = new Random ();
-               
-               Thread workerThread;
-               
-               readonly          ThreadWorker[]        others;
-               internal readonly IDequeOperations<Task>    dDeque;
-               readonly          IProducerConsumerCollection<Task> sharedWorkQueue;
-               readonly          Action<Task>          childWorkAdder;
-               
-               // Flag to tell if workerThread is running
-               int started = 0; 
-               
-               readonly bool isLocal;
-               readonly int  workerLength;
-               readonly int  stealingStart;
-               const    int  maxRetry = 5;
-               
-               const int sleepThreshold = 100000;
-               
-               Action threadInitializer;
-               
-               public ThreadWorker (IScheduler sched, ThreadWorker[] others, IProducerConsumerCollection<Task> sharedWorkQueue,
-                                    int maxStackSize, ThreadPriority priority)
-                       : this (sched, others, sharedWorkQueue, true, maxStackSize, priority)
-               {
-               }
-               
-               public ThreadWorker (IScheduler sched, ThreadWorker[] others, IProducerConsumerCollection<Task> sharedWorkQueue,
-                                    bool createThread, int maxStackSize, ThreadPriority priority)
-               {
-                       this.others          = others;
-
-                       this.dDeque = new CyclicDeque<Task> ();
-                       
-                       this.sharedWorkQueue = sharedWorkQueue;
-                       this.workerLength    = others.Length;
-                       this.isLocal         = !createThread;
-                       
-                       this.childWorkAdder = delegate (Task t) { 
-                               dDeque.PushBottom (t);
-                               sched.PulseAll ();
-                       };
-                       
-                       // Find the stealing start index randomly (then the traversal
-                       // will be done in Round-Robin fashion)
-                       do {
-                               this.stealingStart = r.Next(0, workerLength);
-                       } while (others[stealingStart] == this);
-                       
-                       InitializeUnderlyingThread (maxStackSize, priority);
-               }
-               
-               void InitializeUnderlyingThread (int maxStackSize, ThreadPriority priority)
-               {
-                       threadInitializer = delegate {
-                               // Special case of the participant ThreadWorker
-                               if (isLocal) {                  
-                                       this.workerThread = Thread.CurrentThread;
-                                       return;
-                               }
-                               
-                               this.workerThread = (maxStackSize == 0) ? new Thread (WorkerMethodWrapper) :
-                                       new Thread (WorkerMethodWrapper, maxStackSize);
-       
-                               this.workerThread.IsBackground = true;
-                               this.workerThread.Priority = priority;
-                               this.workerThread.Name = "ParallelFxThreadWorker";
-                       };
-                       threadInitializer ();
-               }
-
-               public void Dispose ()
-               {
-                       Stop ();
-                       if (!isLocal && workerThread.ThreadState != ThreadState.Stopped)
-                               workerThread.Abort ();
-               }
-               
-               public void Pulse ()
-               {
-                       // If the thread was stopped then set it in use and restart it
-                       int result = Interlocked.Exchange (ref started, 1);
-                       if (result != 0)
-                               return;
-                       if (!isLocal) {
-                               if (this.workerThread.ThreadState != ThreadState.Unstarted) {
-                                       threadInitializer ();
-                               }
-                               workerThread.Start ();
-                       }
-               }
-               
-               public void Stop ()
-               {
-                       // Set the flag to stop so that the while in the thread will stop
-                       // doing its infinite loop.
-                       started = 0;
-               }
-               
-               // This is the actual method called in the Thread
-               void WorkerMethodWrapper ()
-               {
-                       int sleepTime = 0;
-                       SpinWait wait = new SpinWait ();
-                       
-                       // Main loop
-                       while (started == 1) {
-                               bool result = false;
-
-                               result = WorkerMethod ();
-                               
-                               // Wait a little and if the Thread has been more sleeping than working shut it down
-                               wait.SpinOnce ();
-                               if (result)
-                                       sleepTime = 0;
-                               if (sleepTime++ > sleepThreshold) 
-                                       break;
-                       }
-
-                       started = 0;
-               }
-               
-               // Main method, used to do all the logic of retrieving, processing and stealing work.
-               bool WorkerMethod ()
-               {               
-                       bool result = false;
-                       bool hasStolenFromOther;
-                       do {
-                               hasStolenFromOther = false;
-                               
-                               Task value;
-                               
-                               // We fill up our work deque concurrently with other ThreadWorker
-                               while (sharedWorkQueue.Count > 0) {
-                                       while (sharedWorkQueue.TryTake (out value)) {
-                                               dDeque.PushBottom (value);
-                                       }
-                                       
-                                       // Now we process our work
-                                       while (dDeque.PopBottom (out value) == PopResult.Succeed) {
-                                               if (value != null) {
-                                                       value.Execute (childWorkAdder);
-                                                       result = true;
-                                               }
-                                       }
-                               }
-                               
-                               // When we have finished, steal from other worker
-                               ThreadWorker other;
-                               
-                               // Repeat the operation a little so that we can let other things process.
-                               for (int j = 0; j < maxRetry; j++) {
-                                       // Start stealing with the ThreadWorker at our right to minimize contention
-                                       for (int it = stealingStart; it < stealingStart + workerLength; it++) {
-                                               int i = it % workerLength;
-                                               if ((other = others [i]) == null || other == this)
-                                                       continue;
-                                               
-                                               // Maybe make this steal more than one item at a time, see TODO.
-                                               if (other.dDeque.PopTop (out value) == PopResult.Succeed) {
-                                                       hasStolenFromOther = true;
-                                                       if (value != null) {
-                                                               value.Execute (childWorkAdder);
-                                                               result = true;
-                                                       }
-                                               }
-                                       }
-                               }
-                       } while (sharedWorkQueue.Count > 0 || hasStolenFromOther);
-                       
-                       return result;
-               }
-               
-               // Almost same as above but with an added predicate and treating one item at a time. 
-               // It's used by Scheduler Participate(...) method for special waiting case like
-               // Task.WaitAll(someTasks) or Task.WaitAny(someTasks)
-               // Predicate should be really fast and not blocking as it is called a good deal of time
-               // Also, the method skip tasks that are LongRunning to avoid blocking (Task are not LongRunning by default)
-               public static void WorkerMethod (Func<bool> predicate, IProducerConsumerCollection<Task> sharedWorkQueue,
-                                                ThreadWorker[] others)
-               {
-                       SpinWait wait = new SpinWait ();
-
-                       while (!predicate ()) {
-                               Task value;
-                               
-                               // Dequeue only one item as we have restriction
-                               if (sharedWorkQueue.TryTake (out value)) {
-                                       if (value != null) {
-                                               if (CheckTaskFitness (value))
-                                                       value.Execute (null);
-                                               else
-                                                       sharedWorkQueue.TryAdd (value);
-                                       }
-                               }
-                               
-                               // First check to see if we comply to predicate
-                               if (predicate ())
-                                       return;
-                               
-                               // Try to complete other work by stealing since our desired tasks may be in other worker
-                               ThreadWorker other;
-                               for (int i = 0; i < others.Length; i++) {
-                                       if ((other = others [i]) == null)
-                                               continue;
-                                       
-                                       if (other.dDeque.PopTop (out value) == PopResult.Succeed) {
-                                               if (value != null) {
-                                                       if (CheckTaskFitness (value))
-                                                               value.Execute (null);
-                                                       else
-                                                               sharedWorkQueue.TryAdd (value);
-                                               }
-                                       }
-                                       
-                                       if (predicate ())
-                                               return;
-                               }
-
-                               wait.SpinOnce ();
-                       }
-               }
-               
-               static bool CheckTaskFitness (Task t)
-               {
-                       return (t.CreationOptions | TaskCreationOptions.LongRunning) > 0;
-               }
-               
-               public bool Finished {
-                       get {
-                               return started == 0;
-                       }
-               }
-               
-               public bool IsLocal {
-                       get {
-                               return isLocal;
-                       }
-               }
-               
-               public int Id {
-                       get {
-                               return workerThread.ManagedThreadId;
-                       }
-               }
-               
-               public bool Equals (ThreadWorker other)
-               {
-                       return (other == null) ? false : object.ReferenceEquals (this.dDeque, other.dDeque);    
-               }
-               
-               public override bool Equals (object obj)
-               {
-                       ThreadWorker temp = obj as ThreadWorker;
-                       return temp == null ? false : Equals (temp);
-               }
-               
-               public override int GetHashCode ()
-               {
-                       return workerThread.ManagedThreadId.GetHashCode ();
-               }
-       }
-}
-#endif
index 4d1bc6a016265e235eb1c134a71b1d2b16b7c54c..0881980622bb72c96d22336caab90364e18354ad 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // Parallel.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0
 using System;
 using System.Collections.Generic;
 using System.Collections.Concurrent;
index 23fcd016086c74d7251bf5ace52ca754b938e3e3..b432ea5688cb1fa6c299ff74d087bfe3cf6714c8 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // ParallelLoopResult.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 
 namespace System.Threading.Tasks
index 61a31cc41be67cbefb2ba313eb77fbf30f00d5c4..32c65ed36c7bf432b786a41b96260fea9b5ce86f 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // ParallelState.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0
 using System;
 using System.Threading;
 
index 5eb01591ceb580974c073f4919862f2753bcac01..6bc0b6bc1cb93ebecc87adc194fba75a12b101a8 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // ParallelOptions.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.Threading;
 
diff --git a/mcs/class/corlib/System.Threading.Tasks/Scheduler.cs b/mcs/class/corlib/System.Threading.Tasks/Scheduler.cs
new file mode 100644 (file)
index 0000000..bb7be9d
--- /dev/null
@@ -0,0 +1,143 @@
+// Scheduler.cs
+//
+// Copyright (c) 2008 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+//
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+using System;
+using System.Collections.Concurrent;
+
+namespace System.Threading.Tasks
+{
+       internal class Scheduler: TaskScheduler, IScheduler
+       {
+               IProducerConsumerCollection<Task> workQueue;
+               ThreadWorker[]        workers;
+               EventWaitHandle       pulseHandle = new AutoResetEvent (false);
+
+               public Scheduler ()
+                       : this (Environment.ProcessorCount, 0, ThreadPriority.Normal)
+               {
+                       
+               }
+               
+               public Scheduler (int maxWorker, int maxStackSize, ThreadPriority priority)
+               {
+                       workQueue = new ConcurrentQueue<Task> ();
+                       workers = new ThreadWorker [maxWorker];
+                       
+                       for (int i = 0; i < maxWorker; i++) {
+                               workers [i] = new ThreadWorker (this, workers, workQueue, maxStackSize, priority, pulseHandle);
+                               workers [i].Pulse ();
+                       }
+               }
+               
+               public void AddWork (Task t)
+               {
+                       // Add to the shared work pool
+                       workQueue.TryAdd (t);
+                       // Wake up some worker if they were asleep
+                       PulseAll ();
+               }
+               
+               public void ParticipateUntil (Task task)
+               {
+                       if (AreTasksFinished (task))
+                               return;
+                       
+                       ParticipateUntil (delegate {
+                               return AreTasksFinished (task);
+                       });
+               }
+               
+               public bool ParticipateUntil (Task task, Func<bool> predicate)
+               {
+                       if (AreTasksFinished (task))
+                               return false;
+                       
+                       bool isFromPredicate = false;
+                       
+                       ParticipateUntil (delegate {
+                               if (predicate ()) {
+                                       isFromPredicate = true;
+                                       return true;
+                               }
+                               return AreTasksFinished (task); 
+                       });
+                               
+                       return isFromPredicate;
+               }
+               
+               // Called with Task.WaitAll(someTasks) or Task.WaitAny(someTasks) so that we can remove ourselves
+               // also when our wait condition is ok
+               public void ParticipateUntil (Func<bool> predicate)
+               {       
+                       ThreadWorker.WorkerMethod (predicate, workQueue, workers);
+               }
+               
+               public void PulseAll ()
+               {
+                       pulseHandle.Set ();
+               }
+               
+               public void Dispose ()
+               {
+                       foreach (ThreadWorker w in workers) {
+                               w.Dispose ();
+                       }
+               }
+               
+               bool AreTasksFinished (Task parent)
+               {
+                       return parent.IsCompleted;
+               }
+
+               #region Scheduler dummy stubs
+               protected override System.Collections.Generic.IEnumerable<Task> GetScheduledTasks ()
+               {
+                       throw new System.NotImplementedException();
+               }
+
+               protected internal override void QueueTask (Task task)
+               {
+                       throw new System.NotImplementedException();
+               }
+
+               protected internal override bool TryDequeue (Task task)
+               {
+                       throw new System.NotImplementedException();
+               }
+
+               protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued)
+               {
+                       throw new System.NotImplementedException();
+               }
+               
+               public override int MaximumConcurrencyLevel {
+                       get {
+                               return base.MaximumConcurrencyLevel;
+                       }
+               }
+               #endregion
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/SchedulerProxy.cs b/mcs/class/corlib/System.Threading.Tasks/SchedulerProxy.cs
new file mode 100644 (file)
index 0000000..8688d9d
--- /dev/null
@@ -0,0 +1,92 @@
+// 
+// SchedulerProxy.cs
+//  
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+// 
+// Copyright (c) 2009 Jérémie "Garuma" Laval
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+using System;
+
+namespace System.Threading.Tasks
+{
+       
+       internal class SchedulerProxy : IScheduler
+       {
+               TaskScheduler scheduler;
+               
+               public SchedulerProxy (TaskScheduler scheduler)
+               {
+                       this.scheduler = scheduler;
+               }
+               
+               #region IScheduler implementation
+               public void AddWork (Task t)
+               {
+                       scheduler.QueueTask (t);
+               }
+               
+               public void ParticipateUntil (Task task)
+               {
+                       ParticipateUntil (() => task.IsCompleted);
+               }
+               
+               public bool ParticipateUntil (Task task, Func<bool> predicate)
+               {
+                       bool fromPredicate = false;
+                       
+                       ParticipateUntil (() => {
+                               if (predicate ()) {
+                                       fromPredicate = true;
+                                       return true;
+                               }
+                               
+                               return task.IsCompleted;
+                       });
+                       
+                       return fromPredicate;
+               }
+               
+               public void ParticipateUntil (Func<bool> predicate)
+               {
+                       SpinWait sw = new SpinWait ();
+                       
+                       while (!predicate ())
+                               sw.SpinOnce ();
+               }
+               
+               public void PulseAll ()
+               {
+                       
+               }
+               #endregion
+
+               #region IDisposable implementation
+               public void Dispose ()
+               {
+                       scheduler = null;
+               }
+               #endregion
+
+       }
+}
+#endif
index e2c6104fb82d3f148862d78587fd59bd88b0152f..8309580b6434ac5abec5140323315f241e6c3ad3 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // SimpleConcurrentBag.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.Threading;
 
index acc2b5aa1fd00a12a83c3229be80236635ca751a..609ad4210a0de6c1d6eecd3be48be4579d4275cf 100644 (file)
@@ -58,8 +58,9 @@ namespace System.Threading.Tasks
                
                Action<object> action;
                object         state;
-               EventHandler   completed;
-               
+
+               ConcurrentQueue<EventHandler> completed = new ConcurrentQueue<EventHandler> ();
+
                CancellationToken token;                        
                
                public Task (Action action) : this (action, TaskCreationOptions.None)
@@ -237,9 +238,10 @@ namespace System.Threading.Tasks
                        
                        AtomicBoolean launched = new AtomicBoolean ();
                        EventHandler action = delegate (object sender, EventArgs e) {
-                               if (!predicate ()) return;
-                               
                                if (!launched.Value && launched.TrySet ()) {
+                                       if (!predicate ())
+                                               return;
+
                                        if (!ContinuationStatusCheck (kind)) {
                                                continuation.CancelReal ();
                                                continuation.Dispose ();
@@ -256,12 +258,13 @@ namespace System.Threading.Tasks
                                return;
                        }
                        
-                       completed += action;
+                       completed.Enqueue (action);
                        
                        // Retry in case completion was achieved but event adding was too late
                        if (IsCompleted)
                                action (null, EventArgs.Empty);
                }
+
                
                bool ContinuationStatusCheck (TaskContinuationOptions kind)
                {
@@ -349,11 +352,13 @@ namespace System.Threading.Tasks
                                
                                try {
                                        InnerInvoke ();
+                               } catch (OperationCanceledException oce) {
+                                       if (oce.CancellationToken == token)
+                                               CancelReal ();
+                                       else
+                                               HandleGenericException (oce);
                                } catch (Exception e) {
-                                       exception = new AggregateException (e);
-                                       status = TaskStatus.Faulted;
-                                       if (taskScheduler.FireUnobservedEvent (exception).Observed)
-                                               exceptionObserved = true;
+                                       HandleGenericException (e);
                                }
                        } else {
                                CancelReal ();
@@ -379,10 +384,7 @@ namespace System.Threading.Tasks
                        if (childTasks.IsSet && status == TaskStatus.WaitingForChildrenToComplete) {
                                status = TaskStatus.RanToCompletion;
                                
-                               // Let continuation creation process
-                               EventHandler tempCompleted = completed;
-                               if (tempCompleted != null) 
-                                       tempCompleted (this, EventArgs.Empty);
+                               ProcessCompleteDelegates ();
                        }
                }
 
@@ -409,12 +411,8 @@ namespace System.Threading.Tasks
                                        status = TaskStatus.WaitingForChildrenToComplete;
                        }
                
-                       if (status != TaskStatus.WaitingForChildrenToComplete) {
-                               // Let continuation creation process
-                               EventHandler tempCompleted = completed;
-                               if (tempCompleted != null)
-                                       tempCompleted (this, EventArgs.Empty);
-                       }
+                       if (status != TaskStatus.WaitingForChildrenToComplete)
+                               ProcessCompleteDelegates ();
                        
                        // Reset the current thingies
                        current = null;
@@ -427,15 +425,29 @@ namespace System.Threading.Tasks
                        
                        Dispose ();
                }
+
+               void ProcessCompleteDelegates ()
+               {
+                       EventHandler handler;
+                       while (completed.TryDequeue (out handler))
+                               handler (this, EventArgs.Empty);
+               }
                #endregion
                
                #region Cancel and Wait related method
                
                internal void CancelReal ()
                {
-                       exception = new AggregateException (new TaskCanceledException (this));
                        status = TaskStatus.Canceled;
                }
+
+               internal void HandleGenericException (Exception e)
+               {
+                       exception = new AggregateException (e);
+                       status = TaskStatus.Faulted;
+                       if (taskScheduler.FireUnobservedEvent (exception).Observed)
+                               exceptionObserved = true;
+               }
                
                public void Wait ()
                {
@@ -445,6 +457,8 @@ namespace System.Threading.Tasks
                        scheduler.ParticipateUntil (this);
                        if (exception != null)
                                throw exception;
+                       if (IsCanceled)
+                               throw new AggregateException (new TaskCanceledException (this));
                }
 
                public void Wait (CancellationToken token)
@@ -482,6 +496,8 @@ namespace System.Threading.Tasks
 
                        if (exception != null)
                                throw exception;
+                       if (IsCanceled)
+                               throw new AggregateException (new TaskCanceledException (this));
                        
                        return !result;
                }
@@ -639,7 +655,7 @@ namespace System.Threading.Tasks
                        // any big object references that the user might have captured in a anonymous method
                        if (disposeManagedRes) {
                                action = null;
-                               completed = null;
+                               completed.Clear ();
                                state = null;
                        }
                }
index 23ec35ac2d530d4360ea63d09debbe0d0655d846..80c2c4055e45941185fae1dcca76420a8d1cd2d8 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // TaskCanceledException.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Runtime.Serialization;
 
index 8365ad990413682d7e9838f508b41378791faa42..2eba7e8bd81145edf90eb5bb8924a190bf9572ab 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // TaskCompletionSource.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.Collections.Generic;
 
index a5205523c7232b5044ce79e8629d36b01a6a6e3e..b0a0d5de00cf26133c7f4dcf1aa5fad8e10af238 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // TaskContinuationKind.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 
 namespace System.Threading.Tasks
index 3af2c965b94a21894d3fba33dca9744affde8405..aada16c14b6c186594e5013ebae56203340edada 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // TaskCreationOptions.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 
 namespace System.Threading.Tasks
index d69c9cd1e8778a3160b3def4e3aa3b72b6d2ebc8..edb5944b92fdd79b4050ae589574001ee4062601 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // TaskFactory.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Threading;
 
@@ -108,7 +108,7 @@ namespace System.Threading.Tasks
                public Task StartNew (Action<object> action, object state, CancellationToken token, TaskCreationOptions options,
                                      TaskScheduler scheduler)
                {
-                       Task t = new Task (action, state, options);
+                       Task t = new Task (action, state, token, options);
                        t.Start (scheduler);
                        
                        return t;
index e836e6e4856c5aa76850bdbe04c40b1636543eac..1084dbe254c89b58b78c440a9e4069b982813bf0 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // TaskScheduler.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Threading;
 using System.Collections.Generic;
index f1c5c73ee4394587027bc47ea4e854b973818985..ddcd63bbaccd99495c081402dc669192472881dc 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // TaskSchedulerException.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0
 using System;
 using System.Runtime.Serialization;
 
index ff9060220874cf1802fe9647c8256a19e421cb67..d3d2ea66474532bdad35eb6f2800b94bb308584d 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // TaskStatus.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 
 namespace System.Threading.Tasks
diff --git a/mcs/class/corlib/System.Threading.Tasks/ThreadWorker.cs b/mcs/class/corlib/System.Threading.Tasks/ThreadWorker.cs
new file mode 100644 (file)
index 0000000..73ef7d6
--- /dev/null
@@ -0,0 +1,304 @@
+// ThreadWorker.cs
+//
+// Copyright (c) 2008 Jérémie "Garuma" Laval
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+//
+
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+using System;
+using System.Threading;
+using System.Collections.Concurrent;
+
+namespace System.Threading.Tasks
+{
+       internal class ThreadWorker : IDisposable
+       {
+               static Random r = new Random ();
+               
+               Thread workerThread;
+               
+               readonly          ThreadWorker[]         others;
+               internal readonly IDequeOperations<Task> dDeque;
+               readonly          Action<Task>           childWorkAdder;
+               readonly          EventWaitHandle        waitHandle;
+               readonly          IProducerConsumerCollection<Task> sharedWorkQueue;
+               // Flag to tell if workerThread is running
+               int started = 0; 
+               
+               readonly bool isLocal;
+               readonly int  workerLength;
+               readonly int  stealingStart;
+               const    int  maxRetry = 5;
+               
+               const int sleepThreshold = 100;
+               const int deepSleepTime = 10;
+               
+               Action threadInitializer;
+               
+               public ThreadWorker (IScheduler sched, ThreadWorker[] others, IProducerConsumerCollection<Task> sharedWorkQueue,
+                                    int maxStackSize, ThreadPriority priority, EventWaitHandle handle)
+               : this (sched, others, sharedWorkQueue, true, maxStackSize, priority, handle)
+               {
+               }
+               
+               public ThreadWorker (IScheduler sched, ThreadWorker[] others, IProducerConsumerCollection<Task> sharedWorkQueue,
+                                    bool createThread, int maxStackSize, ThreadPriority priority, EventWaitHandle handle)
+               {
+                       this.others          = others;
+
+                       this.dDeque = new CyclicDeque<Task> ();
+                       
+                       this.sharedWorkQueue = sharedWorkQueue;
+                       this.workerLength    = others.Length;
+                       this.isLocal         = !createThread;
+                       this.waitHandle      = handle;
+                       
+                       this.childWorkAdder = delegate (Task t) { 
+                               dDeque.PushBottom (t);
+                               sched.PulseAll ();
+                       };
+                       
+                       // Find the stealing start index randomly (then the traversal
+                       // will be done in Round-Robin fashion)
+                       do {
+                               this.stealingStart = r.Next(0, workerLength);
+                       } while (others[stealingStart] == this);
+                       
+                       InitializeUnderlyingThread (maxStackSize, priority);
+               }
+               
+               void InitializeUnderlyingThread (int maxStackSize, ThreadPriority priority)
+               {
+                       threadInitializer = delegate {
+                               // Special case of the participant ThreadWorker
+                               if (isLocal) {                  
+                                       this.workerThread = Thread.CurrentThread;
+                                       return;
+                               }
+                               
+                               this.workerThread = (maxStackSize == 0) ? new Thread (WorkerMethodWrapper) :
+                                       new Thread (WorkerMethodWrapper, maxStackSize);
+       
+                               this.workerThread.IsBackground = true;
+                               this.workerThread.Priority = priority;
+                               this.workerThread.Name = "ParallelFxThreadWorker";
+                       };
+                       threadInitializer ();
+               }
+
+               public void Dispose ()
+               {
+                       Stop ();
+                       if (!isLocal && workerThread.ThreadState != ThreadState.Stopped)
+                               workerThread.Abort ();
+               }
+               
+               public void Pulse ()
+               {
+                       // If the thread was stopped then set it in use and restart it
+                       int result = Interlocked.Exchange (ref started, 1);
+                       if (result != 0)
+                               return;
+                       if (!isLocal) {
+                               if (this.workerThread.ThreadState != ThreadState.Unstarted) {
+                                       threadInitializer ();
+                               }
+                               workerThread.Start ();
+                       }
+               }
+               
+               public void Stop ()
+               {
+                       // Set the flag to stop so that the while in the thread will stop
+                       // doing its infinite loop.
+                       started = 0;
+               }
+               
+               // This is the actual method called in the Thread
+               void WorkerMethodWrapper ()
+               {
+                       int sleepTime = 0;
+                       SpinWait wait = new SpinWait ();
+                       
+                       // Main loop
+                       while (started == 1) {
+                               bool result = false;
+
+                               result = WorkerMethod ();
+                               
+                               if (result) {
+                                       sleepTime = 0;
+                                       wait = new SpinWait ();
+                               }
+
+                               // Wait a little and if the Thread has been more sleeping than working shut it down
+                               wait.SpinOnce ();
+
+                               // If we are spinning too much, have a deeper sleep
+                               if (sleepTime++ > sleepThreshold)
+                                       waitHandle.WaitOne (deepSleepTime);
+                       }
+
+                       started = 0;
+               }
+               
+               // Main method, used to do all the logic of retrieving, processing and stealing work.
+               bool WorkerMethod ()
+               {               
+                       bool result = false;
+                       bool hasStolenFromOther;
+                       do {
+                               hasStolenFromOther = false;
+                               
+                               Task value;
+                               
+                               // We fill up our work deque concurrently with other ThreadWorker
+                               while (sharedWorkQueue.Count > 0) {
+                                       while (sharedWorkQueue.TryTake (out value)) {
+                                               dDeque.PushBottom (value);
+                                       }
+                                       
+                                       // Now we process our work
+                                       while (dDeque.PopBottom (out value) == PopResult.Succeed) {
+                                               if (value != null) {
+                                                       value.Execute (childWorkAdder);
+                                                       result = true;
+                                               }
+                                       }
+                               }
+                               
+                               // When we have finished, steal from other worker
+                               ThreadWorker other;
+                               
+                               // Repeat the operation a little so that we can let other things process.
+                               for (int j = 0; j < maxRetry; j++) {
+                                       // Start stealing with the ThreadWorker at our right to minimize contention
+                                       for (int it = stealingStart; it < stealingStart + workerLength; it++) {
+                                               int i = it % workerLength;
+                                               if ((other = others [i]) == null || other == this)
+                                                       continue;
+                                               
+                                               // Maybe make this steal more than one item at a time, see TODO.
+                                               if (other.dDeque.PopTop (out value) == PopResult.Succeed) {
+                                                       hasStolenFromOther = true;
+                                                       if (value != null) {
+                                                               value.Execute (childWorkAdder);
+                                                               result = true;
+                                                       }
+                                               }
+                                       }
+                               }
+                       } while (sharedWorkQueue.Count > 0 || hasStolenFromOther);
+                       
+                       return result;
+               }
+               
+               // Almost same as above but with an added predicate and treating one item at a time. 
+               // It's used by Scheduler Participate(...) method for special waiting case like
+               // Task.WaitAll(someTasks) or Task.WaitAny(someTasks)
+               // Predicate should be really fast and not blocking as it is called a good deal of time
+               // Also, the method skip tasks that are LongRunning to avoid blocking (Task are not LongRunning by default)
+               public static void WorkerMethod (Func<bool> predicate, IProducerConsumerCollection<Task> sharedWorkQueue,
+                                                ThreadWorker[] others)
+               {
+                       SpinWait wait = new SpinWait ();
+
+                       while (!predicate ()) {
+                               Task value;
+                               
+                               // Dequeue only one item as we have restriction
+                               if (sharedWorkQueue.TryTake (out value)) {
+                                       if (value != null) {
+                                               if (CheckTaskFitness (value))
+                                                       value.Execute (null);
+                                               else
+                                                       sharedWorkQueue.TryAdd (value);
+                                       }
+                               }
+                               
+                               // First check to see if we comply to predicate
+                               if (predicate ())
+                                       return;
+                               
+                               // Try to complete other work by stealing since our desired tasks may be in other worker
+                               ThreadWorker other;
+                               for (int i = 0; i < others.Length; i++) {
+                                       if ((other = others [i]) == null)
+                                               continue;
+                                       
+                                       if (other.dDeque.PopTop (out value) == PopResult.Succeed) {
+                                               if (value != null) {
+                                                       if (CheckTaskFitness (value))
+                                                               value.Execute (null);
+                                                       else
+                                                               sharedWorkQueue.TryAdd (value);
+                                               }
+                                       }
+                                       
+                                       if (predicate ())
+                                               return;
+                               }
+
+                               wait.SpinOnce ();
+                       }
+               }
+               
+               static bool CheckTaskFitness (Task t)
+               {
+                       return (t.CreationOptions | TaskCreationOptions.LongRunning) > 0;
+               }
+               
+               public bool Finished {
+                       get {
+                               return started == 0;
+                       }
+               }
+               
+               public bool IsLocal {
+                       get {
+                               return isLocal;
+                       }
+               }
+               
+               public int Id {
+                       get {
+                               return workerThread.ManagedThreadId;
+                       }
+               }
+               
+               public bool Equals (ThreadWorker other)
+               {
+                       return (other == null) ? false : object.ReferenceEquals (this.dDeque, other.dDeque);    
+               }
+               
+               public override bool Equals (object obj)
+               {
+                       ThreadWorker temp = obj as ThreadWorker;
+                       return temp == null ? false : Equals (temp);
+               }
+               
+               public override int GetHashCode ()
+               {
+                       return workerThread.ManagedThreadId.GetHashCode ();
+               }
+       }
+}
+#endif
index 0df224a281b17ec770bfd2532529bc6c498cda66..433f2957593c57100d06247459e7870bd26da6b6 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // UnobservedTaskExceptionEventArgs.cs
 //  
@@ -25,6 +24,9 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+using System;
+
 namespace System.Threading.Tasks
 {
        public class UnobservedTaskExceptionEventArgs : EventArgs
index 3c76f0925f539044609117c52229c9f4e0bef932..89958b3725cd8c97a1d11b4c20b2e39841c82854 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // AtomicBoolean.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -53,6 +52,11 @@ namespace System.Threading
                {
                        return !Exchange (true);
                }
+
+               public bool TryRelaxedSet ()
+               {
+                       return flag == UnSet && !Exchange (true);
+               }
                
                public bool Exchange (bool newVal)
                {
@@ -95,4 +99,3 @@ namespace System.Threading
                }
        }
 }
-#endif
index de6e9361df3ff4753b4b8ab824b0042305831754..57bc109d4b9d10ba8c51b1a6c453e6f1ce9e8d40 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // CSnzi.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 
 namespace System.Threading
index e12f9c9e23ac3e0b8ee3e537cf4a61d2c3ed265b..1e4e0b69efd9dedf8d69f90948d0dd5d8d92d430 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // CancellationTokenRegistration.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Threading;
 
index bd19c897ef9985bfaa46ceb49421192092ccf226..12f59a5d190bc19f2dcea0a90b9676c88e005764 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // 
 // CancellationTokenSource.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Collections.Generic;
 
index c12c85ed67c632f7ae45f44c10e0d45630cdf851..eaeb3ac6e14e8a087bbadfc7f4ba70609cc53599 100644 (file)
 //
 //
 
-using System;
-
 #if NET_4_0 || BOOTSTRAP_NET_4_0
 
+using System;
+
 namespace System.Threading
 {      
        public class CountdownEvent : IDisposable
        {
                int count;
                readonly int initial;
-               ManualResetEvent evt = new ManualResetEvent (false);
+               ManualResetEventSlim evt = new ManualResetEventSlim (false);
                
                public CountdownEvent (int count)
                {
@@ -122,72 +122,34 @@ namespace System.Threading
                
                public void Wait ()
                {
-                       SpinWait wait = new SpinWait ();
-                       while (!IsSet) {
-                               wait.SpinOnce ();
-                       }
+                       evt.Wait ();
                }
                
                public void Wait (CancellationToken token)
                {
-                       Wait (() => token.IsCancellationRequested);
+                       evt.Wait (token);
                }
                
                public bool Wait (int timeoutMilli)
                {
-                       if (timeoutMilli == -1) {
-                               Wait ();
-                               return true;
-                       }
-                       
-                       Watch sw = Watch.StartNew ();
-                       long timeout = (long)timeoutMilli;
-                       
-                       bool result = Wait (() => sw.ElapsedMilliseconds > timeout);
-                       sw.Stop ();
-                       
-                       return result;
+                       return evt.Wait (timeoutMilli);
                }
                
                public bool Wait(TimeSpan span)
                {
-                       return Wait ((int)span.TotalMilliseconds);
+                       return evt.Wait (span);
                }
                
                public bool Wait (int timeoutMilli, CancellationToken token)
                {
-                       if (timeoutMilli == -1) {
-                               Wait ();
-                               return true;
-                       }
-                       
-                       Watch sw = Watch.StartNew ();
-                       long timeout = (long)timeoutMilli;
-                       
-                       bool result = Wait (() => sw.ElapsedMilliseconds > timeout || token.IsCancellationRequested);
-                       sw.Stop ();
-                       
-                       return result;
+                       return evt.Wait (timeoutMilli, token);
                }
                
                public bool Wait(TimeSpan span, CancellationToken token)
                {
-                       return Wait ((int)span.TotalMilliseconds, token);
-               }
-               
-               bool Wait (Func<bool> waitPredicate)
-               {
-                       SpinWait wait = new SpinWait ();
-                       
-                       while (!IsSet) {
-                               if (waitPredicate ())
-                                       return false;
-                               wait.SpinOnce ();
-                       }
-                       
-                       return true;
+                       return evt.Wait (span, token);
                }
-               
+
                public void Reset ()
                {
                        Reset (initial);
@@ -219,7 +181,7 @@ namespace System.Threading
                
                public WaitHandle WaitHandle {
                        get {
-                               return evt;
+                               return evt.WaitHandle;
                        }
                }
 
index 85b4edab163aa3fcde4baf370d727fe72ec784bc..c63126ee57379b6abad59b650a9cdf7cf9bd069b 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // LazyInitializer.cs
 //  
@@ -25,6 +24,8 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
 using System;
 
 namespace System.Threading
index 5c8d0bd933c37fb99322d60cfd55676925681c04..5cf5ae312ce3571f7e9e7c93521f70bf5e4bea42 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // ManuelResetEventSlim.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,8 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
 using System;
 using System.Diagnostics;
 
@@ -32,14 +33,14 @@ namespace System.Threading
        {
                const int isSet    = 1;
                const int isNotSet = 0;
-               const int defaultSpinCount = 20;
+               const int defaultSpinCount = 10;
 
                int state;
                readonly int spinCount;
 
                ManualResetEvent handle;
 
-               public ManualResetEventSlim () : this(false, defaultSpinCount)
+               public ManualResetEventSlim () : this (false, defaultSpinCount)
                {
                }
 
@@ -54,7 +55,6 @@ namespace System.Threading
 
                        this.state = initState ? isSet : isNotSet;
                        this.spinCount = spinCount;
-                       this.handle = new ManualResetEvent (initState);
                }
 
                public bool IsSet {
@@ -72,11 +72,15 @@ namespace System.Threading
                public void Reset ()
                {
                        Interlocked.Exchange (ref state, isNotSet);
+                       if (handle != null)
+                               handle.Reset ();
                }
 
                public void Set ()
                {
                        Interlocked.Exchange (ref state, isSet);
+                       if (handle != null)
+                               handle.Set ();
                }
 
                public void Wait ()
@@ -99,28 +103,30 @@ namespace System.Threading
                        Wait (-1, token);
                }
 
-               public bool Wait (int millisecondsTimeout, CancellationToken token)
+               public bool Wait (int ms, CancellationToken token)
                {
-                       if (millisecondsTimeout < -1)
+                       if (ms < -1)
                                throw new ArgumentOutOfRangeException ("millisecondsTimeout",
                                                                       "millisecondsTimeout is a negative number other than -1");
 
                        Watch s = Watch.StartNew ();
                        SpinWait sw = new SpinWait ();
-                       int count = 0;
 
                        while (state == isNotSet) {
-                               if (token.IsCancellationRequested)
-                                       return false;
+                               token.ThrowIfCancellationRequested ();
 
-                               if (millisecondsTimeout > -1 && s.ElapsedMilliseconds > millisecondsTimeout)
+                               if (ms > -1 && s.ElapsedMilliseconds > ms)
                                        return false;
 
-                               if (count < spinCount) {
-                                   sw.SpinOnce ();
-                                       count++;
+                               if (sw.Count < spinCount) {
+                                       sw.SpinOnce ();
                                } else {
-                                       Thread.Sleep (0);
+                                       int waitTime = ms == -1 ? -1 : Math.Max (ms - (int)s.ElapsedMilliseconds, 1);
+                                       WaitHandle handle = WaitHandle;
+                                       if (state == isSet)
+                                               return true;
+                                       if (WaitHandle.WaitAny (new[] { handle, token.WaitHandle }, waitTime, false) == 0)
+                                               return true;
                                }
                        }
 
@@ -134,7 +140,10 @@ namespace System.Threading
 
                public WaitHandle WaitHandle {
                        get {
-                               return handle;
+                               if (handle != null)
+                                       return handle;
+                               return LazyInitializer.EnsureInitialized (ref handle,
+                                                                         () => new ManualResetEvent (state == isSet ? true : false));
                        }
                }
 
index 3c2fbfa156d69e109a8320cb0bced64c19d14ef3..62e349e648b1060b33c4877794da5cff0cff6efd 100644 (file)
@@ -88,8 +88,11 @@ namespace System.Threading
 
                private void DoCallBack (object timedOut)
                {
-                       if (_callback != null)
-                               _callback (_state, (bool)timedOut); 
+                       if (_callback != null) {
+                               try {
+                                       _callback (_state, (bool)timedOut); 
+                               } catch {}
+                       }
 
                        lock (this) 
                        {
index dc730f96aaa26da4c0d23861e89c14752c3e0b64..340d95057c0ac3dbafb394b3c3020018095ae6a0 100644 (file)
@@ -30,11 +30,14 @@ namespace System.Threading
 {
        public class SemaphoreSlim : IDisposable
        {
+               const int spinCount = 10;
+               const int deepSleepTime = 20;
+
                readonly int max;
                int currCount;
                bool isDisposed;
 
-               ManualResetEvent handle;
+               EventWaitHandle handle;
 
                public SemaphoreSlim (int initial) : this (initial, int.MaxValue)
                {
@@ -96,7 +99,7 @@ namespace System.Threading
                                newValue = newValue > max ? max : newValue;
                        } while (Interlocked.CompareExchange (ref currCount, newValue, oldValue) != oldValue);
 
-                       handle.Reset ();
+                       handle.Set ();
 
                        return oldValue;
                }
@@ -136,14 +139,14 @@ namespace System.Threading
 
                        Watch sw = Watch.StartNew ();
 
-                       Func<bool> stopCondition =
-                               () => token.IsCancellationRequested || (millisecondsTimeout >= 0 && sw.ElapsedMilliseconds > millisecondsTimeout);
+                       Func<bool> stopCondition = () => millisecondsTimeout >= 0 && sw.ElapsedMilliseconds > millisecondsTimeout;
 
                        do {
                                bool shouldWait;
                                int result;
 
                                do {
+                                       token.ThrowIfCancellationRequested ();
                                        if (stopCondition ())
                                                return false;
 
@@ -158,17 +161,21 @@ namespace System.Threading
 
                                if (!shouldWait) {
                                        if (result == 1)
-                                               handle.Set ();
+                                               handle.Reset ();
                                        break;
                                }
 
                                SpinWait wait = new SpinWait ();
 
                                while (Thread.VolatileRead (ref currCount) <= 0) {
+                                       token.ThrowIfCancellationRequested ();
                                        if (stopCondition ())
                                                return false;
 
-                                       wait.SpinOnce ();
+                                       if (wait.Count > spinCount)
+                                               handle.WaitOne (Math.Min (Math.Max (millisecondsTimeout - (int)sw.ElapsedMilliseconds, 1), deepSleepTime));
+                                       else
+                                               wait.SpinOnce ();
                                }
                        } while (true);
 
index e0a2da56803f10e802190e7806ec3fe30048dc95..b63c4ae7b2a9a42668a02cfd848d2ab77e509474 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // Snzi.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.IO;
 
index e3fb372dd26551be9327ea5a6349eacb7a0e5eab..4191acbeaf31d149d928a97c19e3599c4b856382 100644 (file)
@@ -89,7 +89,7 @@ namespace System.Threading
 
                        int slot = Interlocked.Increment (ref ticket.Users) - 1;
 
-                       SpinWait wait;
+                       SpinWait wait = new SpinWait ();
                        while (slot != ticket.Value)
                                wait.SpinOnce ();
                        
index c93380ef46167780dfbc025e0f77c0aa88bfa0b9..d46376bc0439bde0dbde55c160a338c87010d14a 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // SpinWait.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 
 namespace System.Threading
@@ -31,24 +31,22 @@ namespace System.Threading
        {
                // The number of step until SpinOnce yield on multicore machine
                const           int  step = 5;
-               const           int  maxSpin = 10000;
+               const           int  maxTime = 50;
                static readonly bool isSingleCpu = (Environment.ProcessorCount == 1);
 
                int ntime;
 
                public void SpinOnce ()
                {
-                       if (ntime > 2 * maxSpin) {
-                               Thread.Sleep (1);
-                       } else if (isSingleCpu) {
+                       if (isSingleCpu) {
                                // On a single-CPU system, spinning does no good
                                Thread.Yield ();
                        } else {
-                               if (++ntime % step == 0)
+                               if ((ntime = ntime == maxTime ? maxTime : ntime + 1) % step == 0)
                                        Thread.Yield ();
                                else
                                        // Multi-CPU system might be hyper-threaded, let other thread run
-                                       Thread.SpinWait (Math.Min (ntime << 1, maxSpin));
+                                       Thread.SpinWait (ntime << 1);
                        }
                }
 
index 24d3267cd1467250064f06b3a250b810c53d4797..9fb6bc7bf3e12cc4d34d43bdbcaa0a56d5d4106e 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // ThreadLocal.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0
 using System;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
@@ -38,9 +38,11 @@ namespace System.Threading
        {
                readonly Func<T> initializer;
                LocalDataStoreSlot localStore;
+               Exception cachedException;
                
                class DataSlotWrapper
                {
+                       public bool Creating;
                        public bool Init;
                        public Func<T> Getter;
                }
@@ -60,7 +62,7 @@ namespace System.Threading
                
                public void Dispose ()
                {
-                       Dispose(true);
+                       Dispose (true);
                }
                
                protected virtual void Dispose (bool dispManagedRes)
@@ -70,43 +72,62 @@ namespace System.Threading
                
                public bool IsValueCreated {
                        get {
+                               ThrowIfNeeded ();
                                return IsInitializedThreadLocal ();
                        }
                }
                
                public T Value {
                        get {
+                               ThrowIfNeeded ();
                                return GetValueThreadLocal ();
                        }
+                       set {
+                               ThrowIfNeeded ();
+
+                               DataSlotWrapper w = GetWrapper ();
+                               w.Init = true;
+                               w.Getter = () => value;
+                       }
                }
                
                public override string ToString ()
                {
-                       return string.Format("[ThreadLocal: IsValueCreated={0}, Value={1}]", IsValueCreated, Value);
+                       return string.Format ("[ThreadLocal: IsValueCreated={0}, Value={1}]", IsValueCreated, Value);
                }
 
                
                T GetValueThreadLocal ()
                {
-                       DataSlotWrapper myWrapper = Thread.GetData (localStore) as DataSlotWrapper;
-                       // In case it's the first time the Thread access its data
-                       if (myWrapper == null) {
-                               myWrapper = DataSlotCreator ();
-                               Thread.SetData (localStore, myWrapper);
-                       }
-                               
-                       return myWrapper.Getter();
+                       DataSlotWrapper myWrapper = GetWrapper ();
+                       if (myWrapper.Creating)
+                               throw new InvalidOperationException ("The initialization function attempted to reference Value recursively");
+
+                       return myWrapper.Getter ();
                }
                
                bool IsInitializedThreadLocal ()
+               {
+                       DataSlotWrapper myWrapper = GetWrapper ();
+
+                       return myWrapper.Init;
+               }
+
+               DataSlotWrapper GetWrapper ()
                {
                        DataSlotWrapper myWrapper = (DataSlotWrapper)Thread.GetData (localStore);
                        if (myWrapper == null) {
                                myWrapper = DataSlotCreator ();
                                Thread.SetData (localStore, myWrapper);
                        }
-                       
-                       return myWrapper.Init;
+
+                       return myWrapper;
+               }
+
+               void ThrowIfNeeded ()
+               {
+                       if (cachedException != null)
+                               throw cachedException;
                }
 
                DataSlotWrapper DataSlotCreator ()
@@ -115,10 +136,17 @@ namespace System.Threading
                        Func<T> valSelector = initializer;
        
                        wrapper.Getter = delegate {
-                               T val = valSelector ();
-                               wrapper.Init = true;
-                               wrapper.Getter = delegate { return val; };
-                               return val;
+                               wrapper.Creating = true;
+                               try {
+                                       T val = valSelector ();
+                                       wrapper.Creating = false;
+                                       wrapper.Init = true;
+                                       wrapper.Getter = () => val;
+                                       return val;
+                               } catch (Exception e) {
+                                       cachedException = e;
+                                       throw e;
+                               }
                        };
                        
                        return wrapper;
index d0f9a6562354699d9bea9fdf3ab996f06612a008..ab2193b95feb8620ad79d09e7233adcdafc86fcf 100644 (file)
@@ -288,7 +288,11 @@ namespace System.Threading
                                                        list.RemoveAt (i);
                                                        count--;
                                                        i--;
-                                                       ThreadPool.QueueUserWorkItem (new WaitCallback (timer.callback), timer.state);
+                                                       ThreadPool.QueueUserWorkItem (new WaitCallback (data => {
+                                                               try {
+                                                                       timer.callback (data);
+                                                               } catch {}
+                                                               }), timer.state);
                                                        long period = timer.period_ms;
                                                        long due_time = timer.due_time_ms;
                                                        bool no_more = (period == -1 || ((period == 0 || period == Timeout.Infinite) && due_time != Timeout.Infinite));
index 8c0caf462d730a1295753287dbbed36ba16acd11..86a06d7ef50f2797abde83c19b84c76f26c365e3 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // Task.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 
 namespace System.Threading
index 0e02b536870459146ff7a99a4648b26ec3bb701b..a4db6e599824d236f9501d9889155ceb3b5c5169 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0 || BOOTSTRAP_NET_4_0
 // AggregateException.cs
 //
 // Copyright (c) 2008 Jérémie "Garuma" Laval
@@ -23,6 +22,7 @@
 //
 //
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
 using System;
 using System.Collections.ObjectModel;
 using System.Collections.Generic;
index b1e005caabb24a9c123a3a75fb18b8e337ee50bb..dbd2fcef0884c64b67888bdac518b3e556f5475b 100644 (file)
@@ -1919,11 +1919,6 @@ namespace System
 
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
                public static void Resize<T> (ref T [] array, int newSize)
-               {
-                       Resize<T> (ref array, array == null ? 0 : array.Length, newSize);
-               }
-
-               internal static void Resize<T> (ref T[] array, int length, int newSize)
                {
                        if (newSize < 0)
                                throw new ArgumentOutOfRangeException ();
@@ -1932,12 +1927,14 @@ namespace System
                                array = new T [newSize];
                                return;
                        }
-                       
-                       if (array.Length == newSize)
+
+                       int length = array.Length;
+                       if (length == newSize)
                                return;
                        
                        T [] a = new T [newSize];
-                       Array.Copy (array, a, Math.Min (newSize, length));
+                       if (length != 0)
+                               FastCopy (array, 0, a, 0, Math.Min (newSize, length));
                        array = a;
                }
                
index 9aa38a15a9cd2894cffdb139abd60c628f44d18c..0e8ad29583c36b3c6f547e09b48be524156edbab 100644 (file)
@@ -89,6 +89,7 @@ namespace System
                // try combinations of these patterns. The algorithm also looks for
                // day of the week, AM/PM GMT and Z independently of the patterns.
                private static readonly string[] ParseTimeFormats = new string [] {
+                       "H:m:s.fff zzz",
                        "H:m:s.fffffffzzz",
                        "H:m:s.fffffff",
                        "H:m:s.ffffff",
index 733eac9a4d3f132eab175fecdeed571364b4145f..ac60c1cfcc3d2d633dd31380c4d0e58b9f927068 100644 (file)
@@ -149,6 +149,11 @@ namespace System
                }
 
                public static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo method, bool throwOnBindFailure)
+               {
+                       return CreateDelegate (type, firstArgument, method, throwOnBindFailure, true);
+               }
+
+               public static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo method, bool throwOnBindFailure, bool allowClosed)
                {
                        // The name of the parameter changed in 2.0
                        object target = firstArgument;
@@ -184,13 +189,17 @@ namespace System
                                        // target is passed as the first argument to the static method
                                        argLengthMatch = (args.Length == delargs.Length + 1);
                        } else {
-                               if (!method.IsStatic)
+                               if (!method.IsStatic) {
                                        //
                                        // Net 2.0 feature. The first argument of the delegate is passed
                                        // as the 'this' argument to the method.
                                        //
                                        argLengthMatch = (args.Length + 1 == delargs.Length);
-                               else {
+
+                                       if (!argLengthMatch)
+                                               // closed over a null reference
+                                               argLengthMatch = (args.Length == delargs.Length);
+                               } else {
                                        argLengthMatch = (args.Length == delargs.Length);
 
                                        if (!argLengthMatch)
@@ -217,10 +226,17 @@ namespace System
                                }
                        } else {
                                if (!method.IsStatic) {
-                                       // The first argument should match this
-                                       argsMatch = arg_type_match (delargs [0].ParameterType, method.DeclaringType);
-                                       for (int i = 0; i < args.Length; i++)
-                                               argsMatch &= arg_type_match (delargs [i + 1].ParameterType, args [i].ParameterType);
+                                       if (args.Length + 1 == delargs.Length) {
+                                               // The first argument should match this
+                                               argsMatch = arg_type_match (delargs [0].ParameterType, method.DeclaringType);
+                                               for (int i = 0; i < args.Length; i++)
+                                                       argsMatch &= arg_type_match (delargs [i + 1].ParameterType, args [i].ParameterType);
+                                       } else {
+                                               // closed over a null reference
+                                               argsMatch = allowClosed;
+                                               for (int i = 0; i < args.Length; i++)
+                                                       argsMatch &= arg_type_match (delargs [i].ParameterType, args [i].ParameterType);
+                                       }
                                } else {
                                        if (delargs.Length + 1 == args.Length) {
                                                // closed over a null reference
@@ -247,22 +263,24 @@ namespace System
                        return d;
                }
 
-               public static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo method) {
-                       return CreateDelegate (type, firstArgument, method, true);
+               public static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo method)
+               {
+                       return CreateDelegate (type, firstArgument, method, true, true);
                }
 
                public static Delegate CreateDelegate (Type type, MethodInfo method, bool throwOnBindFailure)
                {
-                       return CreateDelegate (type, null, method, throwOnBindFailure);
+                       return CreateDelegate (type, null, method, throwOnBindFailure, false);
                }
 
-               public static Delegate CreateDelegate (Type type, MethodInfo method) {
+               public static Delegate CreateDelegate (Type type, MethodInfo method)
+               {
                        return CreateDelegate (type, method, true);
                }
 
                public static Delegate CreateDelegate (Type type, object target, string method)
                {
-                       return CreateDelegate(type, target, method, false);
+                       return CreateDelegate (type, target, method, false);
                }
 
                static MethodInfo GetCandidateMethod (Type type, Type target, string method, BindingFlags bflags, bool ignoreCase, bool throwOnBindFailure)
@@ -486,6 +504,12 @@ namespace System
                        if (source == null)
                                return null;
 
+                       if (value == null)
+                               return source;
+
+                       if (source.GetType () != value.GetType ())
+                               throw new ArgumentException ("Delegate type mismatch");
+
                        return source.RemoveImpl (value);
                }
 
index 5b9da1c614623c6669585250970928e4179dc1e9..382060f7954e4aebdebb45dfb97830246a144d4d 100644 (file)
@@ -55,7 +55,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 91;
+               private const int mono_corlib_version = 93;
 #pragma warning restore 169
 
                [ComVisible (true)]
@@ -129,9 +129,26 @@ namespace System {
                public static string CommandLine {
                        // note: security demand inherited from calling GetCommandLineArgs
                        get {
-                               // FIXME: we may need to quote, but any sane person
-                               // should use GetCommandLineArgs () instead.
-                               return String.Join (" ", GetCommandLineArgs ());
+                               StringBuilder sb = new StringBuilder ();
+                               foreach (string str in GetCommandLineArgs ()) {
+                                       bool escape = false;
+                                       string quote = "";
+                                       string s = str;
+                                       for (int i = 0; i < s.Length; i++) {
+                                               if (quote.Length == 0 && Char.IsWhiteSpace (s [i])) {
+                                                       quote = "\"";
+                                               } else if (s [i] == '"') {
+                                                       escape = true;
+                                               }
+                                       }
+                                       if (escape && quote.Length != 0) {
+                                               s = s.Replace ("\"", "\\\"");
+                                       }
+                                       sb.AppendFormat ("{0}{1}{0} ", quote, s);
+                               }
+                               if (sb.Length > 0)
+                                       sb.Length--;
+                               return sb.ToString ();
                        }
                }
 
index d922565962a7ad1f6b78433941d6fa90be1f5c4e..b1a1a78849a6f0020b5b51cee71f8bc7e4b69dc3 100644 (file)
@@ -140,6 +140,8 @@ namespace System
 
                public static double Log (double a, double newBase)
                {
+                       if (newBase == 1.0)
+                               return Double.NaN;
                        double result = Log(a) / Log(newBase);
                        return (result == -0)? 0: result;
                }
old mode 100644 (file)
new mode 100755 (executable)
index e3c2969..b87bb11
@@ -330,7 +330,7 @@ namespace System {
                public bool TreatControlCAsInput {
                        get {
                                int mode;
-                               if (!GetConsoleMode (outputHandle, out mode))
+                               if (!GetConsoleMode (inputHandle, out mode))
                                        throw new Exception ("Failed in GetConsoleMode: " + Marshal.GetLastWin32Error ());
 
                                // ENABLE_PROCESSED_INPUT
@@ -339,7 +339,7 @@ namespace System {
 
                        set {
                                int mode;
-                               if (!GetConsoleMode (outputHandle, out mode))
+                               if (!GetConsoleMode (inputHandle, out mode))
                                        throw new Exception ("Failed in GetConsoleMode: " + Marshal.GetLastWin32Error ());
 
                                bool cAsInput = ((mode & 1) == 0);
@@ -349,9 +349,9 @@ namespace System {
                                if (value)
                                        mode &= ~1;
                                else
-                                       mode++;
+                                       mode |= 1;
 
-                               if (!SetConsoleMode (outputHandle, mode))
+                               if (!SetConsoleMode (inputHandle, mode))
                                        throw new Exception ("Failed in SetConsoleMode: " + Marshal.GetLastWin32Error ());
                        }
                }
@@ -474,11 +474,13 @@ namespace System {
                {
                        int eventsRead;
                        InputRecord record = new InputRecord ();
-                       do {
+                       for (;;) {
                                if (!ReadConsoleInput (inputHandle, out record, 1, out eventsRead))
                                        throw new InvalidOperationException ("Error in ReadConsoleInput " +
                                                                        Marshal.GetLastWin32Error ());
-                       } while (record.EventType != 1 && !record.KeyDown);
+                               if (record.KeyDown && record.EventType == 1 && !IsModifierKey (record.VirtualKeyCode))
+                                       break;
+                       }
 
                        // RIGHT_ALT_PRESSED 1
                        // LEFT_ALT_PRESSED 2
@@ -540,6 +542,26 @@ namespace System {
                                throw new ArgumentOutOfRangeException ("left/top", "Windows error " + Marshal.GetLastWin32Error ());
                }
 
+               private bool IsModifierKey(short virtualKeyCode)
+               {
+                       // 0x10 through 0x14 is shift/control/alt/pause/capslock
+                       // 0x2C is print screen, 0x90 is numlock, 0x91 is scroll lock
+                       switch (virtualKeyCode) {
+                       case 0x10:
+                       case 0x11:
+                       case 0x12:
+                       case 0x13:
+                       case 0x14:
+                               return true;
+                       case 0x2C:
+                       case 0x90:
+                       case 0x91:
+                               return true;
+                       default:
+                               return false;
+                       }
+               }
+
                //
                // Imports
                //
index f357a22333bbe5b1cfd95f98d137c4059ea41e8a..26e97a05dfc52e5d124e504797ea6e2a0ddb6a08 100644 (file)
 
 using System;
 using System.IO;
+using System.Runtime.InteropServices;
 
 using Microsoft.Win32;
+using Microsoft.Win32.SafeHandles;
 
 using NUnit.Framework;
 
@@ -757,6 +759,65 @@ namespace MonoTests.Microsoft.Win32
                                        key2.Close ();
                        }
                }
+
+               [Test]
+               public void DeleteSubKey_Volatile ()
+               {                       
+                       RegistryKey key = null;
+                       RegistryKey subkey = null;
+                       string subKeyName = "VolatileKey";
+
+                       try {
+                               key = Registry.CurrentUser.CreateSubKey (subKeyName, RegistryKeyPermissionCheck.Default, RegistryOptions.Volatile);
+                               key.CreateSubKey ("VolatileKeyChild", RegistryKeyPermissionCheck.Default, RegistryOptions.Volatile);
+                               key.SetValue ("Name", "Mono");
+                               key.Close ();
+
+                               Registry.CurrentUser.DeleteSubKeyTree (subKeyName);
+
+                               key = Registry.CurrentUser.OpenSubKey (subKeyName);
+                               Assert.AreEqual (null, key, "#A0");
+                       } finally {
+                               if (subkey != null)
+                                       subkey.Close ();
+                               if (key != null)
+                                       key.Close ();
+                       }
+               }
+
+               // Define a normal key, and create a normal and a volatile key under it, and retrieve their names.
+               [Test]
+               public void GetSubKeyNames_Volatile ()
+               {           
+                       RegistryKey key = null;
+                       RegistryKey subkey = null;
+                       string subKeyName = Guid.NewGuid ().ToString ();
+                       string volChildKeyName = "volatilechildkey";
+                       string childKeyName = "childkey";
+
+                       try {
+                               key = Registry.CurrentUser.CreateSubKey (subKeyName);
+                               key.CreateSubKey (volChildKeyName, RegistryKeyPermissionCheck.Default, RegistryOptions.Volatile);
+                               key.CreateSubKey (childKeyName, RegistryKeyPermissionCheck.Default, RegistryOptions.None);
+                               key.Close ();
+
+                               key = Registry.CurrentUser.OpenSubKey (subKeyName);
+                               string [] keyNames = key.GetSubKeyNames ();
+
+                               // we can guarantee the order of the child keys, so we sort the two of them
+                               Array.Sort (keyNames);
+
+                               Assert.AreEqual (2, keyNames.Length, "#A0");
+                               Assert.AreEqual (childKeyName, keyNames [0], "#A1");
+                               Assert.AreEqual (volChildKeyName, keyNames [1], "#A2");
+                       } finally {
+                               if (subkey != null)
+                                       subkey.Close ();
+                               if (key != null)
+                                       key.Close ();
+                       }
+
+               }
 #endif
 
                [Test]
@@ -1048,6 +1109,27 @@ namespace MonoTests.Microsoft.Win32
                        }
                }
 
+#if NET_4_0
+               [Test]
+               public void DeleteSubKeyTree_Key_DoesNotExist_Overload ()
+               {
+                       // Cannot delete a subkey tree because the subkey does not exist
+                       string subKeyName = Guid.NewGuid ().ToString ();
+                       try {
+                               Registry.CurrentUser.DeleteSubKeyTree (subKeyName, true);
+                               Assert.Fail ("#1");
+                       } catch (ArgumentException ex) {
+                               Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
+                               Assert.IsNull (ex.InnerException, "#3");
+                               Assert.IsNotNull (ex.Message, "#4");
+                               Assert.IsNull (ex.ParamName, "#5");
+                       }
+
+                       // It's enough to know this line is not throwing an exception.
+                       Registry.CurrentUser.DeleteSubKey (subKeyName, false);
+               }
+#endif
+
                [Test]
                public void DeleteSubKeyTree_Key_ReadOnly ()
                {
@@ -1580,6 +1662,102 @@ namespace MonoTests.Microsoft.Win32
                        }
                }
 
+#if NET_4_0
+               [DllImport ("advapi32.dll", CharSet = CharSet.Unicode)]
+               static extern int RegOpenKeyEx (IntPtr keyBase, string keyName, IntPtr reserved, int access, out IntPtr keyHandle);
+        
+               const int RegCurrentUserHive = -2147483647;
+               const int RegAccessRead = 0x00020019;
+
+               // FromHandle is specially designed to retrieve a RegistryKey instance based on a IntPtr
+               // retrieved using any unmanaged registry function, so we use directly RegOpenKeyEx to load
+               // our handle and then pass it to the new 4.0 method.
+               [Test]
+               public void FromHandle ()
+               {
+                       // Not supported on Unix
+                       if (RunningOnUnix)
+                               return;
+
+                       string subKeyName = Guid.NewGuid ().ToString ();
+                       try {
+                               using (RegistryKey key = Registry.CurrentUser.CreateSubKey (subKeyName))
+                                       key.SetValue ("Name", "Mono001");
+
+                               IntPtr handle;
+                               int res = RegOpenKeyEx (new IntPtr (RegCurrentUserHive), subKeyName, IntPtr.Zero, RegAccessRead, out handle);
+
+                               using (RegistryKey key = RegistryKey.FromHandle (new SafeRegistryHandle (handle, true))) {
+                                       Assert.AreEqual (String.Empty, key.Name, "#A0");
+                                       Assert.AreEqual ("Mono001", key.GetValue ("Name"), "#A1");
+                               }
+                       } finally {
+                               RegistryKey createdKey = Registry.CurrentUser.OpenSubKey (subKeyName);
+                               if (createdKey != null) {
+                                       createdKey.Close ();
+                                       Registry.CurrentUser.DeleteSubKeyTree (subKeyName);
+                               }
+                       }
+               }
+
+               [Test]
+               public void FromHandle_InvalidHandle ()
+               {
+                       // Not supported on Unix
+                       if (RunningOnUnix)
+                               return;
+
+                       string subKeyName = Guid.NewGuid ().ToString ();
+                       try {
+                               using (RegistryKey key = RegistryKey.FromHandle (new SafeRegistryHandle (IntPtr.Zero, true))) {
+                                       Assert.AreEqual (String.Empty, key.Name, "#A0");
+
+                                       // Any operation should throw a IOException, since even if we have a RegistryKey instance,
+                                       // the handle is not valid.
+                                       key.CreateSubKey ("ChildSubKey");
+                                       Assert.Fail ("#Exc0");
+                               }
+                       } catch (IOException) {
+                       } finally {
+                               RegistryKey createdKey = Registry.CurrentUser.OpenSubKey (subKeyName);
+                               if (createdKey != null) {
+                                       createdKey.Close ();
+                                       Registry.CurrentUser.DeleteSubKeyTree (subKeyName);
+                               }
+                       }
+               }
+
+               [Test]
+               public void Handle ()
+               {
+                       if (RunningOnUnix)
+                               return;
+
+                       string subKeyName = Guid.NewGuid ().ToString ();
+                       RegistryKey subkey = null;
+                       try {
+                               subkey = Registry.CurrentUser.CreateSubKey (subKeyName);
+                               Assert.AreEqual (true, subkey.Handle != null, "#A0");
+                               Assert.AreEqual (false, subkey.Handle.IsClosed, "#A1");
+                               Assert.AreEqual (false, subkey.Handle.IsInvalid, "#A2");
+
+                               subkey.Close ();
+                               try {
+                                       if (subkey.Handle != null)
+                                               Console.WriteLine (); // Avoids a warning at compile time
+                                       Assert.Fail ("#Disposed");
+                               } catch (ObjectDisposedException) {
+                               }
+
+                       } finally {
+                               if (subkey != null) {
+                                       subkey.Close ();
+                                       Registry.CurrentUser.DeleteSubKeyTree (subKeyName, false);
+                               }
+                       }
+               }
+#endif
+
                [Test]
                public void GetValue ()
                {
index 975bf773cb5c2816ab72cab41aeada1394578cb5..7e2cd9ef27d6f68e220a4b8cd259350cccacb218 100644 (file)
@@ -81,7 +81,7 @@ namespace MonoTests.System.Collections.Concurrent
                                const int delta = 5;
                                
                                for (int i = 0; i < (count + delta) * threads; i++)
-                                       coll.TryAdd (i);
+                                       while (!coll.TryAdd (i));
                                
                                bool state = true;
                                
@@ -91,8 +91,12 @@ namespace MonoTests.System.Collections.Concurrent
                                        bool s = true;
                                        int t;
                                        
-                                       for (int i = 0; i < count; i++)
+                                       for (int i = 0; i < count; i++) {
                                                s &= coll.TryTake (out t);
+                                               // try again in case it was a transient failure
+                                               if (!s && coll.TryTake (out t))
+                                                       s = true;
+                                       }
                                        
                                        if (!s)
                                                state = false;
index 4f1ad64ce2f2af1628dcae9fd7be5773de7ac1b2..4be09ac4f9c8d85bd262c015b3e237511421a6fa 100644 (file)
@@ -49,7 +49,7 @@ namespace MonoTests.System.Collections.Concurrent
                {
                        map.TryAdd ("foo", 1);
                        map.TryAdd ("bar", 2);
-                       map.TryAdd ("foobar", 3);
+                       map["foobar"] = 3;
                }
                
                [Test]
@@ -74,7 +74,7 @@ namespace MonoTests.System.Collections.Concurrent
                                ParallelTestHelper.ParallelStressTest (map, delegate {
                                        int own = Interlocked.Increment (ref index);
                                        
-                                       while (!map.TryAdd ("monkey" + own.ToString (), 3));
+                                       while (!map.TryAdd ("monkey" + own.ToString (), own));
                                        
                                }, 4);
                                
@@ -82,16 +82,16 @@ namespace MonoTests.System.Collections.Concurrent
                                int value;
                                
                                Assert.IsTrue (map.TryGetValue ("monkey1", out value), "#1");
-                               Assert.AreEqual (3, value, "#1b");
+                               Assert.AreEqual (1, value, "#1b");
                                
                                Assert.IsTrue (map.TryGetValue ("monkey2", out value), "#2");
-                               Assert.AreEqual (3, value, "#2b");
+                               Assert.AreEqual (2, value, "#2b");
                                
                                Assert.IsTrue (map.TryGetValue ("monkey3", out value), "#3");
                                Assert.AreEqual (3, value, "#3b");
                                
                                Assert.IsTrue (map.TryGetValue ("monkey4", out value), "#4");
-                               Assert.AreEqual (3, value, "#4b");
+                               Assert.AreEqual (4, value, "#4b");
                        });
                }
                
@@ -111,10 +111,10 @@ namespace MonoTests.System.Collections.Concurrent
                                                r1 = map.TryRemove ("foo", out val);
                                                break;
                                        case 2:
-                                         r2 =map.TryRemove ("bar", out val);
+                                               r2 =map.TryRemove ("bar", out val);
                                                break;
                                        case 3:
-                                         r3 = map.TryRemove ("foobar", out val);
+                                               r3 = map.TryRemove ("foobar", out val);
                                                break;
                                        }
                                }, 3);
@@ -126,9 +126,9 @@ namespace MonoTests.System.Collections.Concurrent
                                Assert.IsTrue (r2, "2");
                                Assert.IsTrue (r3, "3");
                                
-                               Assert.IsFalse (map.TryGetValue ("foo", out value), "#1");
-                               Assert.IsFalse (map.TryGetValue ("bar", out value), "#2");
-                               Assert.IsFalse (map.TryGetValue ("foobar", out value), "#3");
+                               Assert.IsFalse (map.TryGetValue ("foo", out value), "#1b " + value.ToString ());
+                               Assert.IsFalse (map.TryGetValue ("bar", out value), "#2b");
+                               Assert.IsFalse (map.TryGetValue ("foobar", out value), "#3b");
                        });
                }
                
@@ -164,6 +164,53 @@ namespace MonoTests.System.Collections.Concurrent
                        Assert.IsTrue(map.TryGetValue("foo", out val), "#3");
                        Assert.AreEqual(9, val, "#4");
                }
+
+               [Test]
+               public void IterateTest ()
+               {
+                       string[] keys = { "foo", "bar", "foobar" };
+                       int[] occurence = new int[3];
+
+                       foreach (var kvp in map) {
+                               int index = Array.IndexOf (keys, kvp.Key);
+                               Assert.AreNotEqual (-1, index, "#a");
+                               Assert.AreEqual (index + 1, kvp.Value, "#b");
+                               Assert.Less (++occurence[index], 2, "#c");
+                       }
+               }
+
+               [Test]
+               public void GetOrAddTest ()
+               {
+                       Assert.AreEqual (1, map.GetOrAdd ("foo", (_) => 12));
+                       Assert.AreEqual (13, map.GetOrAdd ("baz", (_) => 13));
+               }
+
+               [Test]
+               public void TryUpdateTest ()
+               {
+                       Assert.IsFalse (map.TryUpdate ("foo", 12, 11));
+                       Assert.AreEqual (1, map["foo"]);
+                       Assert.IsTrue (map.TryUpdate ("foo", 11, 1));
+                       Assert.AreEqual (11, map["foo"]);
+               }
+
+               [Test]
+               public void AddOrUpdateTest ()
+               {
+                       Assert.AreEqual (11, map.AddOrUpdate ("bar", (_) => 12, (_, __) => 11));
+                       Assert.AreEqual (12, map.AddOrUpdate ("baz", (_) => 12, (_, __) => 11));
+               }
+
+               [Test]
+               public void ContainsTest ()
+               {
+                       Assert.IsTrue (map.ContainsKey ("foo"));
+                       Assert.IsTrue (map.ContainsKey ("bar"));
+                       Assert.IsTrue (map.ContainsKey ("foobar"));
+                       Assert.IsFalse (map.ContainsKey ("baz"));
+                       Assert.IsFalse (map.ContainsKey ("oof"));
+               }
        }
 }
 #endif
index 594f221246262068458194477bcb83a88c132d39..560977735bb0aa73fba7a1b6847defbd0f39d029 100644 (file)
@@ -58,10 +58,9 @@ namespace MonoCasTests.System.Diagnostics {
                        int ln = sf.GetFileLineNumber ();
                        int il = sf.GetILOffset ();
                        int no = sf.GetNativeOffset ();
-#if NET_2_0
-                       // this throws in 1.x
+
                        Assert.IsNotNull (sf.GetMethod (), "GetMethod");
-#endif
+
                        if (checkFile) {
                                string fn = sf.GetFileName ();
                        }
@@ -74,16 +73,11 @@ namespace MonoCasTests.System.Diagnostics {
                        StackFrame sf = new StackFrame ();
                        Check (sf, true);
                }
-
+               
+#if !RUN_ONDOTNET || NET_4_0 // Disabled because .net 2 fails to load dll with "Failure decoding embedded permission set object" due to "/" path
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
-#endif
                public void StackFrame_TrueConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -101,44 +95,17 @@ namespace MonoCasTests.System.Diagnostics {
                }
 
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "/")]
-#endif
                public void StackFrame_TrueConstructor_Pass ()
                {
                        // ask file info
                        StackFrame sf = new StackFrame (true);
                        Check (sf, true);
                }
-
-               [Test]
-               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
-               public void StackFrame_FalseConstructor ()
-               {
-                       // DO NOT ask for file informations
-                       StackFrame sf = new StackFrame (false);
-                       Check (sf, true);
-               }
-
-               [Test]
-               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
-               public void StackFrame_IntConstructor ()
-               {
-                       StackFrame sf = new StackFrame (1);
-                       Check (sf, true);
-               }
-
+               
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
-#endif
                public void StackFrame_IntTrueConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -156,36 +123,17 @@ namespace MonoCasTests.System.Diagnostics {
                }
 
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "/")]
-#endif
                public void StackFrame_IntTrueConstructor_Pass ()
                {
                        // ask file info
                        StackFrame sf = new StackFrame (0, true);
                        Check (sf, true);
                }
-
-               [Test]
-               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
-               public void StackFrame_IntFalseConstructor ()
-               {
-                       // DO NOT ask for file informations
-                       StackFrame sf = new StackFrame (1, false);
-                       Check (sf, true);
-               }
-
+               
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
-#endif
                public void StackFrame_StringIntConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -203,11 +151,7 @@ namespace MonoCasTests.System.Diagnostics {
                }
 
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "/")]
-#endif
                public void StackFrame_StringIntConstructor_Pass ()
                {
                        // supply file info
@@ -216,14 +160,8 @@ namespace MonoCasTests.System.Diagnostics {
                }
 
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-#if NET_2_0
                [ExpectedException (typeof (SecurityException))]
-#endif
                public void StackFrame_StringIntIntConstructor_Fail ()
                {
                        StackFrame sf = null;
@@ -241,16 +179,39 @@ namespace MonoCasTests.System.Diagnostics {
                }
 
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.PermitOnly, PathDiscovery = "/")]
-#endif
                public void StackFrame_StringIntIntConstructor_Pass ()
                {
                        // supply file info
                        StackFrame sf = new StackFrame ("mono.cs", 1, 1);
                        Check (sf, true);
+               }               
+#endif         
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void StackFrame_FalseConstructor ()
+               {
+                       // DO NOT ask for file informations
+                       StackFrame sf = new StackFrame (false);
+                       Check (sf, true);
+               }
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void StackFrame_IntConstructor ()
+               {
+                       StackFrame sf = new StackFrame (1);
+                       Check (sf, true);
+               }
+
+               [Test]
+               [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
+               public void StackFrame_IntFalseConstructor ()
+               {
+                       // DO NOT ask for file informations
+                       StackFrame sf = new StackFrame (1, false);
+                       Check (sf, true);
                }
        }
 }
index 7627032db83f1961eb57a335778b0722fffa65b4..b9a37ec30737a6afccbdd7a202dcaf04680b439c 100644 (file)
@@ -10,6 +10,7 @@
 using System;
 using System.Reflection;
 using System.Reflection.Emit;
+using System.Text;
 
 using NUnit.Framework;
 
@@ -383,6 +384,21 @@ namespace MonoTests.System.Reflection.Emit
                        arr [1, 1] = 5;
                        Assert.AreEqual (5, del (arr));
                }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void InvalidUnicodeName ()
+               {
+                       var name = new StringBuilder ().Append ('\udf45').Append ('\ud808');
+                       var method = new DynamicMethod (name.ToString (), typeof (bool), new Type [0]);
+                       var il = method.GetILGenerator ();
+                       il.Emit (OpCodes.Ldc_I4_1);
+                       il.Emit (OpCodes.Ret);
+
+                       var function = (Func<bool>) method.CreateDelegate (typeof (Func<bool>));
+
+                       Assert.IsTrue (function ());
+               }
        }
 }
 
index 77286abba7eadf816eb7a9862d9ab473f9e9f3fc..3e27b8a56d827204e799e19127fd0859c8f89d51 100644 (file)
@@ -1055,5 +1055,66 @@ namespace MonoTests.System.Reflection.Emit
                        Type type = tb.CreateType ();
                        type.GetMethod ("CallVarargMethod").Invoke (null, null);
                }
+
+               public static string GenericMethodWithOneArg<T> (T t)
+               {
+                       return t.ToString ();
+               }
+
+               [Test]
+               public void ParamerersOfGenericArgumentsAreProperlyEncoded ()
+               {
+                       var type = module.DefineType (
+                               "Bar",
+                               TypeAttributes.Public
+                               | TypeAttributes.Abstract
+                               | TypeAttributes.Sealed,
+                               typeof (object));
+
+                       var foo_method = typeof (MethodBuilderTest).GetMethod ("GenericMethodWithOneArg");
+
+                       var method = type.DefineMethod (
+                               "ReFoo",
+                               MethodAttributes.Static | MethodAttributes.Public,
+                               typeof (string),
+                               new [] { foo_method.GetGenericArguments () [0] });
+                       method.DefineGenericParameters ("K");
+
+                       var il = method.GetILGenerator ();
+                       il.Emit (OpCodes.Ldarga, 0);
+                       il.Emit (OpCodes.Constrained, method.GetGenericArguments () [0]);
+                       il.Emit (OpCodes.Callvirt, typeof (object).GetMethod ("ToString"));
+                       il.Emit (OpCodes.Ret);
+
+                       type.CreateType ();
+
+                       var re_foo_open = module.GetType ("Bar").GetMethod ("ReFoo");
+
+                       Assert.AreEqual (re_foo_open.GetGenericArguments ()[0], re_foo_open.GetParameters () [0].ParameterType, "#1");
+               }
+
+               [Test] // #628660
+               public void CanCallGetMethodBodyOnDynamicImageMethod ()
+               {
+                       var type = module.DefineType (
+                               "CanCallGetMethodBodyOnDynamicImageMethod",
+                               TypeAttributes.Public,
+                               typeof (object));
+
+                       var baz = type.DefineMethod ("Foo", MethodAttributes.Public | MethodAttributes.Static, typeof (object), Type.EmptyTypes);
+
+                       var il = baz.GetILGenerator ();
+                       var temp = il.DeclareLocal (typeof (object));
+                       il.Emit (OpCodes.Ldnull);
+                       il.Emit (OpCodes.Stloc, temp);
+                       il.Emit (OpCodes.Ldloc, temp);
+                       il.Emit (OpCodes.Ret);
+
+                       var body = type.CreateType ().GetMethod ("Foo").GetMethodBody ();
+
+                       Assert.IsNotNull (body);
+                       Assert.AreEqual (1, body.LocalVariables.Count);
+                       Assert.AreEqual (typeof (object), body.LocalVariables [0].LocalType);
+               }
        }
 }
index b60bbb9b29e652ddcf015a3f845c42d95873de5d..fd6f4884a3a20cc69cd2cd603c1145d8e740a21b 100644 (file)
@@ -203,6 +203,18 @@ namespace MonoTests.System.Reflection
                        Assert.AreEqual (typeof (Base), parm.Member.DeclaringType);
                }
 
+               [Test]
+               public void ArrayMethodParameters ()
+               {
+                       var matrix_int_get = typeof (int[,,]).GetMethod ("Get");
+                       var parameters = matrix_int_get.GetParameters ();
+
+                       Assert.AreEqual (3, parameters.Length);
+                       Assert.AreEqual (0, parameters [0].GetCustomAttributes (false).Length);
+                       Assert.AreEqual (0, parameters [1].GetCustomAttributes (false).Length);
+                       Assert.AreEqual (0, parameters [2].GetCustomAttributes (false).Length);
+               }
+
                class Base
                {
                        public void SomeMethod( int x )
index c918caf9af5b5017235b1612e654bd43a22c102a..14543b85007486c9825aaf1c001c5f899ebf6952 100644 (file)
@@ -480,5 +480,29 @@ namespace MonoTests.System.Reflection
                        }
 #endif
                }
+
+               [Test] // bug #633671
+               public void DeclaringTypeOfPropertyFromInheritedTypePointsToBase ()
+               {
+                       var inherit1 = typeof(InheritsFromClassWithNullableDateTime);
+                       var siblingProperty = inherit1.GetProperty("Property1");
+
+                       Assert.AreEqual (typeof (ClassWithNullableDateTime), siblingProperty.DeclaringType, "#1");
+                       Assert.AreEqual (typeof (InheritsFromClassWithNullableDateTime), siblingProperty.ReflectedType, "#2");
+
+                       //The check is done twice since the bug is related to getting those 2 properties multiple times.
+                       Assert.AreEqual (typeof (ClassWithNullableDateTime), siblingProperty.DeclaringType, "#3");
+                       Assert.AreEqual (typeof (InheritsFromClassWithNullableDateTime), siblingProperty.ReflectedType, "#4");
+               }
+               
+       
+               public class ClassWithNullableDateTime
+               {
+                       public DateTime? Property1 { get; set; }
+               }
+       
+               public class InheritsFromClassWithNullableDateTime : ClassWithNullableDateTime
+               {
+               }
        }
 }
index b1227dff76524cdd59abd4c6fd76370b279cc5d7..c86a161bf5080cda3270f0aaafa75d384ccb1146 100644 (file)
@@ -32,6 +32,7 @@ using System.IO;
 using System.Runtime.Serialization;
 using System.Runtime.Serialization.Formatters;
 using System.Runtime.Serialization.Formatters.Binary;
+using System.Reflection;
 
 using NUnit.Framework;
 
@@ -328,5 +329,141 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Binary
                        ms.Position = 0;
                        return ms;
                }
+
+#if NET_4_0
+               [Test]
+               public void SerializationBindToName ()
+               {
+                       BinaryFormatter bf = new BinaryFormatter ();
+                       bf.AssemblyFormat = FormatterAssemblyStyle.Full;
+                       bf.Binder = new SimpleSerializationBinder ();
+                       MemoryStream ms = new MemoryStream ();
+
+                       SimpleSerializableObject o = new SimpleSerializableObject ();
+                       o.Name = "MonoObject";
+                       o.Id = 666;
+
+                       bf.Serialize (ms, o);
+                       ms.Position = 0;
+
+                       o = (SimpleSerializableObject)bf.Deserialize (ms);
+                       Assert.AreEqual ("MonoObject", o.Name);
+                       Assert.AreEqual (666, o.Id);
+               }
+
+               class SimpleSerializationBinder : SerializationBinder
+               {
+                       public override Type BindToType (string assemblyName, string typeName)
+                       {
+                               // We *should* be getting a SimpleSerializableObject2 instance
+                               // Otherwise it means we are not getting called our BindToName method.
+                               if (!typeName.EndsWith ("SimpleSerializableObject2"))
+                                       Assert.Fail ("#BindToType-TypeName");
+
+                               // We are also supposed to be getting a 9.9.9.9 version here,
+                               // and if we get a different version, it likely means BindToName was called.
+                               AssemblyName aname = Assembly.GetExecutingAssembly ().GetName ();
+                               aname.Version = new Version (9, 9, 9, 9);
+                               if (aname.ToString () != assemblyName)
+                                       Assert.Fail ("#BindToType-AssemblyName");
+
+                               // No need to call Type.GetType
+                               return typeof (SimpleSerializableObject);
+                       }
+
+                       public override void BindToName (Type serializedType, out string assemblyName, out string typeName)
+                       {
+                               AssemblyName aname = Assembly.GetExecutingAssembly ().GetName ();
+                               aname.Version = new Version (9, 9, 9, 9);
+
+                               // Serialize mapping to this same assembly with 9.9.9.9 version
+                               // and a different type name.
+                               assemblyName = aname.ToString ();
+                               typeName = serializedType.FullName.Replace ("SimpleSerializableObject", "SimpleSerializableObject2");
+                       }
+               }
+
+               [Serializable]
+               class SimpleSerializableObject
+               {
+                       public string Name { get; set; }
+                       public int Id { get; set; }
+               }
+
+               [Test]
+               public void SerializationBindToName2 ()
+               {
+                       BinaryFormatter bf = new BinaryFormatter ();
+                       bf.AssemblyFormat = FormatterAssemblyStyle.Full;
+                       bf.Binder = new SimpleSerializationBinder2 ();
+                       MemoryStream ms = new MemoryStream ();
+
+                       SimpleISerializableObject o = new SimpleISerializableObject ();
+                       o.Name = "MonoObject";
+                       o.Id = 666;
+
+                       bf.Serialize (ms, o);
+                       ms.Position = 0;
+
+                       o = (SimpleISerializableObject)bf.Deserialize (ms);
+                       Assert.AreEqual ("MonoObject", o.Name);
+                       Assert.AreEqual (666, o.Id);
+
+                       ms.Close ();
+               }
+
+               class SimpleSerializationBinder2 : SerializationBinder
+               {
+                       public override void BindToName (Type serializedType, out string assemblyName, out string typeName)
+                       {
+                               AssemblyName aname = Assembly.GetExecutingAssembly ().GetName ();
+                               aname.Version = new Version (9, 9, 9, 9);
+
+                               // Serialize mapping to this same assembly with 9.9.9.9 version
+                               // and a different type name.
+                               assemblyName = aname.ToString ();
+                               typeName = serializedType.FullName.Replace ("SimpleISerializableObject", "SimpleISerializableObject2");
+                       }
+
+                       public override Type BindToType (string assemblyName, string typeName)
+                       {
+                               // We *should* be getting a SimpleISerializableObject2 instance
+                               if (!typeName.EndsWith ("SimpleISerializableObject2"))
+                                       Assert.Fail ("#BindToType-TypeName");
+
+                               // We are also supposed to be getting a 9.9.9.9 version here,
+                               // and if we get a different version, it likely means BindToName was called.
+                               AssemblyName aname = Assembly.GetExecutingAssembly ().GetName ();
+                               aname.Version = new Version (9, 9, 9, 9);
+                               if (aname.ToString () != assemblyName)
+                                       Assert.Fail ("#BindToType-AssemblyName");
+
+                               return typeof (SimpleISerializableObject);
+                       }
+               }
+
+               [Serializable]
+               class SimpleISerializableObject : ISerializable
+               {
+                       public string Name { get; set; }
+                       public int Id { get; set; }
+
+                       public SimpleISerializableObject ()
+                       {
+                       }
+
+                       protected SimpleISerializableObject (SerializationInfo info, StreamingContext context)
+                       {
+                               Name = info.GetString ("Name");
+                               Id = info.GetInt32 ("Id");
+                       }
+
+                       public void GetObjectData (SerializationInfo info, StreamingContext context)
+                       {
+                               info.AddValue ("Name", Name);
+                               info.AddValue ("Id", Id);
+                       }
+               }
+#endif
        }
 }
diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationBinderTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationBinderTest.cs
new file mode 100644 (file)
index 0000000..44c441b
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// System.Runtime.Serialization.SerializationBinderTest.cs.
+//
+// Author: Carlos Alberto Cortez  <calberto.cortez@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.Serialization;
+using NUnit.Framework;
+
+namespace MonoTests.System.Runtime.Serialization
+{
+       [TestFixture]
+       public class SerializationBinderTest
+       {
+#if NET_4_0
+               [Test]
+               public void BindToName ()
+               {
+                       TestSerializationBinder binder = new TestSerializationBinder ();
+                       string assembly_name;
+                       string type_name;
+
+                       binder.BindToName (typeof (SerializationBinder), out assembly_name, out type_name);
+                       Assert.AreEqual (null, assembly_name, "#A0");
+                       Assert.AreEqual (null, type_name, "#A1");
+               }
+#endif
+       }
+
+       class TestSerializationBinder : SerializationBinder
+       {
+               public override Type BindToType (string assemblyName, string typeName)
+               {
+                       return null;
+               }
+       }
+}
+
diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationInfoTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationInfoTest.cs
new file mode 100644 (file)
index 0000000..b9196c2
--- /dev/null
@@ -0,0 +1,107 @@
+//
+// System.Runtime.Serialization.SerializationInfoTest.cs.
+//
+// Author: Carlos Alberto Cortez  <calberto.cortez@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.Serialization;
+using NUnit.Framework;
+
+namespace MonoTests.System.Runtime.Serialization
+{
+       [TestFixture]
+       public class SerializationInfoTest
+       {
+        
+               [Test]
+               public void SetType ()
+               {
+                       SerializationInfo sinfo = new SerializationInfo (typeof (DateTime), new FormatterConverter ());
+
+                       Type point_type = typeof (Point);
+                       sinfo.SetType (point_type);
+                       Assert.AreEqual (point_type.FullName, sinfo.FullTypeName, "#A0");
+                       Assert.AreEqual (point_type.Assembly.FullName, sinfo.AssemblyName, "#A1");
+#if NET_4_0
+                       Assert.AreEqual (point_type, sinfo.ObjectType, "#A2");
+                       Assert.AreEqual (false, sinfo.IsAssemblyNameSetExplicit, "#A3");
+                       Assert.AreEqual (false, sinfo.IsFullTypeNameSetExplicit, "#A4");
+
+                       sinfo.FullTypeName = "Point2";
+                       sinfo.AssemblyName = "NewAssembly";
+                       Type datetime_type = typeof (DateTime);
+                       sinfo.SetType (datetime_type);
+
+                       Assert.AreEqual (datetime_type.FullName, sinfo.FullTypeName, "#B0");
+                       Assert.AreEqual (datetime_type.Assembly.FullName, sinfo.AssemblyName, "#B1");
+                       Assert.AreEqual (datetime_type, sinfo.ObjectType, "#B2");
+                       Assert.AreEqual (false, sinfo.IsAssemblyNameSetExplicit, "#B3");
+                       Assert.AreEqual (false, sinfo.IsFullTypeNameSetExplicit, "#B4");
+#endif
+               }
+
+#if NET_4_0
+               [Test]
+               public void ObjectType ()
+               {
+                       SerializationInfo sinfo = new SerializationInfo (typeof (Point), new FormatterConverter ());
+                       Assert.AreEqual (typeof (Point), sinfo.ObjectType, "#A0");
+               }
+
+               [Test]
+               public void IsAssemblyNameSetExplicit ()
+               {
+                       SerializationInfo sinfo = new SerializationInfo (typeof (Point), new FormatterConverter ());
+                       Assert.AreEqual (false, sinfo.IsAssemblyNameSetExplicit, "#A0");
+
+                       string original_name = sinfo.AssemblyName;
+                       sinfo.AssemblyName = "CustomAssemblyName";
+                       Assert.AreEqual (true, sinfo.IsAssemblyNameSetExplicit, "#B0");
+                       Assert.AreEqual ("CustomAssemblyName", sinfo.AssemblyName, "#B1");
+
+                       sinfo.AssemblyName = original_name;
+                       Assert.AreEqual (true, sinfo.IsAssemblyNameSetExplicit, "#C0");
+                       Assert.AreEqual (original_name, sinfo.AssemblyName, "#C1");
+               }
+
+               [Test]
+               public void IsFullTypeNameSetExplicit ()
+               {
+                       SerializationInfo sinfo = new SerializationInfo (typeof (Point), new FormatterConverter ());
+                       Assert.AreEqual (false, sinfo.IsFullTypeNameSetExplicit, "#A0");
+
+                       string original_name = sinfo.FullTypeName;
+                       sinfo.FullTypeName = "CustomTypeName";
+                       Assert.AreEqual (true, sinfo.IsFullTypeNameSetExplicit, "#B0");
+                       Assert.AreEqual ("CustomTypeName", sinfo.FullTypeName, "#B1");
+
+                       sinfo.FullTypeName = original_name;
+                       Assert.AreEqual (true, sinfo.IsFullTypeNameSetExplicit, "#C0");
+                       Assert.AreEqual (original_name, sinfo.FullTypeName, "#C1");
+               }
+#endif
+       }
+}
+
index 66085bca2cb0231fed7d8ae16c3a947be900111b..fd161035cb18f9575cb85f03947d143087420a92 100644 (file)
@@ -1096,6 +1096,34 @@ namespace MonoTests.System.Text
                        } catch (ArgumentException) {
                        }
                }
+               
+               [Test] // bug #565129
+               public void SufficientByteArray2 ()
+               {
+                       var u = Encoding.UTF8;
+                       Assert.AreEqual (3, u.GetByteCount ("\uFFFD"), "#1-1");
+                       Assert.AreEqual (3, u.GetByteCount ("\uD800"), "#1-2");
+                       Assert.AreEqual (3, u.GetByteCount ("\uDC00"), "#1-3");
+                       Assert.AreEqual (4, u.GetByteCount ("\uD800\uDC00"), "#1-4");
+                       byte [] bytes = new byte [10];
+                       Assert.AreEqual (3, u.GetBytes ("\uDC00", 0, 1, bytes, 0), "#1-5"); // was bogus
+
+                       Assert.AreEqual (3, u.GetBytes ("\uFFFD").Length, "#2-1");
+                       Assert.AreEqual (3, u.GetBytes ("\uD800").Length, "#2-2");
+                       Assert.AreEqual (3, u.GetBytes ("\uDC00").Length, "#2-3");
+                       Assert.AreEqual (4, u.GetBytes ("\uD800\uDC00").Length, "#2-4");
+
+                       for (char c = char.MinValue; c < char.MaxValue; c++) {
+                               byte [] bIn;
+                               bIn = u.GetBytes (c.ToString ());
+                       }
+
+                       try {
+                               new UTF8Encoding (false, true).GetBytes (new char [] {'\uDF45', '\uD808'}, 0, 2);
+                               Assert.Fail ("EncoderFallbackException is expected");
+                       } catch (EncoderFallbackException) {
+                       }
+               }
 
 #if NET_2_0
                [Test] // bug #77550
index 294a951f6df42926343fbc191e14d1150abcc778..f29da568be32dfcd8f8a625950aad2470df2b496 100644 (file)
@@ -31,7 +31,7 @@ namespace MonoTests.System.Threading.Tasks
 {
        static class ParallelTestHelper
        {
-               const int NumRun = 100;
+               const int NumRun = 500;
                
                public static void Repeat (Action action)
                {
index 40509849aecaa05738202473e9431ac4ab9a1c88..7de1033568cb0e761dd209a4596ac68bf4ddaa67 100644 (file)
@@ -110,8 +110,8 @@ namespace MonoTests.System.Threading.Tasks
                        }
                        
                        Assert.IsNotNull (ex, "#1");
-                       Assert.IsInstanceOfType (typeof(AggregateException), t.Exception, "#2");
-                       Assert.AreEqual (t.Exception, ex, "#3");
+                       Assert.IsInstanceOfType (typeof(AggregateException), ex, "#2");
+                       Assert.IsNull (t.Exception, "#3");
                        
                        AggregateException aggr = (AggregateException)ex;
                        Assert.AreEqual (1, aggr.InnerExceptions.Count, "#4");
@@ -126,9 +126,8 @@ namespace MonoTests.System.Threading.Tasks
                                
                                Task t = Task.Factory.StartNew(delegate { });
                                Task cont = t.ContinueWith(delegate { result = true; }, TaskContinuationOptions.None);
-                               t.Wait();
-                               cont.Wait();
-                               
+                               Assert.IsTrue (t.Wait (2000), "First wait, (status, {0})", t.Status);
+                               Assert.IsTrue (cont.Wait(2000), "Cont wait, (result, {0}) (parent status, {2}) (status, {1})", result, cont.Status, t.Status);
                                Assert.IsNull(cont.Exception, "#1");
                                Assert.IsNotNull(cont, "#2");
                                Assert.IsTrue(result, "#3");
index d70b3d78907249e71415cd21e96c31228a69f51c..a821a497d76492bb2eff9e61ae4ec41e3b0b14a1 100644 (file)
@@ -73,7 +73,7 @@ namespace MonoTests.System.Threading
                                        m.Wait();
                                        s = true;
                                }
-                       });     
+                       }, 2);  
                        
                        Assert.IsTrue(s, "#1");
                        Assert.IsTrue(mre.IsSet, "#2");
index 1a5db8f4993201a67a04c505c22641d225f7502a..cbbc0669300960906d0fe983b4befa8e9ee784a1 100644 (file)
@@ -68,18 +68,25 @@ namespace MonoTests.System.Threading
                {
                        int count = -1;
                        bool[] array = new bool[7];
-                       ParallelTestHelper.ParallelStressTest(sem, delegate (SemaphoreSlim s) {
-                               int index = Interlocked.Increment(ref count);
-                               s.Wait();
-                               Thread.Sleep(40);
-                               s.Release();
+                       int worker = 0;
+                       bool coherent = true;
+
+                       ParallelTestHelper.ParallelStressTest (sem, delegate (SemaphoreSlim s) {
+                               int index = Interlocked.Increment (ref count);
+                               s.Wait ();
+                               if (Interlocked.Increment (ref worker) > 5)
+                                       coherent = false;
+                               Thread.Sleep (40);
+                               Interlocked.Decrement (ref worker);
+                               s.Release ();
                                array[index] = true;
                        }, 7);
                        
-                       bool result = array.Aggregate((acc, e) => acc && e);
+                       bool result = array.Aggregate ((acc, e) => acc && e);
                        
-                       Assert.IsTrue(result, "#1");
-                       Assert.AreEqual(5, sem.CurrentCount, "#2");
+                       Assert.IsTrue (result, "#1");
+                       Assert.AreEqual (5, sem.CurrentCount, "#2");
+                       Assert.IsTrue (coherent, "#3");
                }
        }
 }
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadLazyTests.cs b/mcs/class/corlib/Test/System.Threading/ThreadLazyTests.cs
deleted file mode 100644 (file)
index abf59a2..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#if NET_4_0
-// 
-// ThreadLazyTests.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2009 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-
-using NUnit;
-using NUnit.Core;
-using NUnit.Framework;
-
-namespace MonoTests.System.Threading
-{
-       [TestFixtureAttribute]
-       public class ThreadLazyTests
-       {
-               ThreadLocal<int> threadLocal;
-               int nTimes;
-               
-               [SetUp]
-               public void Setup ()
-               {
-                       nTimes = 0;
-                       threadLocal = new ThreadLocal<int> (() => { Interlocked.Increment (ref nTimes); return 42; });
-               }
-
-               [Test]
-               public void SingleThreadTest ()
-               {
-                       AssertThreadLocal ();
-               }
-               
-               [Test]
-               public void ThreadedTest ()
-               {
-                       AssertThreadLocal ();
-                       
-                       Thread t = new Thread ((object o) => { Interlocked.Decrement (ref nTimes); AssertThreadLocal (); });
-                       t.Start ();
-                       t.Join ();
-               }
-               
-               void AssertThreadLocal ()
-               {
-                       Assert.IsFalse (threadLocal.IsValueCreated, "#1");
-                       Assert.AreEqual (42, threadLocal.Value, "#2");
-                       Assert.IsTrue (threadLocal.IsValueCreated, "#3");
-                       Assert.AreEqual (42, threadLocal.Value, "#4");
-                       Assert.AreEqual (1, nTimes, "#5");
-               }
-       }
-}
-#endif
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs
new file mode 100644 (file)
index 0000000..46ff8c6
--- /dev/null
@@ -0,0 +1,119 @@
+#if NET_4_0
+// 
+// ThreadLazyTests.cs
+//  
+// Author:
+//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
+// 
+// Copyright (c) 2009 Jérémie "Garuma" Laval
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Threading;
+
+using NUnit;
+using NUnit.Core;
+using NUnit.Framework;
+
+namespace MonoTests.System.Threading
+{
+       [TestFixtureAttribute]
+       public class ThreadLocalTests
+       {
+               ThreadLocal<int> threadLocal;
+               int nTimes;
+               
+               [SetUp]
+               public void Setup ()
+               {
+                       nTimes = 0;
+                       threadLocal = new ThreadLocal<int> (() => { Interlocked.Increment (ref nTimes); return 42; });
+               }
+
+               [Test]
+               public void SingleThreadTest ()
+               {
+                       AssertThreadLocal ();
+               }
+               
+               [Test]
+               public void ThreadedTest ()
+               {
+                       AssertThreadLocal ();
+                       
+                       Thread t = new Thread ((object o) => { Interlocked.Decrement (ref nTimes); AssertThreadLocal (); });
+                       t.Start ();
+                       t.Join ();
+               }
+
+               [Test]
+               public void InitializeThrowingTest ()
+               {
+                       int callTime = 0;
+                       threadLocal = new ThreadLocal<int> (() => {
+                                       Interlocked.Increment (ref callTime);
+                                       throw new ApplicationException ("foo");
+                                       return 43;
+                               });
+
+                       Exception exception = null;
+
+                       try {
+                               var foo = threadLocal.Value;
+                       } catch (Exception e) {
+                               exception = e;
+                       }
+
+                       Assert.IsNotNull (exception, "#1");
+                       Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#2");
+                       Assert.AreEqual (1, callTime, "#3");
+
+                       exception = null;
+
+                       try {
+                               var foo = threadLocal.Value;
+                       } catch (Exception e) {
+                               exception = e;
+                       }
+
+                       Assert.IsNotNull (exception, "#4");
+                       Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#5");
+                       Assert.AreEqual (1, callTime, "#6");
+               }
+
+               [Test, ExpectedException (typeof (InvalidOperationException))]
+               public void MultipleReferenceToValueTest ()
+               {
+                       threadLocal = new ThreadLocal<int> (() => threadLocal.Value + 1);
+
+                       var value = threadLocal.Value;
+               }
+
+               void AssertThreadLocal ()
+               {
+                       Assert.IsFalse (threadLocal.IsValueCreated, "#1");
+                       Assert.AreEqual (42, threadLocal.Value, "#2");
+                       Assert.IsTrue (threadLocal.IsValueCreated, "#3");
+                       Assert.AreEqual (42, threadLocal.Value, "#4");
+                       Assert.AreEqual (1, nTimes, "#5");
+               }
+       }
+}
+#endif
index 5075383a437073419406fc482fe7b33a10684769..610592e6156e697a19efa745bcf27b531bd82a29 100644 (file)
@@ -2436,6 +2436,16 @@ namespace MonoTests.System
                                               DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, out dt);
                        Assert.AreEqual(default(DateTime), dt);
                }
+
+               [Test]
+               public void MSAndZ ()
+               {
+                       CultureInfo cultureInfo = CultureInfo.GetCultureInfo ("en-US");
+                       DateTime dt;
+                       if (!DateTime.TryParse ("2009.02.24T13:57:07.000 -0800", cultureInfo.DateTimeFormat,
+                                               DateTimeStyles.None, out dt))
+                               Assert.Fail ("Failed");
+               }
 #endif
        }
 }
index a18054ed3ca91869774f2ec8d51148bf3ed8996e..45da0971b67af81453a3800a5ebc579206809b91 100644 (file)
@@ -877,6 +877,14 @@ namespace MonoTests.System
 
                delegate int WrongDelegate ();
 
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void RemoveDelegateTypeMismatch ()
+               {
+                       Delegate boxer = new Boxer (() => new object ());
+                       Delegate.Remove (boxer, new WrongDelegate (() => 42));
+               }
+
                [Test]
                [ExpectedException (typeof (ArgumentException))]
                public void WrongReturnTypeContravariance ()
@@ -1007,6 +1015,88 @@ namespace MonoTests.System
 
                        Assert.AreEqual (10, d (5));
                }
+
+               public static long? StaticMethodToBeClosedOverNull (object o, long? bar)
+               {
+                       Console.WriteLine ("o: {0}", o);
+                       return 5;
+               }
+
+               [Test] // #617161
+               [Category ("NotWorking")]
+               public void ClosedOverNullReferenceStaticMethod ()
+               {
+                       var del = (Func<long?,long?>) Delegate.CreateDelegate (
+                               typeof (Func<long?,long?>),
+                               null as object,
+                               this.GetType ().GetMethod ("StaticMethodToBeClosedOverNull"));
+
+                       Assert.IsNull (del.Target);
+
+                       Assert.AreEqual ((long?) 5, del (5));
+               }
+
+               public void InstanceMethodToBeClosedOverNull ()
+               {
+               }
+
+               public void InstanceMethodIntToBeClosedOverNull (int i)
+               {
+               }
+
+               [Test] // #475962
+               public void ClosedOverNullReferenceInstanceMethod ()
+               {
+                       var action = (Action) Delegate.CreateDelegate (
+                               typeof (Action),
+                               null as object,
+                               this.GetType ().GetMethod ("InstanceMethodToBeClosedOverNull"));
+
+                       Assert.IsNull (action.Target);
+
+                       action ();
+
+                       var action_int = (Action<int>) Delegate.CreateDelegate (
+                               typeof (Action<int>),
+                               null as object,
+                               this.GetType ().GetMethod ("InstanceMethodIntToBeClosedOverNull"));
+
+                       Assert.IsNull (action.Target);
+
+                       action_int (42);
+               }
+
+               class Foo {
+
+                       public void Bar ()
+                       {
+                       }
+               }
+
+               Foo foo;
+               event Action bar_handler;
+
+               [Test]
+               [Category ("NotWorking")]
+               [ExpectedException (typeof (ArgumentException))] // #635349, #605936
+               public void NewDelegateClosedOverNullReferenceInstanceMethod ()
+               {
+                       bar_handler += foo.Bar;
+               }
+
+               public void Banga ()
+               {
+               }
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void CreateDelegateOpenOnly ()
+               {
+                       Delegate.CreateDelegate (
+                               typeof (Action),
+                               this.GetType ().GetMethod ("Banga"));
+               }
+
 #endif
 
                [Test]
index e6e96407949f3cfedcb3a541fa474df1b4463ea4..7d52da081c2dc160f935aef52504de7814b16aad 100644 (file)
@@ -109,18 +109,26 @@ namespace MonoCasTests.System {
                        Environment.CurrentDirectory = cd;
                }
 
+#if !RUN_ONDOTNET || NET_4_0 // Disabled because .net 2 fails to load dll with "Failure decoding embedded permission set object" due to "/" path
+
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
                [ExpectedException (typeof (SecurityException))]
                public void CurrentDirectory_Get_FileIOPermission ()
                {
                        // now that the stack is set, call the method
                        string cd = Environment.CurrentDirectory;
                }
+               
+               [Test]
+               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
+               [ExpectedException (typeof (SecurityException))]
+               public void GetFolderPath ()
+               {
+                       // now that the stack is set, call the method
+                       string s = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
+               }               
+#endif
 
                [Test]
                public void CurrentDirectory_Set_FileIOPermission ()
@@ -141,7 +149,7 @@ namespace MonoCasTests.System {
                private void CurrentDirectory_Set_FileIOPermission_Restricted ()
                {
                        // now that the stack is set, call the method
-#if WINDOWS
+#if RUN_ONDOTNET
                        Environment.CurrentDirectory = "C:\\";
 #else
                        Environment.CurrentDirectory = "/";
@@ -175,7 +183,7 @@ namespace MonoCasTests.System {
                        // now that the stack is set, call the method
                        string s = Environment.ExpandEnvironmentVariables ("%PATH%");
                }
-#if NET_2_0
+
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
                [Ignore ("Protected by a LinkDemand, will throw an ExecutionEngineException to stop process")]
@@ -184,7 +192,7 @@ namespace MonoCasTests.System {
                        // now that the stack is set, call the method
                        Environment.FailFast ("bye bye");
                }
-#endif
+
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Read = "PATH")]
                [ExpectedException (typeof (SecurityException))]
@@ -202,7 +210,7 @@ namespace MonoCasTests.System {
                        // now that the stack is set, call the method
                        string s = Environment.GetEnvironmentVariable ("PATH");
                }
-#if NET_2_0
+
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Read = "MONO")]
                public void GetEnvironmentVariable_Target_Process ()
@@ -238,7 +246,7 @@ namespace MonoCasTests.System {
                        // it takes Unrestricted access to read from Machine
                        // and User environment variables
                }
-#endif
+
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Read = "PATH")]
                [ExpectedException (typeof (SecurityException))]
@@ -251,17 +259,15 @@ namespace MonoCasTests.System {
 
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Read = "PLEASE_NEVER_DEFINE_THIS_VARIABLE")]
-#if !NET_2_0
                // Before 2.0 this required Unrestricted EnvironmentPermission
                [ExpectedException (typeof (SecurityException))]
-#endif
                public void GetEnvironmentVariables_Pass ()
                {
                        // this will work as long as PLEASE_NEVER_DEFINE_THIS_VARIABLE
                        // isn't an environment variable
                        IDictionary d = Environment.GetEnvironmentVariables ();
                }
-#if NET_2_0
+
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Read = "PATH")]
                [ExpectedException (typeof (SecurityException))]
@@ -286,20 +292,6 @@ namespace MonoCasTests.System {
                        // it takes Unrestricted access to read from Machine
                        // and User environment variables
                }
-#endif
-
-               [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-               [ExpectedException (typeof (SecurityException))]
-               public void GetFolderPath ()
-               {
-                       // now that the stack is set, call the method
-                       string s = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
-               }
 
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
@@ -307,13 +299,9 @@ namespace MonoCasTests.System {
                {
                        // we can get all folders without any EnvironmentPermission
                        // note: Mono use some environment variable to create the paths
-#if NET_2_0
                        Assert.IsNotNull (Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments), "MyDocuments");
-#endif
-#if NET_1_1
                        Assert.IsNotNull (Environment.GetFolderPath (Environment.SpecialFolder.Desktop), "Desktop");
                        Assert.IsNotNull (Environment.GetFolderPath (Environment.SpecialFolder.MyComputer), "MyComputer");
-#endif
                        Assert.IsNotNull (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Personal");
                        Assert.IsNotNull (Environment.GetFolderPath (Environment.SpecialFolder.Favorites), "Favorites");
                        Assert.IsNotNull (Environment.GetFolderPath (Environment.SpecialFolder.Startup), "Startup");
@@ -387,7 +375,7 @@ namespace MonoCasTests.System {
                        // now that the stack is set, call the methods
                        OperatingSystem os = Environment.OSVersion;
                }
-#if NET_2_0
+
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Read = "NUMBER_OF_PROCESSORS")]
                [ExpectedException (typeof (SecurityException))]
@@ -442,7 +430,7 @@ namespace MonoCasTests.System {
                        // it takes Unrestricted access to read from Machine
                        // and User environment variables
                }
-#endif
+
                [Test]
                [EnvironmentPermission (SecurityAction.Deny, Write = "MONO")]
                [ExpectedException (typeof (SecurityException))]
@@ -455,12 +443,8 @@ namespace MonoCasTests.System {
                }
 
                [Test]
-#if WINDOWS
-#if NET_2_0
+#if false && RUN_ONDOTNET
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
-               [FileIOPermission (SecurityAction.Deny, Read = "C:\\")]
-#endif
                [ExpectedException (typeof (SecurityException))]
 #endif
                public void SystemDirectory ()
index b032a3657680f91418728d95d2c69ac3df240d77..f805e332563a72027dfdd2e170b499cdf3046c6e 100644 (file)
@@ -67,9 +67,7 @@ namespace MonoCasTests.System {
                        Assert.AreEqual ("message", e.Message, "Message");
                        Assert.IsNotNull (e.InnerException, "InnerException");
                        Assert.IsNotNull (e.ToString (), "ToString");
-#if NET_2_0
                        Assert.IsNotNull (e.Data, "Data");
-#endif
                        Assert.IsNull (e.HelpLink, "HelpLink");
                        Assert.IsNull (e.Source, "Source");
                        Assert.IsNull (e.StackTrace, "StackTrace");
@@ -86,9 +84,7 @@ namespace MonoCasTests.System {
                                Assert.AreEqual ("message", e.Message, "Message");
                                Assert.IsNotNull (e.InnerException, "InnerException");
                                Assert.IsNotNull (e.ToString (), "ToString");
-#if NET_2_0
                                Assert.IsNotNull (e.Data, "Data");
-#endif
                                Assert.IsNull (e.HelpLink, "HelpLink");
                                Assert.IsNotNull (e.Source, "Source");
                                Assert.IsNotNull (e.StackTrace, "StackTrace");
@@ -108,25 +104,11 @@ namespace MonoCasTests.System {
                        Assert.IsNull (e.HelpLink, "HelpLink");
                        Assert.IsNull (e.Source, "Source");
                        Assert.IsNull (e.StackTrace, "StackTrace");
-#if NET_2_0
                        Assert.IsNotNull (e.Data, "Data");
                        // throws under 1.x
                        Assert.IsNull (e.TargetSite, "TargetSite");
-#endif
                }
 
-#if !NET_2_0
-               // note: TypeInformation is obsolete in 2.0
-               [Test]
-               [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)]
-               [ExpectedException (typeof (SecurityException))]
-               public void ReflectionTypeInformationRestriction_TargetSite ()
-               {
-                       Exception e = new Exception ("message", new Exception ("inner message"));
-                       Assert.IsNull (e.TargetSite, "TargetSite");
-               }
-#endif
-
                [Test]
                [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
                public void Throw_FullRestriction_Pass ()
@@ -139,23 +121,17 @@ namespace MonoCasTests.System {
                                Assert.IsNotNull (e.InnerException, "InnerException");
                                Assert.IsNull (e.HelpLink, "HelpLink");
                                Assert.IsNotNull (e.Source, "Source");
-#if NET_2_0
                                Assert.IsNotNull (e.Data, "Data");
                                // throws under 1.x
                                Assert.IsNotNull (e.TargetSite, "TargetSite");
-#endif
                        }
                }
 
+#if !RUN_ONDOTNET || NET_4_0 // Disabled because .net 2 fails to load dll with "Failure decoding embedded permission set object" due to "/" path
+
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-#if NET_2_0
                [ExpectedException (typeof (Exception))]
-#endif
                public void Throw_FullRestriction_Fail_StackTrace ()
                {
                        try {
@@ -168,14 +144,8 @@ namespace MonoCasTests.System {
                }
 
                [Test]
-#if WINDOWS
-               [FileIOPermission (SecurityAction.Deny, PathDiscovery = "C:\\")]
-#else
                [FileIOPermission (SecurityAction.Deny, PathDiscovery = "/")]
-#endif
-#if NET_2_0
                [ExpectedException (typeof (Exception))]
-#endif
                public void Throw_FullRestriction_Fail_ToString ()
                {
                        try {
@@ -186,5 +156,7 @@ namespace MonoCasTests.System {
                                string s = e.ToString ();
                        }
                }
+               
+#endif
        }
 }
index c197a875866ef93b944850c2ec39d38a97c1284a..e316b2df264cc7219b1343b62078b754ff9932d6 100644 (file)
@@ -444,6 +444,7 @@ namespace MonoTests.System
                        Assert.IsTrue (double.IsNaN (Math.Log (double.NegativeInfinity, y)));
                        Assert.IsTrue (double.IsNaN (Math.Log (x, double.NegativeInfinity)));
                        Assert.IsTrue (double.IsNaN (Math.Log (double.PositiveInfinity, double.PositiveInfinity)));
+                       Assert.IsTrue (double.IsNaN (Math.Log (2, 1)));
 
                        // MS docs say this should be PositiveInfinity
                        Assert.IsTrue (Math.Log (0, y) == double.NegativeInfinity);
index 5bb0b89585c556e7acdc21b546f0f85728c381cc..b51eb2a3ce1688474cc157e59597fc54db9447bc 100644 (file)
@@ -796,6 +796,7 @@ System.Runtime.InteropServices/TYPEDESC.cs
 System.Runtime.InteropServices/TYPEFLAGS.cs
 System.Runtime.InteropServices/TYPEKIND.cs
 System.Runtime.InteropServices/TYPELIBATTR.cs
+System.Runtime.InteropServices/TypeIdentifierAttribute.cs
 System.Runtime.InteropServices/TypeLibConverter.cs
 System.Runtime.InteropServices/TypeLibExporterFlags.cs
 System.Runtime.InteropServices/TypeLibFuncAttribute.cs
@@ -1524,11 +1525,11 @@ System.Collections.Generic/Comparer.cs
 System.Threading.Tasks/TaskFactory.cs
 System.Threading.Tasks/TaskStatus.cs
 System.Threading.Tasks/TaskCreationOptions.cs
-System.Threading.Tasks/Internal/ThreadWorker.cs
-System.Threading.Tasks/Internal/SchedulerProxy.cs
-System.Threading.Tasks/Internal/Scheduler.cs
-System.Threading.Tasks/Internal/IScheduler.cs
-System.Threading.Tasks/Internal/CyclicDeque.cs
+System.Threading.Tasks/ThreadWorker.cs
+System.Threading.Tasks/SchedulerProxy.cs
+System.Threading.Tasks/Scheduler.cs
+System.Threading.Tasks/IScheduler.cs
+System.Threading.Tasks/CyclicDeque.cs
 System.Threading.Tasks/TaskScheduler.cs
 System.Threading.Tasks/TaskContinuationOptions.cs
 System.Threading.Tasks/TaskCanceledException.cs
@@ -1545,6 +1546,7 @@ System.Collections.Concurrent/Partitioners/ListPartitioner.cs
 System.Collections.Concurrent/Partitioners/EnumerablePartitioner.cs
 System.Collections.Concurrent/IProducerConsumerCollection.cs
 System.Collections.Concurrent/ConcurrentStack.cs
+System.Collections.Concurrent/SplitOrderedList.cs
 System.Threading/LazyInitializer.cs
 System.Threading/CountdownEvent.cs
 System.Threading/CancellationTokenSource.cs
index f5463a391c561c3c5dd07b1c7cc504d7b535a8e8..08470837e559de27114081af0b4c47b911d0d5bb 100644 (file)
@@ -184,6 +184,8 @@ System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
 System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs
 System.Runtime.Serialization/FormatterServicesTests.cs
 System.Runtime.Serialization/ObjectIDGeneratorTests.cs
+System.Runtime.Serialization/SerializationBinderTest.cs
+System.Runtime.Serialization/SerializationInfoTest.cs
 System.Runtime.Serialization/SerializationTest.cs
 System.Runtime.Serialization/SerializationTest2.cs
 System.Runtime.Serialization/SerializationCallbackTest.cs
@@ -449,6 +451,6 @@ System.Threading/ManualResetEventSlimTests.cs
 System.Threading/SemaphoreSlimTests.cs
 System.Threading/CountdownEventTests.cs
 System/AggregateExceptionTests.cs
-System.Threading/ThreadLazyTests.cs
+System.Threading/ThreadLocalTests.cs
 System.Threading/SpinLockTests.cs
 
index 2d5964246f6115f22cac0a224c33abdeeb9824be..da77893bcc50c66f173571e43a57595448b44e27 100644 (file)
@@ -1,1044 +1 @@
-Assembly/AssemblyInfo.cs
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-Microsoft.Win32.SafeHandles/CriticalHandleMinusOneIsInvalid.cs
-Microsoft.Win32.SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs
-Microsoft.Win32.SafeHandles/SafeHandleMinusOneIsInvalid.cs
-Microsoft.Win32.SafeHandles/SafeFileHandle.cs
-Microsoft.Win32.SafeHandles/SafeWaitHandle.cs
-Mono.Globalization.Unicode/CodePointIndexer.cs
-Mono.Globalization.Unicode/MSCompatUnicodeTable.cs
-Mono.Globalization.Unicode/MSCompatUnicodeTableUtil.cs
-Mono.Globalization.Unicode/SimpleCollator.cs
-Mono.Globalization.Unicode/SortKey.cs
-Mono.Globalization.Unicode/SortKeyBuffer.cs
-Mono/Runtime.cs
-Mono/DataConverter.cs
-Mono.Math/BigInteger.cs
-Mono.Math.Prime/ConfidenceFactor.cs
-Mono.Math.Prime/PrimalityTests.cs
-Mono.Math.Prime.Generator/NextPrimeFinder.cs
-Mono.Math.Prime.Generator/PrimeGeneratorBase.cs
-Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs
-Mono.Security/ASN1.cs
-Mono.Security/ASN1Convert.cs
-Mono.Security/BitConverterLE.cs
-Mono.Security/PKCS7.cs
-Mono.Security/StrongName.cs
-Mono.Security/StrongNameManager_2_1.cs
-Mono.Security/Uri.cs
-Mono.Security.Cryptography/CryptoConvert.cs
-Mono.Security.Cryptography/CryptoTools.cs
-Mono.Security.Cryptography/DSAManaged.cs
-Mono.Security.Cryptography/KeyPairPersistence.cs
-Mono.Security.Cryptography/PKCS1.cs
-Mono.Security.Cryptography/PKCS8.cs
-Mono.Security.Cryptography/HMACAlgorithm.cs
-Mono.Security.Cryptography/SymmetricTransform.cs
-Mono.Security.Cryptography/RSAManaged.cs
-Mono.Security.X509/PKCS12.cs
-Mono.Security.X509/X501Name.cs
-Mono.Security.X509/X509Certificate.cs
-Mono.Security.X509/X509CertificateCollection.cs
-Mono.Security.X509/X509Chain.cs
-Mono.Security.X509/X509ChainStatusFlags.cs
-Mono.Security.X509/X509CRL.cs
-Mono.Security.X509/X509Extension.cs
-Mono.Security.X509/X509Extensions.cs
-Mono.Security.X509/X509Store.cs
-Mono.Security.X509/X509Stores.cs
-Mono.Security.X509/X509StoreManager.cs
-Mono.Security.X509/X520Attributes.cs
-Mono.Security.X509.Extensions/BasicConstraintsExtension.cs
-Mono.Security.X509.Extensions/KeyUsageExtension.cs
-Mono.Security.X509.Extensions/SubjectKeyIdentifierExtension.cs
-Mono.Xml/SmallXmlParser.cs
-System/AccessViolationException.cs
-System/Activator.cs
-System/AppDomain.cs
-System/AppDomainInitializer.cs
-System/AppDomainManager_2_1.cs
-System/AppDomainSetup.cs
-System/AppDomainUnloadedException.cs
-System/ApplicationException.cs
-System/ArgIterator.cs
-System/ArgumentException.cs
-System/ArgumentNullException.cs
-System/ArgumentOutOfRangeException.cs
-System/ArithmeticException.cs
-System/Array.cs
-System/ArrayTypeMismatchException.cs
-System/AssemblyLoadEventArgs.cs
-System/AssemblyLoadEventHandler.cs
-System/AsyncCallback.cs
-System/Attribute.cs
-System/AttributeTargets.cs
-System/AttributeUsageAttribute.cs
-System/BadImageFormatException.cs
-System/Base64FormattingOptions.cs
-System/BitConverter.cs
-System/Boolean.cs
-System/Buffer.cs
-System/Byte.cs
-System/CannotUnloadAppDomainException.cs
-System/Char.cs
-System/CharEnumerator.cs
-System/CLSCompliantAttribute.cs
-System/CStreamReader.cs
-System/CStreamWriter.cs
-System/Console.cs
-System/ConsoleCancelEventArgs.cs
-System/ConsoleCancelEventHandler.cs
-System/ConsoleColor.cs
-System/ConsoleDriver.cs
-System/ConsoleKey.cs
-System/ConsoleKeyInfo.cs
-System/ConsoleModifiers.cs
-System/ConsoleSpecialKey.cs
-System/ContextBoundObject.cs
-System/ContextMarshalException.cs
-System/ContextStaticAttribute.cs
-System/ControlCharacters.cs
-System/Convert.cs
-System/CrossAppDomainDelegate.cs
-System/DataMisalignedException.cs
-System/DateTime.cs
-System/DateTimeKind.cs
-System/DateTimeOffset.cs
-System/DateTimeUtils.cs
-System/DayOfWeek.cs
-System/DBNull.cs
-System/Decimal.cs
-System/Delegate.cs
-System/DelegateSerializationHolder.cs
-System/DivideByZeroException.cs
-System/DllNotFoundException.cs
-System/DomainManagerInitializationFlags.cs
-System/Double.cs
-System/DuplicateWaitObjectException.cs
-System/EntryPointNotFoundException.cs
-System/Enum.cs
-System/Environment.cs
-System/EnvironmentVariableTarget.cs
-System/EventArgs.cs
-System/EventHandler.cs
-System/Exception.cs
-System/ExecutionEngineException.cs
-System/FieldAccessException.cs
-System/FlagsAttribute.cs
-System/FormatException.cs
-System/Funcs.cs
-System/GC.cs
-System/GCCollectionMode.cs
-System/GCNotificationStatus.cs
-System/Guid.cs
-System/IAppDomainSetup.cs
-System/IAsyncResult.cs
-System/ICloneable.cs
-System/IComparable.cs
-System/IEquatable.cs
-System/IConsoleDriver.cs
-System/IConvertible.cs
-System/ICustomFormatter.cs
-System/IDisposable.cs
-System/IFormatProvider.cs
-System/IFormattable.cs
-System/IndexOutOfRangeException.cs
-System/InsufficientMemoryException.cs
-System/Int16.cs
-System/Int32.cs
-System/Int64.cs
-System/IntPtr.cs
-System/InvalidCastException.cs
-System/InvalidOperationException.cs
-System/InvalidProgramException.cs
-System/InvalidTimeZoneException.cs
-System/IServiceProvider.cs
-System/KnownTerminals.cs
-System/LoaderOptimization.cs
-System/LoaderOptimizationAttribute.cs
-System/MarshalByRefObject.cs
-System/Math.cs
-System/MemberAccessException.cs
-System/MethodAccessException.cs
-System/MidpointRounding.cs
-System/MissingFieldException.cs
-System/MissingMemberException.cs
-System/MissingMethodException.cs
-System/MonoAsyncCall.cs
-System/MonoCustomAttrs.cs
-System/MonoListItem.cs
-System/MonoTouchAOTHelper.cs
-System/MonoType.cs
-System/MTAThreadAttribute.cs
-System/MulticastDelegate.cs
-System/MulticastNotSupportedException.cs
-System/NonSerializedAttribute.cs
-System/NotFiniteNumberException.cs
-System/NotImplementedException.cs
-System/NotSupportedException.cs
-System/NullConsoleDriver.cs
-System/Nullable.cs
-System/NullReferenceException.cs
-System/NumberFormatter.cs
-System/Object.cs
-System/ObjectDisposedException.cs
-System/ObsoleteAttribute.cs
-System/OperatingSystem.cs
-System/OperationCanceledException.cs
-System/OutOfMemoryException.cs
-System/OverflowException.cs
-System/ParamArrayAttribute.cs
-System/PlatformID.cs
-System/PlatformNotSupportedException.cs
-System/Random.cs
-System/RankException.cs
-System/ResolveEventArgs.cs
-System/ResolveEventHandler.cs
-System/RuntimeArgumentHandle.cs
-System/RuntimeFieldHandle.cs
-System/RuntimeMethodHandle.cs
-System/RuntimeTypeHandle.cs
-System/ModuleHandle.cs
-System/SByte.cs
-System/SerializableAttribute.cs
-System/Single.cs
-System/StackOverflowException.cs
-System/STAThreadAttribute.cs
-System/String.cs
-System/StringSplitOptions.cs
-System/StringComparer.cs
-System/StringComparison.cs
-System/SystemException.cs
-System/TermInfoBooleans.cs
-System/TermInfoDriver.cs
-System/TermInfoNumbers.cs
-System/TermInfoReader.cs
-System/TermInfoStrings.cs
-System/ThreadStaticAttribute.cs
-System/TimeSpan.cs
-System/TimeZone.cs
-System/TimeZoneNotFoundException.cs
-System/TimeoutException.cs
-../../build/common/MonoTODOAttribute.cs
-System/Type.cs
-System/TypeAccessException.cs
-System/TypeCode.cs
-System/TypedReference.cs
-System/TypeInitializationException.cs
-System/TypeLoadException.cs
-System/TypeUnloadedException.cs
-System/Tuple.cs
-System/Tuples.cs
-System/UInt16.cs
-System/UInt32.cs
-System/UInt64.cs
-System/UIntPtr.cs
-System/UnauthorizedAccessException.cs
-System/UnhandledExceptionEventArgs.cs
-System/UnhandledExceptionEventHandler.cs
-System/UnitySerializationHolder.cs
-System/ValueType.cs
-System/Version.cs
-System/Void.cs
-System/WeakReference.cs
-System/WindowsConsoleDriver.cs
-System.Collections/ArrayList.cs
-System.Collections/BitArray.cs
-System.Collections/CaseInsensitiveComparer.cs
-System.Collections/CaseInsensitiveHashCodeProvider.cs
-System.Collections/CollectionBase.cs
-System.Collections/Comparer.cs
-System.Collections/CollectionDebuggerView.cs
-System.Collections/DictionaryBase.cs
-System.Collections/DictionaryEntry.cs
-System.Collections/Hashtable.cs
-System.Collections/ICollection.cs
-System.Collections/IComparer.cs
-System.Collections/IDictionary.cs
-System.Collections/IDictionaryEnumerator.cs
-System.Collections/IEnumerable.cs
-System.Collections/IEnumerator.cs
-System.Collections/IEqualityComparer.cs
-System.Collections/IHashCodeProvider.cs
-System.Collections/IList.cs
-System.Collections/IStructuralComparable.cs
-System.Collections/IStructuralEquatable.cs
-System.Collections/Queue.cs
-System.Collections/ReadOnlyCollectionBase.cs
-System.Collections/SortedList.cs
-System.Collections/Stack.cs
-System.Configuration.Assemblies/AssemblyHashAlgorithm.cs
-System.Configuration.Assemblies/AssemblyVersionCompatibility.cs
-System.Diagnostics/ConditionalAttribute.cs
-System.Diagnostics/DebuggableAttribute.cs
-System.Diagnostics/Debugger.cs
-System.Diagnostics/DebuggerBrowsableState.cs
-System.Diagnostics/DebuggerBrowsableAttribute.cs
-System.Diagnostics/DebuggerDisplayAttribute.cs
-System.Diagnostics/DebuggerHiddenAttribute.cs
-System.Diagnostics/DebuggerNonUserCodeAttribute.cs
-System.Diagnostics/DebuggerStepThroughAttribute.cs
-System.Diagnostics/DebuggerTypeProxyAttribute.cs
-System.Diagnostics/StackFrame.cs
-System.Diagnostics/StackTrace.cs
-System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.cs
-System.Diagnostics.Contracts/Contract.cs
-System.Diagnostics.Contracts/ContractClassAttribute.cs
-System.Diagnostics.Contracts/ContractClassForAttribute.cs
-System.Diagnostics.Contracts/ContractFailedEventArgs.cs
-System.Diagnostics.Contracts/ContractFailureKind.cs
-System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs
-System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs
-System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs
-System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs
-System.Diagnostics.Contracts/ContractVerificationAttribute.cs
-System.Diagnostics.Contracts/PureAttribute.cs
-System.Diagnostics.SymbolStore/ISymbolBinder.cs
-System.Diagnostics.SymbolStore/ISymbolBinder1.cs
-System.Diagnostics.SymbolStore/ISymbolDocument.cs
-System.Diagnostics.SymbolStore/ISymbolDocumentWriter.cs
-System.Diagnostics.SymbolStore/ISymbolMethod.cs
-System.Diagnostics.SymbolStore/ISymbolNamespace.cs
-System.Diagnostics.SymbolStore/ISymbolReader.cs
-System.Diagnostics.SymbolStore/ISymbolScope.cs
-System.Diagnostics.SymbolStore/ISymbolVariable.cs
-System.Diagnostics.SymbolStore/ISymbolWriter.cs
-System.Diagnostics.SymbolStore/SymAddressKind.cs
-System.Diagnostics.SymbolStore/SymbolToken.cs
-System.Diagnostics.SymbolStore/SymDocumentType.cs
-System.Diagnostics.SymbolStore/SymLanguageType.cs
-System.Diagnostics.SymbolStore/SymLanguageVendor.cs
-System.Globalization/Calendar.cs
-System.Globalization/CalendarWeekRule.cs
-System.Globalization/CalendricalCalculations.cs
-System.Globalization/CharUnicodeInfo.cs
-System.Globalization/CompareInfo.cs
-System.Globalization/CompareOptions.cs
-System.Globalization/CultureInfo.cs
-System.Globalization/CultureNotFoundException.cs
-System.Globalization/DateTimeFormatInfo.cs
-System.Globalization/DateTimeStyles.cs
-System.Globalization/DaylightTime.cs
-System.Globalization/GregorianCalendar.cs
-System.Globalization/GregorianCalendarTypes.cs
-System.Globalization/HebrewCalendar.cs
-System.Globalization/HijriCalendar.cs
-System.Globalization/JapaneseCalendar.cs
-System.Globalization/KoreanCalendar.cs
-System.Globalization/NumberFormatInfo.cs
-System.Globalization/NumberStyles.cs
-System.Globalization/RegionInfo.cs
-System.Globalization/StringInfo.cs
-System.Globalization/TaiwanCalendar.cs
-System.Globalization/TextElementEnumerator.cs
-System.Globalization/TextInfo.cs
-System.Globalization/TimeSpanStyles.cs
-System.Globalization/ThaiBuddhistCalendar.cs
-System.Globalization/UmAlQuraCalendar.cs
-System.Globalization/UnicodeCategory.cs
-System.IO/BinaryReader.cs
-System.IO/BinaryWriter.cs
-System.IO/BufferedStream.cs
-System.IO/Directory.cs
-System.IO/DirectoryInfo.cs
-System.IO/DirectoryNotFoundException.cs
-System.IO/EndOfStreamException.cs
-System.IO/File.cs
-System.IO/FileAccess.cs
-System.IO/FileAttributes.cs
-System.IO/FileInfo.cs
-System.IO/FileLoadException.cs
-System.IO/FileMode.cs
-System.IO/FileNotFoundException.cs
-System.IO/FileOptions.cs
-System.IO/FileShare.cs
-System.IO/FileStream.cs
-System.IO/FileStreamAsyncResult.cs
-System.IO/FileSystemInfo.cs
-System.IO/IOException.cs
-System.IO/MemoryStream.cs
-System.IO/MonoIO.cs
-System.IO/MonoIOError.cs
-System.IO/MonoFileType.cs
-System.IO/MonoIOStat.cs
-System.IO/Path.cs
-System.IO/PathTooLongException.cs
-System.IO/SearchOption.cs
-System.IO/SearchPattern.cs
-System.IO/SeekOrigin.cs
-System.IO/Stream.cs
-System.IO/StreamAsyncResult.cs
-System.IO/StreamReader.cs
-System.IO/StreamWriter.cs
-System.IO/StringReader.cs
-System.IO/StringWriter.cs
-System.IO/TextReader.cs
-System.IO/TextWriter.cs
-System.IO/UnexceptionalStreamReader.cs
-System.IO/UnexceptionalStreamWriter.cs
-System.IO/UnmanagedMemoryAccessor.cs
-System.IO/UnmanagedMemoryStream.cs
-System.IO.IsolatedStorage/MoonIsolatedStorage.cs
-System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs
-System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs
-System.IO.IsolatedStorage/IsolatedStorageException.cs
-System.Reflection/AmbiguousMatchException.cs
-System.Reflection/Assembly.cs
-System.Reflection/AssemblyAlgorithmIdAttribute.cs
-System.Reflection/AssemblyCompanyAttribute.cs
-System.Reflection/AssemblyConfigurationAttribute.cs
-System.Reflection/AssemblyCopyrightAttribute.cs
-System.Reflection/AssemblyCultureAttribute.cs
-System.Reflection/AssemblyDefaultAliasAttribute.cs
-System.Reflection/AssemblyDelaySignAttribute.cs
-System.Reflection/AssemblyDescriptionAttribute.cs
-System.Reflection/AssemblyFileVersionAttribute.cs
-System.Reflection/AssemblyFlagsAttribute.cs
-System.Reflection/AssemblyInformationalVersionAttribute.cs
-System.Reflection/AssemblyKeyFileAttribute.cs
-System.Reflection/AssemblyKeyNameAttribute.cs
-System.Reflection/AssemblyName.cs
-System.Reflection/AssemblyNameFlags.cs
-System.Reflection/AssemblyNameProxy.cs
-System.Reflection/AssemblyProductAttribute.cs
-System.Reflection/AssemblyTitleAttribute.cs
-System.Reflection/AssemblyTradeMarkAttribute.cs
-System.Reflection/AssemblyVersionAttribute.cs
-System.Reflection/Binder.cs
-System.Reflection/BindingFlags.cs
-System.Reflection/CallingConventions.cs
-System.Reflection/ConstructorInfo.cs
-System.Reflection/CustomAttributeData.cs
-System.Reflection/CustomAttributeFormatException.cs
-System.Reflection/CustomAttributeNamedArgument.cs
-System.Reflection/CustomAttributeTypedArgument.cs
-System.Reflection/DefaultMemberAttribute.cs
-System.Reflection/EventAttributes.cs
-System.Reflection/EventInfo.cs
-System.Reflection/ExceptionHandlingClause.cs
-System.Reflection/ExceptionHandlingClauseOptions.cs
-System.Reflection/FieldAttributes.cs
-System.Reflection/FieldInfo.cs
-System.Reflection/GenericParameterAttributes.cs
-System.Reflection/ICustomAttributeProvider.cs
-System.Reflection/ImageFileMachine.cs
-System.Reflection/InterfaceMapping.cs
-System.Reflection/IReflect.cs
-System.Reflection/LocalVariableInfo.cs
-System.Reflection/ManifestResourceInfo.cs
-System.Reflection/MemberFilter.cs
-System.Reflection/MemberInfo.cs
-System.Reflection/MemberInfoSerializationHolder.cs
-System.Reflection/MemberTypes.cs
-System.Reflection/MethodAttributes.cs
-System.Reflection/MethodBase.cs
-System.Reflection/MethodBody.cs
-System.Reflection/MethodImplAttributes.cs
-System.Reflection/MethodInfo.cs
-System.Reflection/Missing.cs
-System.Reflection/Module.cs
-System.Reflection/ModuleResolveEventHandler.cs
-System.Reflection/MonoAssembly.cs
-System.Reflection/MonoGenericClass.cs
-System.Reflection/MonoGenericMethod.cs
-System.Reflection/MonoEvent.cs
-System.Reflection/MonoField.cs
-System.Reflection/MonoMethod.cs
-System.Reflection/MonoModule.cs
-System.Reflection/MonoProperty.cs
-System.Reflection/ObfuscateAssemblyAttribute.cs
-System.Reflection/ObfuscationAttribute.cs
-System.Reflection/ParameterAttributes.cs
-System.Reflection/ParameterInfo.cs
-System.Reflection/ParameterModifier.cs
-System.Reflection/Pointer.cs
-System.Reflection/PortableExecutableKinds.cs
-System.Reflection/ProcessorArchitecture.cs
-System.Reflection/PropertyAttributes.cs
-System.Reflection/PropertyInfo.cs
-System.Reflection/ReflectionTypeLoadException.cs
-System.Reflection/ResourceAttributes.cs
-System.Reflection/ResourceLocation.cs
-System.Reflection/StrongNameKeyPair.cs
-System.Reflection/TargetException.cs
-System.Reflection/TargetInvocationException.cs
-System.Reflection/TargetParameterCountException.cs
-System.Reflection/TypeAttributes.cs
-System.Reflection/TypeDelegator.cs
-System.Reflection/TypeFilter.cs
-System.Reflection.Emit/AssemblyBuilder.cs
-System.Reflection.Emit/AssemblyBuilderAccess.cs
-System.Reflection.Emit/ConstructorBuilder.cs
-System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs
-System.Reflection.Emit/CustomAttributeBuilder.cs
-System.Reflection.Emit/DerivedTypes.cs
-System.Reflection.Emit/DynamicILInfo.cs
-System.Reflection.Emit/DynamicMethod.cs
-System.Reflection.Emit/EnumBuilder.cs
-System.Reflection.Emit/EventBuilder.cs
-System.Reflection.Emit/EventOnTypeBuilderInst.cs
-System.Reflection.Emit/EventToken.cs
-System.Reflection.Emit/FieldBuilder.cs
-System.Reflection.Emit/FieldOnTypeBuilderInst.cs
-System.Reflection.Emit/FieldToken.cs
-System.Reflection.Emit/FlowControl.cs
-System.Reflection.Emit/GenericTypeParameterBuilder.cs
-System.Reflection.Emit/ILGenerator.cs
-System.Reflection.Emit/Label.cs
-System.Reflection.Emit/LocalBuilder.cs
-System.Reflection.Emit/MethodBuilder.cs
-System.Reflection.Emit/MethodOnTypeBuilderInst.cs
-System.Reflection.Emit/MethodToken.cs
-System.Reflection.Emit/MethodRental.cs
-System.Reflection.Emit/ModuleBuilder.cs
-System.Reflection.Emit/MonoArrayMethod.cs
-System.Reflection.Emit/OpCodeNames.cs
-System.Reflection.Emit/OpCode.cs
-System.Reflection.Emit/OpCodes.cs
-System.Reflection.Emit/OpCodeType.cs
-System.Reflection.Emit/OperandType.cs
-System.Reflection.Emit/PackingSize.cs
-System.Reflection.Emit/ParameterBuilder.cs
-System.Reflection.Emit/ParameterToken.cs
-System.Reflection.Emit/PEFileKinds.cs
-System.Reflection.Emit/PropertyBuilder.cs
-System.Reflection.Emit/PropertyOnTypeBuilderInst.cs
-System.Reflection.Emit/PropertyToken.cs
-System.Reflection.Emit/SignatureHelper.cs
-System.Reflection.Emit/SignatureToken.cs
-System.Reflection.Emit/StackBehaviour.cs
-System.Reflection.Emit/StringToken.cs
-System.Reflection.Emit/TypeBuilder.cs
-System.Reflection.Emit/TypeToken.cs
-System.Reflection.Emit/UnmanagedMarshal.cs
-System.Resources/IResourceReader.cs
-System.Resources/IResourceWriter.cs
-System.Resources/MissingManifestResourceException.cs
-System.Resources/NeutralResourcesLanguageAttribute.cs
-System.Resources/ResourceManager.cs
-System.Resources/ResourceReader.cs
-System.Resources/ResourceSet.cs
-System.Resources/ResourceWriter.cs
-System.Resources/RuntimeResourceSet.cs
-System.Resources/SatelliteContractVersionAttribute.cs
-System.Resources/UltimateResourceFallbackLocation.cs
-System.Resources/Win32Resources.cs
-System.Runtime.CompilerServices/AccessedThroughPropertyAttribute.cs
-System.Runtime.CompilerServices/CallConvCdecl.cs
-System.Runtime.CompilerServices/CallConvFastcall.cs
-System.Runtime.CompilerServices/CallConvThiscall.cs
-System.Runtime.CompilerServices/CallConvStdcall.cs
-System.Runtime.CompilerServices/CompilationRelaxations.cs
-System.Runtime.CompilerServices/CompilationRelaxationsAttribute.cs
-System.Runtime.CompilerServices/CompilerGeneratedAttribute.cs
-System.Runtime.CompilerServices/CompilerGlobalScopeAttribute.cs
-System.Runtime.CompilerServices/CompilerMarshalOverride.cs
-System.Runtime.CompilerServices/ConditionalWeakTable.cs
-System.Runtime.CompilerServices/CustomConstantAttribute.cs
-System.Runtime.CompilerServices/DateTimeConstantAttribute.cs
-System.Runtime.CompilerServices/DecimalConstantAttribute.cs
-System.Runtime.CompilerServices/DefaultDependencyAttribute.cs
-System.Runtime.CompilerServices/DependencyAttribute.cs
-System.Runtime.CompilerServices/DiscardableAttribute.cs
-System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.cs
-System.Runtime.CompilerServices/FixedBufferAttribute.cs
-System.Runtime.CompilerServices/HasCopySemanticsAttribute.cs
-System.Runtime.CompilerServices/IDispatchConstantAttribute.cs
-System.Runtime.CompilerServices/IUnknownConstantAttribute.cs
-System.Runtime.CompilerServices/IndexerNameAttribute.cs
-System.Runtime.CompilerServices/InternalsVisibleToAttribute.cs
-System.Runtime.CompilerServices/IsBoxed.cs
-System.Runtime.CompilerServices/IsByValue.cs
-System.Runtime.CompilerServices/IsConst.cs
-System.Runtime.CompilerServices/IsCopyConstructed.cs
-System.Runtime.CompilerServices/IsExplicitlyDereferenced.cs
-System.Runtime.CompilerServices/IsImplicitlyDereferenced.cs
-System.Runtime.CompilerServices/IsJitIntrinsic.cs
-System.Runtime.CompilerServices/IsLong.cs
-System.Runtime.CompilerServices/IsPinned.cs
-System.Runtime.CompilerServices/IsSignUnspecifiedByte.cs
-System.Runtime.CompilerServices/IsUdtReturn.cs
-System.Runtime.CompilerServices/IsVolatile.cs
-System.Runtime.CompilerServices/LoadHint.cs
-System.Runtime.CompilerServices/MethodCodeType.cs
-System.Runtime.CompilerServices/MethodImplAttribute.cs
-System.Runtime.CompilerServices/MethodImplOptions.cs
-System.Runtime.CompilerServices/NativeCppClassAttribute.cs
-System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
-System.Runtime.CompilerServices/RequiredAttributeAttribute.cs
-System.Runtime.CompilerServices/RuntimeCompatibilityAttribute.cs
-System.Runtime.CompilerServices/RuntimeHelpers.cs
-System.Runtime.CompilerServices/RuntimeWrappedException.cs
-System.Runtime.CompilerServices/SpecialNameAttribute.cs 
-System.Runtime.CompilerServices/ScopelessEnumAttribute.cs
-System.Runtime.CompilerServices/SuppressIldasmAttribute.cs
-System.Runtime.CompilerServices/StringFreezingAttribute.cs 
-System.Runtime.CompilerServices/UnsafeValueTypeAttribute.cs
-System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs
-System.Runtime.CompilerServices/TypeForwardedToAttribute.cs
-System.Runtime.ConstrainedExecution/CriticialFinalizerObject.cs
-System.Runtime.ConstrainedExecution/CER.cs
-System.Runtime.ConstrainedExecution/Consistency.cs
-System.Runtime.ConstrainedExecution/PrePrepareMethodAttribute.cs
-System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.cs
-System.Runtime.InteropServices/_Activator.cs
-System.Runtime.InteropServices/_Assembly.cs
-System.Runtime.InteropServices/_AssemblyBuilder.cs
-System.Runtime.InteropServices/_AssemblyName.cs
-System.Runtime.InteropServices/_Attribute.cs
-System.Runtime.InteropServices/_ConstructorBuilder.cs
-System.Runtime.InteropServices/_ConstructorInfo.cs
-System.Runtime.InteropServices/_CustomAttributeBuilder.cs
-System.Runtime.InteropServices/_EnumBuilder.cs
-System.Runtime.InteropServices/_EventBuilder.cs
-System.Runtime.InteropServices/_EventInfo.cs
-System.Runtime.InteropServices/_Exception.cs
-System.Runtime.InteropServices/_FieldBuilder.cs
-System.Runtime.InteropServices/_FieldInfo.cs
-System.Runtime.InteropServices/_ILGenerator.cs
-System.Runtime.InteropServices/_LocalBuilder.cs
-System.Runtime.InteropServices/_MemberInfo.cs
-System.Runtime.InteropServices/_MethodBase.cs
-System.Runtime.InteropServices/_MethodBuilder.cs
-System.Runtime.InteropServices/_MethodInfo.cs
-System.Runtime.InteropServices/_MethodRental.cs
-System.Runtime.InteropServices/_Module.cs
-System.Runtime.InteropServices/_ModuleBuilder.cs
-System.Runtime.InteropServices/_ParameterBuilder.cs
-System.Runtime.InteropServices/_ParameterInfo.cs
-System.Runtime.InteropServices/_PropertyBuilder.cs
-System.Runtime.InteropServices/_PropertyInfo.cs
-System.Runtime.InteropServices/_SignatureHelper.cs
-System.Runtime.InteropServices/_Thread.cs
-System.Runtime.InteropServices/_Type.cs
-System.Runtime.InteropServices/_TypeBuilder.cs
-System.Runtime.InteropServices/AllowReversePInvokeCallsAttribute.cs
-System.Runtime.InteropServices/CallingConvention.cs
-System.Runtime.InteropServices/CharSet.cs
-System.Runtime.InteropServices/ClassInterfaceAttribute.cs
-System.Runtime.InteropServices/ClassInterfaceType.cs
-System.Runtime.InteropServices/CoClassAttribute.cs
-System.Runtime.InteropServices/ComDefaultInterfaceAttribute.cs
-System.Runtime.InteropServices/COMException.cs
-System.Runtime.InteropServices/ComImportAttribute.cs
-System.Runtime.InteropServices/ComInterfaceType.cs
-System.Runtime.InteropServices/ComVisible.cs
-System.Runtime.InteropServices/CriticalHandle.cs
-System.Runtime.InteropServices/DefaultCharSetAttribute.cs
-System.Runtime.InteropServices/DispIdAttribute.cs
-System.Runtime.InteropServices/DllImportAttribute.cs
-System.Runtime.InteropServices/ExternalException.cs
-System.Runtime.InteropServices/FieldOffsetAttribute.cs
-System.Runtime.InteropServices/GCHandle.cs
-System.Runtime.InteropServices/GCHandleType.cs
-System.Runtime.InteropServices/GuidAttribute.cs
-System.Runtime.InteropServices/HandleRef.cs
-System.Runtime.InteropServices/InAttribute.cs
-System.Runtime.InteropServices/InterfaceTypeAttribute.cs
-System.Runtime.InteropServices/LayoutKind.cs
-System.Runtime.InteropServices/Marshal.cs
-System.Runtime.InteropServices/MarshalAsAttribute.cs
-System.Runtime.InteropServices/MarshalDirectiveException.cs
-System.Runtime.InteropServices/OptionalAttribute.cs
-System.Runtime.InteropServices/OutAttribute.cs
-System.Runtime.InteropServices/PreserveSigAttribute.cs
-System.Runtime.InteropServices/SEHException.cs
-System.Runtime.InteropServices/SafeHandle.cs
-System.Runtime.InteropServices/StructLayoutAttribute.cs
-System.Runtime.InteropServices/TypeLibImportClassAttribute.cs
-System.Runtime.InteropServices/TypeLibVersionAttribute.cs
-System.Runtime.InteropServices/UnmanagedFunctionPointerAttribute.cs
-System.Runtime.InteropServices/UnmanagedType.cs
-System.Runtime.Remoting/ActivatedClientTypeEntry.cs
-System.Runtime.Remoting/ActivatedServiceTypeEntry.cs
-System.Runtime.Remoting/CustomErrorsModes.cs
-System.Runtime.Remoting/EnvoyInfo.cs
-System.Runtime.Remoting/IObjectHandle.cs
-System.Runtime.Remoting/IChannelInfo.cs
-System.Runtime.Remoting/Identity.cs
-System.Runtime.Remoting/InternalRemotingServices.cs
-System.Runtime.Remoting/IEnvoyInfo.cs
-System.Runtime.Remoting/IRemotingTypeInfo.cs
-System.Runtime.Remoting/ObjectHandle.cs
-System.Runtime.Remoting/ObjRef.cs
-System.Runtime.Remoting/RemotingConfiguration.cs
-System.Runtime.Remoting/RemotingException.cs
-System.Runtime.Remoting/RemotingTimeoutException.cs
-System.Runtime.Remoting/RemotingServices.cs
-System.Runtime.Remoting/ServerException.cs
-System.Runtime.Remoting/ServerIdentity.cs
-System.Runtime.Remoting/SoapServices.cs
-System.Runtime.Remoting/TypeEntry.cs
-System.Runtime.Remoting/TypeInfo.cs
-System.Runtime.Remoting/WellKnownObjectMode.cs
-System.Runtime.Remoting/WellKnownClientTypeEntry.cs
-System.Runtime.Remoting/WellKnownServiceTypeEntry.cs
-System.Runtime.Remoting.Activation/ActivationServices.cs
-System.Runtime.Remoting.Activation/ActivatorLevel.cs
-System.Runtime.Remoting.Activation/AppDomainLevelActivator.cs
-System.Runtime.Remoting.Activation/ConstructionLevelActivator.cs
-System.Runtime.Remoting.Activation/ContextLevelActivator.cs
-System.Runtime.Remoting.Activation/IActivator.cs
-System.Runtime.Remoting.Activation/IConstructionCallMessage.cs
-System.Runtime.Remoting.Activation/IConstructionReturnMessage.cs
-System.Runtime.Remoting.Activation/RemoteActivator.cs
-System.Runtime.Remoting.Activation/RemoteActivationAttribute.cs
-System.Runtime.Remoting.Activation/UrlAttribute.cs
-System.Runtime.Remoting.Channels/AggregateDictionary.cs
-System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.cs
-System.Runtime.Remoting.Channels/BaseChannelSinkWithProperties.cs
-System.Runtime.Remoting.Channels/BaseChannelWithProperties.cs
-System.Runtime.Remoting.Channels/ChannelDataStore.cs
-System.Runtime.Remoting.Channels/ChannelServices.cs
-System.Runtime.Remoting.Channels/ChannelSinkStackEntry.cs
-System.Runtime.Remoting.Channels/ClientChannelSinkStack.cs
-System.Runtime.Remoting.Channels/IChannel.cs
-System.Runtime.Remoting.Channels/IChannelDataStore.cs
-System.Runtime.Remoting.Channels/IChannelReceiver.cs
-System.Runtime.Remoting.Channels/IChannelReceiverHook.cs
-System.Runtime.Remoting.Channels/IChannelSender.cs
-System.Runtime.Remoting.Channels/IChannelSinkBase.cs
-System.Runtime.Remoting.Channels/IClientChannelSink.cs
-System.Runtime.Remoting.Channels/IClientChannelSinkProvider.cs
-System.Runtime.Remoting.Channels/IClientChannelSinkStack.cs
-System.Runtime.Remoting.Channels/IClientFormatterSink.cs
-System.Runtime.Remoting.Channels/IClientFormatterSinkProvider.cs
-System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.cs
-System.Runtime.Remoting.Channels/ISecurableChannel.cs
-System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.cs
-System.Runtime.Remoting.Channels/ServerDispatchSink.cs
-System.Runtime.Remoting.Channels/ServerDispatchSinkProvider.cs
-System.Runtime.Remoting.Channels/IServerChannelSink.cs
-System.Runtime.Remoting.Channels/IServerChannelSinkProvider.cs
-System.Runtime.Remoting.Channels/IServerChannelSinkStack.cs
-System.Runtime.Remoting.Channels/IServerFormatterSinkProvider.cs
-System.Runtime.Remoting.Channels/ITransportHeaders.cs
-System.Runtime.Remoting.Channels/ServerChannelSinkStack.cs
-System.Runtime.Remoting.Channels/ServerProcessing.cs
-System.Runtime.Remoting.Channels/SinkProviderData.cs
-System.Runtime.Remoting.Channels/TransportHeaders.cs
-System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs
-System.Runtime.Remoting.Contexts/Context.cs
-System.Runtime.Remoting.Contexts/ContextAttribute.cs
-System.Runtime.Remoting.Contexts/ContextProperty.cs
-System.Runtime.Remoting.Contexts/CrossContextChannel.cs
-System.Runtime.Remoting.Contexts/CrossContextDelegate.cs
-System.Runtime.Remoting.Contexts/IContextAttribute.cs
-System.Runtime.Remoting.Contexts/IContextProperty.cs
-System.Runtime.Remoting.Contexts/IContextPropertyActivator.cs
-System.Runtime.Remoting.Contexts/IContributeClientContextSink.cs
-System.Runtime.Remoting.Contexts/IContributeDynamicSink.cs
-System.Runtime.Remoting.Contexts/IContributeEnvoySink.cs
-System.Runtime.Remoting.Contexts/IContributeObjectSink.cs
-System.Runtime.Remoting.Contexts/IContributeServerContextSink.cs
-System.Runtime.Remoting.Contexts/IDynamicMessageSink.cs
-System.Runtime.Remoting.Contexts/IDynamicProperty.cs
-System.Runtime.Remoting.Contexts/SynchronizationAttribute.cs
-System.Runtime.Remoting.Lifetime/ClientSponsor.cs
-System.Runtime.Remoting.Lifetime/ILease.cs
-System.Runtime.Remoting.Lifetime/ISponsor.cs
-System.Runtime.Remoting.Lifetime/Lease.cs
-System.Runtime.Remoting.Lifetime/LeaseManager.cs
-System.Runtime.Remoting.Lifetime/LeaseSink.cs
-System.Runtime.Remoting.Lifetime/LeaseState.cs
-System.Runtime.Remoting.Lifetime/LifetimeServices.cs
-System.Runtime.Remoting.Messaging/ArgInfo.cs
-System.Runtime.Remoting.Messaging/AsyncResult.cs
-System.Runtime.Remoting.Messaging/CallContext.cs
-System.Runtime.Remoting.Messaging/ClientContextTerminatorSink.cs
-System.Runtime.Remoting.Messaging/ConstructionCall.cs
-System.Runtime.Remoting.Messaging/ConstructionCallDictionary.cs
-System.Runtime.Remoting.Messaging/ConstructionResponse.cs
-System.Runtime.Remoting.Messaging/EnvoyTerminatorSink.cs
-System.Runtime.Remoting.Messaging/Header.cs
-System.Runtime.Remoting.Messaging/HeaderHandler.cs
-System.Runtime.Remoting.Messaging/ErrorMessage.cs
-System.Runtime.Remoting.Messaging/IInternalMessage.cs
-System.Runtime.Remoting.Messaging/IMessage.cs
-System.Runtime.Remoting.Messaging/IMessageCtrl.cs
-System.Runtime.Remoting.Messaging/IMessageSink.cs
-System.Runtime.Remoting.Messaging/IMethodCallMessage.cs
-System.Runtime.Remoting.Messaging/IMethodMessage.cs
-System.Runtime.Remoting.Messaging/IMethodReturnMessage.cs
-System.Runtime.Remoting.Messaging/IRemotingFormatter.cs
-System.Runtime.Remoting.Messaging/InternalMessageWrapper.cs
-System.Runtime.Remoting.Messaging/ISerializationRootObject.cs
-System.Runtime.Remoting.Messaging/LogicalCallContext.cs
-System.Runtime.Remoting.Messaging/MessageSurrogateFilter.cs
-System.Runtime.Remoting.Messaging/MethodCall.cs
-System.Runtime.Remoting.Messaging/MethodCallMessageWrapper.cs
-System.Runtime.Remoting.Messaging/MethodResponse.cs
-System.Runtime.Remoting.Messaging/MethodCallDictionary.cs
-System.Runtime.Remoting.Messaging/MethodDictionary.cs
-System.Runtime.Remoting.Messaging/MethodReturnDictionary.cs
-System.Runtime.Remoting.Messaging/MethodReturnMessageWrapper.cs
-System.Runtime.Remoting.Messaging/MonoMethodMessage.cs
-System.Runtime.Remoting.Messaging/OneWayAttribute.cs
-System.Runtime.Remoting.Messaging/RemotingSurrogateSelector.cs
-System.Runtime.Remoting.Messaging/RemotingSurrogate.cs
-System.Runtime.Remoting.Messaging/ReturnMessage.cs
-System.Runtime.Remoting.Messaging/ServerContextTerminatorSink.cs
-System.Runtime.Remoting.Messaging/ServerObjectTerminatorSink.cs
-System.Runtime.Remoting.Messaging/StackBuilderSink.cs
-System.Runtime.Remoting.Messaging/CADMessages.cs
-System.Runtime.Remoting.Metadata/SoapAttribute.cs
-System.Runtime.Remoting.Metadata/SoapFieldAttribute.cs
-System.Runtime.Remoting.Metadata/SoapMethodAttribute.cs
-System.Runtime.Remoting.Metadata/SoapOption.cs
-System.Runtime.Remoting.Metadata/SoapParameterAttribute.cs
-System.Runtime.Remoting.Metadata/SoapTypeAttribute.cs
-System.Runtime.Remoting.Metadata/XmlFieldOrderOption.cs
-System.Runtime.Remoting.Proxies/RealProxy.cs
-System.Runtime.Remoting.Proxies/RemotingProxy.cs
-System.Runtime.Remoting.Proxies/ProxyAttribute.cs
-System.Runtime.Remoting.Services/EnterpriseServicesHelper.cs
-System.Runtime.Remoting.Services/ITrackingHandler.cs
-System.Runtime.Remoting.Services/TrackingServices.cs
-System.Runtime.Serialization/Formatter.cs
-System.Runtime.Serialization/FormatterConverter.cs
-System.Runtime.Serialization/FormatterServices.cs
-System.Runtime.Serialization/IDeserializationCallback.cs
-System.Runtime.Serialization/IFormatter.cs
-System.Runtime.Serialization/IFormatterConverter.cs
-System.Runtime.Serialization/IObjectReference.cs
-System.Runtime.Serialization/ISerializable.cs
-System.Runtime.Serialization/ISerializationSurrogate.cs
-System.Runtime.Serialization/ISurrogateSelector.cs
-System.Runtime.Serialization/ObjectIDGenerator.cs
-System.Runtime.Serialization/ObjectManager.cs
-System.Runtime.Serialization/OnDeserializedAttribute.cs
-System.Runtime.Serialization/OnDeserializingAttribute.cs
-System.Runtime.Serialization/OnSerializedAttribute.cs
-System.Runtime.Serialization/OnSerializingAttribute.cs
-System.Runtime.Serialization/OptionalFieldAttribute.cs
-System.Runtime.Serialization/SerializationBinder.cs
-System.Runtime.Serialization/SerializationCallbacks.cs
-System.Runtime.Serialization/SerializationEntry.cs
-System.Runtime.Serialization/SerializationException.cs
-System.Runtime.Serialization/SerializationInfo.cs
-System.Runtime.Serialization/SerializationInfoEnumerator.cs
-System.Runtime.Serialization/SerializationObjectManager.cs
-System.Runtime.Serialization/StreamingContext.cs
-System.Runtime.Serialization/StreamingContextStates.cs
-System.Runtime.Serialization/SurrogateSelector.cs
-System.Runtime.Serialization.Formatters/FormatterAssemblyStyle.cs
-System.Runtime.Serialization.Formatters/FormatterTopObjectStyle.cs
-System.Runtime.Serialization.Formatters/FormatterTypeStyle.cs
-System.Runtime.Serialization.Formatters/IFieldInfo.cs
-System.Runtime.Serialization.Formatters/InternalArrayTypeE.cs
-System.Runtime.Serialization.Formatters/InternalElementTypeE.cs
-System.Runtime.Serialization.Formatters/InternalMemberTypeE.cs
-System.Runtime.Serialization.Formatters/InternalMemberValueE.cs
-System.Runtime.Serialization.Formatters/InternalNameSpaceE.cs
-System.Runtime.Serialization.Formatters/InternalObjectPositionE.cs
-System.Runtime.Serialization.Formatters/InternalObjectTypeE.cs
-System.Runtime.Serialization.Formatters/InternalParseStateE.cs
-System.Runtime.Serialization.Formatters/InternalParseTypeE.cs
-System.Runtime.Serialization.Formatters/InternalPrimitiveTypeE.cs
-System.Runtime.Serialization.Formatters/InternalRM.cs
-System.Runtime.Serialization.Formatters/InternalSerializerTypeE.cs
-System.Runtime.Serialization.Formatters/InternalST.cs
-System.Runtime.Serialization.Formatters/ISoapMessage.cs
-System.Runtime.Serialization.Formatters/ServerFault.cs
-System.Runtime.Serialization.Formatters/SoapFault.cs
-System.Runtime.Serialization.Formatters/SoapMessage.cs
-System.Runtime.Serialization.Formatters/TypeFilterLevel.cs
-System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
-System.Runtime.Serialization.Formatters.Binary/BinaryCommon.cs
-System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs
-System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs
-System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
-System.Runtime.Serialization.Formatters.Binary/MessageFormatter.cs
-System.Runtime.Versioning/ResourceExposureAttribute.cs
-System.Runtime.Versioning/ResourceScope.cs
-System.Runtime.Versioning/TargetFrameworkAttribute.cs
-System.Runtime.Versioning/VersioningHelper.cs
-System.Security/AllowPartiallyTrustedCallersAttribute.cs
-System.Security/CodeAccessPermission_2_1.cs
-System.Security/IPermission.cs
-System.Security/PermissionSet_2_1.cs
-System.Security/SecurityCriticalAttribute.cs
-System.Security/SecurityFrame.cs
-System.Security/SecurityException_2_1.cs
-System.Security/SecurityManager_2_1.cs
-System.Security/SecuritySafeCriticalAttribute.cs
-System.Security/SecurityState.cs
-System.Security/SecurityTransparentAttribute.cs
-System.Security/SuppressUnmanagedCodeSecurityAttribute.cs
-System.Security/UnverifiableCodeAttribute.cs
-System.Security/VerificationException.cs
-../System.Core/System.Security.Cryptography/Aes.cs
-System.Security.Cryptography/AsymmetricAlgorithm.cs
-System.Security.Cryptography/AsymmetricKeyExchangeDeformatter.cs
-System.Security.Cryptography/AsymmetricKeyExchangeFormatter.cs
-System.Security.Cryptography/AsymmetricSignatureDeformatter.cs
-System.Security.Cryptography/AsymmetricSignatureFormatter.cs
-System.Security.Cryptography/Base64Constants.cs
-System.Security.Cryptography/CipherMode.cs
-System.Security.Cryptography/CryptoAPITransform.cs
-System.Security.Cryptography/CryptoConfig_2_1.cs
-System.Security.Cryptography/CryptographicException.cs
-System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs
-System.Security.Cryptography/CryptoStream.cs
-System.Security.Cryptography/CryptoStreamMode.cs
-System.Security.Cryptography/DeriveBytes.cs
-System.Security.Cryptography/DES.cs
-System.Security.Cryptography/DESCryptoServiceProvider.cs
-System.Security.Cryptography/DSA.cs
-System.Security.Cryptography/DSAParameters.cs
-System.Security.Cryptography/DSASignatureDeformatter.cs
-System.Security.Cryptography/DSASignatureFormatter.cs
-System.Security.Cryptography/FromBase64Transform.cs
-System.Security.Cryptography/HashAlgorithm.cs
-System.Security.Cryptography/HMAC.cs
-System.Security.Cryptography/HMACMD5.cs
-System.Security.Cryptography/HMACSHA1.cs
-System.Security.Cryptography/HMACSHA256.cs
-System.Security.Cryptography/ICryptoTransform.cs
-System.Security.Cryptography/KeyedHashAlgorithm.cs
-System.Security.Cryptography/KeyNumber.cs
-System.Security.Cryptography/KeySizes.cs
-System.Security.Cryptography/MaskGenerationMethod.cs
-System.Security.Cryptography/MD5.cs
-System.Security.Cryptography/MD5CryptoServiceProvider.cs
-System.Security.Cryptography/PaddingMode.cs
-System.Security.Cryptography/PKCS1MaskGenerationMethod.cs
-System.Security.Cryptography/RandomNumberGenerator.cs
-System.Security.Cryptography/RC2.cs
-System.Security.Cryptography/RC2CryptoServiceProvider.cs
-System.Security.Cryptography/Rfc2898DeriveBytes.cs
-System.Security.Cryptography/Rijndael.cs
-System.Security.Cryptography/RijndaelManaged.cs
-System.Security.Cryptography/RijndaelManagedTransform.cs
-System.Security.Cryptography/RNGCryptoServiceProvider.cs
-System.Security.Cryptography/RSA.cs
-System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs
-System.Security.Cryptography/RSAOAEPKeyExchangeFormatter.cs
-System.Security.Cryptography/RSAParameters.cs
-System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs
-System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.cs
-System.Security.Cryptography/RSAPKCS1SignatureDeformatter.cs
-System.Security.Cryptography/RSAPKCS1SignatureFormatter.cs
-System.Security.Cryptography/SHA1.cs
-System.Security.Cryptography/SHA1CryptoServiceProvider.cs
-System.Security.Cryptography/SHA1Managed.cs
-System.Security.Cryptography/SHA256.cs
-System.Security.Cryptography/SHA256Managed.cs
-System.Security.Cryptography/SHAConstants.cs
-System.Security.Cryptography/SymmetricAlgorithm.cs
-System.Security.Cryptography/ToBase64Transform.cs
-System.Security.Cryptography/TripleDES.cs
-System.Security.Cryptography/TripleDESCryptoServiceProvider.cs
-System.Security.Cryptography.X509Certificates/X509Certificate.cs
-System.Security.Cryptography.X509Certificates/X509Certificate20.cs
-System.Security.Cryptography.X509Certificates/X509ContentType.cs
-System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs
-System.Security.Permissions/CodeAccessSecurityAttribute.cs
-System.Security.Permissions/EnvironmentPermissionAccess.cs
-System.Security.Permissions/EnvironmentPermissionAttribute.cs
-System.Security.Permissions/FileIOPermissionAccess.cs
-System.Security.Permissions/FileIOPermissionAttribute.cs
-System.Security.Permissions/HostProtectionAttribute.cs
-System.Security.Permissions/HostProtectionResource.cs
-System.Security.Permissions/PermissionSetAttribute.cs
-System.Security.Permissions/PermissionState.cs
-System.Security.Permissions/ReflectionPermissionAttribute.cs
-System.Security.Permissions/ReflectionPermissionFlag.cs
-System.Security.Permissions/SecurityAction.cs
-System.Security.Permissions/SecurityAttribute.cs
-System.Security.Permissions/SecurityPermissionAttribute.cs
-System.Security.Permissions/SecurityPermissionFlag.cs
-System.Security.Permissions/StrongNamePermissionAttribute.cs
-System.Security.Permissions/StrongNamePublicKeyBlob.cs
-System.Security.Policy/Evidence_2_1.cs
-System.Security.Policy/PolicyLevel_2_1.cs
-System.Security.Principal/IIdentity.cs
-System.Security.Principal/IPrincipal.cs
-System.Text/ASCIIEncoding.cs
-System.Text/Decoder.cs
-System.Text/DecoderExceptionFallback.cs
-System.Text/DecoderExceptionFallbackBuffer.cs
-System.Text/DecoderFallback.cs
-System.Text/DecoderFallbackBuffer.cs
-System.Text/DecoderFallbackException.cs
-System.Text/DecoderReplacementFallback.cs
-System.Text/DecoderReplacementFallbackBuffer.cs
-System.Text/Encoder.cs
-System.Text/EncoderExceptionFallback.cs
-System.Text/EncoderExceptionFallbackBuffer.cs
-System.Text/EncoderFallback.cs
-System.Text/EncoderFallbackBuffer.cs
-System.Text/EncoderFallbackException.cs
-System.Text/EncoderReplacementFallback.cs
-System.Text/EncoderReplacementFallbackBuffer.cs
-System.Text/Encoding.cs
-System.Text/EncodingInfo.cs
-System.Text/StringBuilder.cs
-System.Text/SurrogateEncoder.cs
-System.Text/UnicodeEncoding.cs
-System.Text/UTF7Encoding.cs
-System.Text/UTF8Encoding.cs
-System.Text/UTF32Encoding.cs
-System.Threading/AbandonedMutexException.cs
-System.Threading/AutoResetEvent.cs
-System.Threading/ContextCallback.cs
-System.Threading/EventResetMode.cs
-System.Threading/EventWaitHandle.cs
-System.Threading/ExecutionContext.cs
-System.Threading/Interlocked.cs
-System.Threading/IOCompletionCallback.cs
-System.Threading/ManualResetEvent.cs
-System.Threading/Monitor.cs
-System.Threading/Mutex.cs
-System.Threading/NativeEventCalls.cs
-System.Threading/NativeOverlapped.cs
-System.Threading/Overlapped.cs
-System.Threading/ParameterizedThreadStart.cs
-System.Threading/RegisteredWaitHandle.cs
-System.Threading/SendOrPostCallback.cs
-System.Threading/SynchronizationContext.cs
-System.Threading/SynchronizationLockException.cs
-System.Threading/Thread.cs
-System.Threading/ThreadAbortException.cs
-System.Threading/ThreadInterruptedException.cs
-System.Threading/ThreadPool.cs
-System.Threading/ThreadStart.cs
-System.Threading/ThreadStartException.cs
-System.Threading/ThreadState.cs
-System.Threading/ThreadStateException.cs
-System.Threading/Timeout.cs
-System.Threading/Timer.cs
-System.Threading/TimerCallback.cs
-System.Threading/WaitCallback.cs
-System.Threading/WaitHandle.cs
-System.Threading/WaitOrTimerCallback.cs
-System.Collections.Generic/CollectionDebuggerView.cs
-System.Collections.Generic/Dictionary.cs
-System.Collections.Generic/ICollection.cs
-System.Collections.Generic/IEnumerable.cs
-System.Collections.Generic/IEnumerator.cs
-System.Collections.Generic/IList.cs
-System.Collections.Generic/IComparer.cs
-System.Collections.Generic/IEqualityComparer.cs
-System.Collections.Generic/IDictionary.cs
-System.Collections.Generic/KeyValuePair.cs
-System.Collections.Generic/EqualityComparer.cs
-System.Collections.Generic/KeyNotFoundException.cs
-System.Collections.Generic/List.cs
-System.Collections.ObjectModel/Collection.cs
-System.Collections.ObjectModel/KeyedCollection.cs
-System.Collections.ObjectModel/ReadOnlyCollection.cs
-System/Action.cs
-System/ArraySegment.cs
-System/Comparison.cs
-System/Converter.cs
-System/Predicate.cs
-System.Collections.Generic/Comparer.cs
-../Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
-../Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
-../Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
-../Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
-../System.Core/System/TimeZoneInfo.AdjustmentRule.cs
-../System.Core/System/TimeZoneInfo.cs
-../System.Core/System/TimeZoneInfo.TransitionTime.cs
+#include corlib.dll.sources
diff --git a/mcs/class/dlr/sync.sh b/mcs/class/dlr/sync.sh
new file mode 100755 (executable)
index 0000000..fe3554f
--- /dev/null
@@ -0,0 +1,2 @@
+rsync -r /home/marek/svn/dlr/svn/DLR_Main/Src/Runtime/Microsoft.Dynamic/ Runtime/Microsoft.Dynamic --exclude=".*/" --exclude="*.snk"
+rsync -r /home/marek/svn/dlr/svn/DLR_Main/Src/Runtime/Microsoft.Scripting.Core/ Runtime/Microsoft.Scripting.Core --exclude=".*/" --exclude="*.snk"
diff --git a/mcs/errors/.cvsignore b/mcs/errors/.cvsignore
deleted file mode 100644 (file)
index 502c393..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-*.dll
-*.exe
-*.log
-*.mdb
-error-1.out
-semantic.cache
index cbea4b091712544f3fbd0242210216e58aef6949..581562408d8a111aea0b9233e25354da308d4537 100644 (file)
@@ -79,3 +79,5 @@
 /cs1746.cs -crlf
 /gcs0307-5.cs -crlf
 /gcs1579.cs -crlf
+/CS0534-6-lib.cs -crlf
+/cs0133-2.cs -crlf
diff --git a/mcs/errors/CS0534-6-lib.cs b/mcs/errors/CS0534-6-lib.cs
new file mode 100644 (file)
index 0000000..fc901d8
--- /dev/null
@@ -0,0 +1,12 @@
+public abstract class A\r
+{\r
+}\r
+\r
+public abstract class B : A\r
+{\r
+       public abstract void BMethod ();\r
+}\r
+\r
+public abstract class C : B\r
+{\r
+}\r
index 75c2f58695a37ff0da2dc1ab88b31f148098c2ff..c5ea833596217e51b3b4f78a72e74da8a56f7f41 100644 (file)
@@ -26,7 +26,7 @@ TEST_SUPPORT_FILES = \
        CS0205-3-lib.dll \
        CS0229-3-lib.dll CS0229-4-lib.dll \
        CS0433-lib.dll CS0433-2-lib.dll \
-       CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll CS0571-5-lib.dll CS0571-6-lib.dll \
+       CS0534-3-lib.dll CS0534-4-lib.dll CS0534-6-lib.dll CS0571-3-lib.dll CS0571-5-lib.dll CS0571-6-lib.dll \
        CS0612-2-lib.dll CS0618-2-lib.dll CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll CS0619-42-lib.dll \
        CS0619-43-lib.dll CS1546-lib.dll CS0619-51-lib.dll CS1509-module.dll CS1681-2-lib.dll \
        CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
diff --git a/mcs/errors/cs0103-6.cs b/mcs/errors/cs0103-6.cs
new file mode 100644 (file)
index 0000000..0c8df07
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0103: The name `owner' does not exist in the current context
+// Line: 6
+
+class C
+{
+       public readonly object A = owner.Foo;
+
+       public C ()
+       {
+               int owner = 1;
+       }
+}
diff --git a/mcs/errors/cs0106-6.cs b/mcs/errors/cs0106-6.cs
new file mode 100644 (file)
index 0000000..06fe0b0
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0106: The modifier `sealed' is not valid for this item
+// Line: 6
+
+struct S
+{
+       public sealed override int GetHashCode ()
+       {
+               return 1;
+       }
+}
diff --git a/mcs/errors/cs0106-7.cs b/mcs/errors/cs0106-7.cs
new file mode 100644 (file)
index 0000000..43b8486
--- /dev/null
@@ -0,0 +1,9 @@
+// CS0106: The modifier `abstract' is not valid for this item
+// Line: 6
+
+struct S
+{
+       public abstract int Prop {
+               set {}
+       }
+}
diff --git a/mcs/errors/cs0108-14.cs b/mcs/errors/cs0108-14.cs
new file mode 100644 (file)
index 0000000..c37ee28
--- /dev/null
@@ -0,0 +1,13 @@
+// CS0108: `B.D' hides inherited member `A.D'. Use the new keyword if hiding was intended
+// Line: 15
+// Compiler options: -warnaserror -warn:2
+
+public class B : A
+{
+       public delegate void D ();
+}
+
+public class A
+{
+       public int D;
+}
diff --git a/mcs/errors/cs0117-3.cs b/mcs/errors/cs0117-3.cs
new file mode 100644 (file)
index 0000000..63e2027
--- /dev/null
@@ -0,0 +1,24 @@
+// CS0117: `Color' does not contain a definition for `Transparent'
+// Line:
+
+using System;
+
+struct Color
+{
+}
+
+static class ExtensionMethods
+{
+       public static Color Transparent (this Color c)
+       {
+               return new Color ();
+       }
+}
+
+class MainClass
+{
+       public static void Main ()
+       {
+               var c = Color.Transparent ();
+       }
+}
diff --git a/mcs/errors/cs0119-10.cs b/mcs/errors/cs0119-10.cs
new file mode 100644 (file)
index 0000000..5a14ccf
--- /dev/null
@@ -0,0 +1,14 @@
+// CS0119: Expression denotes a `type', where a `variable' or `value' was expected
+// Line: 12
+
+class A
+{
+}
+
+class B
+{
+       public B ()
+       {
+               A = 2;
+       }
+}
diff --git a/mcs/errors/cs0119-9.cs b/mcs/errors/cs0119-9.cs
new file mode 100644 (file)
index 0000000..cf302c2
--- /dev/null
@@ -0,0 +1,17 @@
+// CS0119: Expression denotes a `type', where a `variable' or `value' was expected
+// Line: 15
+
+class A
+{
+       public class D
+       {
+       }
+}
+
+class B
+{
+       public B ()
+       {
+               A.D = 2;
+       }
+}
diff --git a/mcs/errors/cs0121-11.cs b/mcs/errors/cs0121-11.cs
new file mode 100644 (file)
index 0000000..ae0740b
--- /dev/null
@@ -0,0 +1,29 @@
+// CS0121: The call is ambiguous between the following methods or properties: `IA.Foo()' and `IB.Foo()'
+// Line: 27
+
+interface IA
+{
+       void Foo ();
+}
+
+interface IBB : IB
+{
+}
+
+interface IB
+{
+       int Foo ();
+}
+
+interface IC : IA, IBB
+{
+}
+
+public class Program
+{
+       static void Main ()
+       {
+               IC i = null;
+               i.Foo ();
+       }
+}
diff --git a/mcs/errors/cs0121-12.cs b/mcs/errors/cs0121-12.cs
new file mode 100644 (file)
index 0000000..27ac112
--- /dev/null
@@ -0,0 +1,18 @@
+// CS0121: The call is ambiguous between the following methods or properties: `D.Test(bool, string)' and `D.Test(bool, int, string)'
+// Line: 16
+
+public class D
+{
+       static void Test (bool b, string a = "s")
+       {
+       }
+
+       static void Test (bool b, int i = 9, string a = "b")
+       {
+       }
+
+       public static void Main ()
+       {
+               Test (false);
+       }
+}
index 75403fc34259a9f9ba0d1138a0493e6e2eda75a5..776941a35ff4066fb2c7dfb3149145053fb45ae0 100644 (file)
@@ -1,6 +1,5 @@
 // CS0121: The call is ambiguous between the following methods or properties: `C.Foo(byte)' and `C.Foo(int)'
 // Line: 18
-// Compiler options: -langversion:future
 
 class C
 {
diff --git a/mcs/errors/cs0122-33.cs b/mcs/errors/cs0122-33.cs
new file mode 100644 (file)
index 0000000..947bc19
--- /dev/null
@@ -0,0 +1,29 @@
+// CS0122: `M.Test<S.P>(I<S.P>)' is inaccessible due to its protection level
+// Line: 27
+
+interface I<T>
+{
+}
+
+struct S
+{
+       class P
+       {
+       }
+       
+       public class C : I<P>
+       {
+       }
+}
+
+class M
+{
+       static void Test<T>(I<T> iface)
+       {
+       }
+
+       static void Test()
+       {
+               Test (new S.C ());
+       }
+}
index cd80d6fb0ed0c74f7410e4110e47157f448f5d8c..638012bc837e5be6b38df82b8f6a083905e2ee35 100644 (file)
@@ -1,5 +1,5 @@
-// cs0122-9.cs: `X.a' is inaccessible due to its protection level
-// Line: 11
+// CS0122: `X.a' is inaccessible due to its protection level
+// Line: 16
 
 public class X {
        private int a {
@@ -9,18 +9,12 @@ public class X {
        }
 }
 
-internal class Y : X {
-
+internal class Y : X
+{
        int D (X x)
        {
                if (x.a == 2)
                        return 0;
                return 0;
        }
-
-       static void Main ()
-       {
-       }
 }
-
-       
diff --git a/mcs/errors/cs0182-11.cs b/mcs/errors/cs0182-11.cs
new file mode 100644 (file)
index 0000000..e717b64
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
+// Line: 13
+
+using System;
+
+class MyAttribute : Attribute
+{
+       public MyAttribute (object s)
+       {
+       }
+}
+
+[My (decimal.MaxValue)]
+class X
+{
+}
diff --git a/mcs/errors/cs0243-2.cs b/mcs/errors/cs0243-2.cs
new file mode 100644 (file)
index 0000000..2330937
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0243: Conditional not valid on `MyClass.GetHashCode()' because it is an override method
+// Line: 6
+
+public class MyClass
+{
+       [System.Diagnostics.Conditional ("WOOHOO")]
+       public override int GetHashCode ()
+       {
+               return base.GetHashCode ();
+       }
+}
diff --git a/mcs/errors/cs0246-22.cs b/mcs/errors/cs0246-22.cs
new file mode 100644 (file)
index 0000000..e675a30
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0246: The type or namespace name `var' could not be found. Are you missing a using directive or an assembly reference?
+// Line: 8
+
+class C
+{
+       public static void Main ()
+       {
+               var[] v = new int[0];
+       }
+}
index 11098ff6a88c09cdf71604e773fa479b0c750802..761563e1bb6c803fb0dd38b35408b70dd93a3ebb 100644 (file)
@@ -1,4 +1,4 @@
-// cs0283-2.cs: The type `S' cannot be declared const
+// CS0283: The type `S' cannot be declared const
 // Line: 12
 
 struct S
diff --git a/mcs/errors/cs0283-4.cs b/mcs/errors/cs0283-4.cs
new file mode 100644 (file)
index 0000000..62fa370
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0283: The type `int?' cannot be declared const
+// Line: 8
+
+class C
+{
+       void Test ()
+       {
+               const int? ac = null;
+       }
+}
index 70086ce9f7377b4a5dbafdeb6b5c10f521d7e0d8..31ac6c678a13ff83e6a525c6a05a79c79e0367d6 100644 (file)
@@ -1,4 +1,4 @@
-// cs0283.cs: The type `S' cannot be declared const
+// CS0283: The type `S' cannot be declared const
 // Line: 10
 
 struct S
diff --git a/mcs/errors/cs0509-4.cs b/mcs/errors/cs0509-4.cs
new file mode 100644 (file)
index 0000000..d40c7f3
--- /dev/null
@@ -0,0 +1,6 @@
+// CS0509: `A': cannot derive from sealed type `System.Action'
+// Line: 4
+
+class A : System.Action
+{
+}
diff --git a/mcs/errors/cs0534-6.cs b/mcs/errors/cs0534-6.cs
new file mode 100644 (file)
index 0000000..ce702be
--- /dev/null
@@ -0,0 +1,7 @@
+// CS0534: `M' does not implement inherited abstract member `B.BMethod()'
+// Line: 5
+// Compiler options: -r:CS0534-6-lib.dll
+
+class M : C
+{
+}
diff --git a/mcs/errors/cs0542-4.cs b/mcs/errors/cs0542-4.cs
new file mode 100644 (file)
index 0000000..b9d831e
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0542: `C.C<T>()': member names cannot be the same as their enclosing type
+// Line: 6
+
+class C
+{
+       public static void C<T> ()
+       {
+       }
+}
+
index 0fc21238475d550e7beb2f912680847e05064f45..a029d4168452d97169467cc18d8a533c642b3864 100644 (file)
@@ -1,4 +1,4 @@
-// cs0617-2.cs: `foo3' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
+// CS0617: `foo3' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
 // Line: 11
 
 class BazAttribute : System.Attribute 
diff --git a/mcs/errors/cs0617-4.cs b/mcs/errors/cs0617-4.cs
new file mode 100644 (file)
index 0000000..4f94f3b
--- /dev/null
@@ -0,0 +1,14 @@
+// CS0617: `Foo' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
+// Line: 11
+
+using System;
+
+public sealed class FooAttribute : Attribute
+{
+       internal int Foo;
+}
+
+[Foo (Foo = 1)]
+public class Tests
+{
+}
diff --git a/mcs/errors/cs0617-5.cs b/mcs/errors/cs0617-5.cs
new file mode 100644 (file)
index 0000000..e9a49b2
--- /dev/null
@@ -0,0 +1,14 @@
+// CS0617: `Foo' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
+// Line: 11
+
+using System;
+
+public sealed class FooAttribute : Attribute
+{
+       public short Foo { get; private set; }
+}
+
+[Foo (Foo = 1)]
+public class Tests
+{
+}
index 04a97a9f2a36b933becb2ce19c64e7077260f0bc..b8d8ab726ed53c008998c80c4cfa361f549ca857 100644 (file)
@@ -1,26 +1,25 @@
-// cs0617.cs: `MyNamedArg' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
-// Line : 20
+// CS0617: `MyNamedArg' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
+// Line : 19
 
 using System;
 
 [AttributeUsage (AttributeTargets.Class, AllowMultiple = true)]
-       public class SimpleAttribute : Attribute {
+public class SimpleAttribute : Attribute
+{
+       string name;
 
-               string name = null;
-
-               public readonly string MyNamedArg;
-               
-               public SimpleAttribute (string name)
-               {
-                       this.name = name;
-               }
+       public readonly string MyNamedArg;
 
+       public SimpleAttribute (string name)
+       {
+               this.name = name;
        }
+}
 
 [Simple ("Dummy", MyNamedArg = "Dude!")]
-       public class Blah {
+public class Blah {
 
-               public static void Main ()
-               {
-               }
+       public static void Main ()
+       {
        }
+}
diff --git a/mcs/errors/cs1024-3.cs b/mcs/errors/cs1024-3.cs
new file mode 100644 (file)
index 0000000..954adbb
--- /dev/null
@@ -0,0 +1,16 @@
+// CS1024: Wrong preprocessor directive
+// Line: 12
+
+using System;
+
+class C
+{
+       static void Main ()
+       {
+#if AA
+               Console.WriteLine ("DEBUG mode");
+# something not valid here
+               Console.WriteLine ("NON-DEBUG mode");
+#endif
+       }
+}
diff --git a/mcs/errors/cs1031.cs b/mcs/errors/cs1031.cs
new file mode 100644 (file)
index 0000000..1e37e8e
--- /dev/null
@@ -0,0 +1,20 @@
+// CS1031: Type expected
+// Line: 17
+
+using System;
+
+class C<T>
+{
+       class G<U>
+       {
+       }
+}
+
+class M
+{
+       public static void Main ()
+       {
+               Type t = typeof (C<int>.G<>);
+       }
+}
+
diff --git a/mcs/errors/cs1503-11.cs b/mcs/errors/cs1503-11.cs
new file mode 100644 (file)
index 0000000..2961fd4
--- /dev/null
@@ -0,0 +1,15 @@
+// CS1503: Argument `#1' cannot convert `null' expression to type `__arglist'
+// Line: 8
+
+class C
+{
+       void Foo ()
+       {
+               InstanceArgList (null);
+       }
+       
+       int InstanceArgList (__arglist)
+       {
+               return 54;
+       }
+}
diff --git a/mcs/errors/cs1540-14.cs b/mcs/errors/cs1540-14.cs
new file mode 100644 (file)
index 0000000..90c65b5
--- /dev/null
@@ -0,0 +1,11 @@
+// CS1540: Cannot access protected member `object.MemberwiseClone()' via a qualifier of type `anonymous type'. The qualifier must be of type `A' or derived from it
+// Line: 9
+
+class A
+{
+       public A ()
+       {
+               var x = new { s = "-" };
+               x.MemberwiseClone();
+       }
+}
diff --git a/mcs/errors/cs1622-3.cs b/mcs/errors/cs1622-3.cs
new file mode 100644 (file)
index 0000000..c53b064
--- /dev/null
@@ -0,0 +1,25 @@
+// CS1622: Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration
+// Line: 21
+
+using System.Collections.Generic;
+
+namespace McsDiff
+{
+       class MyObj
+       {
+       }
+       
+       class MainClass
+       {
+               protected static IEnumerable<MyObj> GetStuff ()
+               {
+                       yield return null;
+                       
+                       try {
+                       }
+                       catch {
+                               return;
+                       }
+               }
+       }
+}
diff --git a/mcs/errors/cs1622-4.cs b/mcs/errors/cs1622-4.cs
new file mode 100644 (file)
index 0000000..8fa41c1
--- /dev/null
@@ -0,0 +1,25 @@
+// CS1622: Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration
+// Line: 21
+
+using System.Collections.Generic;
+
+namespace McsDiff
+{
+       class MyObj
+       {
+       }
+       
+       class MainClass
+       {
+               protected static IEnumerable<MyObj> GetStuff ()
+               {
+                       yield return null;
+                       
+                       try {
+                       }
+                       catch {
+                               return true;
+                       }
+               }
+       }
+}
diff --git a/mcs/errors/cs1695-2.cs b/mcs/errors/cs1695-2.cs
new file mode 100644 (file)
index 0000000..c424b4d
--- /dev/null
@@ -0,0 +1,5 @@
+// CS1695: Invalid #pragma checksum syntax. Expected "filename" "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" "XXXX..."
+// Line: 5
+// Compiler options: -warnaserror
+
+#pragma checksum "foo.txt" "{00000000-0000-0000-0000-000000000000}" "M"
diff --git a/mcs/errors/cs1695-3.cs b/mcs/errors/cs1695-3.cs
new file mode 100644 (file)
index 0000000..a13458a
--- /dev/null
@@ -0,0 +1,5 @@
+// CS1695: Invalid #pragma checksum syntax. Expected "filename" "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" "XXXX..."
+// Line: 5
+// Compiler options: -warnaserror
+
+#pragma checksum "foo.txt" "{00000000-0000-0000 -0000-000000000000}" ""
diff --git a/mcs/errors/cs1695.cs b/mcs/errors/cs1695.cs
new file mode 100644 (file)
index 0000000..691072b
--- /dev/null
@@ -0,0 +1,5 @@
+// CS1695: Invalid #pragma checksum syntax. Expected "filename" "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" "XXXX..."
+// Line: 5
+// Compiler options: -warnaserror
+
+#pragma checksum "" ID
diff --git a/mcs/errors/cs1696.cs b/mcs/errors/cs1696.cs
new file mode 100644 (file)
index 0000000..87b2234
--- /dev/null
@@ -0,0 +1,6 @@
+// CS1696: Single-line comment or end-of-line expected
+// Line: 5
+// Compiler options: -warnaserror
+
+#pragma warning disable 659 /* overrides Equals but not GetHashCode */
+#pragma warning restore
diff --git a/mcs/errors/cs1699-2.cs b/mcs/errors/cs1699-2.cs
new file mode 100644 (file)
index 0000000..512a650
--- /dev/null
@@ -0,0 +1,7 @@
+// CS1699: Use compiler option `keycontainer' or appropriate project settings instead of `AssemblyKeyNameAttribute' attribute
+// Line: 7
+// Compiler options: -warnaserror -warn:4
+
+using System.Reflection;
+
+[assembly:AssemblyKeyNameAttribute ("container")]
diff --git a/mcs/errors/cs1699-3.cs b/mcs/errors/cs1699-3.cs
new file mode 100644 (file)
index 0000000..f9e4878
--- /dev/null
@@ -0,0 +1,7 @@
+// CS1699: Use compiler option `keyfile' or appropriate project settings instead of `AssemblyKeyFile' attribute
+// Line: 7
+// Compiler options: -warnaserror -warn:4
+
+using System.Reflection;
+
+[assembly:AssemblyKeyFile ("InternalsVisibleTest.snk")]
diff --git a/mcs/errors/cs1699.cs b/mcs/errors/cs1699.cs
new file mode 100644 (file)
index 0000000..ff2669b
--- /dev/null
@@ -0,0 +1,7 @@
+// CS1699: Use compiler option `delaysign' or appropriate project settings instead of `AssemblyDelaySign' attribute
+// Line: 7
+// Compiler options: -warnaserror -warn:4
+
+using System.Reflection;
+
+[assembly:AssemblyDelaySign (true)]
diff --git a/mcs/errors/cs1706-4.cs b/mcs/errors/cs1706-4.cs
new file mode 100644 (file)
index 0000000..887684b
--- /dev/null
@@ -0,0 +1,17 @@
+// CS1706: Anonymous methods and lambda expressions cannot be used in the current context
+// Line: 13
+
+using System;
+
+delegate int TestDelegate();
+
+class MyAttr : Attribute
+{
+       public MyAttr (TestDelegate d) { }
+}
+
+[MyAttr (() => 1)]
+class C
+{
+}
+
diff --git a/mcs/errors/cs1709.cs b/mcs/errors/cs1709.cs
new file mode 100644 (file)
index 0000000..d96a207
--- /dev/null
@@ -0,0 +1,5 @@
+// CS1709: Filename specified for preprocessor directive is empty
+// Line: 5
+// Compiler options: -warnaserror
+
+#pragma checksum "" "{ee1816fc-aa5e-4d10-8ff7-6f4963833f60}" ""
index 14d1f7ca208c816a3be2c19bbe7143687d88526e..a3b3a32e6e360270488e19bbb4ab78ac2e34fab5 100644 (file)
@@ -1,6 +1,5 @@
 // CS1744: Named argument `a' cannot be used for a parameter which has positional argument specified
 // Line: 12
-// Compiler options: -langversion:future
 
 static class C
 {
diff --git a/mcs/errors/cs1763-2.cs b/mcs/errors/cs1763-2.cs
new file mode 100644 (file)
index 0000000..72f5370
--- /dev/null
@@ -0,0 +1,9 @@
+// CS1763: Optional parameter `o' of type `object' can only be initialized with `null'
+// Line: 6
+
+class C
+{
+       public static void Test (object o = 9, params object[] args)
+       {
+       }
+}
index f6ea5a67366c5b28d0d90c04960f55003658cc30..d10a7bf2c2037f54d6a66aab2b211a39b95d2cc8 100644 (file)
@@ -1,6 +1,5 @@
 // CS1763: Optional parameter `o' of type `object' can only be initialized with `null'
 // Line: 6
-// Compiler options: -langversion:future
 
 class C
 {
diff --git a/mcs/errors/dcs0019.cs b/mcs/errors/dcs0019.cs
new file mode 100644 (file)
index 0000000..fcb4e89
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0019: Cannot implicitly convert type `dynamic' to `int*'
+// Line: 10
+// Compiler options: -unsafe
+
+public unsafe class C
+{
+       public static void Main ()
+       {
+               dynamic d = 1;
+               int* i = d;
+       }
+}
diff --git a/mcs/errors/dcs0160.cs b/mcs/errors/dcs0160.cs
new file mode 100644 (file)
index 0000000..7f2341d
--- /dev/null
@@ -0,0 +1,20 @@
+// CS0160: A previous catch clause already catches all exceptions of this or a super type `C<dynamic>'
+// Line: 17
+
+class D<T> : C<object>
+{
+}
+
+class C<T> : System.Exception
+{
+}
+
+class ClassMain
+{
+       public static void Main ()
+       {
+               try { }
+               catch (C<dynamic>) { }
+               catch (D<object>) { }
+       }
+}
diff --git a/mcs/errors/dcs0182.cs b/mcs/errors/dcs0182.cs
deleted file mode 100644 (file)
index cbaafd0..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
-// Line: 13
-
-using System;
-
-class AAttribute : Attribute
-{
-       public AAttribute (dynamic X)
-       {
-       }
-}
-
-[A (Test.B)]
-class Test
-{
-       public static dynamic B;
-
-       static void Main ()
-       {
-       }
-}
diff --git a/mcs/errors/dcs1660.cs b/mcs/errors/dcs1660.cs
new file mode 100644 (file)
index 0000000..71cb0c2
--- /dev/null
@@ -0,0 +1,10 @@
+// CS1660: Cannot convert `lambda expression' to non-delegate type `dynamic'
+// Line: 8
+
+public class C
+{
+       public static void Main ()
+       {
+               dynamic d = () => 1;
+       }
+}
diff --git a/mcs/errors/dcs1966-3.cs b/mcs/errors/dcs1966-3.cs
new file mode 100644 (file)
index 0000000..59b15b7
--- /dev/null
@@ -0,0 +1,10 @@
+// CS1966: `C': cannot implement a dynamic interface `I<dynamic[]>'
+// Line: 8
+
+interface I<T>
+{
+}
+
+class C : I<dynamic[]>
+{
+}
diff --git a/mcs/errors/dcs1973.cs b/mcs/errors/dcs1973.cs
new file mode 100644 (file)
index 0000000..354e2a7
--- /dev/null
@@ -0,0 +1,15 @@
+// CS1973: Type `string' does not contain a member `Foo' and the best extension method overload `C.Foo(this string, dynamic)' cannot be dynamically dispatched. Consider calling the method without the extension method syntax
+// Line: 13
+
+static class C
+{
+       public static void Foo (this string s, dynamic d)
+       {
+       }
+
+       static void Main()
+       {
+               dynamic d = null;
+               "x".Foo (d);
+       }
+}
index 9a19b3c0ea68fd166c5ab04455db27d792ff90bd..643039ac9231499593949e84c3b7c867d2cf235d 100644 (file)
@@ -1,4 +1,4 @@
-// CS19806: Dynamic keyword requires `System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you missing System.Core.dll assembly reference?
+// CS1980: Dynamic keyword requires `System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you missing System.Core.dll assembly reference?
 // Line: 8
 // Compiler options: -noconfig
 
diff --git a/mcs/errors/dcs1981.cs b/mcs/errors/dcs1981.cs
new file mode 100644 (file)
index 0000000..6507a09
--- /dev/null
@@ -0,0 +1,12 @@
+// CS1981: Using `is' to test compatibility with `dynamic' is identical to testing compatibility with `object'
+// Line: 10
+// Compiler options: -warnaserror
+
+class C
+{
+       public static void Main ()
+       {
+               object o = null;
+               bool b = o is dynamic;
+       }
+}
diff --git a/mcs/errors/dcs1982-2.cs b/mcs/errors/dcs1982-2.cs
new file mode 100644 (file)
index 0000000..bbd7e16
--- /dev/null
@@ -0,0 +1,12 @@
+// CS01982: An attribute argument cannot be dynamic expression
+// Line: 6
+
+using System;
+
+[A((dynamic) null)]
+public class A : Attribute
+{
+       public A (Type arg)
+       {
+       }
+}
diff --git a/mcs/errors/dcs1982-3.cs b/mcs/errors/dcs1982-3.cs
new file mode 100644 (file)
index 0000000..7af87df
--- /dev/null
@@ -0,0 +1,12 @@
+// CS01982: An attribute argument cannot be dynamic expression
+// Line: 6
+
+using System;
+
+[A(typeof (dynamic[]))]
+public class A : Attribute
+{
+       public A (object arg)
+       {
+       }
+}
diff --git a/mcs/errors/dcs1982-4.cs b/mcs/errors/dcs1982-4.cs
new file mode 100644 (file)
index 0000000..8d3728e
--- /dev/null
@@ -0,0 +1,12 @@
+// CS01982: An attribute argument cannot be dynamic expression
+// Line: 6
+
+using System;
+
+[A(new dynamic [] { 8 })]
+public class A : Attribute
+{
+       public A (object arg)
+       {
+       }
+}
diff --git a/mcs/errors/dcs1982-5.cs b/mcs/errors/dcs1982-5.cs
new file mode 100644 (file)
index 0000000..58ea1c6
--- /dev/null
@@ -0,0 +1,12 @@
+// CS01982: An attribute argument cannot be dynamic expression
+// Line: 6
+
+using System;
+
+[A(typeof (Func<dynamic>))]
+public class A : Attribute
+{
+       public A (Type arg)
+       {
+       }
+}
diff --git a/mcs/errors/dcs1982.cs b/mcs/errors/dcs1982.cs
new file mode 100644 (file)
index 0000000..344638f
--- /dev/null
@@ -0,0 +1,21 @@
+// CS1982: An attribute argument cannot be dynamic expression
+// Line: 13
+
+using System;
+
+class AAttribute : Attribute
+{
+       public AAttribute (dynamic X)
+       {
+       }
+}
+
+[A (Test.B)]
+class Test
+{
+       public static dynamic B;
+
+       static void Main ()
+       {
+       }
+}
diff --git a/mcs/errors/gcs0119-2.cs b/mcs/errors/gcs0119-2.cs
new file mode 100644 (file)
index 0000000..5d67a55
--- /dev/null
@@ -0,0 +1,14 @@
+// CS0119: Expression denotes a `type', where a `variable' or `value' was expected
+// Line: 12
+public class Foo<T>
+{
+}
+class X
+{
+       static void Main ()
+       {
+               Foo<X> = new Foo<X> ();
+       }
+}
diff --git a/mcs/errors/gcs0131.cs b/mcs/errors/gcs0131.cs
deleted file mode 100644 (file)
index 80a8915..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
-// Line: 13
-using System;
-public class Foo<T>
-{
-}
-class X
-{
-       static void Main ()
-       {
-               Foo<X> = new Foo<X> ();
-       }
-}
diff --git a/mcs/errors/gcs0266-6.cs b/mcs/errors/gcs0266-6.cs
new file mode 100644 (file)
index 0000000..efa355d
--- /dev/null
@@ -0,0 +1,22 @@
+// CS0266: Cannot implicitly convert type `System.Collections.Generic.IList<int>' to `Hoge<System.Collections.Generic.IList<int>>'. An explicit conversion exists (are you missing a cast?)
+// Line: 20
+
+using System;
+using System.Collections.Generic;
+
+public class Hoge<T>
+{
+       public static implicit operator Hoge<T> (T value)
+       {
+               return null;
+       }
+}
+
+public class Test
+{
+       static void Main ()
+       {
+               IList<int> x = new List<int> ();
+               Hoge<IList<int>> hoge = x;
+       }
+}
diff --git a/mcs/errors/gcs0411-17.cs b/mcs/errors/gcs0411-17.cs
new file mode 100644 (file)
index 0000000..a0f37af
--- /dev/null
@@ -0,0 +1,20 @@
+// CS0411: The type arguments for method `C.Test<T>(System.Func<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
+// Line: 14
+
+using System;
+
+interface IB
+{
+}
+
+class C
+{
+       public static void Main ()
+       {
+               Test (() => { if (true) return (C) null; return (IB) null; });
+       }
+       
+       static void Test<T> (Func<T> f)
+       {
+       }
+}
diff --git a/mcs/errors/gcs0416-3.cs b/mcs/errors/gcs0416-3.cs
new file mode 100644 (file)
index 0000000..b6eed9b
--- /dev/null
@@ -0,0 +1,22 @@
+// CS0416: `C<T>.N': an attribute argument cannot use type parameters
+// Line: 17
+
+using System;
+
+public class TestAttribute : Attribute
+{
+       public TestAttribute(Type type)
+       {
+       }
+}
+
+class C<T>
+{
+       class N
+       {
+               [Test(typeof(N))]
+               public static void Foo()
+               {
+               }
+       }
+}
diff --git a/mcs/errors/gcs1113-2.cs b/mcs/errors/gcs1113-2.cs
new file mode 100644 (file)
index 0000000..5043b34
--- /dev/null
@@ -0,0 +1,25 @@
+// CS1113: Extension method `Extension.Foo(this S)' of value type `S' cannot be used to create delegates
+// Line: 11
+
+delegate void D ();
+
+public class C
+{
+       static void Main ()
+       {
+               S s = new S ();
+               D d = s.Foo;
+       }
+}
+
+public struct S
+{
+       public void Foo (int i)
+       {
+       }
+}
+
+public static class Extension
+{
+       public static void Foo (this S s) { }
+}
index 6ad25380bb402c63e8641fea188f7218cfea46e0..9a1e4fdc649baff39fbb9e5b44c2707de0c3f384 100644 (file)
@@ -19,7 +19,32 @@ cs1041.cs # new in GMCS; grammar issue
 cs0457-2.cs
 cs0457.cs
 
-cs1540-6.cs
-cs1540-9.cs
+cs1540-6.cs NO ERROR
 
 dcs0165.cs NO ERROR # Bug 593369
+
+# all the following are from bug #628673
+dcs1965.cs NO ERROR
+dcs1979.cs
+gcs0122-2.cs
+gcs0307-6.cs
+gcs0308-7.cs
+cs0023-11.cs
+cs0111-3.cs
+cs0122-19.cs
+cs0122-28.cs
+cs0122-8.cs
+cs0177-8.cs NO ERROR
+cs0419.cs
+cs0520.cs
+cs0844-2.cs
+cs0844.cs
+cs1574-2.cs
+cs1574-3.cs NO ERROR
+cs1574-6.cs NO ERROR
+cs1574-8.cs NO ERROR
+cs1581-2.cs
+cs1581.cs
+cs1584.cs
+cs1612-6.cs NO ERROR
+cs3006-7.cs NO ERROR
index b5935702e79448ff1a3a9946fcb202dd2365dfb5..4c52704230d9f9835709a68981ca362eab7241e5 100644 (file)
@@ -20,3 +20,27 @@ cs0457-2.cs
 cs0457.cs
 
 cs1540-6.cs NO ERROR Is it real error
+
+# all the following are from bug #628673
+gcs0122-2.cs
+gcs0307-6.cs
+gcs0308-7.cs
+cs0023-11.cs
+cs0111-3.cs
+cs0122-19.cs
+cs0122-28.cs
+cs0122-8.cs
+cs0177-8.cs NO ERROR
+cs0419.cs
+cs0520.cs
+cs0844-2.cs
+cs0844.cs
+cs1574-2.cs
+cs1574-3.cs NO ERROR
+cs1574-6.cs NO ERROR
+cs1574-8.cs NO ERROR
+cs1581-2.cs
+cs1581.cs
+cs1584.cs
+cs1612-6.cs NO ERROR
+cs3006-7.cs NO ERROR
index b94d64121b1a36638fffc5c6fdd68b3f5c57b352..014ae7a3d1d1c12eac7abf44cc68dff25faa1602 100644 (file)
@@ -2158,9 +2158,7 @@ method_decl               : D_EMITBYTE int32
 \r
                                 if (param == null) {\r
                                         Report.Warning (tokenizer.Location, String.Format ("invalid param index ({0}) with .param", index));\r
-                                        break;\r
-                                }\r
-                                if ($5 != null)\r
+                                } else if ($5 != null)\r
                                         param.AddDefaultValue ((Constant) $5);\r
                           }\r
                        | param_type_decl\r
index 9e50b38d869a664aa77b8a0fb7d3cabaadb39b7e..2aade48dac2fcdf29bd5c0cee576b6f3bfe2a385 100644 (file)
@@ -249,6 +249,7 @@ extern int nsyms;
 extern int ntokens;
 extern int nvars;
 extern int ntags;
+extern int nmethods;
 
 extern char *line_format;
 extern char *default_line_format;
@@ -258,6 +259,7 @@ extern char  **symbol_name;
 extern short *symbol_value;
 extern short *symbol_prec;
 extern char  *symbol_assoc;
+extern char  **methods;
 
 extern short *ritem;
 extern short *rlhs;
index c074824b402eb47d47b10755e5d5612c0b8be3b4..b47867d3e33a68754ca2e1b82624d5a6897a0bcb 100644 (file)
@@ -76,12 +76,14 @@ int nrules;
 int nsyms;
 int ntokens;
 int nvars;
+int nmethods;
 
 int   start_symbol;
 char  **symbol_name;
 short *symbol_value;
 short *symbol_prec;
 char  *symbol_assoc;
+char  **methods;
 
 short *ritem;
 short *rlhs;
index 41ebfb1dac3a1248443cfd157e18f9b132ecb94f..d1e2c14a1b2a2b933a253292c17084d4a78125bf 100644 (file)
@@ -103,10 +103,21 @@ output_rule_data()
     register int i;
     register int j;
 
+       printf("/*\n All more than 3 lines long rules are wrapped into a method\n*/\n");
+
+    for (i = 0; i < nmethods; ++i)
+       {
+               printf("%s", methods[i]);
+               FREE(methods[i]);
+               printf("\n\n");
+       }
+       FREE(methods);
+
+       printf(default_line_format, ++outline + 1);
 
     printf("  %s static %s short [] yyLhs  = {%16d,",
           csharp ? "" : " protected",
-          csharp ? "" : " final",
+          csharp ? "readonly" : "final",
            symbol_value[start_symbol]);
 
     j = 10;
@@ -128,7 +139,7 @@ output_rule_data()
 
     printf("  %s static %s short [] yyLen = {%12d,",
           csharp ? "" : "protected",
-          csharp ? "" : "final",
+          csharp ? "readonly" : "final",
           2);
 
     j = 10;
@@ -156,7 +167,7 @@ output_yydefred()
 
     printf("  %s static %s short [] yyDefRed = {%13d,",
           csharp ? "" : "protected",
-          csharp ? "" : "final",          
+          csharp ? "readonly" : "final",          
            (defred[0] ? defred[0] - 2 : 0));
 
     j = 10;
@@ -298,7 +309,7 @@ goto_actions()
     state_count = NEW2(nstates, short);
 
     k = default_goto(start_symbol + 1);
-    printf("  protected static %s short [] yyDgoto  = {%14d,", csharp ? "" : "final", k);
+    printf("  protected static %s short [] yyDgoto  = {%14d,", csharp ? "readonly" : "final", k);
     save_column(start_symbol + 1, k);
 
     j = 10;
@@ -622,7 +633,7 @@ output_base()
 {
     register int i, j;
 
-    printf("  protected static %s short [] yySindex = {%13d,", csharp?"":"final", base[0]);
+    printf("  protected static %s short [] yySindex = {%13d,", csharp? "readonly":"final", base[0]);
 
     j = 10;
     for (i = 1; i < nstates; i++)
@@ -641,7 +652,7 @@ output_base()
 
     outline += 2;
     printf("\n  };\n  protected static %s short [] yyRindex = {%13d,",
-          csharp ? "" : "final",
+          csharp ? "readonly" : "final",
            base[nstates]);
 
     j = 10;
@@ -661,7 +672,7 @@ output_base()
 
     outline += 2;
     printf("\n  };\n  protected static %s short [] yyGindex = {%13d,",
-          csharp ? "" : "final",
+          csharp ? "readonly" : "final",
            base[2*nstates]);
 
     j = 10;
@@ -691,7 +702,7 @@ output_table()
     register int i;
     register int j;
 
-    printf("  protected static %s short [] yyTable = {%14d,", csharp ? "" : "final", table[0]);
+    printf("  protected static %s short [] yyTable = {%14d,", csharp ? "readonly" : "final", table[0]);
 
     j = 10;
     for (i = 1; i <= high; i++)
@@ -721,7 +732,7 @@ output_check()
     register int j;
 
     printf("  protected static %s short [] yyCheck = {%14d,",
-          csharp ? "" : "final",
+          csharp ? "readonly" : "final",
            check[0]);
 
     j = 10;
@@ -851,13 +862,13 @@ output_debug()
     char * prefix = tflag ? "" : "//t";
 
     ++outline;
-    printf("  protected static %s int yyFinal = %d;\n", csharp ? "" : "final", final_state);
+    printf("  protected %s int yyFinal = %d;\n", csharp ? "const" : "static final", final_state);
 
       ++outline;
          printf ("%s // Put this array into a separate class so it is only initialized if debugging is actually used\n", prefix);
          printf ("%s // Use MarshalByRefObject to disable inlining\n", prefix);
          printf("%s class YYRules %s {\n", prefix, csharp ? ": MarshalByRefObject" : "");
-      printf("%s  public static %s string [] yyRule = {\n", prefix, csharp ? "" : "final");
+      printf("%s  public static %s string [] yyRule = {\n", prefix, csharp ? "readonly" : "final");
       for (i = 2; i < nrules; ++i)
       {
          printf("%s    \"%s :", prefix, symbol_name[rlhs[i]]);
@@ -920,7 +931,7 @@ output_debug()
 
        /* need yyNames for yyExpecting() */
 
-      printf("  protected static %s string [] yyNames = {", csharp ? "" : "final");
+      printf("  protected static %s string [] yyNames = {", csharp ? "readonly" : "final");
       symnam = (char **) MALLOC((max+1)*sizeof(char *));
       if (symnam == 0) no_space();
   
index 7096a6b4bba1c3c1c007423b833e85067198ce01..f089456ed71d055a0b53782d49a383efd0795571 100644 (file)
@@ -68,6 +68,8 @@ bucket **pitem;
 int maxrules;
 bucket **plhs;
 
+int maxmethods;
+
 int name_pool_size;
 char *name_pool;
 
@@ -846,6 +848,7 @@ initialize_grammar()
     pitem[2] = 0;
     pitem[3] = 0;
 
+       nmethods = 0;
     nrules = 3;
     maxrules = 100;
     plhs = (bucket **) MALLOC(maxrules*sizeof(bucket *));
@@ -1037,21 +1040,25 @@ copy_action()
     int depth;
     int quote;
     char *tag;
-    register FILE *f = action_file;
+    FILE *f = action_file;
     int a_lineno = lineno;
     char *a_line = dup_line();
     char *a_cptr = a_line + (cptr - line);
+       char buffer [10000];
+       int len = 0;
+       int comment_lines = 0;
+       char *mbody;
+       memset (buffer, 0, 10000);
 
     if (last_was_action)
        insert_empty_rule();
     last_was_action = 1;
 
     fprintf(f, "case %d:\n", nrules - 2);
-    fprintf(f, line_format, lineno, input_file_name);
-    putc(' ', f); putc(' ', f);
     if (*cptr == '=') ++cptr;
 
     n = 0;
+
     for (i = nitems - 1; pitem[i]; --i) ++n;
 
     depth = 0;
@@ -1069,9 +1076,13 @@ loop:
            tag = get_tag(1);
            c = *cptr;
            if (c == '$')
-           {   if (tag && strcmp(tag, "Object"))
-                                       fprintf(f, "((%s)yyVal)", tag);
-               else fprintf(f, "yyVal");
+           {   
+                       if (tag && strcmp(tag, "Object")) {
+                               len += sprintf(buffer + len, "((%s)yyVal)", tag);
+                       } else {
+                               strcat (buffer + len, "yyVal");
+                               len += 5;
+                       }
                ++cptr;
                FREE(d_line);
                goto loop;
@@ -1081,8 +1092,9 @@ loop:
                i = get_number();
                if (i > n) dollar_warning(d_lineno, i);
                if (tag && strcmp(tag, "Object"))
-                       fprintf(f, "((%s)yyVals[%d+yyTop])", tag, i - n);
-               else fprintf(f, "yyVals[%d+yyTop]", i - n);
+                       len += sprintf(buffer + len, "((%s)yyVals[%d+yyTop])", tag, i - n);
+               else
+                       len += sprintf(buffer + len, "yyVals[%d+yyTop]", i - n);
                FREE(d_line);
                goto loop;
            }
@@ -1091,8 +1103,9 @@ loop:
                ++cptr;
                i = -get_number() - n;
                if (tag && strcmp(tag, "Object"))
-                       fprintf(f, "((%s)yyVals[%d+yyTop])", tag, i);
-               else fprintf(f, "yyVals[%d+yyTop]", i);
+                       len += sprintf(buffer + len, "((%s)yyVals[%d+yyTop])", tag, i);
+               else
+                       len += sprintf(buffer + len, "yyVals[%d+yyTop]", i);
                FREE(d_line);
                goto loop;
            }
@@ -1103,7 +1116,8 @@ loop:
        {
            if (ntags && plhs[nrules]->tag == 0)
                untyped_lhs();
-           fprintf(f, "yyVal");
+               strcat (buffer, "yyVal");
+               len += 5;
            cptr += 2;
            goto loop;
        }
@@ -1118,17 +1132,18 @@ loop:
                tag = pitem[nitems + i - n - 1]->tag;
                if (tag == 0)
                    untyped_rhs(i, pitem[nitems + i - n - 1]->name),
-                   fprintf(f, "yyVals[%d+yyTop]", i - n);
+                   len += sprintf(buffer + len, "yyVals[%d+yyTop]", i - n);
                else if (strcmp(tag, "Object"))
-                   fprintf(f, "((%s)yyVals[%d+yyTop])", tag, i - n);
+                   len += sprintf(buffer + len, "((%s)yyVals[%d+yyTop])", tag, i - n);
                else
-                   fprintf(f, "yyVals[%d+yyTop]", i - n);
+                   len += sprintf(buffer + len, "yyVals[%d+yyTop]", i - n);
            }
            else
            {
                if (i > n)
                    dollar_warning(lineno, i);
-               fprintf(f, "yyVals[%d+yyTop]", i - n);
+
+               len += sprintf(buffer + len,"yyVals[%d+yyTop]", i - n);
            }
            goto loop;
        }
@@ -1138,7 +1153,7 @@ loop:
            i = get_number();
            if (ntags)
                unknown_rhs(-i);
-           fprintf(f, "yyVals[%d+yyTop]", -i - n);
+           len += sprintf(buffer + len, "yyVals[%d+yyTop]", -i - n);
            goto loop;
        }
     }
@@ -1146,12 +1161,12 @@ loop:
     {
        do
        {
-           putc(c, f);
+           buffer[len++] = c;
            c = *++cptr;
        } while (isalnum(c) || c == '_' || c == '$');
        goto loop;
     }
-    putc(c, f);
+       buffer[len++] = c;
     ++cptr;
     switch (c)
     {
@@ -1163,8 +1178,7 @@ loop:
 
     case ';':
        if (depth > 0) goto loop;
-       fprintf(f, "\nbreak;\n");
-       return;
+       break;
 
     case '{':
        ++depth;
@@ -1172,8 +1186,7 @@ loop:
 
     case '}':
        if (--depth > 0) goto loop;
-       fprintf(f, "\n  break;\n");
-       return;
+       break;
 
     case '\'':
     case '"':
@@ -1186,7 +1199,7 @@ loop:
            for (;;)
            {
                c = *cptr++;
-               putc(c, f);
+               buffer[len++] = c;
                if (c == quote)
                {
                    FREE(s_line);
@@ -1197,7 +1210,7 @@ loop:
                if (c == '\\')
                {
                    c = *cptr++;
-                   putc(c, f);
+                   buffer[len++] = c;
                    if (c == '\n')
                    {
                        get_line();
@@ -1212,15 +1225,19 @@ loop:
        c = *cptr;
        if (c == '/')
        {
-           putc('*', f);
+           buffer[len++] = '*';
            while ((c = *++cptr) != '\n')
            {
-               if (c == '*' && cptr[1] == '/')
-                   fprintf(f, "* ");
-               else
-                   putc(c, f);
-           }
-           fprintf(f, "*/\n");
+                       if (c == '*' && cptr[1] == '/'){
+                               buffer[len++] = '*';
+                               buffer[len++] = ' ';
+                       } else {
+                               buffer[len++] = c;
+                       }
+               }
+           buffer[len++] = '*';
+               buffer[len++] = '/';
+               buffer[len++] = '\n';
            goto next_line;
        }
        if (c == '*')
@@ -1229,21 +1246,22 @@ loop:
            char *c_line = dup_line();
            char *c_cptr = c_line + (cptr - line - 1);
 
-           putc('*', f);
+           buffer[len++] = '*';
            ++cptr;
            for (;;)
            {
                c = *cptr++;
-               putc(c, f);
+               buffer[len++] = c;
                if (c == '*' && *cptr == '/')
                {
-                   putc('/', f);
+                   buffer[len++] = '/';
                    ++cptr;
                    FREE(c_line);
                    goto loop;
                }
                if (c == '\n')
                {
+                       ++comment_lines;
                    get_line();
                    if (line == 0)
                        unterminated_comment(c_lineno, c_line, c_cptr);
@@ -1255,6 +1273,49 @@ loop:
     default:
        goto loop;
     }
+
+       if (comment_lines > 0)
+               comment_lines++;
+
+       if ((lineno - (a_lineno + comment_lines)) > 2)
+       {
+               char mname[20];
+               char line_define[256];
+
+               sprintf(mname, "case_%d()", nrules - 2);
+
+               putc(' ', f); putc(' ', f);
+               fputs(mname, f);
+               fprintf(f, ";");
+               if (nmethods == 0)
+               {
+                       maxmethods = 100;
+                       methods = NEW2(maxmethods, char *);
+               }
+               else if (nmethods == maxmethods)
+               {
+                       maxmethods += 500;
+                       methods = REALLOC (methods, maxmethods*sizeof(char *));
+               }
+
+               sprintf(line_define, line_format, a_lineno, input_file_name);
+
+               mbody = NEW2(5+strlen(line_define)+1+strlen(mname)+strlen(buffer)+1, char);
+               strcpy(mbody, "void ");
+               strcat(mbody, mname);
+               strcat(mbody, "\n");
+               strcat(mbody, line_define);
+               strcat(mbody, buffer);
+               methods[nmethods++] = mbody;
+       }
+       else
+       {
+           fprintf(f, line_format, lineno, input_file_name);
+               putc(' ', f); putc(' ', f);
+               fwrite(buffer, 1, len, f);
+       }
+
+       fprintf(f, "\n  break;\n");
 }
 
 
index db18294b1b27a8dec4392c2e5f1b97c87240bef5..f8fc4370b1f0ce3444f60b08a4e1985cdad3deea 100644 (file)
@@ -126,6 +126,10 @@ t    this.debug = (yydebug.yyDebug)yyd;
 .      static int[] global_yyStates;
 .      static object[] global_yyVals;
 .      protected bool use_global_stacks;
+.      object[] yyVals;                                        // value stack
+.      object yyVal;                                           // value stack ptr
+.      int yyToken;                                            // current input
+.      int yyTop;
 .
 .  /** the generated parser.
 .      Maintains a state and a value stack, currently with fixed maximum size.
@@ -138,9 +142,8 @@ t    this.debug = (yydebug.yyDebug)yyd;
 .    if (yyMax <= 0) yyMax = 256;              // initial size
 .    int yyState = 0;                   // state stack ptr
 .    int [] yyStates;                  // state stack 
-.    Object yyVal = null;                // value stack ptr
-.    Object [] yyVals;                                 // value stack
-.    int yyToken = -1;                                 // current input
+.    yyVal = null;
+.    yyToken = -1;
 .    int yyErrorFlag = 0;                              // #tks to shift
 .      if (use_global_stacks && global_yyStates != null) {
 .              yyVals = global_yyVals;
@@ -156,7 +159,7 @@ t    this.debug = (yydebug.yyDebug)yyd;
 .
  local         ## %{ ... %} after the first %%
 
-.    /*yyLoop:*/ for (int yyTop = 0;; ++ yyTop) {
+.    /*yyLoop:*/ for (yyTop = 0;; ++ yyTop) {
 .      if (yyTop >= yyStates.Length) {                 // dynamically increase
 .        global::System.Array.Resize (ref yyStates, yyStates.Length+yyMax);
 .        global::System.Array.Resize (ref yyVals, yyVals.Length+yyMax);
@@ -165,7 +168,7 @@ t    this.debug = (yydebug.yyDebug)yyd;
 .      yyVals[yyTop] = yyVal;
 t      if (debug != null) debug.push(yyState, yyVal);
 .
-.      /*yyDiscarded:*/ for (;;) {     // discarding a token does not change stack
+.      /*yyDiscarded:*/ while (true) { // discarding a token does not change stack
 .        int yyN;
 .        if ((yyN = yyDefRed[yyState]) == 0) { // else [default] reduce (yyN)
 .          if (yyToken < 0) {
@@ -228,7 +231,7 @@ t                                                   yyLex.value());
 .        int yyV = yyTop + 1-yyLen[yyN];
 t        if (debug != null)
 t          debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
-.        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
+.        yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
 .        switch (yyN) {
 
  actions               ## code from the actions within the grammar
@@ -259,9 +262,9 @@ t            if (debug != null) debug.accept(yyVal);
 .          yyState = yyDgoto[yyM];
 t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
 .       goto continue_yyLoop;
-.      continue_yyDiscarded: continue; // implements the named-loop continue: 'continue yyDiscarded'
+.      continue_yyDiscarded: ; // implements the named-loop continue: 'continue yyDiscarded'
 .      }
-.    continue_yyLoop: continue;                // implements the named-loop continue: 'continue yyLoop'
+.    continue_yyLoop: ;                // implements the named-loop continue: 'continue yyLoop'
 .    }
 .  }
 .
index ff26c6310c57ce0a70bc50fb7223d7ab6528d0ab..de556335b47758c925038b2a086b939d5ac4c0de 100644 (file)
@@ -1,2 +1,7 @@
 /y.output
 /cs-parser.cs
+/?mcs.user
+/?mcs.csproj.user
+/?mcs.pdb
+/?mcs.suo
+/?mcs.vshost*
index 43a2780851e2951341f0ad3643d120cb53c7de59..4599b6f8d59d1b835190671ef4dca999ce858dc8 100644 (file)
@@ -39,8 +39,9 @@ PROGRAM_COMPILE = $(BOOT_COMPILE)
 
 CLEAN_FILES += y.output
 
+# Use -cvt for parser debug version
 %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
-       $(topdir)/jay/jay -cvt < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
+       $(topdir)/jay/jay -cv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
 
 
 KEEP_OUTPUT_FILE_COPY = yes
index 609c2092534e4d5e74958e3e9b979a8506a2666c..7a89cd903a9a11c9050e076b221a4b8e5d4b9309 100644 (file)
@@ -19,11 +19,6 @@ namespace Mono.CSharp {
 
        public abstract class CompilerGeneratedClass : Class
        {
-               public static string MakeName (string host, string typePrefix, string name, int id)
-               {
-                       return "<" + host + ">" + typePrefix + "__" + name + id.ToString ("X");
-               }
-               
                protected CompilerGeneratedClass (DeclSpace parent, MemberName name, Modifiers mod)
                        : base (parent.NamespaceEntry, parent, name, mod | Modifiers.COMPILER_GENERATED, null)
                {
@@ -34,30 +29,32 @@ namespace Mono.CSharp {
                        if (HasMembersDefined)
                                throw new InternalErrorException ("Helper class already defined!");
                }
-       }
 
-       //
-       // Anonymous method storey is created when an anonymous method uses
-       // variable or parameter from outer scope. They are then hoisted to
-       // anonymous method storey (captured)
-       //
-       public class AnonymousMethodStorey : CompilerGeneratedClass
-       {
-               struct StoreyFieldPair
+               protected static MemberName MakeMemberName (MemberBase host, string name, int unique_id, TypeParameter[] tparams, Location loc)
                {
-                       public readonly AnonymousMethodStorey Storey;
-                       public readonly Field Field;
-
-                       public StoreyFieldPair (AnonymousMethodStorey storey, Field field)
-                       {
-                               this.Storey = storey;
-                               this.Field = field;
+                       string host_name = host == null ? null : host.Name;
+                       string tname = MakeName (host_name, "c", name, unique_id);
+                       TypeArguments args = null;
+                       if (tparams != null) {
+                               args = new TypeArguments ();
+                               foreach (TypeParameter tparam in tparams)
+                                       args.Add (new TypeParameterName (tparam.Name, null, loc));
                        }
+
+                       return new MemberName (tname, args, loc);
                }
 
-               sealed class HoistedGenericField : Field
+               public static string MakeName (string host, string typePrefix, string name, int id)
                {
-                       public HoistedGenericField (DeclSpace parent, FullNamedExpression type, Modifiers mod, string name,
+                       return "<" + host + ">" + typePrefix + "__" + name + id.ToString ("X");
+               }
+       }
+
+       public class HoistedStoreyClass : CompilerGeneratedClass
+       {
+               public sealed class HoistedField : Field
+               {
+                       public HoistedField (HoistedStoreyClass parent, FullNamedExpression type, Modifiers mod, string name,
                                  Attributes attrs, Location loc)
                                : base (parent, type, mod, new MemberName (name, loc), attrs)
                        {
@@ -68,7 +65,7 @@ namespace Mono.CSharp {
                                if (!base.ResolveMemberType ())
                                        return false;
 
-                               AnonymousMethodStorey parent = ((AnonymousMethodStorey) Parent).GetGenericStorey ();
+                               HoistedStoreyClass parent = ((HoistedStoreyClass) Parent).GetGenericStorey ();
                                if (parent != null && parent.Mutator != null)
                                        member_type = parent.Mutator.Mutate (MemberType);
 
@@ -76,6 +73,62 @@ namespace Mono.CSharp {
                        }
                }
 
+               protected TypeParameterMutator mutator;
+
+               public HoistedStoreyClass (DeclSpace parent, MemberName name, TypeParameter[] tparams, Modifiers mod)
+                       : base (parent, name, mod | Modifiers.PRIVATE)
+               {
+                       if (tparams != null) {
+                               type_params = new TypeParameter[tparams.Length];
+                               for (int i = 0; i < type_params.Length; ++i) {
+                                       type_params[i] = tparams[i].CreateHoistedCopy (this, spec);
+                               }
+                       }
+               }
+
+               #region Properties
+
+               public TypeParameterMutator Mutator {
+                       get {
+                               return mutator;
+                       }
+                       set {
+                               mutator = value;
+                       }
+               }
+
+               #endregion
+
+               public HoistedStoreyClass GetGenericStorey ()
+               {
+                       DeclSpace storey = this;
+                       while (storey != null && storey.CurrentTypeParameters == null)
+                               storey = storey.Parent;
+
+                       return storey as HoistedStoreyClass;
+               }
+       }
+
+
+       //
+       // Anonymous method storey is created when an anonymous method uses
+       // variable or parameter from outer scope. They are then hoisted to
+       // anonymous method storey (captured)
+       //
+       public class AnonymousMethodStorey : HoistedStoreyClass
+       {
+               struct StoreyFieldPair
+               {
+                       public readonly AnonymousMethodStorey Storey;
+                       public readonly Field Field;
+
+                       public StoreyFieldPair (AnonymousMethodStorey storey, Field field)
+                       {
+                               this.Storey = storey;
+                               this.Field = field;
+                       }
+               }
+
                //
                // Needed to delay hoisted _this_ initialization. When an anonymous
                // method is used inside ctor and _this_ is hoisted, base ctor has to
@@ -122,36 +175,13 @@ namespace Mono.CSharp {
                // Local variable which holds this storey instance
                public LocalTemporary Instance;
 
-               TypeParameterMutator mutator;
-
-               public AnonymousMethodStorey (Block block, TypeContainer parent, MemberBase host, GenericMethod generic, string name)
-                       : base (parent, MakeMemberName (host, name, generic, block.StartLocation), Modifiers.PRIVATE | Modifiers.SEALED)
+               public AnonymousMethodStorey (Block block, TypeContainer parent, MemberBase host, TypeParameter[] tparams, string name)
+                       : base (parent, MakeMemberName (host, name, unique_id, tparams, block.StartLocation),
+                               tparams, Modifiers.SEALED)
                {
                        Parent = parent;
                        OriginalSourceBlock = block;
                        ID = unique_id++;
-
-                       if (generic != null) {
-                               var hoisted_tparams = generic.CurrentTypeParameters;
-                               type_params = new TypeParameter [hoisted_tparams.Length];
-                               for (int i = 0; i < type_params.Length; ++i) {
-                                       type_params[i] = hoisted_tparams[i].CreateHoistedCopy (this, spec);
-                               }
-                       }
-               }
-
-               static MemberName MakeMemberName (MemberBase host, string name, GenericMethod generic, Location loc)
-               {
-                       string host_name = host == null ? null : host.Name;
-                       string tname = MakeName (host_name, "c", name, unique_id);
-                       TypeArguments args = null;
-                       if (generic != null) {
-                               args = new TypeArguments ();
-                               foreach (TypeParameter tparam in generic.CurrentTypeParameters)
-                                       args.Add (new TypeParameterName (tparam.Name, null, loc));
-                       }
-
-                       return new MemberName (tname, args, loc);
                }
 
                public void AddCapturedThisField (EmitContext ec)
@@ -180,7 +210,7 @@ namespace Mono.CSharp {
                                return AddCompilerGeneratedField (name, field_type);
 
                        const Modifiers mod = Modifiers.INTERNAL | Modifiers.COMPILER_GENERATED;
-                       Field f = new HoistedGenericField (this, field_type, mod, name, null, Location);
+                       Field f = new HoistedField (this, field_type, mod, name, null, Location);
                        AddField (f);
                        return f;
                }
@@ -433,15 +463,6 @@ namespace Mono.CSharp {
                        base.EmitType ();
                }
 
-               public AnonymousMethodStorey GetGenericStorey ()
-               {
-                       DeclSpace storey = this;
-                       while (storey != null && storey.CurrentTypeParameters == null)
-                               storey = storey.Parent;
-
-                       return storey as AnonymousMethodStorey;
-               }
-
                //
                // Returns a field which holds referenced storey instance
                //
@@ -512,15 +533,6 @@ namespace Mono.CSharp {
                        get { return hoisted_this; }
                }
 
-               public TypeParameterMutator Mutator {
-                       get {
-                               return mutator;
-                       }
-                       set {
-                               mutator = value;
-                       }
-               }
-
                public IList<ExplicitBlock> ReferencesFromChildrenBlock {
                        get { return children_references; }
                }
@@ -832,7 +844,7 @@ namespace Mono.CSharp {
                        }
                }
 
-               protected TypeSpec CompatibleChecks (ResolveContext ec, TypeSpec delegate_type)
+               TypeSpec CompatibleChecks (ResolveContext ec, TypeSpec delegate_type)
                {
                        if (delegate_type.IsDelegate)
                                return delegate_type;
@@ -906,7 +918,7 @@ namespace Mono.CSharp {
                                if (TypeManager.HasElementType (type) && TypeManager.IsGenericParameter (TypeManager.GetElementType (type)))
                                        continue;
                                
-                               if (invoke_pd.Types [i] != Parameters.Types [i]) {
+                               if (!TypeSpecComparer.IsEqual (invoke_pd.Types [i], Parameters.Types [i])) {
                                        if (ignore_errors)
                                                return false;
                                        
@@ -958,16 +970,24 @@ namespace Mono.CSharp {
 
                public TypeSpec InferReturnType (ResolveContext ec, TypeInferenceContext tic, TypeSpec delegate_type)
                {
+                       Expression expr;
                        AnonymousExpression am;
+
+                       if (compatibles.TryGetValue (delegate_type, out expr)) {
+                               am = expr as AnonymousExpression;
+                               return am == null ? null : am.ReturnType;
+                       }
+
                        using (ec.Set (ResolveContext.Options.ProbingMode | ResolveContext.Options.InferReturnType)) {
                                am = CompatibleMethodBody (ec, tic, InternalType.Arglist, delegate_type);
                                if (am != null)
                                        am = am.Compatible (ec);
                        }
-                       
+
                        if (am == null)
                                return null;
 
+//                     compatibles.Add (delegate_type, am);
                        return am.ReturnType;
                }
 
@@ -1042,9 +1062,10 @@ namespace Mono.CSharp {
                        } catch (Exception e) {
                                throw new InternalErrorException (e, loc);
                        }
-                       
-                       if (!ec.IsInProbingMode)
-                               compatibles.Add (type, am == null ? EmptyExpression.Null : am);
+
+                       if (!ec.IsInProbingMode) {
+                               compatibles.Add (type, am ?? EmptyExpression.Null);
+                       }
 
                        return am;
                }
@@ -1116,7 +1137,7 @@ namespace Mono.CSharp {
                        // 
                        type = InternalType.AnonymousMethod;
 
-                       if ((Parameters != null) && !Parameters.Resolve (ec))
+                       if (!DoResolveParameters (ec))
                                return null;
 
                        // FIXME: The emitted code isn't very careful about reachability
@@ -1128,6 +1149,11 @@ namespace Mono.CSharp {
                        return this;
                }
 
+               protected virtual bool DoResolveParameters (ResolveContext rc)
+               {
+                       return Parameters.Resolve (rc);
+               }
+
                public override void Emit (EmitContext ec)
                {
                        // nothing, as we only exist to not do anything.
@@ -1270,15 +1296,20 @@ namespace Mono.CSharp {
 
                public AnonymousExpression Compatible (ResolveContext ec, AnonymousExpression ae)
                {
+                       if (block.Resolved)
+                               return this;
+
                        // TODO: Implement clone
                        BlockContext aec = new BlockContext (ec.MemberContext, Block, ReturnType);
                        aec.CurrentAnonymousMethod = ae;
 
-                       IDisposable aec_dispose = null;
+                       ResolveContext.FlagsHandle? aec_dispose = null;
                        ResolveContext.Options flags = 0;
-                       if (ec.HasSet (ResolveContext.Options.InferReturnType)) {
-                               flags |= ResolveContext.Options.InferReturnType;
-                               aec.ReturnTypeInference = new TypeInferenceContext ();
+
+                       var am = this as AnonymousMethodBody;
+
+                       if (ec.HasSet (ResolveContext.Options.InferReturnType) && am != null) {
+                               am.ReturnTypeInference = new TypeInferenceContext ();
                        }
 
                        if (ec.IsInProbingMode)
@@ -1307,13 +1338,14 @@ namespace Mono.CSharp {
                        if (aec.HasReturnLabel)
                                return_label = aec.ReturnLabel;
 
-                       if (ec.HasSet (ResolveContext.Options.InferReturnType)) {
-                               aec.ReturnTypeInference.FixAllTypes (ec);
-                               ReturnType = aec.ReturnTypeInference.InferredTypeArguments [0];
+                       if (am != null && am.ReturnTypeInference != null) {
+                               am.ReturnTypeInference.FixAllTypes (ec);
+                               ReturnType = am.ReturnTypeInference.InferredTypeArguments [0];
+                               am.ReturnTypeInference = null;
                        }
 
                        if (aec_dispose != null) {
-                               aec_dispose.Dispose ();
+                               aec_dispose.Value.Dispose ();
                        }
 
                        if (res && errors != ec.Report.Errors)
@@ -1355,6 +1387,7 @@ namespace Mono.CSharp {
                AnonymousMethodMethod method;
                Field am_cache;
                string block_name;
+               TypeInferenceContext return_inference;
 
                static int unique_id;
 
@@ -1367,17 +1400,30 @@ namespace Mono.CSharp {
                        this.parameters = parameters;
                }
 
+               #region Properties
+
                public override string ContainerType {
                        get { return "anonymous method"; }
                }
 
+               public override bool IsIterator {
+                       get { return false; }
+               }
+
+               public TypeInferenceContext ReturnTypeInference {
+                       get {
+                               return return_inference;
+                       }
+                       set {
+                               return_inference = value;
+                       }
+               }
+
                public override AnonymousMethodStorey Storey {
                        get { return storey; }
                }
 
-               public override bool IsIterator {
-                       get { return false; }
-               }
+               #endregion
 
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
index 3d54dda0f2e5a7b3c7e517e69edfd4ea82ac96ba..8cb7e9780e38b25ff0c97f9bb527d2bd7d20b481 100644 (file)
@@ -27,7 +27,8 @@ namespace Mono.CSharp
                        Ref = 1,                        // ref modifier used
                        Out = 2,                        // out modifier used
                        Default = 3,            // argument created from default parameter value
-                       DynamicTypeName = 4     // System.Type argument for dynamic binding
+                       DynamicTypeName = 4,    // System.Type argument for dynamic binding
+                       ExtensionType = 5,      // Instance expression inserted as the first argument
                }
 
                public readonly AType ArgType;
@@ -393,7 +394,7 @@ namespace Mono.CSharp
                public bool HasDynamic {
                        get {
                                foreach (Argument a in args) {
-                                       if (a.Type == InternalType.Dynamic)
+                                       if (a.Type == InternalType.Dynamic && !a.IsByRef)
                                                return true;
                                }
                                
@@ -442,7 +443,8 @@ namespace Mono.CSharp
                        dynamic = false;
                        foreach (Argument a in args) {
                                a.Resolve (ec);
-                               dynamic |= a.Type == InternalType.Dynamic;
+                               if (a.Type == InternalType.Dynamic && !a.IsByRef)
+                                       dynamic = true;
                        }
                }
 
index 4ca227e9bb35646ffc6fed649745ec584b7c0b5b..310765bcaf66bc4cc2ea17e973e5f4611794a725 100644 (file)
@@ -330,7 +330,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       if (!TypeManager.IsEqual (target_type, source_type)) {
+                       if (target_type != source_type) {
                                Expression resolved = ResolveConversions (ec);
 
                                if (resolved != this)
@@ -432,19 +432,43 @@ namespace Mono.CSharp {
                }
        }
 
-       // This class implements fields and events class initializers
+       //
+       // Implements fields and events class initializers
+       //
        public class FieldInitializer : Assign
        {
+               //
+               // Field initializers are tricky for partial classes. They have to
+               // share same constructor (block) for expression trees resolve but
+               // they have they own resolve scope
+               //
+               sealed class FieldInitializerContext : ResolveContext
+               {
+                       ExplicitBlock ctor_block;
+
+                       public FieldInitializerContext (IMemberContext mc, ResolveContext constructorContext)
+                               : base (mc, Options.FieldInitializerScope | Options.ConstructorScope)
+                       {
+                               this.ctor_block = constructorContext.CurrentBlock.Explicit;
+                       }
+
+                       public override ExplicitBlock ConstructorBlock {
+                               get {
+                                       return ctor_block;
+                               }
+                       }
+               }
+
                //
                // Keep resolved value because field initializers have their own rules
                //
                ExpressionStatement resolved;
-               IMemberContext rc;
+               IMemberContext mc;
 
-               public FieldInitializer (FieldSpec spec, Expression expression, IMemberContext rc)
+               public FieldInitializer (FieldSpec spec, Expression expression, IMemberContext mc)
                        : base (new FieldExpr (spec, expression.Location), expression, expression.Location)
                {
-                       this.rc = rc;
+                       this.mc = mc;
                        if (!spec.IsStatic)
                                ((FieldExpr)target).InstanceExpression = CompilerGeneratedThis.Instance;
                }
@@ -456,19 +480,8 @@ namespace Mono.CSharp {
                                return null;
 
                        if (resolved == null) {
-                               //
-                               // Field initializers are tricky for partial classes. They have to
-                               // share same constructor (block) but they have they own resolve scope.
-                               //
-
-                               IMemberContext old = ec.MemberContext;
-                               ec.MemberContext = rc;
-
-                               using (ec.Set (ResolveContext.Options.FieldInitializerScope)) {
-                                       resolved = base.DoResolve (ec) as ExpressionStatement;
-                               }
-
-                               ec.MemberContext = old;
+                               var ctx = new FieldInitializerContext (mc, ec);
+                               resolved = base.DoResolve (ctx) as ExpressionStatement;
                        }
 
                        return resolved;
index cdc02fb53b1cc4b4688f956555086ca847de9240..2a26b99e6d51b9a4ef02f3527a50ea02368f3ef3 100644 (file)
@@ -178,11 +178,9 @@ namespace Mono.CSharp {
                                name.Name);
                }
 
-               public static void Error_AttributeArgumentNotValid (IMemberContext rc, Location loc)
+               public static void Error_AttributeArgumentIsDynamic (IMemberContext context, Location loc)
                {
-                       rc.Compiler.Report.Error (182, loc,
-                                     "An attribute argument must be a constant expression, typeof " +
-                                     "expression or array creation expression");
+                       context.Compiler.Report.Error (1982, loc, "An attribute argument cannot be dynamic expression");
                }
                
                public void Error_MissingGuidAttribute ()
@@ -311,7 +309,7 @@ namespace Mono.CSharp {
                public bool HasSecurityAttribute {
                        get {
                                PredefinedAttribute pa = PredefinedAttributes.Get.Security;
-                               return pa.IsDefined && TypeManager.IsSubclassOf (type, pa.Type);
+                               return pa.IsDefined && TypeSpec.IsBaseClass (type, pa.Type, false);
                        }
                }
 
@@ -355,7 +353,7 @@ namespace Mono.CSharp {
                                }
                        }
 
-                       var char_set = Import.ImportType (typeof (CharSet));
+                       var char_set = rc.Compiler.MetaImporter.ImportType (typeof (CharSet));  // TODO: typeof
                        NamedArguments.Add (new NamedArgument (CharSetEnumMember, loc,
                                Constant.CreateConstant (rc, char_set, RootContext.ToplevelTypes.DefaultCharSet, Location)));
                }
@@ -419,7 +417,7 @@ namespace Mono.CSharp {
                                bool dynamic;
                                PosArguments.Resolve (ec, out dynamic);
                                if (dynamic) {
-                                       Error_AttributeArgumentNotValid (ec, loc);
+                                       Error_AttributeArgumentIsDynamic (ec.MemberContext, loc);
                                        return null;
                                }
                        }
@@ -472,7 +470,7 @@ namespace Mono.CSharp {
                                if (member is PropertyExpr) {
                                        var pi = ((PropertyExpr) member).PropertyInfo;
 
-                                       if (!pi.HasSet || !pi.HasGet || pi.IsStatic) {
+                                       if (!pi.HasSet || !pi.HasGet || pi.IsStatic || !pi.Get.IsPublic || !pi.Set.IsPublic) {
                                                ec.Report.SymbolRelatedToPreviousError (pi);
                                                Error_InvalidNamedArgument (ec, a);
                                                return false;
@@ -485,10 +483,11 @@ namespace Mono.CSharp {
                                        }
 
                                        obsolete_attr = pi.GetAttributeObsolete ();
+                                       pi.MemberDefinition.SetIsAssigned ();
                                } else {
                                        var fi = ((FieldExpr) member).Spec;
 
-                                       if (fi.IsReadOnly || fi.IsStatic) {
+                                       if (fi.IsReadOnly || fi.IsStatic || !fi.IsPublic) {
                                                Error_InvalidNamedArgument (ec, a);
                                                return false;
                                        }
@@ -500,6 +499,7 @@ namespace Mono.CSharp {
                                        }
 
                                        obsolete_attr = fi.GetAttributeObsolete ();
+                                       fi.MemberDefinition.SetIsAssigned ();
                                }
 
                                if (obsolete_attr != null && !context.IsObsolete)
@@ -1064,11 +1064,6 @@ namespace Mono.CSharp {
                                var param_types = ctor.Parameters.Types;
                                for (int j = 0; j < PosArguments.Count; ++j) {
                                        var pt = param_types[j];
-                                       if (!IsValidArgumentType (pt)) {
-                                               Error_AttributeArgumentNotValid (context, loc);
-                                               return;
-                                       }
-
                                        var arg_expr = PosArguments[j].Expr;
                                        if (j == 0) {
                                                if (Type == predefined.IndexerName || Type == predefined.Conditional) {
@@ -1401,6 +1396,14 @@ namespace Mono.CSharp {
 
        public struct AttributeEncoder
        {
+               [Flags]
+               public enum EncodedTypeProperties
+               {
+                       None = 0,
+                       DynamicType = 1,
+                       TypeParameter = 1 << 1
+               }
+
                public readonly BinaryWriter Stream;
 
                public AttributeEncoder (bool empty)
@@ -1425,7 +1428,7 @@ namespace Mono.CSharp {
                        Stream.Write (buf);
                }
 
-               public void Encode (TypeSpec type)
+               public EncodedTypeProperties Encode (TypeSpec type)
                {
                        if (type == TypeManager.bool_type) {
                                Stream.Write ((byte) 0x02);
@@ -1462,10 +1465,13 @@ namespace Mono.CSharp {
                                EncodeTypeName (type);
                        } else if (type.IsArray) {
                                Stream.Write ((byte) 0x1D);
-                               Encode (TypeManager.GetElementType (type));
-                       } else {
-                               throw new NotImplementedException (type.ToString ());
+                               return Encode (TypeManager.GetElementType (type));
+                       } else if (type == InternalType.Dynamic) {
+                               Stream.Write ((byte) 0x51);
+                               return EncodedTypeProperties.DynamicType;
                        }
+
+                       return EncodedTypeProperties.None;
                }
 
                public void EncodeTypeName (TypeSpec type)
index b8b82ffe573f99a60cec30aaf0444ebb22f00810..eb4ef94ecb08d45f9672cf65c505da5b28098992 100644 (file)
@@ -276,10 +276,10 @@ namespace Mono.CSharp {
                                break;
 
                        case Binary.Operator.Addition:
-                               if (lt == TypeManager.null_type)
+                               if (lt == InternalType.Null)
                                        return right;
 
-                               if (rt == TypeManager.null_type)
+                               if (rt == InternalType.Null)
                                        return left;
 
                                //
index 2a050242231ad44817f929459cbac1e3df6bad15..cd8a1b47f3904e4adc85e5348c9a5c90b2db197d 100644 (file)
@@ -90,7 +90,7 @@ namespace Mono.CSharp {
                                return tc.GetSignatureForError ();
                        }
 
-                       public ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc)
+                       public IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
                        {
                                return null;
                        }
@@ -850,7 +850,7 @@ namespace Mono.CSharp {
 
                                if (fne_resolved.Type.IsInterface) {
                                        for (int ii = 0; ii < j; ++ii) {
-                                               if (TypeManager.IsEqual (fne_resolved.Type, ifaces [ii].Type)) {
+                                               if (fne_resolved.Type == ifaces [ii].Type) {
                                                        Report.Error (528, Location, "`{0}' is already listed in interface list",
                                                                fne_resolved.GetSignatureForError ());
                                                        break;
@@ -954,10 +954,10 @@ namespace Mono.CSharp {
                                        if (o_b == null || o_b.OperatorType != matching_type)
                                                continue;
 
-                                       if (!TypeManager.IsEqual (o_a.ReturnType, o_b.ReturnType))
+                                       if (!TypeSpecComparer.IsEqual (o_a.ReturnType, o_b.ReturnType))
                                                continue;
 
-                                       if (!TypeSpecComparer.Default.Equals (o_a.ParameterTypes, o_b.ParameterTypes))
+                                       if (!TypeSpecComparer.Equals (o_a.ParameterTypes, o_b.ParameterTypes))
                                                continue;
 
                                        operators[i] = null;
@@ -1053,7 +1053,17 @@ namespace Mono.CSharp {
 
                        if (proxy_method == null) {
                                string name = CompilerGeneratedClass.MakeName (method.Name, null, "BaseCallProxy", hoisted_base_call_proxies.Count);
-                               var cloned_params = ParametersCompiled.CreateFullyResolved (method.Parameters.FixedParameters, method.Parameters.Types);
+                               var base_parameters = method.Parameters.FixedParameters as Parameter[];
+                               if (base_parameters == null) {
+                                       base_parameters = new Parameter[method.Parameters.Count];
+                                       for (int i = 0; i < base_parameters.Length; ++i) {
+                                               var base_param = method.Parameters.FixedParameters[i];
+                                               base_parameters[i] = new Parameter (new TypeExpression (method.Parameters.Types[i], Location),
+                                                       base_param.Name, base_param.ModFlags, null, Location);
+                                       }
+                               }
+
+                               var cloned_params = ParametersCompiled.CreateFullyResolved (base_parameters, method.Parameters.Types);
                                if (method.Parameters.HasArglist) {
                                        cloned_params.FixedParameters[0] = new Parameter (null, "__arglist", Parameter.Modifier.NONE, null, Location);
                                        cloned_params.Types[0] = TypeManager.runtime_argument_handle_type;
@@ -1210,9 +1220,8 @@ namespace Mono.CSharp {
                        if (instance_constructors != null) {
                                foreach (MethodCore m in instance_constructors) {
                                        var p = m.ParameterInfo;
-                                       if (!p.IsEmpty && p[p.Count - 1].HasDefaultValue) {
-                                               var rc = new ResolveContext (m);
-                                               p.ResolveDefaultValues (rc);
+                                       if (!p.IsEmpty) {
+                                               p.ResolveDefaultValues (m);
                                        }
                                }
                        }
@@ -1220,20 +1229,15 @@ namespace Mono.CSharp {
                        if (methods != null) {
                                foreach (MethodCore m in methods) {
                                        var p = m.ParameterInfo;
-                                       if (!p.IsEmpty && p[p.Count - 1].HasDefaultValue) {
-                                               var rc = new ResolveContext (m);
-                                               p.ResolveDefaultValues (rc);
+                                       if (!p.IsEmpty) {
+                                               p.ResolveDefaultValues (m);
                                        }
                                }
                        }
 
                        if (indexers != null) {
                                foreach (Indexer i in indexers) {
-                                       var p = i.ParameterInfo;
-                                       if (p[p.Count - 1].HasDefaultValue) {
-                                           var rc = new ResolveContext (i);
-                                               p.ResolveDefaultValues (rc);
-                                       }
+                                       i.ParameterInfo.ResolveDefaultValues (i);
                                }
                        }
 
@@ -1479,7 +1483,7 @@ namespace Mono.CSharp {
 
                                                ct.CheckConstraints (this);
 
-                                               if (ct.HasDynamicArguments ()) {
+                                               if (ct.HasDynamicArguments () && !IsCompilerGenerated) {
                                                        Report.Error (1966, iface.Location,
                                                                "`{0}': cannot implement a dynamic interface `{1}'",
                                                                GetSignatureForError (), iface.GetSignatureForError ());
@@ -1518,25 +1522,6 @@ namespace Mono.CSharp {
                                }
                        }
 
-                       if (!IsTopLevel) {
-                               MemberSpec candidate;
-                               var conflict_symbol = MemberCache.FindBaseMember (this, out candidate);
-                               if (conflict_symbol == null && candidate == null) {
-                                       if ((ModFlags & Modifiers.NEW) != 0)
-                                               Report.Warning (109, 4, Location, "The member `{0}' does not hide an inherited member. The new keyword is not required",
-                                                       GetSignatureForError ());
-                               } else {
-                                       if ((ModFlags & Modifiers.NEW) == 0) {
-                                               if (candidate == null)
-                                                       candidate = conflict_symbol;
-
-                                               Report.SymbolRelatedToPreviousError (candidate);
-                                               Report.Warning (108, 2, Location, "`{0}' hides inherited member `{1}'. Use the new keyword if hiding was intended",
-                                                       GetSignatureForError (), candidate.GetSignatureForError ());
-                                       }
-                               }
-                       }
-
                        DefineContainerMembers (constants);
                        DefineContainerMembers (fields);
 
@@ -1735,6 +1720,25 @@ namespace Mono.CSharp {
 
                public override void Emit ()
                {
+                       if (!IsTopLevel) {
+                               MemberSpec candidate;
+                               var conflict_symbol = MemberCache.FindBaseMember (this, out candidate);
+                               if (conflict_symbol == null && candidate == null) {
+                                       if ((ModFlags & Modifiers.NEW) != 0)
+                                               Report.Warning (109, 4, Location, "The member `{0}' does not hide an inherited member. The new keyword is not required",
+                                                       GetSignatureForError ());
+                               } else {
+                                       if ((ModFlags & Modifiers.NEW) == 0) {
+                                               if (candidate == null)
+                                                       candidate = conflict_symbol;
+
+                                               Report.SymbolRelatedToPreviousError (candidate);
+                                               Report.Warning (108, 2, Location, "`{0}' hides inherited member `{1}'. Use the new keyword if hiding was intended",
+                                                       GetSignatureForError (), candidate.GetSignatureForError ());
+                                       }
+                               }
+                       }
+
                        if (all_tp_builders != null) {
                                int current_starts_index = CurrentTypeParametersStartIndex;
                                for (int i = 0; i < all_tp_builders.Length; i++) {
@@ -1914,7 +1918,6 @@ namespace Mono.CSharp {
                public bool MethodModifiersValid (MemberCore mc)
                {
                        const Modifiers vao = (Modifiers.VIRTUAL | Modifiers.ABSTRACT | Modifiers.OVERRIDE);
-                       const Modifiers va = (Modifiers.VIRTUAL | Modifiers.ABSTRACT);
                        const Modifiers nv = (Modifiers.NEW | Modifiers.VIRTUAL);
                        bool ok = true;
                        var flags = mc.ModFlags;
@@ -1930,13 +1933,6 @@ namespace Mono.CSharp {
                                }
                        }
 
-                       if (Kind == MemberKind.Struct){
-                               if ((flags & va) != 0){
-                                       ModifiersExtensions.Error_InvalidModifier (mc.Location, "virtual or abstract", Report);
-                                       ok = false;
-                               }
-                       }
-
                        if ((flags & Modifiers.OVERRIDE) != 0 && (flags & nv) != 0){
                                Report.Error (113, mc.Location, "A member `{0}' marked as override cannot be marked as new or virtual",
                                        mc.GetSignatureForError ());
@@ -2022,7 +2018,7 @@ namespace Mono.CSharp {
                        var ifaces = spec.Interfaces;
                        if (ifaces != null) {
                                foreach (TypeSpec t in ifaces){
-                                       if (TypeManager.IsEqual (t, mb.InterfaceType))
+                                       if (t == mb.InterfaceType)
                                                return true;
                                }
                        }
@@ -2125,14 +2121,14 @@ namespace Mono.CSharp {
 
                protected override bool AddToContainer (MemberCore symbol, string name)
                {
-                       if (name == MemberName.Name) {
+                       if (!(symbol is Constructor) && symbol.MemberName.Name == MemberName.Name) {
                                if (symbol is TypeParameter) {
                                        Report.Error (694, symbol.Location,
                                                "Type parameter `{0}' has same name as containing type, or method",
                                                symbol.GetSignatureForError ());
                                        return false;
                                }
-
+                       
                                InterfaceMemberBase imb = symbol as InterfaceMemberBase;
                                if (imb == null || !imb.IsExplicitImpl) {
                                        Report.SymbolRelatedToPreviousError (this);
@@ -2237,7 +2233,7 @@ namespace Mono.CSharp {
                        }
                }
 
-               public override ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc)
+               public override IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
                {
                        DeclSpace top_level = Parent;
                        if (top_level != null) {
@@ -2245,11 +2241,13 @@ namespace Mono.CSharp {
                                        top_level = top_level.Parent;
 
                                var candidates = NamespaceEntry.NS.LookupExtensionMethod (extensionType, this, name, arity);
-                               if (candidates != null)
-                                       return new ExtensionMethodGroupExpr (candidates, NamespaceEntry, extensionType, loc);
+                               if (candidates != null) {
+                                       scope = NamespaceEntry;
+                                       return candidates;
+                               }
                        }
 
-                       return NamespaceEntry.LookupExtensionMethod (extensionType, name, arity, loc);
+                       return NamespaceEntry.LookupExtensionMethod (extensionType, name, arity, ref scope);
                }
 
                protected override TypeAttributes TypeAttr {
@@ -2761,7 +2759,46 @@ namespace Mono.CSharp {
                }
        }
 
-       public abstract class InterfaceMemberBase : MemberBase {
+       public abstract class InterfaceMemberBase : MemberBase
+       {
+               //
+               // Common modifiers allowed in a class declaration
+               //
+               protected const Modifiers AllowedModifiersClass =
+                       Modifiers.NEW |
+                       Modifiers.PUBLIC |
+                       Modifiers.PROTECTED |
+                       Modifiers.INTERNAL |
+                       Modifiers.PRIVATE |
+                       Modifiers.STATIC |
+                       Modifiers.VIRTUAL |
+                       Modifiers.SEALED |
+                       Modifiers.OVERRIDE |
+                       Modifiers.ABSTRACT |
+                       Modifiers.UNSAFE |
+                       Modifiers.EXTERN;
+
+               //
+               // Common modifiers allowed in a struct declaration
+               //
+               protected const Modifiers AllowedModifiersStruct =
+                       Modifiers.NEW |
+                       Modifiers.PUBLIC |
+                       Modifiers.PROTECTED |
+                       Modifiers.INTERNAL |
+                       Modifiers.PRIVATE |
+                       Modifiers.STATIC |
+                       Modifiers.OVERRIDE |
+                       Modifiers.UNSAFE |
+                       Modifiers.EXTERN;
+
+               //
+               // Common modifiers allowed in a interface declaration
+               //
+               protected const Modifiers AllowedModifiersInterface =
+                       Modifiers.NEW |
+                       Modifiers.UNSAFE;
+
                //
                // Whether this is an interface member.
                //
index 4a7835b617d3a49734997a00e9521969c5cc4328..85926d23be186278bc5eecc79005bd484e4a2ae3 100644 (file)
@@ -294,6 +294,8 @@ namespace Mono.CSharp {
                
                public readonly IMemberContext MemberContext;
 
+               DynamicSiteClass dynamic_site_container;
+
                public EmitContext (IMemberContext rc, ILGenerator ig, TypeSpec return_type)
                {
                        this.MemberContext = rc;
@@ -389,6 +391,25 @@ namespace Mono.CSharp {
                        SymbolWriter.CloseScope(ig);
                }
 
+               //
+               // Creates a nested container in this context for all dynamic compiler generated stuff
+               //
+               public DynamicSiteClass CreateDynamicSite ()
+               {
+                       if (dynamic_site_container == null) {
+                               var mc = MemberContext.CurrentMemberDefinition as MemberBase;
+                               dynamic_site_container = new DynamicSiteClass (CurrentTypeDefinition.Parent.PartialContainer, mc, CurrentTypeParameters);
+
+                               RootContext.ToplevelTypes.AddCompilerGeneratedClass (dynamic_site_container);
+                               dynamic_site_container.CreateType ();
+                               dynamic_site_container.DefineType ();
+                               dynamic_site_container.ResolveTypeParameters ();
+                               dynamic_site_container.Define ();
+                       }
+
+                       return dynamic_site_container;
+               }
+
                public LocalBuilder DeclareLocal (TypeSpec type, bool pinned)
                {
                        if (IsAnonymousStoreyMutateRequired)
@@ -899,7 +920,7 @@ namespace Mono.CSharp {
                        get { return false; }
                }
 
-               public ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc)
+               public IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
                {
                        throw new NotImplementedException ();
                }
@@ -1053,6 +1074,13 @@ namespace Mono.CSharp {
                        }
                }
 
+               void Error_ObsoleteSecurityAttribute (Attribute a, string option)
+               {
+                       Report.Warning (1699, 1, a.Location,
+                               "Use compiler option `{0}' or appropriate project settings instead of `{1}' attribute",
+                               option, a.Name);
+               }
+
                // TODO: rewrite this code (to kill N bugs and make it faster) and use standard ApplyAttribute way.
                public AssemblyName GetAssemblyName (string name, string output) 
                {
@@ -1076,8 +1104,10 @@ namespace Mono.CSharp {
                                                                        "keyfile", "System.Reflection.AssemblyKeyFileAttribute");
                                                } else {
                                                        string value = a.GetString ();
-                                                       if (value != null && value.Length != 0)
+                                                       if (!string.IsNullOrEmpty (value)) {
+                                                               Error_ObsoleteSecurityAttribute (a, "keyfile");
                                                                RootContext.StrongNameKeyFile = value;
+                                                       }
                                                }
                                                break;
                                        case "AssemblyKeyName":
@@ -1089,14 +1119,21 @@ namespace Mono.CSharp {
                                                                        "keycontainer", "System.Reflection.AssemblyKeyNameAttribute");
                                                } else {
                                                        string value = a.GetString ();
-                                                       if (value != null && value.Length != 0)
+                                                       if (!string.IsNullOrEmpty (value)) {
+                                                               Error_ObsoleteSecurityAttribute (a, "keycontainer");
                                                                RootContext.StrongNameKeyContainer = value;
+                                                       }
                                                }
                                                break;
                                        case "AssemblyDelaySign":
                                        case "AssemblyDelaySignAttribute":
                                        case "System.Reflection.AssemblyDelaySignAttribute":
-                                               RootContext.StrongNameDelaySign = a.GetBoolean ();
+                                               bool b = a.GetBoolean ();
+                                               if (b) {
+                                                       Error_ObsoleteSecurityAttribute (a, "delaysign");
+                                               }
+
+                                               RootContext.StrongNameDelaySign = b;
                                                break;
                                        }
                                }
index ff45ac65b3dbefd6a50daade3277ab931ec3307a..28a103b8c80151b88d935b5a48454ad569a0f85d 100644 (file)
@@ -119,7 +119,7 @@ namespace Mono.CSharp {
                                return null;
 
                        TypeSpec expr_type = expr_resolved.Type;
-                       if (expr_type.IsPointer || expr_type == TypeManager.void_type || expr_type == TypeManager.null_type || expr_type == InternalType.AnonymousMethod) {
+                       if (expr_type.IsPointer || expr_type == TypeManager.void_type || expr_type == InternalType.Null || expr_type == InternalType.AnonymousMethod) {
                                Unary.Error_OperatorCannotBeApplied (ec, loc, ".", expr_type);
                                return null;
                        }
index c04ad0246df1417ee4d111d3245a9f5e4e2370c1..eeb66fbdcc35bf3c2cb8afa3800029b83a168a6e 100644 (file)
@@ -249,9 +249,15 @@ namespace Mono.CSharp {
                        // do nothing
                }
 
+               public sealed override Expression Clone (CloneContext clonectx)
+               {
+                       // No cloning is not needed for constants
+                       return this;
+               }
+
                protected override void CloneTo (CloneContext clonectx, Expression target)
                {
-                       // CloneTo: Nothing, we do not keep any state on this expression
+                       throw new NotSupportedException ("should not be reached");
                }
 
                public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
@@ -281,7 +287,8 @@ namespace Mono.CSharp {
                }
        }
 
-       public abstract class IntegralConstant : Constant {
+       public abstract class IntegralConstant : Constant
+       {
                protected IntegralConstant (Location loc) :
                        base (loc)
                {
@@ -1892,7 +1899,7 @@ namespace Mono.CSharp {
                        // Use string.Empty for both literals and constants even if
                        // it's not allowed at language level
                        //
-                       if (Value.Length == 0 && RootContext.Optimize && !TypeManager.IsEqual (ec.CurrentType, TypeManager.string_type)) {
+                       if (Value.Length == 0 && RootContext.Optimize && ec.CurrentType != TypeManager.string_type) {
                                if (TypeManager.string_empty == null)
                                        TypeManager.string_empty = TypeManager.GetPredefinedField (TypeManager.string_type, "Empty", loc, TypeManager.string_type);
 
@@ -1975,12 +1982,12 @@ namespace Mono.CSharp {
                public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
                {
                        // Type it as string cast
-                       if (targetType == TypeManager.object_type || targetType == TypeManager.null_type)
+                       if (targetType == TypeManager.object_type || targetType == InternalType.Null)
                                enc.Encode (TypeManager.string_type);
 
                        var ac = targetType as ArrayContainer;
                        if (ac != null) {
-                               if (ac.Rank != 1)
+                               if (ac.Rank != 1 || ac.Element.IsArray)
                                        base.EncodeAttributeValue (rc, enc, targetType);
                                else
                                        enc.Stream.Write (uint.MaxValue);
@@ -2019,7 +2026,7 @@ namespace Mono.CSharp {
                        }
 
                        // Exlude internal compiler types
-                       if (targetType == InternalType.AnonymousMethod)
+                       if (targetType.Kind == MemberKind.InternalCompilerType && targetType != InternalType.Dynamic && targetType != InternalType.Null)
                                return null;
 
                        if (!IsLiteral && !Convert.ImplicitStandardConversionExists (this, targetType))
index 2d89d2b9a2eb03d42c3c9c42e6982e38deb9fb95..074312cbae28cca2e92a7b1f0f6befb54e513b3f 100644 (file)
@@ -44,7 +44,7 @@ namespace Mono.CSharp
 
                string GetSignatureForError ();
 
-               ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc);
+               IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope);
                FullNamedExpression LookupNamespaceOrType (string name, int arity, Location loc, bool ignore_cs0104);
                FullNamedExpression LookupNamespaceAlias (string name);
 
@@ -58,8 +58,6 @@ namespace Mono.CSharp
        {
                FlowBranching current_flow_branching;
 
-               public TypeInferenceContext ReturnTypeInference;
-
                TypeSpec return_type;
 
                /// <summary>
@@ -350,6 +348,12 @@ namespace Mono.CSharp
                        get { return MemberContext.Compiler; }
                }
 
+               public virtual ExplicitBlock ConstructorBlock {
+                       get {
+                               return CurrentBlock.Explicit;
+                       }
+               }
+
                public virtual FlowBranching CurrentBranching {
                        get { return null; }
                }
@@ -457,7 +461,7 @@ namespace Mono.CSharp
                public bool IsObsolete {
                        get {
                                // Disables obsolete checks when probing is on
-                               return IsInProbingMode || MemberContext.IsObsolete;
+                               return MemberContext.IsObsolete;
                        }
                }
 
@@ -469,9 +473,9 @@ namespace Mono.CSharp
                        get { return HasSet (Options.UnsafeScope) || MemberContext.IsUnsafe; }
                }
 
-               public ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc)
+               public IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
                {
-                       return MemberContext.LookupExtensionMethod (extensionType, name, arity, loc);
+                       return MemberContext.LookupExtensionMethod (extensionType, name, arity, ref scope);
                }
 
                public FullNamedExpression LookupNamespaceOrType (string name, int arity, Location loc, bool ignore_cs0104)
@@ -502,9 +506,7 @@ namespace Mono.CSharp
 
                public void AddBlockMap (Block from, Block to)
                {
-                       if (block_map.ContainsKey (from))
-                               return;
-                       block_map[from] = to;
+                       block_map.Add (from, to);
                }
 
                public Block LookupBlock (Block from)
@@ -512,7 +514,6 @@ namespace Mono.CSharp
                        Block result;
                        if (!block_map.TryGetValue (from, out result)) {
                                result = (Block) from.Clone (this);
-                               block_map [from] = result;
                        }
 
                        return result;
@@ -556,16 +557,26 @@ namespace Mono.CSharp
        public class CompilerContext
        {
                readonly Report report;
+               readonly ReflectionMetaImporter meta_importer;
 
-               public CompilerContext (Report report)
+               public CompilerContext (ReflectionMetaImporter metaImporter, Report report)
                {
+                       this.meta_importer = metaImporter;
                        this.report = report;
                }
 
                public bool IsRuntimeBinder { get; set; }
 
+               public ReflectionMetaImporter MetaImporter {
+                       get {
+                               return meta_importer;
+                       }
+               }
+
                public Report Report {
-                       get { return report; }
+                       get {
+                               return report;
+                       }
                }
 
                //public PredefinedAttributes PredefinedAttributes {
index 5a1ebe831644b3503fed44d4b0f3eacdf4a1a14e..73ad9f1ee94d2bfa56958cf573cd311faf68bab6 100644 (file)
@@ -114,7 +114,7 @@ namespace Mono.CSharp {
                        }
 
                        //
-                       // LAMESPEC: From T to dynamic type
+                       // LAMESPEC: From T to dynamic type because it's like T to object
                        //
                        if (target_type == InternalType.Dynamic) {
                                if (expr_type.IsReferenceType)
@@ -125,11 +125,11 @@ namespace Mono.CSharp {
 
                        //
                        // From T to its effective base class C
-                       // From T to any base class of C
+                       // From T to any base class of C (it cannot contain dynamic of be of dynamic type)
                        // From T to any interface implemented by C
                        //
                        var base_type = expr_type.GetEffectiveBase ();
-                       if (base_type == target_type || TypeManager.IsSubclassOf (base_type, target_type) || base_type.ImplementsInterface (target_type)) {
+                       if (base_type == target_type || TypeSpec.IsBaseClass (base_type, target_type, false) || base_type.ImplementsInterface (target_type)) {
                                if (expr_type.IsReferenceType)
                                        return new ClassCast (expr, target_type);
 
@@ -158,7 +158,7 @@ namespace Mono.CSharp {
                                                return source == null ? EmptyExpression.Null : new ClassCast (source, target_type);
                                        }
                                }
-
+/*
                                if (target_tp.Interfaces != null) {
                                        foreach (TypeSpec iface in target_tp.Interfaces) {
                                                if (!TypeManager.IsGenericParameter (iface))
@@ -168,7 +168,7 @@ namespace Mono.CSharp {
                                                        return source == null ? EmptyExpression.Null : new ClassCast (source, target_type, true);
                                        }
                                }
-
+*/
                                return null;
                        }
 
@@ -226,7 +226,7 @@ namespace Mono.CSharp {
                        TypeSpec expr_type = expr.Type;
 
                        // from the null type to any reference-type.
-                       if (expr_type == TypeManager.null_type)
+                       if (expr_type == InternalType.Null)
                                return target_type != InternalType.AnonymousMethod;
 
                        if (TypeManager.IsGenericParameter (expr_type))
@@ -245,36 +245,23 @@ namespace Mono.CSharp {
                        }
 
                        //
-                       // notice that it is possible to write "ValueType v = 1", the ValueType here
-                       // is an abstract class, and not really a value type, so we apply the same rules.
+                       // Implicit reference conversions (no-boxing) to object or dynamic
                        //
                        if (target_type == TypeManager.object_type || target_type == InternalType.Dynamic) {
-                               //
-                               // A pointer type cannot be converted to object
-                               //
-                               if (expr_type.IsPointer)
-                                       return false;
-
-                               if (TypeManager.IsValueType (expr_type))
-                                       return false;
-
-                               if (expr_type.IsClass || expr_type.IsInterface || expr_type == TypeManager.enum_type || expr_type.IsDelegate || expr_type.Kind == MemberKind.ArrayType) {
-                                       // No mcs internal types are convertible
-                                       return true; // expr_type.MetaInfo.Module != typeof (Convert).Module;
-                               }
-
-                               // From anything to dynamic
-                               if (target_type == InternalType.Dynamic)
+                               switch (expr_type.Kind) {
+                               case MemberKind.Class:
+                               case MemberKind.Interface:
+                               case MemberKind.Delegate:
+                               case MemberKind.ArrayType:
                                        return true;
+                               }
 
-                               // From dynamic to object
-                               if (expr_type == InternalType.Dynamic)
-                                       return true;
+                               return expr_type == InternalType.Dynamic;
+                       }
 
-                               return false;
-                       } else if (target_type == TypeManager.value_type) {
+                       if (target_type == TypeManager.value_type) {
                                return expr_type == TypeManager.enum_type;
-                       } else if (TypeManager.IsSubclassOf (expr_type, target_type)) {
+                       } else if (expr_type == target_type || TypeSpec.IsBaseClass (expr_type, target_type, true)) {
                                //
                                // Special case: enumeration to System.Enum.
                                // System.Enum is not a value type, it is a class, so we need
@@ -342,9 +329,6 @@ namespace Mono.CSharp {
                                (expr_type == TypeManager.delegate_type || expr_type.IsDelegate))
                                return true;
 
-                       if (TypeManager.IsEqual (expr_type, target_type))
-                               return true;
-
                        return false;
                }
 
@@ -402,7 +386,7 @@ namespace Mono.CSharp {
                                return res;
                        }
 
-                       if (TypeManager.IsSubclassOf (expr_type, target_type)) {
+                       if (TypeSpec.IsBaseClass (expr_type, target_type, false)) {
                                //
                                // Don't box same type arguments
                                //
@@ -435,7 +419,7 @@ namespace Mono.CSharp {
                        //
                        // From null to any nullable type
                        //
-                       if (expr_type == TypeManager.null_type)
+                       if (expr_type == InternalType.Null)
                                return ec == null ? EmptyExpression.Null : Nullable.LiftedNull.Create (target_type, expr.Location);
 
                        // S -> T?
@@ -673,24 +657,41 @@ namespace Mono.CSharp {
                ///  Determines if a standard implicit conversion exists from
                ///  expr_type to target_type
                ///
-               ///  ec should point to a real EmitContext if expr.Type is TypeManager.anonymous_method_type.
                /// </summary>
                public static bool ImplicitStandardConversionExists (Expression expr, TypeSpec target_type)
                {
                        TypeSpec expr_type = expr.Type;
 
-                       if (expr_type == TypeManager.null_type) {
-                               NullLiteral nl = expr as NullLiteral;
-                               if (nl != null)
-                                       return nl.ConvertImplicitly (null, target_type) != null;
-                       }
+                       NullLiteral nl = expr as NullLiteral;
+                       if (nl != null)
+                               return nl.ConvertImplicitly (null, target_type) != null;
 
                        if (expr_type == TypeManager.void_type)
                                return false;
 
-                       if (TypeManager.IsEqual (expr_type, target_type))
+                       if (expr_type == target_type)
                                return true;
 
+                       // Implicit dynamic conversion
+                       if (expr_type == InternalType.Dynamic) {
+                               switch (target_type.Kind) {
+                               case MemberKind.ArrayType:
+                               case MemberKind.Class:
+                               case MemberKind.Struct:
+                               case MemberKind.Delegate:
+                               case MemberKind.Enum:
+                               case MemberKind.Interface:
+                               case MemberKind.TypeParameter:
+                                       return true;
+                               }
+
+                               // dynamic to __arglist
+                               if (target_type == InternalType.Arglist)
+                                       return true;
+
+                               return false;
+                       }
+
                        if (TypeManager.IsNullableType (target_type)) {
                                return ImplicitNulableConversion (null, expr, target_type) != null;
                        }
@@ -704,7 +705,7 @@ namespace Mono.CSharp {
 
                        if (ImplicitBoxingConversion (null, expr_type, target_type) != null)
                                return true;
-
+                       
                        //
                        // Implicit Constant Expression Conversions
                        //
@@ -981,6 +982,10 @@ namespace Mono.CSharp {
                                        target = TypeManager.uint64_type;
                        }
 
+                       // Neither A nor B are interface-types
+                       if (source.Type.IsInterface)
+                               return;
+
                        // For a conversion operator to be applicable, it must be possible
                        // to perform a standard conversion from the source type to
                        // the operand type of the operator, and it must be possible
@@ -1010,6 +1015,9 @@ namespace Mono.CSharp {
                                if (t == TypeManager.uint32_type && source.Type == TypeManager.uintptr_type)
                                        continue;
 
+                               if (t.IsInterface)
+                                       continue;
+
                                if (target != t && !ImplicitStandardConversionExists (new EmptyExpression (t), target)) {
                                        if (implicitOnly)
                                                continue;
@@ -1221,14 +1229,31 @@ namespace Mono.CSharp {
                        TypeSpec expr_type = expr.Type;
                        Expression e;
 
-                       if (expr_type.Equals (target_type)) {
-                               if (expr_type != TypeManager.null_type && expr_type != InternalType.AnonymousMethod)
+                       if (expr_type == target_type) {
+                               if (expr_type != InternalType.Null && expr_type != InternalType.AnonymousMethod)
                                        return expr;
                                return null;
                        }
 
-                       if (TypeSpecComparer.Variant.IsEqual (expr_type, target_type)) {
-                               return expr;
+                       if (expr_type == InternalType.Dynamic) {
+                               switch (target_type.Kind) {
+                               case MemberKind.ArrayType:
+                               case MemberKind.Class:
+                                       if (target_type == TypeManager.object_type)
+                                               return EmptyCast.Create (expr, target_type);
+
+                                       goto case MemberKind.Struct;
+                               case MemberKind.Struct:
+                               case MemberKind.Delegate:
+                               case MemberKind.Enum:
+                               case MemberKind.Interface:
+                               case MemberKind.TypeParameter:
+                                       Arguments args = new Arguments (1);
+                                       args.Add (new Argument (expr));
+                                       return new DynamicConversion (target_type, explicit_cast ? CSharpBinderFlags.ConvertExplicit : 0, args, loc).Resolve (ec);
+                               }
+
+                               return null;
                        }
 
                        if (TypeManager.IsNullableType (target_type))
@@ -1289,7 +1314,7 @@ namespace Mono.CSharp {
                                        }
                                }
 
-                               if (expr_type == TypeManager.null_type && target_type.IsPointer)
+                               if (expr_type == InternalType.Null && target_type.IsPointer)
                                        return EmptyCast.Create (new NullPointer (loc), target_type);
                        }
 
@@ -1318,12 +1343,6 @@ namespace Mono.CSharp {
                        if (e != null)
                                return e;
 
-                       if (source.Type == InternalType.Dynamic) {
-                               Arguments args = new Arguments (1);
-                               args.Add (new Argument (source));
-                               return new DynamicConversion (target_type, 0, args, loc).Resolve (ec);
-                       }
-
                        source.Error_ValueCannotBeConverted (ec, loc, target_type, false);
                        return null;
                }
@@ -1640,9 +1659,9 @@ namespace Mono.CSharp {
                                return source == null ? EmptyExpression.Null : new UnboxCast (source, target_type);
 
                        //
-                       // From object to any reference type or value type (unboxing)
+                       // From object or dynamic to any reference type or value type (unboxing)
                        //
-                       if (source_type == TypeManager.object_type)
+                       if (source_type == TypeManager.object_type || source_type == InternalType.Dynamic)
                                return
                                        source == null ? EmptyExpression.Null :
                                        target_is_value_type ? new UnboxCast (source, target_type) :
@@ -1652,7 +1671,7 @@ namespace Mono.CSharp {
                        //
                        // From any class S to any class-type T, provided S is a base class of T
                        //
-                       if (source_type.Kind == MemberKind.Class && TypeManager.IsSubclassOf (target_type, source_type))
+                       if (source_type.Kind == MemberKind.Class && TypeSpec.IsBaseClass (target_type, source_type, true))
                                return source == null ? EmptyExpression.Null : new ClassCast (source, target_type);
 
                        //
@@ -1741,6 +1760,46 @@ namespace Mono.CSharp {
                        if (source_type == TypeManager.delegate_type && TypeManager.IsDelegateType (target_type))
                                return source == null ? EmptyExpression.Null : new ClassCast (source, target_type);
 
+                       //
+                       // From variant generic delegate to same variant generic delegate type
+                       //
+                       if (source_type.IsDelegate && target_type.IsDelegate && source_type.MemberDefinition == target_type.MemberDefinition) {
+                               var tparams = source_type.MemberDefinition.TypeParameters;
+                               var targs_src = source_type.TypeArguments;
+                               var targs_dst = target_type.TypeArguments;
+                               int i;
+                               for (i = 0; i < tparams.Length; ++i) {
+                                       //
+                                       // If TP is invariant, types have to be identical
+                                       //
+                                       if (TypeSpecComparer.IsEqual (targs_src[i], targs_dst[i]))
+                                               continue;
+
+                                       if (tparams[i].Variance == Variance.Covariant) {
+                                               //
+                                               //If TP is covariant, an implicit or explicit identity or reference conversion is required
+                                               //
+                                               if (ImplicitReferenceConversionExists (new EmptyExpression (targs_src[i]), targs_dst[i]))
+                                                       continue;
+
+                                               if (ExplicitReferenceConversionExists (targs_src[i], targs_dst[i]))
+                                                       continue;
+
+                                       } else if (tparams[i].Variance == Variance.Contravariant) {
+                                               //
+                                               //If TP is contravariant, both are either identical or reference types
+                                               //
+                                               if (TypeManager.IsReferenceType (targs_src[i]) && TypeManager.IsReferenceType (targs_dst[i]))
+                                                       continue;
+                                       }
+
+                                       break;
+                               }
+
+                               if (i == tparams.Length)
+                                       return source == null ? EmptyExpression.Null : new ClassCast (source, target_type);
+                       }
+
                        return null;
                }
 
@@ -1818,7 +1877,7 @@ namespace Mono.CSharp {
                        // from Null to a ValueType, and ExplicitReference wont check against
                        // null literal explicitly
                        //
-                       if (expr_type != TypeManager.null_type){
+                       if (expr_type != InternalType.Null) {
                                ne = ExplicitReferenceConversion (expr, expr_type, target_type);
                                if (ne != null)
                                        return ne;
index b718931b1fb3e4313fd3c338ba756bd6d03c2a9f..1c2b452b4f635db267c3075357ec602d0bb964c6 100644 (file)
@@ -784,9 +784,9 @@ attribute
                else if (global_attrs_enabled && (current_attr_target == "assembly" || current_attr_target == "module"))
                        // FIXME: supply "nameEscaped" parameter here.
                        $$ = new GlobalAttribute (current_namespace, current_attr_target,
-                                                 expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname.Location));
+                                                 expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname));
                else
-                       $$ = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname.Location));
+                       $$ = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname));
          }
        ;
 
@@ -1232,7 +1232,6 @@ fixed_field_size
          }       
        ;
        
-       
 local_variable_declarators     
        : local_variable_declarator 
          {
@@ -2026,24 +2025,24 @@ operator_declaration
          }
          operator_body
          {
-               if ($3 == null)
-                       break;
-
                OperatorDeclaration decl = (OperatorDeclaration) $3;
-               Operator op = new Operator (
-                       current_class, decl.optype, decl.ret_type, (Modifiers) $2, 
-                       current_local_parameters,
-                       (ToplevelBlock) $5, (Attributes) $1, decl.location);
-
-               if (RootContext.Documentation != null) {
-                       op.DocComment = tmpComment;
-                       Lexer.doc_state = XmlCommentState.Allowed;
-               }
+               if (decl != null) {
+                       Operator op = new Operator (
+                               current_class, decl.optype, decl.ret_type, (Modifiers) $2, 
+                               current_local_parameters,
+                               (ToplevelBlock) $5, (Attributes) $1, decl.location);
+
+                       if (RootContext.Documentation != null) {
+                               op.DocComment = tmpComment;
+                               Lexer.doc_state = XmlCommentState.Allowed;
+                       }
 
-               // Note again, checking is done in semantic analysis
-               current_container.AddOperator (op);
+                       // Note again, checking is done in semantic analysis
+                       current_container.AddOperator (op);
 
-               lbag.AddMember (op, mod_locations, lbag.GetLocations (decl));
+                       lbag.AddMember (op, mod_locations, lbag.GetLocations (decl));
+               }
+               
                current_local_parameters = null;
          }
        ;
@@ -2707,9 +2706,6 @@ delegate_declaration
 
 opt_nullable
        : /* empty */
-         {
-               $$ = null;
-         }
        | INTERR_NULLABLE
          {
                if (RootContext.MetadataCompatibilityVersion < MetadataVersion.v2)        
@@ -2754,7 +2750,7 @@ type_name
 // Generics arguments  (any type, without attributes)
 //
 opt_type_argument_list
-       : /* empty */                { $$ = null; } 
+       : /* empty */
        | OP_GENERICS_LT type_arguments OP_GENERICS_GT
          {
                if (RootContext.MetadataCompatibilityVersion < MetadataVersion.v2)        
@@ -2859,7 +2855,7 @@ explicit_interface
        ;
        
 opt_type_parameter_list
-       : /* empty */                { $$ = null; } 
+       : /* empty */
        | OP_GENERICS_LT_DECL type_parameters OP_GENERICS_GT
          {
                if (RootContext.MetadataCompatibilityVersion < MetadataVersion.v2)        
@@ -2975,23 +2971,22 @@ type_expression
                                $$ = name.GetTypeExpression ();
                }
          }
+       | namespace_or_type_name pointer_stars
+         {
+               $$ = new ComposedCast (((MemberName) $1).GetTypeExpression (), (ComposedTypeSpecifier) $2);
+         }
        | builtin_types opt_nullable
          {
                if ($2 != null)
                        $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
          }
-       | type_expression STAR
+       | builtin_types pointer_stars
          {
-               //
-               // Note that here only unmanaged types are allowed but we
-               // can't perform checks during this phase - we do it during
-               // semantic analysis.
-               //
-               $$ = new ComposedCast ((FullNamedExpression) $1, ComposedTypeSpecifier.CreatePointer (GetLocation ($2)));
+               $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
          }
-       | VOID STAR
+       | VOID pointer_stars
          {
-               $$ = new ComposedCast (new TypeExpression (TypeManager.void_type, GetLocation ($1)), ComposedTypeSpecifier.CreatePointer (GetLocation ($2)));
+               $$ = new ComposedCast (new TypeExpression (TypeManager.void_type, GetLocation ($1)), (ComposedTypeSpecifier) $2);
          }     
        ;
 
@@ -3057,24 +3052,11 @@ integral_type
 
 
 primary_expression
-       : primary_expression_no_array_creation
+       : primary_expression_or_type
+       | literal
        | array_creation_expression
-       ;
-
-primary_expression_no_array_creation
-       : literal
-       | IDENTIFIER opt_type_argument_list
-         {
-               var lt = (Tokenizer.LocatedToken) $1;
-               $$ = new SimpleName (lt.Value, (TypeArguments)$2, lt.Location);   
-         }
-       | IDENTIFIER GENERATE_COMPLETION {
-               var lt = (Tokenizer.LocatedToken) $1;
-              $$ = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location);
-         }
        | parenthesized_expression
        | default_value_expression
-       | member_access
        | invocation_expression
        | element_access
        | this_access
@@ -3088,7 +3070,20 @@ primary_expression_no_array_creation
        | checked_expression
        | unchecked_expression
        | pointer_member_access
-       | anonymous_method_expression
+       | anonymous_method_expression   
+       ;
+
+primary_expression_or_type
+       : IDENTIFIER opt_type_argument_list
+         {
+               var lt = (Tokenizer.LocatedToken) $1;
+               $$ = new SimpleName (lt.Value, (TypeArguments)$2, lt.Location);   
+         }
+       | IDENTIFIER GENERATE_COMPLETION {
+               var lt = (Tokenizer.LocatedToken) $1;
+              $$ = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location);
+         }
+       | member_access
        ;
 
 literal
@@ -3587,25 +3582,9 @@ anonymous_type_parameter
 
 opt_rank_specifier
        : /* empty */
-         {
-               $$ = null;
-         }
        | rank_specifiers
        ;
 
-opt_rank_specifier_or_nullable
-       : opt_nullable
-       | opt_nullable rank_specifiers
-         {
-               if ($1 != null) {
-                       ((ComposedTypeSpecifier) $1).Next = (ComposedTypeSpecifier) $2;
-                       $$ = $1;
-               } else {
-                       $$ = $2;
-               }
-         }
-       ;
-
 rank_specifiers
        : rank_specifier
        | rank_specifier rank_specifiers
@@ -3732,10 +3711,12 @@ unbound_type_name
          }
        | namespace_or_type_name DOT IDENTIFIER generic_dimension
          {
-               var lt = (Tokenizer.LocatedToken) $3;
-               MemberName name = (MemberName) $1;
+               var te = ((MemberName) $1).GetTypeExpression ();
+               if (te.HasTypeArguments)
+                       Error_TypeExpected (GetLocation ($4));
 
-               $$ = new MemberAccess (name.GetTypeExpression (), lt.Value, (int) $4, lt.Location);             
+               var lt = (Tokenizer.LocatedToken) $3;
+               $$ = new MemberAccess (te, lt.Value, (int) $4, lt.Location);            
          }
        ;
 
@@ -4704,14 +4685,25 @@ declaration_statement
          }
        ;
 
+variable_type
+       : variable_type_simple
+       | variable_type_simple rank_specifiers
+         {
+               if ($1 is VarExpr)
+                       $1 = new SimpleName ("var", ((VarExpr) $1).Location);
+         
+               $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
+         }
+       ;
+
 /* 
  * The following is from Rhys' grammar:
  * > Types in local variable declarations must be recognized as 
  * > expressions to prevent reduce/reduce errors in the grammar.
  * > The expressions are converted into types during semantic analysis.
  */
-variable_type
-       : primary_expression_no_array_creation opt_rank_specifier_or_nullable
+variable_type_simple
+       : primary_expression_or_type opt_nullable
          { 
                // Ok, the above "primary_expression" is there to get rid of
                // both reduce/reduce and shift/reduces in the grammar, it should
@@ -4741,63 +4733,57 @@ variable_type
                        $$ = null;
                }
          }
-       | builtin_types opt_rank_specifier_or_nullable
-         {
-               if ($2 == null)
-                       $$ = $1;
-               else
-                       $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
-         }
-       | VOID opt_rank_specifier
-         {
-               Expression.Error_VoidInvalidInTheContext (GetLocation ($1), Report);
-               $$ = new TypeExpression (TypeManager.void_type, GetLocation ($1));
-         }
-       ;
-
-local_variable_pointer_type
-       : primary_expression_no_array_creation STAR
+       | primary_expression_or_type pointer_stars
          {
                ATypeNameExpression expr = $1 as ATypeNameExpression;
 
                if (expr != null) {
-                       $$ = new ComposedCast (expr, ComposedTypeSpecifier.CreatePointer (GetLocation ($2)));
+                       $$ = new ComposedCast (expr, (ComposedTypeSpecifier) $2);
                } else {
                        Error_ExpectingTypeName ((Expression)$1);
                        $$ = expr;
                }
          }
-       | builtin_types STAR
+       | builtin_types opt_nullable
          {
-               $$ = new ComposedCast ((FullNamedExpression) $1, ComposedTypeSpecifier.CreatePointer (GetLocation ($2)));
+               if ($2 == null)
+                       $$ = $1;
+               else
+                       $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
          }
-       | VOID STAR
+       | builtin_types pointer_stars
          {
-               $$ = new ComposedCast (new TypeExpression (TypeManager.void_type, GetLocation ($1)), ComposedTypeSpecifier.CreatePointer (GetLocation ($2)));
+               $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
          }
-       | local_variable_pointer_type STAR
+       | VOID pointer_stars
+         {
+               $$ = new ComposedCast (new TypeExpression (TypeManager.void_type, GetLocation ($1)), (ComposedTypeSpecifier) $2);
+         }       
+       | VOID
          {
-               $$ = new ComposedCast ((FullNamedExpression) $1, ComposedTypeSpecifier.CreatePointer (GetLocation ($2)));
+               Expression.Error_VoidInvalidInTheContext (GetLocation ($1), Report);
+               $$ = new TypeExpression (TypeManager.void_type, GetLocation ($1));
          }
        ;
+       
+pointer_stars
+       : pointer_star
+       | pointer_star pointer_stars
+         {
+               ((ComposedTypeSpecifier) $1).Next = (ComposedTypeSpecifier) $2;
+               $$ = $1;
+         }       
+       ;
 
-local_variable_type
-       : variable_type
-       | local_variable_pointer_type opt_rank_specifier
+pointer_star
+       : STAR
          {
-               if ($1 != null){
-                       if ($2 == null)
-                               $$ = $1;
-                       else
-                               $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
-               } else {
-                       $$ = null;
-               }
+               $$ = ComposedTypeSpecifier.CreatePointer (GetLocation ($1));
          }
        ;
 
 local_variable_declaration
-       : local_variable_type local_variable_declarators
+       : variable_type local_variable_declarators
          {
                if ($1 != null) {
                        VarExpr ve = $1 as VarExpr;
@@ -6092,7 +6078,7 @@ class VariableDeclaration {
 // <summary>
 //  A class used to hold info about an operator declarator
 // </summary>
-struct OperatorDeclaration {
+class OperatorDeclaration {
        public readonly Operator.OpType optype;
        public readonly FullNamedExpression ret_type;
        public readonly Location location;
index 253b1be803fbf12ced49b3475f1f85ec9e348dca..4f6ad6bfd935cf0c720110493efa61e8a5ead8b2 100644 (file)
@@ -28,13 +28,13 @@ namespace Mono.CSharp
 
        public class Tokenizer : yyParser.yyInput
        {
-               class KeywordEntry
+               class KeywordEntry<T>
                {
-                       public readonly int Token;
-                       public KeywordEntry Next;
+                       public readonly T Token;
+                       public KeywordEntry<T> Next;
                        public readonly char[] Value;
 
-                       public KeywordEntry (string value, int token)
+                       public KeywordEntry (string value, T token)
                        {
                                this.Value = value.ToCharArray ();
                                this.Token = token;
@@ -143,6 +143,27 @@ namespace Mono.CSharp
                        }
                }
 
+               enum PreprocessorDirective
+               {
+                       Invalid = 0,
+
+                       Region = 1,
+                       Endregion = 2,
+                       If = 3 | RequiresArgument,
+                       Endif = 4,
+                       Elif = 5 | RequiresArgument,
+                       Else = 6,
+                       Define = 7 | RequiresArgument,
+                       Undef = 8 | RequiresArgument,
+                       Error = 9,
+                       Warning = 10,
+                       Pragma = 11 | CustomArgumentsParsing,
+                       Line = 12,
+
+                       CustomArgumentsParsing = 1 << 10,
+                       RequiresArgument = 1 << 11
+               }
+
                SeekableStreamReader reader;
                SourceFile ref_name;
                CompilationUnit file_name;
@@ -282,24 +303,25 @@ namespace Mono.CSharp
                        escaped_identifiers.Add (loc);
                }
 
-               public bool IsEscapedIdentifier (Location loc)
+               public bool IsEscapedIdentifier (MemberName name)
                {
-                       if (escaped_identifiers != null) {
-                               foreach (Location lt in escaped_identifiers)
-                                       if (lt.Equals (loc))
-                                               return true;
-                       }
-
-                       return false;
+                       return escaped_identifiers != null && escaped_identifiers.Contains (name.Location);
                }
 
                //
                // Class variables
                // 
-               static KeywordEntry[][] keywords;
+               static KeywordEntry<int>[][] keywords;
+               static KeywordEntry<PreprocessorDirective>[][] keywords_preprocessor;
                static Dictionary<string, object> keyword_strings;              // TODO: HashSet
                static NumberStyles styles;
                static NumberFormatInfo csharp_format_info;
+
+               // Pragma arguments
+               static readonly char[] pragma_warning = "warning".ToCharArray ();
+               static readonly char[] pragma_warning_disable = "disable".ToCharArray ();
+               static readonly char[] pragma_warning_restore = "restore".ToCharArray ();
+               static readonly char[] pragma_checksum = "checksum".ToCharArray ();
                
                //
                // Values for the associated token returned
@@ -425,15 +447,25 @@ namespace Mono.CSharp
                {
                        keyword_strings.Add (kw, null);
 
+                       AddKeyword (keywords, kw, token);
+               }
+
+               static void AddPreprocessorKeyword (string kw, PreprocessorDirective directive)
+               {
+                       AddKeyword (keywords_preprocessor, kw, directive);
+               }
+
+               static void AddKeyword<T> (KeywordEntry<T>[][] keywords, string kw, T token)
+               {
                        int length = kw.Length;
-                       if (keywords [length] == null) {
-                               keywords [length] = new KeywordEntry ['z' - '_' + 1];
+                       if (keywords[length] == null) {
+                               keywords[length] = new KeywordEntry<T>['z' - '_' + 1];
                        }
 
-                       int char_index = kw [0] - '_';
-                       KeywordEntry kwe = keywords [length] [char_index];
+                       int char_index = kw[0] - '_';
+                       var kwe = keywords[length][char_index];
                        if (kwe == null) {
-                               keywords [length] [char_index] = new KeywordEntry (kw, token);
+                               keywords[length][char_index] = new KeywordEntry<T> (kw, token);
                                return;
                        }
 
@@ -441,7 +473,7 @@ namespace Mono.CSharp
                                kwe = kwe.Next;
                        }
 
-                       kwe.Next = new KeywordEntry (kw, token);
+                       kwe.Next = new KeywordEntry<T> (kw, token);
                }
 
                static void InitTokens ()
@@ -449,7 +481,7 @@ namespace Mono.CSharp
                        keyword_strings = new Dictionary<string, object> ();
 
                        // 11 is the length of the longest keyword for now
-                       keywords = new KeywordEntry [11] [];
+                       keywords = new KeywordEntry<int> [11] [];
 
                        AddKeyword ("__arglist", Token.ARGLIST);
                        AddKeyword ("abstract", Token.ABSTRACT);
@@ -549,6 +581,21 @@ namespace Mono.CSharp
                        AddKeyword ("ascending", Token.ASCENDING);
                        AddKeyword ("descending", Token.DESCENDING);
                        AddKeyword ("into", Token.INTO);
+
+                       keywords_preprocessor = new KeywordEntry<PreprocessorDirective>[10][];
+
+                       AddPreprocessorKeyword ("region", PreprocessorDirective.Region);
+                       AddPreprocessorKeyword ("endregion", PreprocessorDirective.Endregion);
+                       AddPreprocessorKeyword ("if", PreprocessorDirective.If);
+                       AddPreprocessorKeyword ("endif", PreprocessorDirective.Endif);
+                       AddPreprocessorKeyword ("elif", PreprocessorDirective.Elif);
+                       AddPreprocessorKeyword ("else", PreprocessorDirective.Else);
+                       AddPreprocessorKeyword ("define", PreprocessorDirective.Define);
+                       AddPreprocessorKeyword ("undef", PreprocessorDirective.Undef);
+                       AddPreprocessorKeyword ("error", PreprocessorDirective.Error);
+                       AddPreprocessorKeyword ("warning", PreprocessorDirective.Warning);
+                       AddPreprocessorKeyword ("pragma", PreprocessorDirective.Pragma);
+                       AddPreprocessorKeyword ("line", PreprocessorDirective.Line);
                }
 
                //
@@ -576,7 +623,7 @@ namespace Mono.CSharp
                        if (first_index > 'z' - '_')
                                return -1;
 
-                       KeywordEntry kwe = keywords [id_len] [first_index];
+                       var kwe = keywords [id_len] [first_index];
                        if (kwe == null)
                                return -1;
 
@@ -733,6 +780,38 @@ namespace Mono.CSharp
                        return res;
                }
 
+               static PreprocessorDirective GetPreprocessorDirective (char[] id, int id_len)
+               {
+                       //
+                       // Keywords are stored in an array of arrays grouped by their
+                       // length and then by the first character
+                       //
+                       if (id_len >= keywords_preprocessor.Length || keywords_preprocessor[id_len] == null)
+                               return PreprocessorDirective.Invalid;
+
+                       int first_index = id[0] - '_';
+                       if (first_index > 'z' - '_')
+                               return PreprocessorDirective.Invalid;
+
+                       var kwe = keywords_preprocessor[id_len][first_index];
+                       if (kwe == null)
+                               return PreprocessorDirective.Invalid;
+
+                       PreprocessorDirective res = PreprocessorDirective.Invalid;
+                       do {
+                               res = kwe.Token;
+                               for (int i = 1; i < id_len; ++i) {
+                                       if (id[i] != kwe.Value[i]) {
+                                               res = 0;
+                                               kwe = kwe.Next;
+                                               break;
+                                       }
+                               }
+                       } while (res == PreprocessorDirective.Invalid && kwe != null);
+
+                       return res;
+               }
+
                public Location Location {
                        get {
                                return new Location (ref_line, hidden ? -1 : col);
@@ -1307,8 +1386,7 @@ namespace Mono.CSharp
                                        return integer_type_suffix (ui, c);
                                }
                        } catch (OverflowException) {
-                               error_details = "Integral constant is too large";
-                               Report.Error (1021, Location, error_details);
+                               Error_NumericConstantTooLong ();
                                val = new IntLiteral (0, Location);
                                return Token.LITERAL;
                        }
@@ -1375,8 +1453,7 @@ namespace Mono.CSharp
                                else
                                        ul = System.UInt64.Parse (s, NumberStyles.HexNumber);
                        } catch (OverflowException){
-                               error_details = "Integral constant is too large";
-                               Report.Error (1021, Location, error_details);
+                               Error_NumericConstantTooLong ();
                                val = new IntLiteral (0, Location);
                                return Token.LITERAL;
                        }
@@ -1670,21 +1747,17 @@ namespace Mono.CSharp
                        return current_token;
                }
 
-               void get_cmd_arg (out string cmd, out string arg)
+               int TokenizePreprocessorIdentifier (out int c)
                {
-                       int c;
-                       
-                       tokens_seen = false;
-                       arg = "";
-
                        // skip over white space
                        do {
                                c = get_char ();
                        } while (c == '\r' || c == ' ' || c == '\t');
 
-                       static_cmd_arg.Length = 0;
-                       while (c != -1 && is_identifier_part_character ((char)c)) {
-                               static_cmd_arg.Append ((char)c);
+
+                       int pos = 0;
+                       while (c != -1 && c >= 'a' && c <= 'z') {
+                               id_builder[pos++] = (char) c;
                                c = get_char ();
                                if (c == '\\') {
                                        int peek = peek_char ();
@@ -1692,26 +1765,40 @@ namespace Mono.CSharp
                                                int surrogate;
                                                c = EscapeUnicode (c, out surrogate);
                                                if (surrogate != 0) {
-                                                       if (is_identifier_part_character ((char) c))
-                                                               static_cmd_arg.Append ((char) c);
+                                                       if (is_identifier_part_character ((char) c)) {
+                                                               id_builder[pos++] = (char) c;
+                                                       }
                                                        c = surrogate;
                                                }
                                        }
                                }
                        }
 
-                       cmd = static_cmd_arg.ToString ();
+                       return pos;
+               }
+
+               PreprocessorDirective get_cmd_arg (out string arg)
+               {
+                       int c;          
+
+                       tokens_seen = false;
+                       arg = "";
+
+                       var cmd = GetPreprocessorDirective (id_builder, TokenizePreprocessorIdentifier (out c));
+
+                       if ((cmd & PreprocessorDirective.CustomArgumentsParsing) != 0)
+                               return cmd;
 
                        // skip over white space
                        while (c == '\r' || c == ' ' || c == '\t')
                                c = get_char ();
 
                        static_cmd_arg.Length = 0;
-                       int has_identifier_argument = 0;
+                       int has_identifier_argument = (int)(cmd & PreprocessorDirective.RequiresArgument);
 
                        while (c != -1 && c != '\n' && c != '\r') {
                                if (c == '\\' && has_identifier_argument >= 0) {
-                                       if (has_identifier_argument != 0 || (cmd == "define" || cmd == "if" || cmd == "elif" || cmd == "undef")) {
+                                       if (has_identifier_argument != 0) {
                                                has_identifier_argument = 1;
 
                                                int peek = peek_char ();
@@ -1732,8 +1819,18 @@ namespace Mono.CSharp
                                c = get_char ();
                        }
 
-                       if (static_cmd_arg.Length != 0)
+                       if (static_cmd_arg.Length != 0) {
                                arg = static_cmd_arg.ToString ();
+
+                               // Eat any trailing whitespaces and single-line comments
+                               if (arg.IndexOf ("//") != -1) {
+                                       arg = arg.Substring (0, arg.IndexOf ("//"));
+                               }
+
+                               arg = arg.Trim (simple_whitespaces);
+                       }
+
+                       return cmd;
                }
 
                //
@@ -1824,12 +1921,10 @@ namespace Mono.CSharp
                        }
                }
 
-               static byte read_hex (string arg, int pos, out bool error)
+               byte read_hex (out bool error)
                {
-                       error = false;
-
                        int total;
-                       char c = arg [pos];
+                       int c = get_char ();
 
                        if ((c >= '0') && (c <= '9'))
                                total = (int) c - (int) '0';
@@ -1843,7 +1938,7 @@ namespace Mono.CSharp
                        }
 
                        total *= 16;
-                       c = arg [pos+1];
+                       c = get_char ();
 
                        if ((c >= '0') && (c <= '9'))
                                total += (int) c - (int) '0';
@@ -1856,164 +1951,262 @@ namespace Mono.CSharp
                                return 0;
                        }
 
+                       error = false;
                        return (byte) total;
                }
 
-               /// <summary>
-               /// Handles #pragma checksum
-               /// </summary>
-               bool PreProcessPragmaChecksum (string arg)
+               //
+               // Parses #pragma checksum
+               //
+               bool ParsePragmaChecksum ()
                {
-                       if ((arg [0] != ' ') && (arg [0] != '\t'))
-                               return false;
+                       //
+                       // The syntax is ` "foo.txt" "{guid}" "hash"'
+                       //
+                       int c = get_char ();
 
-                       arg = arg.Trim (simple_whitespaces);
-                       if ((arg.Length < 2) || (arg [0] != '"'))
+                       if (c != '"')
                                return false;
 
-                       StringBuilder file_sb = new StringBuilder ();
-
-                       int pos = 1;
-                       char ch;
-                       while ((ch = arg [pos++]) != '"') {
-                               if (pos >= arg.Length)
-                                       return false;
-
-                               if (ch == '\\') {
-                                       if (pos+1 >= arg.Length)
-                                               return false;
-                                       ch = arg [pos++];
+                       string_builder.Length = 0;
+                       while (c != -1 && c != '\n') {
+                               c = get_char ();
+                               if (c == '"') {
+                                       c = get_char ();
+                                       break;
                                }
 
-                               file_sb.Append (ch);
+                               string_builder.Append ((char) c);
+                       }
+
+                       if (string_builder.Length == 0) {
+                               Report.Warning (1709, 1, Location, "Filename specified for preprocessor directive is empty");
                        }
 
-                       if ((pos+2 >= arg.Length) || ((arg [pos] != ' ') && (arg [pos] != '\t')))
+                       // TODO: Any white-spaces count
+                       if (c != ' ')
                                return false;
 
-                       arg = arg.Substring (pos).Trim (simple_whitespaces);
-                       if ((arg.Length < 42) || (arg [0] != '"') || (arg [1] != '{') ||
-                           (arg [10] != '-') || (arg [15] != '-') || (arg [20] != '-') ||
-                           (arg [25] != '-') || (arg [38] != '}') || (arg [39] != '"'))
+                       SourceFile file = Location.LookupFile (file_name, string_builder.ToString ());
+
+                       if (get_char () != '"' || get_char () != '{')
                                return false;
 
                        bool error;
                        byte[] guid_bytes = new byte [16];
+                       int i = 0;
 
-                       for (int i = 0; i < 4; i++) {
-                               guid_bytes [i] = read_hex (arg, 2+2*i, out error);
+                       for (; i < 4; i++) {
+                               guid_bytes [i] = read_hex (out error);
                                if (error)
                                        return false;
                        }
-                       for (int i = 0; i < 2; i++) {
-                               guid_bytes [i+4] = read_hex (arg, 11+2*i, out error);
+
+                       if (get_char () != '-')
+                               return false;
+
+                       for (; i < 10; i++) {
+                               guid_bytes [i] = read_hex (out error);
                                if (error)
                                        return false;
-                               guid_bytes [i+6] = read_hex (arg, 16+2*i, out error);
+
+                               guid_bytes [i++] = read_hex (out error);
                                if (error)
                                        return false;
-                               guid_bytes [i+8] = read_hex (arg, 21+2*i, out error);
-                               if (error)
+
+                               if (get_char () != '-')
                                        return false;
                        }
 
-                       for (int i = 0; i < 6; i++) {
-                               guid_bytes [i+10] = read_hex (arg, 26+2*i, out error);
+                       for (; i < 16; i++) {
+                               guid_bytes [i] = read_hex (out error);
                                if (error)
                                        return false;
                        }
 
-                       arg = arg.Substring (40).Trim (simple_whitespaces);
-                       if ((arg.Length < 34) || (arg [0] != '"') || (arg [33] != '"'))
+                       if (get_char () != '}' || get_char () != '"')
                                return false;
 
-                       byte[] checksum_bytes = new byte [16];
-                       for (int i = 0; i < 16; i++) {
-                               checksum_bytes [i] = read_hex (arg, 1+2*i, out error);
+                       // TODO: Any white-spaces count
+                       c = get_char ();
+                       if (c != ' ')
+                               return false;
+
+                       if (get_char () != '"')
+                               return false;
+
+                       // Any length of checksum
+                       List<byte> checksum_bytes = new List<byte> (16);
+
+                       c = peek_char ();
+                       while (c != '"' && c != -1) {
+                               checksum_bytes.Add (read_hex (out error));
                                if (error)
                                        return false;
+
+                               c = peek_char ();
                        }
 
-                       arg = arg.Substring (34).Trim (simple_whitespaces);
-                       if (arg.Length > 0)
+                       if (c == '/') {
+                               ReadSingleLineComment ();
+                       } else if (get_char () != '"') {
                                return false;
+                       }
 
-                       SourceFile file = Location.LookupFile (file_name, file_sb.ToString ());
-                       file.SetChecksum (guid_bytes, checksum_bytes);
+                       file.SetChecksum (guid_bytes, checksum_bytes.ToArray ());
                        ref_name.AutoGenerated = true;
                        return true;
                }
 
+               bool IsTokenIdentifierEqual (char[] identifier)
+               {
+                       for (int i = 0; i < identifier.Length; ++i) {
+                               if (identifier[i] != id_builder[i])
+                                       return false;
+                       }
+
+                       return true;
+               }
+
+               int TokenizePragmaNumber (ref int c)
+               {
+                       number_pos = 0;
+
+                       int number;
+
+                       if (c >= '0' && c <= '9') {
+                               decimal_digits (c);
+                               uint ui = (uint) (number_builder[0] - '0');
+
+                               try {
+                                       for (int i = 1; i < number_pos; i++) {
+                                               ui = checked ((ui * 10) + ((uint) (number_builder[i] - '0')));
+                                       }
+
+                                       number = (int) ui;
+                               } catch (OverflowException) {
+                                       Error_NumericConstantTooLong ();
+                                       number = -1;
+                               }
+
+
+                               c = get_char ();
+
+                               // skip over white space
+                               while (c == '\r' || c == ' ' || c == '\t')
+                                       c = get_char ();
+
+                               if (c == ',') {
+                                       c = get_char ();
+                               }
+
+                               // skip over white space
+                               while (c == '\r' || c == ' ' || c == '\t')
+                                       c = get_char ();
+                       } else {
+                               number = -1;
+                               if (c == '/') {
+                                       ReadSingleLineComment ();
+                               } else {
+                                       Report.Warning (1692, 1, Location, "Invalid number");
+
+                                       // Read everything till the end of the line or file
+                                       do {
+                                               c = get_char ();
+                                       } while (c != -1 && c != '\n');
+                               }
+                       }
+
+                       return number;
+               }
+
+               void ReadSingleLineComment ()
+               {
+                       if (peek_char () != '/')
+                               Report.Warning (1696, 1, Location, "Single-line comment or end-of-line expected");
+
+                       // Read everything till the end of the line or file
+                       int c;
+                       do {
+                               c = get_char ();
+                       } while (c != -1 && c != '\n');
+               }
+
                /// <summary>
                /// Handles #pragma directive
                /// </summary>
-               void PreProcessPragma (string arg)
+               void ParsePragmaDirective (string arg)
                {
-                       const string warning = "warning";
-                       const string w_disable = "warning disable";
-                       const string w_restore = "warning restore";
-                       const string checksum = "checksum";
+                       int c;
+                       int length = TokenizePreprocessorIdentifier (out c);
+                       if (length == pragma_warning.Length && IsTokenIdentifierEqual (pragma_warning)) {
+                               length = TokenizePreprocessorIdentifier (out c);
 
-                       if (arg == w_disable) {
-                               Report.RegisterWarningRegion (Location).WarningDisable (Location.Row);
-                               return;
-                       }
+                               //
+                               // #pragma warning disable
+                               // #pragma warning restore
+                               //
+                               if (length == pragma_warning_disable.Length) {
+                                       bool disable = IsTokenIdentifierEqual (pragma_warning_disable);
+                                       if (disable || IsTokenIdentifierEqual (pragma_warning_restore)) {
+                                               // skip over white space
+                                               while (c == '\r' || c == ' ' || c == '\t')
+                                                       c = get_char ();
 
-                       if (arg == w_restore) {
-                               Report.RegisterWarningRegion (Location).WarningEnable (Location.Row);
-                               return;
-                       }
+                                               var loc = Location;
 
-                       if (arg.StartsWith (w_disable)) {
-                               int[] codes = ParseNumbers (arg.Substring (w_disable.Length));
-                               foreach (int code in codes) {
-                                       if (code != 0)
-                                               Report.RegisterWarningRegion (Location).WarningDisable (Location, code, Report);
-                               }
-                               return;
-                       }
+                                               if (c == '\n' || c == '/') {
+                                                       if (c == '/')
+                                                               ReadSingleLineComment ();
 
-                       if (arg.StartsWith (w_restore)) {
-                               int[] codes = ParseNumbers (arg.Substring (w_restore.Length));
-                               var w_table = Report.warning_ignore_table;
-                               foreach (int code in codes) {
-                                       if (w_table != null && w_table.ContainsKey (code))
-                                               Report.Warning (1635, 1, Location, "Cannot restore warning `CS{0:0000}' because it was disabled globally", code);
-                                       Report.RegisterWarningRegion (Location).WarningEnable (Location, code, Report);
+                                                       //
+                                                       // Disable/Restore all warnings
+                                                       //
+                                                       if (disable) {
+                                                               Report.RegisterWarningRegion (loc).WarningDisable (loc.Row);
+                                                       } else {
+                                                               Report.RegisterWarningRegion (loc).WarningEnable (loc.Row);
+                                                       }
+                                               } else {
+                                                       //
+                                                       // Disable/Restore a warning or group of warnings
+                                                       //
+                                                       int code;
+                                                       do {
+                                                               code = TokenizePragmaNumber (ref c);
+                                                               if (code > 0) {
+                                                                       if (disable) {
+                                                                               Report.RegisterWarningRegion (loc).WarningDisable (loc, code, Report);
+                                                                       } else {
+                                                                               Report.RegisterWarningRegion (loc).WarningEnable (loc, code, Report);
+                                                                       }
+                                                               }
+                                                       } while (code >= 0 && c != '\n');
+                                               }
+
+                                               return;
+                                       }
                                }
-                               return;
-                       }
 
-                       if (arg.StartsWith (warning)) {
                                Report.Warning (1634, 1, Location, "Expected disable or restore");
                                return;
                        }
 
-                       if (arg.StartsWith (checksum)) {
-                               if (!PreProcessPragmaChecksum (arg.Substring (checksum.Length)))
-                                       Warning_InvalidPragmaChecksum ();
+                       //
+                       // #pragma checksum
+                       //
+                       if (length == pragma_checksum.Length && IsTokenIdentifierEqual (pragma_checksum)) {
+                               if (c != ' ' || !ParsePragmaChecksum ()) {
+                                       Report.Warning (1695, 1, Location,
+                                               "Invalid #pragma checksum syntax. Expected \"filename\" \"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\" \"XXXX...\"");
+                               }
+
                                return;
                        }
 
                        Report.Warning (1633, 1, Location, "Unrecognized #pragma directive");
                }
 
-               int[] ParseNumbers (string text)
-               {
-                       string[] string_array = text.Split (',');
-                       int[] values = new int [string_array.Length];
-                       int index = 0;
-                       foreach (string string_code in string_array) {
-                               try {
-                                       values[index++] = int.Parse (string_code, System.Globalization.CultureInfo.InvariantCulture);
-                               }
-                               catch (FormatException) {
-                                       Report.Warning (1692, 1, Location, "Invalid number");
-                               }
-                       }
-                       return values;
-               }
-
                bool eval_val (string s)
                {
                        if (s == "true")
@@ -2176,7 +2369,7 @@ namespace Mono.CSharp
 
                void Error_NumericConstantTooLong ()
                {
-                       Report.Error (1021, Location, "Numeric constant too long");                     
+                       Report.Error (1021, Location, "Integral constant is too large");                        
                }
                
                void Error_InvalidDirective ()
@@ -2208,41 +2401,29 @@ namespace Mono.CSharp
                        Report.Error (1025, Location, "Single-line comment or end-of-line expected");
                }
                
-               void Warning_InvalidPragmaChecksum ()
-               {
-                       Report.Warning (1695, 1, Location,
-                                       "Invalid #pragma checksum syntax; should be " +
-                                       "#pragma checksum \"filename\" " +
-                                       "\"{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\" \"XXXX...\"");
-               }
                //
                // if true, then the code continues processing the code
                // if false, the code stays in a loop until another directive is
                // reached.
                // When caller_is_taking is false we ignore all directives except the ones
                // which can help us to identify where the #if block ends
-               bool handle_preprocessing_directive (bool caller_is_taking)
+               bool ParsePreprocessingDirective (bool caller_is_taking)
                {
-                       string cmd, arg;
+                       string arg;
                        bool region_directive = false;
 
-                       get_cmd_arg (out cmd, out arg);
-
-                       // Eat any trailing whitespaces and single-line comments
-                       if (arg.IndexOf ("//") != -1)
-                               arg = arg.Substring (0, arg.IndexOf ("//"));
-                       arg = arg.Trim (simple_whitespaces);
+                       var directive = get_cmd_arg (out arg);
 
                        //
                        // The first group of pre-processing instructions is always processed
                        //
-                       switch (cmd){
-                       case "region":
+                       switch (directive) {
+                       case PreprocessorDirective.Region:
                                region_directive = true;
                                arg = "true";
-                               goto case "if";
+                               goto case PreprocessorDirective.If;
 
-                       case "endregion":
+                       case PreprocessorDirective.Endregion:
                                if (ifstack == null || ifstack.Count == 0){
                                        Error_UnexpectedDirective ("no #region for this #endregion");
                                        return true;
@@ -2254,7 +2435,7 @@ namespace Mono.CSharp
                                        
                                return caller_is_taking;
                                
-                       case "if":
+                       case PreprocessorDirective.If:
                                if (ifstack == null)
                                        ifstack = new Stack<int> (2);
 
@@ -2274,8 +2455,8 @@ namespace Mono.CSharp
                                }
                                ifstack.Push (flags);
                                return false;
-                               
-                       case "endif":
+
+                       case PreprocessorDirective.Endif:
                                if (ifstack == null || ifstack.Count == 0){
                                        Error_UnexpectedDirective ("no #if for this #endif");
                                        return true;
@@ -2296,7 +2477,7 @@ namespace Mono.CSharp
                                        return (state & TAKING) != 0;
                                }
 
-                       case "elif":
+                       case PreprocessorDirective.Elif:
                                if (ifstack == null || ifstack.Count == 0){
                                        Error_UnexpectedDirective ("no #if for this #elif");
                                        return true;
@@ -2327,7 +2508,7 @@ namespace Mono.CSharp
                                        return false;
                                }
 
-                       case "else":
+                       case PreprocessorDirective.Else:
                                if (ifstack == null || ifstack.Count == 0){
                                        Error_UnexpectedDirective ("no #if for this #else");
                                        return true;
@@ -2365,7 +2546,7 @@ namespace Mono.CSharp
                                        
                                        return ret;
                                }
-                       case "define":
+                       case PreprocessorDirective.Define:
                                if (any_token_seen){
                                        Error_TokensSeen ();
                                        return caller_is_taking;
@@ -2373,13 +2554,17 @@ namespace Mono.CSharp
                                PreProcessDefinition (true, arg, caller_is_taking);
                                return caller_is_taking;
 
-                       case "undef":
+                       case PreprocessorDirective.Undef:
                                if (any_token_seen){
                                        Error_TokensSeen ();
                                        return caller_is_taking;
                                }
                                PreProcessDefinition (false, arg, caller_is_taking);
                                return caller_is_taking;
+
+                       case PreprocessorDirective.Invalid:
+                               Report.Error (1024, Location, "Wrong preprocessor directive");
+                               return true;
                        }
 
                        //
@@ -2388,25 +2573,24 @@ namespace Mono.CSharp
                        if (!caller_is_taking)
                                return false;
                                        
-                       switch (cmd){
-                       case "error":
+                       switch (directive){
+                       case PreprocessorDirective.Error:
                                Report.Error (1029, Location, "#error: '{0}'", arg);
                                return true;
 
-                       case "warning":
+                       case PreprocessorDirective.Warning:
                                Report.Warning (1030, 1, Location, "#warning: `{0}'", arg);
                                return true;
 
-                       case "pragma":
+                       case PreprocessorDirective.Pragma:
                                if (RootContext.Version == LanguageVersion.ISO_1) {
                                        Report.FeatureIsNotAvailable (Location, "#pragma");
-                                       return true;
                                }
 
-                               PreProcessPragma (arg);
+                               ParsePragmaDirective (arg);
                                return true;
 
-                       case "line":
+                       case PreprocessorDirective.Line:
                                if (!PreProcessLine (arg))
                                        Report.Error (
                                                1576, Location,
@@ -2414,9 +2598,7 @@ namespace Mono.CSharp
                                return caller_is_taking;
                        }
 
-                       Report.Error (1024, Location, "Wrong preprocessor directive");
-                       return true;
-
+                       throw new NotImplementedException (directive.ToString ());
                }
 
                private int consume_string (bool quoted)
@@ -2424,24 +2606,23 @@ namespace Mono.CSharp
                        int c;
                        string_builder.Length = 0;
 
-                       while ((c = get_char ()) != -1){
-                               if (c == '"'){
-                                       if (quoted && peek_char () == '"'){
+                       while (true){
+                               c = get_char ();
+                               if (c == '"') {
+                                       if (quoted && peek_char () == '"') {
                                                string_builder.Append ((char) c);
                                                get_char ();
                                                continue;
-                                       } else {
-                                               val = new StringLiteral (string_builder.ToString (), Location);
-                                               return Token.LITERAL;
                                        }
+
+                                       val = new StringLiteral (string_builder.ToString (), Location);
+                                       return Token.LITERAL;
                                }
 
-                               if (c == '\n'){
+                               if (c == '\n') {
                                        if (!quoted)
                                                Report.Error (1010, Location, "Newline in constant");
-                               }
-
-                               if (!quoted){
+                               } else if (c == '\\' && !quoted) {
                                        int surrogate;
                                        c = escape (c, out surrogate);
                                        if (c == -1)
@@ -2450,12 +2631,13 @@ namespace Mono.CSharp
                                                string_builder.Append ((char) c);
                                                c = surrogate;
                                        }
+                               } else if (c == -1) {
+                                       Report.Error (1039, Location, "Unterminated string literal");
+                                       return Token.EOF;
                                }
+
                                string_builder.Append ((char) c);
                        }
-
-                       Report.Error (1039, Location, "Unterminated string literal");
-                       return Token.EOF;
                }
 
                private int consume_identifier (int s)
@@ -2965,7 +3147,7 @@ namespace Mono.CSharp
                                                return Token.ERROR;
                                        }
                                        
-                                       if (handle_preprocessing_directive (true))
+                                       if (ParsePreprocessingDirective (true))
                                                continue;
 
                                        bool directive_expected = false;
@@ -2985,7 +3167,7 @@ namespace Mono.CSharp
                                                        continue;
 
                                                if (c == '#') {
-                                                       if (handle_preprocessing_directive (false))
+                                                       if (ParsePreprocessingDirective (false))
                                                                break;
                                                }
                                                directive_expected = false;
index acb2d1d0ce04b8d78a88f5151c53ca9a6305eff2..ce474490f6fb8b3ae23cd76e435f5cf4e5325c35 100644 (file)
@@ -598,11 +598,12 @@ namespace Mono.CSharp {
                                        case Modifiers.PROTECTED | Modifiers.INTERNAL:
                                                if (al == Modifiers.INTERNAL)
                                                        same_access_restrictions = TypeManager.IsThisOrFriendAssembly (Parent.Module.Assembly, p.Assembly);
-                                               else if (al == Modifiers.PROTECTED)
-                                                       same_access_restrictions = mc.Parent.IsBaseTypeDefinition (p_parent);
                                                else if (al == (Modifiers.PROTECTED | Modifiers.INTERNAL))
                                                        same_access_restrictions = mc.Parent.IsBaseTypeDefinition (p_parent) &&
                                                                TypeManager.IsThisOrFriendAssembly (Parent.Module.Assembly, p.Assembly);
+                                               else
+                                                       goto case Modifiers.PROTECTED;
+
                                                break;
 
                                        case Modifiers.PRIVATE:
@@ -678,9 +679,9 @@ namespace Mono.CSharp {
                        return true;
                }
 
-               public virtual ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc)
+               public virtual IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
                {
-                       return Parent.LookupExtensionMethod (extensionType, name, arity, loc);
+                       return Parent.LookupExtensionMethod (extensionType, name, arity, ref scope);
                }
 
                public virtual FullNamedExpression LookupNamespaceAlias (string name)
@@ -1071,7 +1072,7 @@ namespace Mono.CSharp {
 
                        if ((ma & Modifiers.INTERNAL) != 0) {
                                var b = TypeManager.IsThisOrFriendAssembly (invocationType == InternalType.FakeInternalType ?
-                                        CodeGen.Assembly.Builder : invocationType.Assembly, parentType.Assembly);
+                                        CodeGen.Assembly.Builder : invocationType.Assembly, Assembly);
                                if (b || ma == Modifiers.INTERNAL)
                                        return b;
                        }
index 860bfa6de3dd3984ad899814adecbf62c702e55b..fc1968d10582f3dcd477af172f0a98a247143104 100644 (file)
@@ -245,9 +245,8 @@ namespace Mono.CSharp {
 
                public override void DefineConstants ()
                {
-                       if (!Parameters.IsEmpty && Parameters[Parameters.Count - 1].HasDefaultValue) {
-                               var rc = new ResolveContext (this);
-                               Parameters.ResolveDefaultValues (rc);
+                       if (!Parameters.IsEmpty) {
+                               Parameters.ResolveDefaultValues (this);
                        }
                }
 
@@ -440,7 +439,7 @@ namespace Mono.CSharp {
                        var invoke_method = Delegate.GetInvokeMethod (ec.Compiler, type);
 
                        Arguments arguments = CreateDelegateMethodArguments (invoke_method.Parameters, invoke_method.Parameters.Types, loc);
-                       method_group = method_group.OverloadResolve (ec, ref arguments, this, OverloadResolver.Restrictions.Covariant);
+                       method_group = method_group.OverloadResolve (ec, ref arguments, this, OverloadResolver.Restrictions.CovariantDelegate);
                        if (method_group == null)
                                return null;
 
@@ -545,7 +544,7 @@ namespace Mono.CSharp {
                        var invoke = Delegate.GetInvokeMethod (ec.Compiler, target_type);
 
                        Arguments arguments = CreateDelegateMethodArguments (invoke.Parameters, invoke.Parameters.Types, mg.Location);
-                       return mg.OverloadResolve (ec, ref arguments, null, OverloadResolver.Restrictions.Covariant | OverloadResolver.Restrictions.ProbingOnly) != null;
+                       return mg.OverloadResolve (ec, ref arguments, null, OverloadResolver.Restrictions.CovariantDelegate | OverloadResolver.Restrictions.ProbingOnly) != null;
                }
 
                #region IErrorHandler Members
diff --git a/mcs/mcs/dmcs.sln b/mcs/mcs/dmcs.sln
new file mode 100644 (file)
index 0000000..2ea4ed4
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dmcs", "dmcs.csproj", "{D4A01C5B-A1B5-48F5-BB5B-D2E1BD236E56}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {D4A01C5B-A1B5-48F5-BB5B-D2E1BD236E56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {D4A01C5B-A1B5-48F5-BB5B-D2E1BD236E56}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {D4A01C5B-A1B5-48F5-BB5B-D2E1BD236E56}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {D4A01C5B-A1B5-48F5-BB5B-D2E1BD236E56}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
index 2b4ca5d4405a96539060ec69ca94feeaed572d7b..759d26dcba6a6bec4cddef9491def14f94a9a45e 100644 (file)
@@ -271,7 +271,7 @@ namespace Mono.CSharp {
                        }
                        TypeSpec t = FindDocumentedTypeNonArray (mc, identifier, ds, cref, r);
                        if (t != null && is_array)
-                               t = Import.ImportType (Array.CreateInstance (t.GetMetaInfo (), 0).GetType ());
+                               t = ArrayContainer.MakeType (t);
                        return t;
                }
 
@@ -720,8 +720,16 @@ namespace Mono.CSharp {
                        if (paramSpec.Length > 0)
                                paramSpec += ")";
 
-                       string name = mc is Constructor ? "#ctor" : mc.Name;
-                       if (mc.MemberName.IsGeneric)
+                       string name = mc.Name;
+                       if (mc is Constructor)
+                               name = "#ctor";
+                       else if (mc is InterfaceMemberBase) {
+                               var imb = (InterfaceMemberBase) mc;
+                               name = imb.GetFullName (imb.ShortName);
+                       }
+                       name = name.Replace ('.', '#');
+
+                       if (mc.MemberName.TypeArguments != null && mc.MemberName.TypeArguments.Count > 0)
                                name += "``" + mc.MemberName.CountTypeArguments;
 
                        string suffix = String.Empty;
@@ -741,10 +749,25 @@ namespace Mono.CSharp {
                {
                        var tp = type as TypeParameterSpec;
                        if (tp != null) {
+                               int c = 0;
+                               type = type.DeclaringType;
+                               while (type != null && type.DeclaringType != null) {
+                                       type = type.DeclaringType;
+                                       c += type.MemberDefinition.TypeParametersCount;
+                               }
                                var prefix = tp.IsMethodOwned ? "``" : "`";
-                               return prefix + tp.DeclaredPosition;
+                               return prefix + (c + tp.DeclaredPosition);
                        }
 
+                       var pp = type as PointerContainer;
+                       if (pp != null)
+                               return GetSignatureForDoc (pp.Element) + "*";
+
+                       ArrayContainer ap = type as ArrayContainer;
+                       if (ap != null)
+                               return GetSignatureForDoc (ap.Element) +
+                                       ArrayContainer.GetPostfixSignature (ap.Rank);
+
                        if (TypeManager.IsGenericType (type)) {
                                string g = type.MemberDefinition.Namespace;
                                if (g != null && g.Length > 0)
index ed82199c88814f9226ac45e4e764e88977e5fd79..39360e9127f205eaa64983faf9ae2f8eb76e4e46 100644 (file)
@@ -97,7 +97,7 @@ namespace Mono.CSharp
                //
                Encoding encoding;
 
-               readonly CompilerContext ctx;
+               internal readonly CompilerContext ctx;
 
                static readonly char[] argument_value_separator = new char [] { ';', ',' };
 
@@ -114,7 +114,7 @@ namespace Mono.CSharp
 
                public static Driver Create (string[] args, bool require_files, ReportPrinter printer)
                {
-                       Driver d = new Driver (new CompilerContext (new Report (printer)));
+                       Driver d = new Driver (new CompilerContext (new ReflectionMetaImporter (), new Report (printer)));
 
                        if (!d.ParseArguments (args, require_files))
                                return null;
@@ -1703,7 +1703,7 @@ namespace Mono.CSharp
                        if (timestamps)
                                ShowTime ("Loading references");
 
-                       Import.Initialize ();
+                       ctx.MetaImporter.Initialize ();
                        LoadReferences ();
                        
                        if (modules.Count > 0) {
@@ -2055,7 +2055,6 @@ namespace Mono.CSharp
                        Linq.QueryBlock.TransparentParameter.Reset ();
                        Convert.Reset ();
                        TypeInfo.Reset ();
-                       DynamicExpressionStatement.Reset ();
                }
        }
 }
index 3459c8ab190909bbf8c61e87455ecb8877ca3690..b1b5b4a5952f2ee9240037b7e9d6913b1837b7b1 100644 (file)
@@ -9,7 +9,7 @@
 //
 
 using System;
-using System.Reflection.Emit;
+using System.Linq;
 using SLE = System.Linq.Expressions;
 
 #if NET_4_0
@@ -142,6 +142,16 @@ namespace Mono.CSharp
 
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
+#if NET_4_0            
+                       if (type.IsStruct && !obj.Expression.Type.IsValueType)
+                               return SLE.Expression.Unbox (obj.Expression, type.GetMetaInfo ());
+
+                       if (obj.Expression.NodeType == SLE.ExpressionType.Parameter) {
+                               if (((SLE.ParameterExpression) obj.Expression).IsByRef)
+                                       return obj.Expression;
+                       }
+#endif
+
                        return SLE.Expression.Convert (obj.Expression, type.GetMetaInfo ());
                }
        }
@@ -198,16 +208,6 @@ namespace Mono.CSharp
        //
        class DynamicExpressionStatement : ExpressionStatement
        {
-               class StaticDataClass : CompilerGeneratedClass
-               {
-                       public StaticDataClass ()
-                               : base (new RootDeclSpace (new NamespaceEntry (null, null, null)),
-                                       new MemberName (CompilerGeneratedClass.MakeName (null, "c", "DynamicSites", 0)),
-                                       Modifiers.INTERNAL | Modifiers.STATIC)
-                       {
-                       }
-               }
-
                //
                // Binder flag dynamic constant, the value is combination of
                // flags known at resolve stage and flags known only at emit
@@ -235,10 +235,6 @@ namespace Mono.CSharp
                        }
                }
 
-               static StaticDataClass global_site_container;
-               static int field_counter;
-               static int container_counter;
-
                readonly Arguments arguments;
                protected IDynamicBinder binder;
                protected Expression binder_expr;
@@ -259,28 +255,10 @@ namespace Mono.CSharp
                        }
                }
 
-               static TypeContainer CreateSiteContainer ()
+               FieldSpec CreateSiteField (EmitContext ec, FullNamedExpression type)
                {
-                       if (global_site_container == null) {
-                               global_site_container = new StaticDataClass ();
-                               RootContext.ToplevelTypes.AddCompilerGeneratedClass (global_site_container);
-                               global_site_container.CreateType ();
-                               global_site_container.DefineType ();
-                               global_site_container.Define ();
-                       }
-
-                       return global_site_container;
-               }
-
-               static Field CreateSiteField (FullNamedExpression type)
-               {
-                       TypeContainer site_container = CreateSiteContainer ();
-                       Field f = new Field (site_container, type, Modifiers.PUBLIC | Modifiers.STATIC,
-                               new MemberName ("Site" +  field_counter++), null);
-                       f.Define ();
-
-                       site_container.AddField (f);
-                       return f;
+                       var site_container = ec.CreateDynamicSite ();
+                       return site_container.CreateCallSiteField (type, loc);
                }
 
                public override Expression CreateExpressionTree (ResolveContext ec)
@@ -347,8 +325,9 @@ namespace Mono.CSharp
                protected void EmitCall (EmitContext ec, Expression binder, Arguments arguments, bool isStatement)
                {
                        int dyn_args_count = arguments == null ? 0 : arguments.Count;
-                       TypeExpr site_type = CreateSiteType (RootContext.ToplevelTypes.Compiler, arguments, dyn_args_count, isStatement);
-                       FieldExpr site_field_expr = new FieldExpr (CreateSiteField (site_type), loc);
+                       TypeExpr site_type = CreateSiteType (ec, arguments, dyn_args_count, isStatement);
+
+                       FieldExpr site_field_expr = new FieldExpr (CreateSiteField (ec, site_type), loc);
 
                        SymbolWriter.OpenCompilerGeneratedBlock (ec);
 
@@ -394,7 +373,7 @@ namespace Mono.CSharp
                        return new MemberAccess (TypeManager.binder_type, name, loc);
                }
 
-               TypeExpr CreateSiteType (CompilerContext ctx, Arguments arguments, int dyn_args_count, bool is_statement)
+               TypeExpr CreateSiteType (EmitContext ec, Arguments arguments, int dyn_args_count, bool is_statement)
                {
                        int default_args = is_statement ? 1 : 2;
 
@@ -402,24 +381,18 @@ namespace Mono.CSharp
                        FullNamedExpression[] targs = new FullNamedExpression[dyn_args_count + default_args];
                        targs [0] = new TypeExpression (TypeManager.call_site_type, loc);
                        for (int i = 0; i < dyn_args_count; ++i) {
-                               TypeSpec arg_type;
                                Argument a = arguments [i];
-                               if (a.Type == TypeManager.null_type)
-                                       arg_type = TypeManager.object_type;
-                               else
-                                       arg_type = a.Type;
-
                                if (a.ArgType == Argument.AType.Out || a.ArgType == Argument.AType.Ref)
                                        has_ref_out_argument = true;
 
-                               targs [i + 1] = new TypeExpression (arg_type, loc);
+                               targs [i + 1] = new TypeExpression (a.Type, loc);
                        }
 
                        TypeExpr del_type = null;
                        if (!has_ref_out_argument) {
                                string d_name = is_statement ? "Action" : "Func";
 
-                               TypeSpec t = TypeManager.CoreLookupType (ctx, "System", d_name, dyn_args_count + default_args, MemberKind.Delegate, false);
+                               TypeSpec t = TypeManager.CoreLookupType (ec.MemberContext.Compiler, "System", d_name, dyn_args_count + default_args, MemberKind.Delegate, false);
                                if (t != null) {
                                        if (!is_statement)
                                                targs [targs.Length - 1] = new TypeExpression (type, loc);
@@ -439,30 +412,26 @@ namespace Mono.CSharp
                                for (int i = 1; i < dyn_args_count + 1; ++i)
                                        p[i] = new Parameter (targs[i], "p" + i.ToString ("X"), arguments[i - 1].Modifier, null, loc);
 
-                               TypeContainer parent = CreateSiteContainer ();
-                               Delegate d = new Delegate (parent.NamespaceEntry, parent, new TypeExpression (rt, loc),
+                               TypeContainer site = ec.CreateDynamicSite ();
+                               int index = site.Types == null ? 0 : site.Types.Count;
+
+                               Delegate d = new Delegate (site.NamespaceEntry, site, new TypeExpression (rt, loc),
                                        Modifiers.INTERNAL | Modifiers.COMPILER_GENERATED,
-                                       new MemberName ("Container" + container_counter++.ToString ("X")),
-                                       new ParametersCompiled (ctx, p), null);
+                                       new MemberName ("Container" + index.ToString ("X")),
+                                       new ParametersCompiled (null, p), null);
 
                                d.CreateType ();
                                d.DefineType ();
                                d.Define ();
                                d.Emit ();
 
-                               parent.AddDelegate (d);
+                               site.AddDelegate (d);
                                del_type = new TypeExpression (d.Definition, loc);
                        }
 
                        TypeExpr site_type = new GenericTypeExpr (TypeManager.generic_call_site_type, new TypeArguments (del_type), loc);
                        return site_type;
                }
-
-               public static void Reset ()
-               {
-                       global_site_container = null;
-                       field_counter = container_counter = 0;
-               }
        }
 
        //
@@ -522,8 +491,8 @@ namespace Mono.CSharp
                        flags |= ec.HasSet (ResolveContext.Options.CheckedScope) ? CSharpBinderFlags.CheckedContext : 0;
 
                        binder_args.Add (new Argument (new BinderFlags (flags, this)));
-                       binder_args.Add (new Argument (new TypeOf (new TypeExpression (ec.CurrentType, loc), loc)));                                            
                        binder_args.Add (new Argument (new TypeOf (new TypeExpression (type, loc), loc)));
+                       binder_args.Add (new Argument (new TypeOf (new TypeExpression (ec.CurrentType, loc), loc)));
                        return new Invocation (GetBinder ("Convert", loc), binder_args);
                }
        }
@@ -778,4 +747,50 @@ namespace Mono.CSharp
                        return new Invocation (GetBinder ("UnaryOperation", loc), binder_args);
                }
        }
+
+       public class DynamicSiteClass : HoistedStoreyClass
+       {
+               //
+               // Holds the type to access the site. It gets inflated
+               // by MVARs for generic call sites
+               //
+               TypeSpec instance_type;
+
+               public DynamicSiteClass (TypeContainer parent, MemberBase host, TypeParameter[] tparams)
+                       : base (parent, MakeMemberName (host, "DynamicSite", 0, tparams, Location.Null), tparams, Modifiers.STATIC)
+               {
+                       if (tparams != null) {
+                               mutator = new TypeParameterMutator (tparams, CurrentTypeParameters);
+                       }
+               }
+
+               public FieldSpec CreateCallSiteField (FullNamedExpression type, Location loc)
+               {
+                       int index = fields == null ? 0 : fields.Count;
+                       Field f = new HoistedField (this, type, Modifiers.PUBLIC | Modifiers.STATIC, "Site" + index.ToString ("X"), null, loc);
+                       f.Define ();
+
+                       AddField (f);
+
+                       var fs = f.Spec;
+                       if (mutator != null) {
+                               //
+                               // Inflate the field, no need to keep it in MemberCache as it's accessed only once
+                               //
+                               var inflator = new TypeParameterInflator (instance_type, spec.MemberDefinition.TypeParameters, instance_type.TypeArguments);
+                               fs = (FieldSpec) fs.InflateMember (inflator);
+                       }
+
+                       return fs;
+               }
+
+               protected override bool DoResolveTypeParameters ()
+               {
+                       instance_type = spec;
+                       if (mutator != null)
+                               instance_type = instance_type.MakeGenericType (mutator.MethodTypeParameters.Select (l => l.Type).ToArray ());
+
+                       return true;
+               }
+       }
 }
index b1003ab5d06902b3f1584fc350ab91b8d39d6e80..f1d18e2a8d526240cc6a357b6efa8544eb6e1745 100644 (file)
@@ -497,7 +497,8 @@ namespace Mono.CSharp {
 
                public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
                {
-                       Attribute.Error_AttributeArgumentNotValid (rc, loc);
+                       rc.Compiler.Report.Error (182, loc,
+                               "An attribute argument must be a constant expression, typeof expression or array creation expression");
                }
 
                /// <summary>
@@ -893,7 +894,7 @@ namespace Mono.CSharp {
                // compile the same code using different type values for the same
                // arguments to find the correct overload
                //
-               public Expression Clone (CloneContext clonectx)
+               public virtual Expression Clone (CloneContext clonectx)
                {
                        Expression cloned = (Expression) MemberwiseClone ();
                        CloneTo (clonectx, cloned);
@@ -2364,7 +2365,7 @@ namespace Mono.CSharp {
                                errorMode = true;
                        }
                }
-
+               
                Expression SimpleNameResolve (ResolveContext ec, Expression right_side, bool intermediate)
                {
                        Expression e = LookupNameExpression (ec, right_side == null, false);
@@ -2372,10 +2373,16 @@ namespace Mono.CSharp {
                        if (e == null)
                                return null;
 
-                       if (right_side != null)
+                       if (right_side != null) {
+                               if (e is TypeExpr) {
+                                   e.Error_UnexpectedKind (ec, ResolveFlags.VariableOrValue, loc);
+                                   return null;
+                               }
+
                                e = e.ResolveLValue (ec, right_side);
-                       else
+                       } else {
                                e = e.Resolve (ec);
+                       }
 
                        //if (ec.CurrentBlock == null || ec.CurrentBlock.CheckInvariantMeaningInBlock (Name, e, Location))
                        return e;
@@ -2595,7 +2602,7 @@ namespace Mono.CSharp {
                        if ((member.Modifiers & Modifiers.AccessibilityMask) == Modifiers.PROTECTED && !(InstanceExpression is This)) {
                                var ct = rc.CurrentType;
                                var expr_type = InstanceExpression.Type;
-                               if (ct != expr_type && !TypeManager.IsSubclassOf (expr_type, ct)) {
+                               if (ct != expr_type) {
                                        expr_type = expr_type.GetDefinition ();
                                        if (ct != expr_type && !IsSameOrBaseQualifier (ct, expr_type)) {
                                                rc.Report.SymbolRelatedToPreviousError (member);
@@ -2747,18 +2754,24 @@ namespace Mono.CSharp {
 
                protected void EmitInstance (EmitContext ec, bool prepare_for_load)
                {
-                       if (TypeManager.IsValueType (InstanceExpression.Type)) {
+                       TypeSpec instance_type = InstanceExpression.Type;
+                       if (TypeManager.IsValueType (instance_type)) {
                                if (InstanceExpression is IMemoryLocation) {
                                        ((IMemoryLocation) InstanceExpression).AddressOf (ec, AddressOp.LoadStore);
                                } else {
-                                       LocalTemporary t = new LocalTemporary (InstanceExpression.Type);
+                                       LocalTemporary t = new LocalTemporary (instance_type);
                                        InstanceExpression.Emit (ec);
                                        t.Store (ec);
                                        t.AddressOf (ec, AddressOp.Store);
                                }
-                       } else
+                       } else {
                                InstanceExpression.Emit (ec);
 
+                               // Only to make verifier happy
+                               if (instance_type.IsGenericParameter && !(InstanceExpression is This) && TypeManager.IsReferenceType (instance_type))
+                                       ec.Emit (OpCodes.Box, instance_type);
+                       }
+
                        if (prepare_for_load)
                                ec.Emit (OpCodes.Dup);
                }
@@ -2766,26 +2779,46 @@ namespace Mono.CSharp {
                public abstract void SetTypeArguments (ResolveContext ec, TypeArguments ta);
        }
 
-       /// 
-       /// Represents group of extension method candidates
-       /// 
-       public class ExtensionMethodGroupExpr : MethodGroupExpr, OverloadResolver.IErrorHandler
+       // 
+       // Represents a group of extension method candidates for whole namespace
+       // 
+       class ExtensionMethodGroupExpr : MethodGroupExpr, OverloadResolver.IErrorHandler
        {
-               readonly NamespaceEntry namespace_entry;
-               public Expression ExtensionExpression;
+               NamespaceEntry namespace_entry;
+               public readonly Expression ExtensionExpression;
 
-               public ExtensionMethodGroupExpr (List<MethodSpec> list, NamespaceEntry n, TypeSpec extensionType, Location l)
-                       : base (list.Cast<MemberSpec>().ToList (), extensionType, l)
+               public ExtensionMethodGroupExpr (IList<MethodSpec> list, NamespaceEntry n, Expression extensionExpr, Location l)
+                       : base (list.Cast<MemberSpec>().ToList (), extensionExpr.Type, l)
                {
                        this.namespace_entry = n;
+                       this.ExtensionExpression = extensionExpr;
                }
 
                public override bool IsStatic {
                        get { return true; }
                }
 
-               public bool IsTopLevel {
-                       get { return namespace_entry == null; }
+               public override IList<MemberSpec> GetBaseMembers (TypeSpec baseType)
+               {
+                       if (namespace_entry == null)
+                               return null;
+
+                       //
+                       // For extension methodgroup we are not looking for base members but parent
+                       // namespace extension methods
+                       //
+                       int arity = type_arguments == null ? 0 : type_arguments.Count;
+                       var found = namespace_entry.LookupExtensionMethod (DeclaringType, Name, arity, ref namespace_entry);
+                       if (found == null)
+                               return null;
+
+                       return found.Cast<MemberSpec> ().ToList ();
+               }
+
+               public override MethodGroupExpr LookupExtensionMethod (ResolveContext rc)
+               {
+                       // We are already here
+                       return null;
                }
 
                public override MethodGroupExpr OverloadResolve (ResolveContext ec, ref Arguments arguments, OverloadResolver.IErrorHandler ehandler, OverloadResolver.Restrictions restr)
@@ -2793,40 +2826,22 @@ namespace Mono.CSharp {
                        if (arguments == null)
                                arguments = new Arguments (1);
 
-                       arguments.Insert (0, new Argument (ExtensionExpression));
-                       MethodGroupExpr mg = ResolveOverloadExtensions (ec, ref arguments, ehandler ?? this, namespace_entry, loc);
+                       arguments.Insert (0, new Argument (ExtensionExpression, Argument.AType.ExtensionType));
+                       var res = base.OverloadResolve (ec, ref arguments, ehandler ?? this, restr);
 
                        // Store resolved argument and restore original arguments
-                       if (mg == null) {
-                               arguments.RemoveAt (0); // Clean-up modified arguments for error reporting
-                       } else {
-                               var me = ExtensionExpression as MemberExpr;
-                               if (me != null)
-                                       me.ResolveInstanceExpression (ec);
-                       }
-
-                       return mg;
-               }
-
-               MethodGroupExpr ResolveOverloadExtensions (ResolveContext ec, ref Arguments arguments, OverloadResolver.IErrorHandler ehandler, NamespaceEntry ns, Location loc)
-               {
-                       // Use normal resolve rules
-                       MethodGroupExpr mg = base.OverloadResolve (ec, ref arguments, ehandler, ns != null ? OverloadResolver.Restrictions.ProbingOnly : OverloadResolver.Restrictions.None);
-                       if (mg != null)
-                               return mg;
-
-                       if (ns == null)
+                       if (res == null) {
+                               // Clean-up modified arguments for error reporting
+                               arguments.RemoveAt (0);
                                return null;
+                       }
 
-                       // Search continues
-                       int arity = type_arguments == null ? 0 : type_arguments.Count;
-                       ExtensionMethodGroupExpr e = ns.LookupExtensionMethod (type, Name, arity, loc);
-                       if (e == null)
-                               return base.OverloadResolve (ec, ref arguments, ehandler, OverloadResolver.Restrictions.None);
+                       var me = ExtensionExpression as MemberExpr;
+                       if (me != null)
+                               me.ResolveInstanceExpression (ec);
 
-                       e.ExtensionExpression = ExtensionExpression;
-                       e.SetTypeArguments (ec, type_arguments);                        
-                       return e.ResolveOverloadExtensions (ec, ref arguments, ehandler, e.namespace_entry, loc);
+                       InstanceExpression = null;
+                       return this;
                }
 
                #region IErrorHandler Members
@@ -2958,13 +2973,6 @@ namespace Mono.CSharp {
                        return Methods.First ().GetSignatureForError ();
                }
 
-               public override MemberExpr ResolveMemberAccess (ResolveContext ec, Expression left, SimpleName original)
-               {
-                       simple_name = original;
-
-                       return base.ResolveMemberAccess (ec, left, original);
-               }
-
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
                        if (best_candidate == null) {
@@ -3013,7 +3021,7 @@ namespace Mono.CSharp {
                        //
                        // LAMESPEC: No details about which expressions are not allowed
                        //
-                       return !(expr is BaseThis);
+                       return !(expr is TypeExpr) && !(expr is BaseThis);
                }
 
                /// <summary>
@@ -3051,6 +3059,10 @@ namespace Mono.CSharp {
                        if (best_candidate == null)
                                return r.BestCandidateIsDynamic ? this : null;
 
+                       // Overload resolver had to create a new method group, all checks bellow have already been executed
+                       if (r.BestCandidateNewMethodGroup != null)
+                               return r.BestCandidateNewMethodGroup;
+
                        if (best_candidate.Kind == MemberKind.Method) {
                                if (InstanceExpression != null) {
                                        if (best_candidate.IsExtensionMethod && args[0].Expr == InstanceExpression) {
@@ -3067,17 +3079,18 @@ namespace Mono.CSharp {
                                ResolveInstanceExpression (ec);
                                if (InstanceExpression != null)
                                        CheckProtectedMemberAccess (ec, best_candidate);
-
-                               if (best_candidate.IsGeneric) {
-                                       ConstraintChecker.CheckAll (ec.MemberContext, best_candidate.GetGenericMethodDefinition (), best_candidate.TypeArguments,
-                                               best_candidate.Constraints, loc);
-                               }
                        }
 
                        best_candidate = CandidateToBaseOverride (ec, best_candidate);
                        return this;
                }
 
+               public override MemberExpr ResolveMemberAccess (ResolveContext ec, Expression left, SimpleName original)
+               {
+                       simple_name = original;
+                       return base.ResolveMemberAccess (ec, left, original);
+               }
+
                public override void SetTypeArguments (ResolveContext ec, TypeArguments ta)
                {
                        type_arguments = ta;
@@ -3085,12 +3098,15 @@ namespace Mono.CSharp {
 
                #region IBaseMembersProvider Members
 
-               IList<MemberSpec> OverloadResolver.IBaseMembersProvider.GetBaseMembers (TypeSpec baseType)
+               public virtual IList<MemberSpec> GetBaseMembers (TypeSpec baseType)
                {
                        return baseType == null ? null : MemberCache.FindMembers (baseType, Methods [0].Name, false);
                }
 
-               MethodGroupExpr OverloadResolver.IBaseMembersProvider.LookupExtensionMethod (ResolveContext rc, int arity)
+               //
+               // Extension methods lookup after ordinary methods candidates failed to apply
+               //
+               public virtual MethodGroupExpr LookupExtensionMethod (ResolveContext rc)
                {
                        if (InstanceExpression == null)
                                return null;
@@ -3099,12 +3115,14 @@ namespace Mono.CSharp {
                        if (!IsExtensionMethodArgument (InstanceExpression))
                                return null;
 
-                       var emg = rc.LookupExtensionMethod (InstanceExpression.Type, Methods [0].Name, arity, loc);
-                       if (emg != null) {
-                               emg.ExtensionExpression = InstanceExpression;
-                               emg.SetTypeArguments (rc, type_arguments);
-                       }
+                       int arity = type_arguments == null ? 0 : type_arguments.Count;
+                       NamespaceEntry methods_scope = null;
+                       var methods = rc.LookupExtensionMethod (InstanceExpression.Type, Methods[0].Name, arity, ref methods_scope);
+                       if (methods == null)
+                               return null;
 
+                       var emg = new ExtensionMethodGroupExpr (methods, methods_scope, InstanceExpression, loc);
+                       emg.SetTypeArguments (rc, type_arguments);
                        return emg;
                }
 
@@ -3119,14 +3137,14 @@ namespace Mono.CSharp {
                        None = 0,
                        DelegateInvoke = 1,
                        ProbingOnly     = 1 << 1,
-                       Covariant = 1 << 2,
+                       CovariantDelegate = 1 << 2,
                        NoBaseMembers = 1 << 3
                }
 
                public interface IBaseMembersProvider
                {
                        IList<MemberSpec> GetBaseMembers (TypeSpec baseType);
-                       MethodGroupExpr LookupExtensionMethod (ResolveContext rc, int arity);
+                       MethodGroupExpr LookupExtensionMethod (ResolveContext rc);
                }
 
                public interface IErrorHandler
@@ -3146,7 +3164,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       public MethodGroupExpr LookupExtensionMethod (ResolveContext rc, int arity)
+                       public MethodGroupExpr LookupExtensionMethod (ResolveContext rc)
                        {
                                return null;
                        }
@@ -3170,6 +3188,7 @@ namespace Mono.CSharp {
                IBaseMembersProvider base_provider;
                IErrorHandler custom_errors;
                Restrictions restrictions;
+               MethodGroupExpr best_candidate_extension_group;
 
                SessionReportPrinter lambda_conv_msgs;
                ReportPrinter prev_recorder;
@@ -3208,6 +3227,15 @@ namespace Mono.CSharp {
 
                public bool BestCandidateIsDynamic { get; set; }
 
+               //
+               // Best candidate was found in newly created MethodGroupExpr, used by extension methods
+               //
+               public MethodGroupExpr BestCandidateNewMethodGroup {
+                       get {
+                               return best_candidate_extension_group;
+                       }
+               }
+
                public IErrorHandler CustomErrors {
                        get {
                                return custom_errors;
@@ -3357,12 +3385,13 @@ namespace Mono.CSharp {
                        bool better_at_least_one = false;
                        bool same = true;
                        int args_count = args == null ? 0 : args.Count;
-                       for (int j = 0, c_idx = 0, b_idx = 0; j < args_count; ++j, ++c_idx, ++b_idx) {
+                       int j = 0;
+                       for (int c_idx = 0, b_idx = 0; j < args_count; ++j, ++c_idx, ++b_idx) {
                                Argument a = args[j];
 
-                               // Provided default argument value is never better
-                               if (a.IsDefaultArgument && candidate_params == best_params)
-                                       return false;
+                               // Default arguments are ignored for better decision
+                               if (a.IsDefaultArgument)
+                                       break;
 
                                TypeSpec ct = candidate_pd.Types[c_idx];
                                TypeSpec bt = best_pd.Types[b_idx];
@@ -3377,7 +3406,7 @@ namespace Mono.CSharp {
                                        --b_idx;
                                }
 
-                               if (TypeManager.IsEqual (ct, bt))
+                               if (ct == bt)
                                        continue;
 
                                same = false;
@@ -3410,15 +3439,34 @@ namespace Mono.CSharp {
                                return false;
 
                        //
-                       // The two methods have equal parameter types.  Now apply tie-breaking rules
+                       // The two methods have equal non-optional parameter types, apply tie-breaking rules
                        //
-                       if (best.IsGeneric) {
-                               if (!candidate.IsGeneric)
-                                       return true;
-                       } else if (candidate.IsGeneric) {
-                               return false;
+
+                       //
+                       // This handles the following cases:
+                       //
+                       //  Foo (int i) is better than Foo (int i, long l = 0)
+                       //  Foo (params int[] args) is better than Foo (int i = 0, params int[] args)
+                       //
+                       // Prefer non-optional version
+                       //
+                       // LAMESPEC: Specification claims this should be done at last but the opposite is true
+                       if (candidate_params == best_params && candidate_pd.Count != best_pd.Count) {
+                               if (candidate_pd.Count >= best_pd.Count)
+                                       return false;
+
+                               if (j < candidate_pd.Count && candidate_pd.FixedParameters[j].HasDefaultValue)
+                                       return false;
+
+                               return true;
                        }
 
+                       //
+                       // One is a non-generic method and second is a generic method, then non-generic is better
+                       //
+                       if (best.IsGeneric != candidate.IsGeneric)
+                               return best.IsGeneric;
+
                        //
                        // This handles the following cases:
                        //
@@ -3427,10 +3475,10 @@ namespace Mono.CSharp {
                        //     Concat (string s1, params string [] srest)
                        //   Foo (int, params int [] rest) is better than Foo (params int [] rest)
                        //
-                       if (!candidate_params && best_params)
-                               return true;
-                       if (candidate_params && !best_params)
-                               return false;
+                       // Prefer non-expanded version
+                       //
+                       if (candidate_params != best_params)
+                               return best_params;
 
                        int candidate_param_count = candidate_pd.Count;
                        int best_param_count = best_pd.Count;
@@ -3447,7 +3495,7 @@ namespace Mono.CSharp {
                        var best_def_pd = ((IParametersMember) best.MemberDefinition).Parameters;
 
                        bool specific_at_least_once = false;
-                       for (int j = 0; j < candidate_param_count; ++j) {
+                       for (j = 0; j < candidate_param_count; ++j) {
                                var ct = candidate_def_pd.Types[j];
                                var bt = best_def_pd.Types[j];
                                if (ct == bt)
@@ -3486,6 +3534,7 @@ namespace Mono.CSharp {
                        AParametersCollection pd = ((IParametersMember) candidate).Parameters;
                        int param_count = pd.Count;
                        int optional_count = 0;
+                       int score;
 
                        if (arg_count != param_count) {
                                for (int i = 0; i < pd.Count; ++i) {
@@ -3515,22 +3564,19 @@ namespace Mono.CSharp {
                                                return int.MaxValue - 10000 + args_gap;
                                }
 
-                               // Initialize expanded form of a method with 1 params parameter
-                               params_expanded_form = param_count == 1 && pd.HasParams;
-
                                // Resize to fit optional arguments
                                if (optional_count != 0) {
-                                       Arguments resized;
                                        if (arguments == null) {
-                                               resized = new Arguments (optional_count);
+                                               arguments = new Arguments (optional_count);
                                        } else {
-                                               resized = new Arguments (param_count);
+                                               // Have to create a new container, so the next run can do same
+                                               var resized = new Arguments (param_count);
                                                resized.AddRange (arguments);
+                                               arguments = resized;
                                        }
 
                                        for (int i = arg_count; i < param_count; ++i)
-                                               resized.Add (null);
-                                       arguments = resized;
+                                               arguments.Add (null);
                                }
                        }
 
@@ -3551,19 +3597,31 @@ namespace Mono.CSharp {
                                                        int index = pd.GetParameterIndexByName (na.Name);
 
                                                        // Named parameter not found or already reordered
-                                                       if (index <= i)
+                                                       if (index == i || index < 0)
                                                                break;
 
-                                                       // When using parameters which should not be available to the user
-                                                       if (index >= param_count)
-                                                               break;
+                                                       Argument temp;
+                                                       if (index >= param_count) {
+                                                               // When using parameters which should not be available to the user
+                                                               if ((pd.FixedParameters[index].ModFlags & Parameter.Modifier.PARAMS) == 0)
+                                                                       break;
+
+                                                               arguments.Add (null);
+                                                               ++arg_count;
+                                                               temp = null;
+                                                       } else {
+                                                               temp = arguments[index];
+
+                                                               // The slot has been taken by positional argument
+                                                               if (temp != null && !(temp is NamedArgument))
+                                                                       break;
+                                                       }
 
                                                        if (!arg_moved) {
                                                                arguments.MarkReorderedArgument (na);
                                                                arg_moved = true;
                                                        }
 
-                                                       Argument temp = arguments[index];
                                                        arguments[index] = arguments[i];
                                                        arguments[i] = temp;
 
@@ -3598,7 +3656,7 @@ namespace Mono.CSharp {
                                                prev_recorder = ec.Report.SetPrinter (lambda_conv_msgs);
                                        }
 
-                                       int score = TypeManager.InferTypeArguments (ec, arguments, ref ms);
+                                       score = TypeManager.InferTypeArguments (ec, arguments, ref ms);
                                        lambda_conv_msgs.EndSession ();
 
                                        if (score != 0)
@@ -3607,6 +3665,13 @@ namespace Mono.CSharp {
                                        candidate = ms;
                                        pd = ms.Parameters;
                                }
+
+                               //
+                               // Type arguments constraints have to match
+                               //
+                               if (!ConstraintChecker.CheckAll (null, ms.GetGenericMethodDefinition (), ms.TypeArguments, ms.Constraints, loc))
+                                       return int.MaxValue - 25000;
+
                        } else {
                                if (type_arguments != null)
                                        return int.MaxValue - 15000;
@@ -3623,31 +3688,51 @@ namespace Mono.CSharp {
                                        if (!pd.FixedParameters[i].HasDefaultValue)
                                                throw new InternalErrorException ();
 
-                                       Expression e = pd.FixedParameters[i].DefaultValue as Constant;
-                                       if (e == null)
-                                               e = new DefaultValueExpression (new TypeExpression (pd.Types[i], loc), loc).Resolve (ec);
+                                       //
+                                       // Get the default value expression, we can use the same expression
+                                       // if the type matches
+                                       //
+                                       Expression e = pd.FixedParameters[i].DefaultValue;
+                                       if (!(e is Constant) || e.Type.IsGenericOrParentIsGeneric) {
+                                               //
+                                               // LAMESPEC: No idea what the exact rules are for System.Reflection.Missing.Value instead of null
+                                               //
+                                               if (e == EmptyExpression.MissingValue && pd.Types[i] == TypeManager.object_type) {
+                                                       e = new MemberAccess (new MemberAccess (new MemberAccess (
+                                                               new QualifiedAliasMember (QualifiedAliasMember.GlobalAlias, "System", loc), "Reflection", loc), "Missing", loc), "Value", loc);
+                                               } else {
+                                                       e = new DefaultValueExpression (new TypeExpression (pd.Types[i], loc), loc);
+                                               }
+
+                                               e = e.Resolve (ec);
+                                       }
 
                                        arguments[i] = new Argument (e, Argument.AType.Default);
                                        continue;
                                }
 
                                if (p_mod != Parameter.Modifier.PARAMS) {
-                                       p_mod = pd.FixedParameters[i].ModFlags & ~(Parameter.Modifier.OUTMASK | Parameter.Modifier.REFMASK);
+                                       p_mod = pd.FixedParameters[i].ModFlags;
                                        pt = pd.Types[i];
-                               } else {
+                               } else if (!params_expanded_form) {
                                        params_expanded_form = true;
+                                       pt = ((ElementTypeSpec) pt).Element;
+                                       i -= 2;
+                                       continue;
                                }
 
-                               Parameter.Modifier a_mod = a.Modifier & ~(Parameter.Modifier.OUTMASK | Parameter.Modifier.REFMASK);
-                               int score = 1;
+                               score = 1;
                                if (!params_expanded_form)
-                                       score = IsArgumentCompatible (ec, a_mod, a, p_mod & ~Parameter.Modifier.PARAMS, pt);
+                                       score = IsArgumentCompatible (ec, a, p_mod & ~Parameter.Modifier.PARAMS, pt);
 
                                //
                                // It can be applicable in expanded form (when not doing exact match like for delegates)
                                //
-                               if (score != 0 && (p_mod & Parameter.Modifier.PARAMS) != 0 && (restrictions & Restrictions.Covariant) == 0) {
-                                       score = IsArgumentCompatible (ec, a_mod, a, 0, TypeManager.GetElementType (pt));
+                               if (score != 0 && (p_mod & Parameter.Modifier.PARAMS) != 0 && (restrictions & Restrictions.CovariantDelegate) == 0) {
+                                       if (!params_expanded_form)
+                                               pt = ((ElementTypeSpec) pt).Element;
+
+                                       score = IsArgumentCompatible (ec, a, Parameter.Modifier.NONE, pt);
                                        if (score == 0)
                                                params_expanded_form = true;
                                }
@@ -3659,23 +3744,34 @@ namespace Mono.CSharp {
                                }
                        }
 
-                       if (arg_count != param_count)
+                       //
+                       // When params parameter has notargument, will be provided later if the method is the best candidate
+                       //
+                       if (arg_count + 1 == pd.Count && (pd.FixedParameters [arg_count].ModFlags & Parameter.Modifier.PARAMS) != 0)
                                params_expanded_form = true;
 
                        return 0;
                }
 
-               int IsArgumentCompatible (ResolveContext ec, Parameter.Modifier arg_mod, Argument argument, Parameter.Modifier param_mod, TypeSpec parameter)
+               int IsArgumentCompatible (ResolveContext ec, Argument argument, Parameter.Modifier param_mod, TypeSpec parameter)
                {
                        //
-                       // Types have to be identical when ref or out modifer is used 
+                       // Types have to be identical when ref or out modifer
+                       // is used and argument is not of dynamic type
                        //
-                       if ((arg_mod | param_mod) != 0) {
-                               if (argument.Type != parameter) {
-                                       if (argument.Type == InternalType.Dynamic)
-                                               return 0;
+                       if ((argument.Modifier | param_mod) != 0) {
+                               //
+                               // Defer to dynamic binder
+                               //
+                               if (argument.Type == InternalType.Dynamic)
+                                       return 0;
 
-                                       return 2;
+                               if (argument.Type != parameter) {
+                                       //
+                                       // Do full equality check after quick path
+                                       //
+                                       if (!TypeSpecComparer.IsEqual (argument.Type, parameter))
+                                               return 2;
                                }
                        } else {
                                //
@@ -3696,14 +3792,11 @@ namespace Mono.CSharp {
                                                lambda_conv_msgs.EndSession ();
                                        }
 
-                                       if (argument.Type == InternalType.Dynamic)
-                                               return 0;
-
                                        return 2;
                                }
                        }
 
-                       if (arg_mod != param_mod)
+                       if (argument.Modifier != param_mod)
                                return 1;
 
                        return 0;
@@ -3766,74 +3859,76 @@ namespace Mono.CSharp {
                        var current_type = rc.CurrentType;
                        MemberSpec invocable_member = null;
 
-                       // Cannot return until error reporter is restored
+                       // Be careful, cannot return until error reporter is restored
                        while (true) {
                                best_candidate = null;
                                best_candidate_rate = int.MaxValue;
 
                                var type_members = members;
+                               try {
 
-                               do {
-                                       for (int i = 0; i < type_members.Count; ++i) {
-                                               var member = type_members [i];
-
-                                               //
-                                               // Methods in a base class are not candidates if any method in a derived
-                                               // class is applicable
-                                               //
-                                               if ((member.Modifiers & Modifiers.OVERRIDE) != 0)
-                                                       continue;
-
-                                               if (!member.IsAccessible (current_type) && !error_mode)
-                                                       continue;
+                                       do {
+                                               for (int i = 0; i < type_members.Count; ++i) {
+                                                       var member = type_members[i];
 
-                                               if (!(member is IParametersMember)) {
                                                        //
-                                                       // Will use it later to report ambiguity between best method and invocable member
+                                                       // Methods in a base class are not candidates if any method in a derived
+                                                       // class is applicable
                                                        //
-                                                       if (Invocation.IsMemberInvocable (member))
-                                                               invocable_member = member;
+                                                       if ((member.Modifiers & Modifiers.OVERRIDE) != 0)
+                                                               continue;
 
-                                                       continue;
-                                               }
+                                                       if (!member.IsAccessible (current_type) && !error_mode)
+                                                               continue;
 
-                                               //
-                                               // Check if candidate is applicable
-                                               //
-                                               bool params_expanded_form = false;
-                                               int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, ref params_expanded_form);
+                                                       if (!(member is IParametersMember)) {
+                                                               //
+                                                               // Will use it later to report ambiguity between best method and invocable member
+                                                               //
+                                                               if (Invocation.IsMemberInvocable (member))
+                                                                       invocable_member = member;
 
-                                               //
-                                               // How does it score compare to others
-                                               //
-                                               if (candidate_rate < best_candidate_rate) {
-                                                       best_candidate_rate = candidate_rate;
-                                                       best_candidate = member;
-                                                       best_candidate_args = candidate_args;
-                                                       best_candidate_params = params_expanded_form;
-                                               } else if (candidate_rate == 0) {
-                                                       // Is new candidate better
-                                                       if (BetterFunction (rc, candidate_args, member, params_expanded_form, best_candidate, best_candidate_params)) {
+                                                               continue;
+                                                       }
+
+                                                       //
+                                                       // Check if candidate is applicable
+                                                       //
+                                                       bool params_expanded_form = false;
+                                                       int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, ref params_expanded_form);
+
+                                                       //
+                                                       // How does it score compare to others
+                                                       //
+                                                       if (candidate_rate < best_candidate_rate) {
+                                                               best_candidate_rate = candidate_rate;
                                                                best_candidate = member;
                                                                best_candidate_args = candidate_args;
                                                                best_candidate_params = params_expanded_form;
-                                                       } else {
-                                                               // It's not better but any other found later could be but we are not sure yet
-                                                               if (ambiguous_candidates == null)
-                                                                       ambiguous_candidates = new List<AmbiguousCandidate> ();
-
-                                                               ambiguous_candidates.Add (new AmbiguousCandidate (member, params_expanded_form));
+                                                       } else if (candidate_rate == 0) {
+                                                               // Is new candidate better
+                                                               if (BetterFunction (rc, candidate_args, member, params_expanded_form, best_candidate, best_candidate_params)) {
+                                                                       best_candidate = member;
+                                                                       best_candidate_args = candidate_args;
+                                                                       best_candidate_params = params_expanded_form;
+                                                               } else {
+                                                                       // It's not better but any other found later could be but we are not sure yet
+                                                                       if (ambiguous_candidates == null)
+                                                                               ambiguous_candidates = new List<AmbiguousCandidate> ();
+
+                                                                       ambiguous_candidates.Add (new AmbiguousCandidate (member, params_expanded_form));
+                                                               }
                                                        }
-                                               }
-
-                                               // Restore expanded arguments
-                                               if (candidate_args != args)
-                                                       candidate_args = args;
-                                       }
-                               } while (best_candidate_rate != 0 && (type_members = base_provider.GetBaseMembers (type_members[0].DeclaringType.BaseType)) != null);
 
-                               if (prev_recorder != null)
-                                       rc.Report.SetPrinter (prev_recorder);
+                                                       // Restore expanded arguments
+                                                       if (candidate_args != args)
+                                                               candidate_args = args;
+                                               }
+                                       } while (best_candidate_rate != 0 && (type_members = base_provider.GetBaseMembers (type_members[0].DeclaringType.BaseType)) != null);
+                               } finally {
+                                       if (prev_recorder != null)
+                                               rc.Report.SetPrinter (prev_recorder);
+                               }
 
                                //
                                // We've found exact match
@@ -3842,14 +3937,16 @@ namespace Mono.CSharp {
                                        break;
 
                                //
-                               // Extension methods lookup when no ordinary method match was found
+                               // Try extension methods lookup when no ordinary method match was found and provider enables it
                                //
                                if (!error_mode) {
-                                       var emg = base_provider.LookupExtensionMethod (rc, type_arguments == null ? 0 : type_arguments.Count);
+                                       var emg = base_provider.LookupExtensionMethod (rc);
                                        if (emg != null) {
-                                               emg = emg.OverloadResolve (rc, ref args, custom_errors, error_mode ? Restrictions.ProbingOnly : Restrictions.None);
-                                               if (emg != null)
+                                               emg = emg.OverloadResolve (rc, ref args, null, restrictions);
+                                               if (emg != null) {
+                                                       best_candidate_extension_group = emg;
                                                        return (T) (MemberSpec) emg.BestCandidate;
+                                               }
                                        }
                                }
 
@@ -3872,8 +3969,14 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       // TODO: quite slow
-                       if (args_count != 0 && args.HasDynamic) {
+                       // TODO: HasDynamic is quite slow
+                       if (args_count != 0 && (restrictions & Restrictions.CovariantDelegate) == 0 && args.HasDynamic) {
+                               if (args [0].ArgType == Argument.AType.ExtensionType) {
+                                       rc.Report.Error (1973, loc,
+                                               "Type `{0}' does not contain a member `{1}' and the best extension method overload `{2}' cannot be dynamically dispatched. Consider calling the method without the extension method syntax",
+                                               args [0].Type.GetSignatureForError (), best_candidate.Name, best_candidate.GetSignatureForError());
+                               }
+
                                BestCandidateIsDynamic = true;
                                return null;
                        }
@@ -4021,14 +4124,23 @@ namespace Mono.CSharp {
                                        }
 
                                        var ms = best_candidate as MethodSpec;
-                                       if (ms != null && ms.IsGeneric && ta_count == 0) {
-                                               if (custom_errors != null && custom_errors.TypeInferenceFailed (rc, best_candidate))
-                                                       return;
+                                       if (ms != null && ms.IsGeneric) {
+                                               bool constr_ok = true;
+                                               if (ms.TypeArguments != null)
+                                                       constr_ok = ConstraintChecker.CheckAll (rc.MemberContext, ms.GetGenericMethodDefinition (), ms.TypeArguments, ms.Constraints, loc);
+
+                                               if (ta_count == 0) {
+                                                       if (custom_errors != null && custom_errors.TypeInferenceFailed (rc, best_candidate))
+                                                               return;
+
+                                                       if (constr_ok) {
+                                                               rc.Report.Error (411, loc,
+                                                                       "The type arguments for method `{0}' cannot be inferred from the usage. Try specifying the type arguments explicitly",
+                                                                       ms.GetGenericMethodDefinition ().GetSignatureForError ());
+                                                       }
 
-                                               rc.Report.Error (411, loc,
-                                                       "The type arguments for method `{0}' cannot be inferred from the usage. Try specifying the type arguments explicitly",
-                                                       ms.GetGenericMethodDefinition ().GetSignatureForError ());
-                                               return;
+                                                       return;
+                                               }
                                        }
 
                                        VerifyArguments (rc, ref args, best_candidate, params_expanded);
@@ -4092,10 +4204,10 @@ namespace Mono.CSharp {
                                        if ((p_mod & ~Parameter.Modifier.PARAMS) != a.Modifier)
                                                break;
 
-                                       if (!TypeManager.IsEqual (a.Expr.Type, pt))
-                                               break;
+                                       if (a.Expr.Type == pt || TypeSpecComparer.IsEqual (a.Expr.Type, pt))
+                                               continue;
 
-                                       continue;
+                                       break;
                                }
 
                                NamedArgument na = a as NamedArgument;
@@ -4128,7 +4240,7 @@ namespace Mono.CSharp {
                                if (a.Expr.Type == InternalType.Dynamic)
                                        continue;
 
-                               if ((restrictions & Restrictions.Covariant) != 0 && !Delegate.IsTypeCovariant (a.Expr, pt)) {
+                               if ((restrictions & Restrictions.CovariantDelegate) != 0 && !Delegate.IsTypeCovariant (a.Expr, pt)) {
                                        custom_errors.NoArgumentMatch (ec, member);
                                        return false;
                                }
@@ -4184,6 +4296,20 @@ namespace Mono.CSharp {
                                Expression.UnsafeError (ec, loc);
                        }
 
+                       //
+                       // We could infer inaccesible type arguments
+                       //
+                       if (type_arguments == null && member.IsGeneric) {
+                               var ms = (MethodSpec) member;
+                               foreach (var ta in ms.TypeArguments) {
+                                       if (!ta.IsAccessible (ec.CurrentType)) {
+                                               ec.Report.SymbolRelatedToPreviousError (ta);
+                                               Expression.ErrorIsInaccesible (ec, member.GetSignatureForError (), loc);
+                                               break;
+                                       }
+                               }
+                       }
+
                        return true;
                }
        }
@@ -4330,7 +4456,7 @@ namespace Mono.CSharp {
                {
                        // Checks possible ldflda of field access expression
                        return !spec.IsStatic && TypeManager.IsValueType (spec.MemberType) &&
-                               TypeManager.IsSubclassOf (spec.DeclaringType, TypeManager.mbr_type) &&
+                               TypeSpec.IsBaseClass (spec.DeclaringType, TypeManager.mbr_type, false) &&
                                !(InstanceExpression is This);
                }
 
@@ -4499,7 +4625,7 @@ namespace Mono.CSharp {
                                if (ec.HasSet (ResolveContext.Options.ConstructorScope)) {
 
                                        // InitOnly fields cannot be assigned-to in a different constructor from their declaring type
-                                       if (!TypeManager.IsEqual (ec.CurrentMemberDefinition.Parent.Definition, spec.DeclaringType.GetDefinition ()))
+                                       if (ec.CurrentMemberDefinition.Parent.Definition != spec.DeclaringType.GetDefinition ())
                                                return Report_AssignToReadonly (ec, right_side);
                                        // static InitOnly fields cannot be assigned-to in an instance constructor
                                        if (IsStatic && !ec.IsStatic)
@@ -4511,7 +4637,7 @@ namespace Mono.CSharp {
                        }
 
                        if (right_side == EmptyExpression.OutAccess.Instance &&
-                           !IsStatic && !(InstanceExpression is This) && TypeManager.mbr_type != null && TypeManager.IsSubclassOf (spec.DeclaringType, TypeManager.mbr_type)) {
+                               !IsStatic && !(InstanceExpression is This) && TypeManager.mbr_type != null && TypeSpec.IsBaseClass (spec.DeclaringType, TypeManager.mbr_type, false)) {
                                ec.Report.SymbolRelatedToPreviousError (spec.DeclaringType);
                                ec.Report.Warning (197, 1, loc,
                                                "Passing `{0}' as ref or out or taking its address may cause a runtime exception because it is a field of a marshal-by-reference class",
@@ -4575,7 +4701,7 @@ namespace Mono.CSharp {
                                        EmitInstance (ec, false);
 
                                // Optimization for build-in types
-                               if (TypeManager.IsStruct (type) && TypeManager.IsEqual (type, ec.MemberContext.CurrentType) && TypeManager.IsEqual (InstanceExpression.Type, type)) {
+                               if (TypeManager.IsStruct (type) && type == ec.MemberContext.CurrentType && InstanceExpression.Type == type) {
                                        ec.EmitLoadFromPtr (type);
                                } else {
                                        var ff = spec as FixedFieldSpec;
@@ -5117,9 +5243,6 @@ namespace Mono.CSharp {
                        if (spec.DeclaringType == ec.CurrentType ||
                            TypeManager.IsNestedChildOf(ec.CurrentType, spec.DeclaringType)) {
                                        
-                               // TODO: Breaks dynamic binder as currect context fields are imported and not compiled
-                               // EventField mi = spec.MemberDefinition as EventField;
-
                                if (spec.BackingField != null) {
                                        spec.MemberDefinition.SetIsUsed ();
 
@@ -5347,7 +5470,7 @@ namespace Mono.CSharp {
                                throw new InternalErrorException ("An implicitly typed local variable could not be redefined");
                        
                        type = right_side.Type;
-                       if (type == TypeManager.null_type || type == TypeManager.void_type || type == InternalType.AnonymousMethod || type == InternalType.MethodGroup) {
+                       if (type == InternalType.Null || type == TypeManager.void_type || type == InternalType.AnonymousMethod || type == InternalType.MethodGroup) {
                                ec.Report.Error (815, loc,
                                        "An implicitly typed local variable declaration cannot be initialized with `{0}'",
                                        type.GetSignatureForError ());
index 9d7be6f0f08f0b9106535502be47bfbd8a4b10ae..899331d0ffcd544adefc7c76fa649bc420878d39 100644 (file)
@@ -117,6 +117,8 @@ namespace Mono.CSharp {
                                if (driver == null)
                                        throw new Exception ("Failed to create compiler driver with the given arguments");
 
+                               ctx = driver.ctx;
+
                                RootContext.ToplevelTypes = new ModuleCompiled (ctx, true);
                                
                                driver.ProcessDefaultConfig ();
@@ -129,7 +131,7 @@ namespace Mono.CSharp {
                                RootContext.ToplevelTypes = new ModuleCompiled (ctx, true);
                                /*var ctypes = */TypeManager.InitCoreTypes ();
 
-                               Import.Initialize ();
+                               ctx.MetaImporter.Initialize ();
                                driver.LoadReferences ();
                                TypeManager.InitOptionalCoreTypes (ctx);
 
@@ -159,9 +161,11 @@ namespace Mono.CSharp {
                        } else
                                printer = new StreamReportPrinter (MessageOutput);
 
-                       ctx = new CompilerContext (new Report (printer));
+                       ctx = new CompilerContext (new ReflectionMetaImporter (), new Report (printer));
                        RootContext.ToplevelTypes = new ModuleCompiled (ctx, true);
 
+                       ctx.MetaImporter.Initialize ();
+
                        //
                        // PartialReset should not reset the core types, this is very redundant.
                        //
@@ -198,7 +202,7 @@ namespace Mono.CSharp {
                                if (interactive_base_class != null)
                                        return interactive_base_class;
 
-                               return Import.ImportType (typeof (InteractiveBase));
+                               return ctx.MetaImporter.ImportType (typeof (InteractiveBase));
                        }
                }
 
@@ -208,7 +212,7 @@ namespace Mono.CSharp {
                                throw new ArgumentNullException ();
 
                        lock (evaluator_lock)
-                               interactive_base_class = Import.ImportType (type);
+                               interactive_base_class = ctx.MetaImporter.ImportType (type);
                }
 
                /// <summary>
@@ -905,7 +909,7 @@ namespace Mono.CSharp {
                        lock (evaluator_lock){
 //                             GlobalRootNamespace.Instance.AddAssemblyReference (a);
 //                             GlobalRootNamespace.Instance.ComputeNamespaces (ctx);
-                               GlobalRootNamespace.Instance.ImportAssembly (a);
+                               ctx.MetaImporter.ImportAssembly (a, GlobalRootNamespace.Instance);
                        }
                }
 
index bdf470baa263ba09293b74ac18f188808a8094f7..0d8f2027afebdc0b1bcac4481bdc73e9a58d2aa0 100644 (file)
@@ -1342,6 +1342,12 @@ namespace Mono.CSharp {
                                if (TypeManager.IsGenericParameter (t))
                                        return ResolveGenericParameter (ec, d, (TypeParameterSpec) t);
 
+                               if (t == InternalType.Dynamic) {
+                                       ec.Report.Warning (1981, 3, loc,
+                                               "Using `{0}' to test compatibility with `{1}' is identical to testing compatibility with `object'",
+                                               OperatorName, t.GetSignatureForError ());
+                               }
+
                                if (TypeManager.IsStruct (d)) {
                                        if (Convert.ImplicitBoxingConversion (null, d, t) != null)
                                                return CreateConstantResult (ec, true);
@@ -1445,11 +1451,16 @@ namespace Mono.CSharp {
                        if (expr.IsNull && TypeManager.IsNullableType (type)) {
                                return Nullable.LiftedNull.CreateFromExpression (ec, this);
                        }
+
+                       // If the compile-time type of E is dynamic, unlike the cast operator the as operator is not dynamically bound
+                       if (etype == InternalType.Dynamic) {
+                               do_isinst = true;
+                               return this;
+                       }
                        
                        Expression e = Convert.ImplicitConversion (ec, expr, type, loc);
                        if (e != null){
                                expr = e;
-                               do_isinst = false;
                                return this;
                        }
 
@@ -1524,10 +1535,6 @@ namespace Mono.CSharp {
 
                        if (type.IsPointer && !ec.IsUnsafe) {
                                UnsafeError (ec, loc);
-                       } else if (expr.Type == InternalType.Dynamic) {
-                               Arguments arg = new Arguments (1);
-                               arg.Add (new Argument (expr));
-                               return new DynamicConversion (type, CSharpBinderFlags.ConvertExplicit, arg, loc).Resolve (ec);
                        }
 
                        var res = Convert.ExplicitConversion (ec, expr, type, loc);
@@ -1720,8 +1727,8 @@ namespace Mono.CSharp {
 
                        public virtual bool IsApplicable (ResolveContext ec, Expression lexpr, Expression rexpr)
                        {
-                               if (TypeManager.IsEqual (left, lexpr.Type) &&
-                                       TypeManager.IsEqual (right, rexpr.Type))
+                               // Quick path
+                               if (left == lexpr.Type && right == rexpr.Type)
                                        return true;
 
                                return Convert.ImplicitConversionExists (ec, lexpr, left) &&
@@ -2787,9 +2794,9 @@ namespace Mono.CSharp {
                //
                Expression ResolveOperatorDelegate (ResolveContext ec, TypeSpec l, TypeSpec r)
                {
-                       if (!TypeManager.IsEqual (l, r) && !TypeSpecComparer.Variant.IsEqual (r, l)) {
+                       if (l != r && !TypeSpecComparer.Variant.IsEqual (r, l)) {
                                Expression tmp;
-                               if (right.eclass == ExprClass.MethodGroup || (r == InternalType.AnonymousMethod)) {
+                               if (right.eclass == ExprClass.MethodGroup || r == InternalType.AnonymousMethod || r == InternalType.Null) {
                                        tmp = Convert.ImplicitConversionRequired (ec, right, l, loc);
                                        if (tmp == null)
                                                return null;
@@ -2883,7 +2890,7 @@ namespace Mono.CSharp {
                                }
                        }                       
 
-                       if (TypeManager.IsEqual (ltype, rtype)) {
+                       if (ltype == rtype) {
                                underlying_type = EnumSpec.GetUnderlyingType (ltype);
 
                                if (left is Constant)
@@ -3912,7 +3919,7 @@ namespace Mono.CSharp {
                protected override Expression DoResolve (ResolveContext ec)
                {
                        AParametersCollection pd = oper.Parameters;
-                       if (!TypeManager.IsEqual (type, type) || !TypeManager.IsEqual (type, pd.Types [0]) || !TypeManager.IsEqual (type, pd.Types [1])) {
+                       if (!TypeSpecComparer.IsEqual (type, pd.Types[0]) || !TypeSpecComparer.IsEqual (type, pd.Types[1])) {
                                ec.Report.Error (217, loc,
                                        "A user-defined operator `{0}' must have parameters and return values of the same type in order to be applicable as a short circuit operator",
                                        oper.GetSignatureForError ());
@@ -4210,19 +4217,23 @@ namespace Mono.CSharp {
                        // First, if an implicit conversion exists from true_expr
                        // to false_expr, then the result type is of type false_expr.Type
                        //
-                       if (!TypeManager.IsEqual (true_type, false_type)) {
+                       if (!TypeSpecComparer.IsEqual (true_type, false_type)) {
                                Expression conv = Convert.ImplicitConversion (ec, true_expr, false_type, loc);
                                if (conv != null) {
                                        //
                                        // Check if both can convert implicitly to each other's type
                                        //
-                                       if (Convert.ImplicitConversion (ec, false_expr, true_type, loc) != null) {
-                                               ec.Report.Error (172, true_expr.Location,
-                                                       "Type of conditional expression cannot be determined as `{0}' and `{1}' convert implicitly to each other",
-                                                       TypeManager.CSharpName (true_type), TypeManager.CSharpName (false_type));
-                                               return null;
+                                       if (true_type != InternalType.Dynamic) {
+                                               type = false_type;
+
+                                               if (false_type != InternalType.Dynamic && Convert.ImplicitConversion (ec, false_expr, true_type, loc) != null) {
+                                                       ec.Report.Error (172, true_expr.Location,
+                                                               "Type of conditional expression cannot be determined as `{0}' and `{1}' convert implicitly to each other",
+                                                               TypeManager.CSharpName (true_type), TypeManager.CSharpName (false_type));
+                                                       return null;
+                                               }
                                        }
-                                       type = false_type;
+
                                        true_expr = conv;
                                } else if ((conv = Convert.ImplicitConversion (ec, false_expr, true_type, loc)) != null) {
                                        false_expr = conv;
@@ -4391,8 +4402,11 @@ namespace Mono.CSharp {
                        New n_source = source as New;
                        if (n_source != null) {
                                if (!n_source.Emit (ec, this)) {
-                                       if (leave_copy)
+                                       if (leave_copy) {
                                                EmitLoad (ec);
+                                               if (IsRef)
+                                                       ec.EmitLoadFromPtr (type);
+                                       }
                                        return;
                                }
                        } else {
@@ -4873,6 +4887,17 @@ namespace Mono.CSharp {
                }
                #endregion
 
+               protected override void CloneTo (CloneContext clonectx, Expression t)
+               {
+                       Invocation target = (Invocation) t;
+
+                       if (arguments != null)
+                               target.arguments = arguments.Clone (clonectx);
+
+                       target.expr = expr.Clone (clonectx);
+               }
+
+
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
                        Expression instance = mg.IsInstance ?
@@ -4929,14 +4954,9 @@ namespace Mono.CSharp {
                                                        return null;
                                                }
 
-                                               mg = ec.LookupExtensionMethod (me.Type, me.Name, -1, loc);
-                                               if (mg == null) {
-                                                       ec.Report.Error (1955, loc, "The member `{0}' cannot be used as method or delegate",
+                                               ec.Report.Error (1955, loc, "The member `{0}' cannot be used as method or delegate",
                                                                member_expr.GetSignatureForError ());
-                                                       return null;
-                                               }
-
-                                               ((ExtensionMethodGroupExpr) mg).ExtensionExpression = me.InstanceExpression;
+                                               return null;
                                        }
                                }
 
@@ -5026,6 +5046,16 @@ namespace Mono.CSharp {
                        return mg.OverloadResolve (ec, ref arguments, null, OverloadResolver.Restrictions.None);
                }
 
+               static Type[] GetVarargsTypes (MethodSpec mb, Arguments arguments)
+               {
+                       AParametersCollection pd = mb.Parameters;
+
+                       Argument a = arguments[pd.Count - 1];
+                       Arglist list = (Arglist) a.Expr;
+
+                       return list.ArgumentTypes;
+               }
+
                //
                // If a member is a method or event, or if it is a constant, field or property of either a delegate type
                // or the type dynamic, then the member is invocable
@@ -5059,14 +5089,32 @@ namespace Mono.CSharp {
                        return true;
                }
 
-               static Type[] GetVarargsTypes (MethodSpec mb, Arguments arguments)
+               //
+               // Used to decide whether call or callvirt is needed
+               //
+               static bool IsVirtualCallRequired (Expression instance, MethodSpec method)
                {
-                       AParametersCollection pd = mb.Parameters;
-                       
-                       Argument a = arguments [pd.Count - 1];
-                       Arglist list = (Arglist) a.Expr;
+                       //
+                       // There are 2 scenarious where we emit callvirt
+                       //
+                       // Case 1: A method is virtual and it's not used to call base
+                       // Case 2: A method instance expression can be null. In this casen callvirt ensures
+                       // correct NRE exception when the method is called
+                       //
+                       var decl_type = method.DeclaringType;
+                       if (decl_type.IsStruct || decl_type.IsEnum)
+                               return false;
 
-                       return list.ArgumentTypes;
+                       if (instance is BaseThis)
+                               return false;
+
+                       //
+                       // It's non-virtual and will never be null
+                       //
+                       if (!method.IsVirtual && (instance is This || instance is New || instance is ArrayCreation || instance is DelegateCreation || instance is TypeOf))
+                               return false;
+
+                       return true;
                }
 
                /// <remarks>
@@ -5102,8 +5150,6 @@ namespace Mono.CSharp {
                {
                        LocalTemporary this_arg = null;
 
-                       TypeSpec decl_type = method.DeclaringType;
-
                        // Speed up the check by not doing it on not allowed targets
                        if (method.ReturnType == TypeManager.void_type && method.IsConditionallyExcluded (loc))
                                return;
@@ -5117,10 +5163,10 @@ namespace Mono.CSharp {
                        } else {
                                iexpr_type = instance_expr.Type;
 
-                               if (decl_type.IsStruct || decl_type.IsEnum || (instance_expr is This && !method.IsVirtual) || (instance_expr is BaseThis)) {
-                                       call_op = OpCodes.Call;
-                               } else {
+                               if (IsVirtualCallRequired (instance_expr, method)) {
                                        call_op = OpCodes.Callvirt;
+                               } else {
+                                       call_op = OpCodes.Call;
                                }
 
                                //
@@ -5132,8 +5178,8 @@ namespace Mono.CSharp {
                                        //
                                        // Push the instance expression
                                        //
-                                       if ((iexpr_type.IsStruct && (call_op == OpCodes.Callvirt || (call_op == OpCodes.Call && decl_type == iexpr_type))) ||
-                                               iexpr_type.IsGenericParameter || TypeManager.IsNullableType (decl_type)) {
+                                       if ((iexpr_type.IsStruct && (call_op == OpCodes.Callvirt || (call_op == OpCodes.Call && method.DeclaringType == iexpr_type))) ||
+                                               iexpr_type.IsGenericParameter || TypeManager.IsNullableType (method.DeclaringType)) {
                                                //
                                                // If the expression implements IMemoryLocation, then
                                                // we can optimize and use AddressOf on the
@@ -5177,12 +5223,12 @@ namespace Mono.CSharp {
 
                        if (call_op == OpCodes.Callvirt && (iexpr_type.IsGenericParameter || iexpr_type.IsStruct)) {
                                ec.Emit (OpCodes.Constrained, iexpr_type);
-                       }\r
-\r
-                       if (method.Parameters.HasArglist) {\r
-                               Type[] varargs_types = GetVarargsTypes (method, Arguments);\r
-                               ec.Emit (call_op, method, varargs_types);\r
-                               return;\r
+                       }
+
+                       if (method.Parameters.HasArglist) {
+                               Type[] varargs_types = GetVarargsTypes (method, Arguments);
+                               ec.Emit (call_op, method, varargs_types);
+                               return;
                        }
 
                        //
@@ -5210,16 +5256,6 @@ namespace Mono.CSharp {
                                ec.Emit (OpCodes.Pop);
                }
 
-               protected override void CloneTo (CloneContext clonectx, Expression t)
-               {
-                       Invocation target = (Invocation) t;
-
-                       if (arguments != null)
-                               target.arguments = arguments.Clone (clonectx);
-
-                       target.expr = expr.Clone (clonectx);
-               }
-
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
                        return MakeExpression (ctx, mg.InstanceExpression, mg.BestCandidate, arguments);
@@ -6244,9 +6280,10 @@ namespace Mono.CSharp {
                                return;
 
                        // Emit static initializer for arrays which have contain more than 2 items and
-                       // the static initializer will initialize at least 25% of array values.
+                       // the static initializer will initialize at least 25% of array values or there
+                       // is more than 10 items to be initialized
                        // NOTE: const_initializers_count does not contain default constant values.
-                       if (const_initializers_count > 2 && const_initializers_count * 4 > (array_data.Count) &&
+                       if (const_initializers_count > 2 && (array_data.Count > 10 || const_initializers_count * 4 > (array_data.Count)) &&
                                (TypeManager.IsPrimitiveType (array_element_type) || TypeManager.IsEnumType (array_element_type))) {
                                EmitStaticInitializers (ec);
 
@@ -6275,7 +6312,10 @@ namespace Mono.CSharp {
                                        return;
                                }
 
-                               enc.Encode (type);
+                               if (enc.Encode (type) == AttributeEncoder.EncodedTypeProperties.DynamicType) {
+                                       Attribute.Error_AttributeArgumentIsDynamic (rc, loc);
+                                       return;
+                               }
                        }
 
                        // Single dimensional array of 0 size
@@ -6319,6 +6359,8 @@ namespace Mono.CSharp {
        //
        class ImplicitlyTypedArrayCreation : ArrayCreation
        {
+               TypeInferenceContext best_type_inference;
+
                public ImplicitlyTypedArrayCreation (ComposedTypeSpecifier rank, ArrayInitializer initializers, Location loc)
                        : base (null, rank, initializers, loc)
                {                       
@@ -6336,14 +6378,19 @@ namespace Mono.CSharp {
 
                        dimensions = rank.Dimension;
 
+                       best_type_inference = new TypeInferenceContext ();
+
                        if (!ResolveInitializers (ec))
                                return null;
 
-                       if (array_element_type == null || array_element_type == TypeManager.null_type ||
-                               array_element_type == TypeManager.void_type || array_element_type == InternalType.AnonymousMethod ||
-                               array_element_type == InternalType.MethodGroup ||
+                       best_type_inference.FixAllTypes (ec);
+                       array_element_type = best_type_inference.InferredTypeArguments[0];
+                       best_type_inference = null;
+
+                       if (array_element_type == null || array_element_type == InternalType.MethodGroup || array_element_type == InternalType.AnonymousMethod ||
                                arguments.Count != rank.Dimension) {
-                               Error_NoBestType (ec);
+                               ec.Report.Error (826, loc,
+                                       "The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly");
                                return null;
                        }
 
@@ -6359,19 +6406,13 @@ namespace Mono.CSharp {
                        return this;
                }
 
-               void Error_NoBestType (ResolveContext ec)
-               {
-                       ec.Report.Error (826, loc,
-                               "The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly");
-               }
-
                //
                // Converts static initializer only
                //
                void UnifyInitializerElement (ResolveContext ec)
                {
                        for (int i = 0; i < array_data.Count; ++i) {
-                               Expression e = (Expression)array_data[i];
+                               Expression e = array_data[i];
                                if (e != null)
                                        array_data [i] = Convert.ImplicitConversion (ec, e, array_element_type, Location.Null);
                        }
@@ -6380,27 +6421,10 @@ namespace Mono.CSharp {
                protected override Expression ResolveArrayElement (ResolveContext ec, Expression element)
                {
                        element = element.Resolve (ec);
-                       if (element == null)
-                               return null;
-                       
-                       if (array_element_type == null) {
-                               if (element.Type != TypeManager.null_type)
-                                       array_element_type = element.Type;
+                       if (element != null)
+                               best_type_inference.AddCommonTypeBound (element.Type);
 
-                               return element;
-                       }
-
-                       if (Convert.ImplicitConversionExists (ec, element, array_element_type)) {
-                               return element;
-                       }
-
-                       if (Convert.ImplicitConversionExists (ec, new TypeExpression (array_element_type, loc), element.Type)) {
-                               array_element_type = element.Type;
-                               return element;
-                       }
-
-                       Error_NoBestType (ec);
-                       return null;
+                       return element;
                }
        }       
        
@@ -6786,6 +6810,7 @@ namespace Mono.CSharp {
                        }
 
                        type = TypeManager.type_type;
+                       QueriedType = texpr;
 
                        return DoResolveBase ();
                }
@@ -6803,6 +6828,24 @@ namespace Mono.CSharp {
                        return this;
                }
 
+               static bool ContainsDynamicType (TypeSpec type)
+               {
+                       if (type == InternalType.Dynamic)
+                               return true;
+
+                       var element_container = type as ElementTypeSpec;
+                       if (element_container != null)
+                               return ContainsDynamicType (element_container.Element);
+
+                       foreach (var t in type.TypeArguments) {
+                               if (ContainsDynamicType (t)) {
+                                       return true;
+                               }
+                       }
+
+                       return false;
+               }
+
                static bool ContainsTypeParameter (TypeSpec type)
                {
                        if (type.Kind == MemberKind.TypeParameter)
@@ -6828,10 +6871,22 @@ namespace Mono.CSharp {
                        if (targetType != type)
                                enc.Encode (type);
 
-                       if (ContainsTypeParameter (typearg)) {
-                               rc.Compiler.Report.Error (416, loc, "`{0}': an attribute argument cannot use type parameters",
-                                       TypeManager.CSharpName (typearg));
-                               return;
+                       if (!(QueriedType is GenericOpenTypeExpr)) {
+                               var gt = typearg;
+                               while (gt != null) {
+                                       if (ContainsTypeParameter (gt)) {
+                                               rc.Compiler.Report.Error (416, loc, "`{0}': an attribute argument cannot use type parameters",
+                                                       typearg.GetSignatureForError ());
+                                               return;
+                                       }
+
+                                       gt = gt.DeclaringType;
+                               }
+
+                               if (ContainsDynamicType (typearg)) {
+                                       Attribute.Error_AttributeArgumentIsDynamic (rc, loc);
+                                       return;
+                               }
                        }
 
                        enc.EncodeTypeName (typearg);
@@ -7232,10 +7287,16 @@ namespace Mono.CSharp {
                        if (e == null)
                                return null;
 
-                       if (right_side != null)
+                       if (right_side != null) {
+                               if (e is TypeExpr) {
+                                       e.Error_UnexpectedKind (rc, ResolveFlags.VariableOrValue, loc);
+                                       return null;
+                               }
+
                                e = e.ResolveLValue (rc, right_side);
-                       else
+                       } else {
                                e = e.Resolve (rc, ResolveFlags.VariableOrValue | ResolveFlags.Type);
+                       }
 
                        return e;
                }
@@ -7288,8 +7349,13 @@ namespace Mono.CSharp {
                                return retval;
                        }
 
+                       MemberExpr me;
                        TypeSpec expr_type = expr.Type;
                        if (expr_type == InternalType.Dynamic) {
+                               me = expr as MemberExpr;
+                               if (me != null)
+                                       me.ResolveInstanceExpression (rc);
+
                                Arguments args = new Arguments (1);
                                args.Add (new Argument (expr));
                                return new DynamicMemberBinder (Name, args, loc);
@@ -7299,7 +7365,10 @@ namespace Mono.CSharp {
                                MemberKind.Interface | MemberKind.TypeParameter | MemberKind.ArrayType;
 
                        if ((expr_type.Kind & dot_kinds) == 0 || expr_type == TypeManager.void_type) {
-                               Unary.Error_OperatorCannotBeApplied (rc, loc, ".", expr_type);
+                               if (expr_type == InternalType.Null && rc.Compiler.IsRuntimeBinder)
+                                       rc.Report.Error (Report.RuntimeErrorId, loc, "Cannot perform member binding on `null' value");
+                               else
+                                       Unary.Error_OperatorCannotBeApplied (rc, loc, ".", expr_type);
                                return null;
                        }
 
@@ -7314,18 +7383,19 @@ namespace Mono.CSharp {
                                        // Try to look for extension method when member lookup failed
                                        //
                                        if (MethodGroupExpr.IsExtensionMethodArgument (expr)) {
-                                               ExtensionMethodGroupExpr ex_method_lookup = rc.LookupExtensionMethod (expr_type, Name, lookup_arity, loc);
-                                               if (ex_method_lookup != null) {
-                                                       ex_method_lookup.ExtensionExpression = expr;
-
+                                               NamespaceEntry scope = null;
+                                               var methods = rc.LookupExtensionMethod (expr_type, Name, lookup_arity, ref scope);
+                                               if (methods != null) {
+                                                       var emg = new ExtensionMethodGroupExpr (methods, scope, expr, loc);
                                                        if (HasTypeArguments) {
                                                                if (!targs.Resolve (rc))
                                                                        return null;
 
-                                                               ex_method_lookup.SetTypeArguments (rc, targs);
+                                                               emg.SetTypeArguments (rc, targs);
                                                        }
 
-                                                       return ex_method_lookup.Resolve (rc);
+                                                       // TODO: Should it really skip the checks bellow
+                                                       return emg.Resolve (rc);
                                                }
                                        }
                                }
@@ -7358,9 +7428,7 @@ namespace Mono.CSharp {
                                errorMode = true;
                        }
 
-                       MemberExpr me;
                        TypeExpr texpr = member_lookup as TypeExpr;
-
                        if (texpr != null) {
                                if (!(expr is TypeExpr)) {
                                        me = expr as MemberExpr;
@@ -7460,8 +7528,12 @@ namespace Mono.CSharp {
                        }
                        
                        TypeExpr texpr;
-                       if (HasTypeArguments) {
-                               texpr = new GenericTypeExpr (nested, targs, loc);
+                       if (Arity > 0) {
+                               if (HasTypeArguments) {
+                                       texpr = new GenericTypeExpr (nested, targs, loc);
+                               } else {
+                                       texpr = new GenericOpenTypeExpr (nested, loc);
+                               }
                        } else {
                                texpr = new TypeExpression (nested, loc);
                        }
@@ -8094,7 +8166,10 @@ namespace Mono.CSharp {
                                        return null;
                        }
 
-                       if (dynamic || type == InternalType.Dynamic) {
+                       //
+                       // It has dynamic arguments
+                       //
+                       if (dynamic) {
                                Arguments args = new Arguments (arguments.Count + 1);
                                if (IsBase) {
                                        rc.Report.Error (1972, loc,
@@ -8133,7 +8208,7 @@ namespace Mono.CSharp {
                        return baseType == null ? null : MemberCache.FindMembers (baseType, MemberCache.IndexerNameAlias, false);
                }
 
-               MethodGroupExpr OverloadResolver.IBaseMembersProvider.LookupExtensionMethod (ResolveContext rc, int arity)
+               MethodGroupExpr OverloadResolver.IBaseMembersProvider.LookupExtensionMethod (ResolveContext rc)
                {
                        return null;
                }
@@ -8155,19 +8230,19 @@ namespace Mono.CSharp {
                        : base (loc)
                {
                        this.type = type;
-                       eclass = ExprClass.Variable;\r
-               }\r
-\r
-               #region Properties\r
-\r
-               public override string Name {\r
-                       get {\r
-                               return "base";\r
-                       }\r
-               }\r
-\r
-               #endregion\r
-\r
+                       eclass = ExprClass.Variable;
+               }
+
+               #region Properties
+
+               public override string Name {
+                       get {
+                               return "base";
+                       }
+               }
+
+               #endregion
+
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
                        ec.Report.Error (831, loc, "An expression tree may not contain a base access");
@@ -8175,12 +8250,12 @@ namespace Mono.CSharp {
                }
 
                public override void Emit (EmitContext ec)
-               {\r
-                       base.Emit (ec);\r
-\r
+               {
+                       base.Emit (ec);
+
                        if (ec.CurrentType.IsStruct) {
                                ec.Emit (OpCodes.Ldobj, ec.CurrentType);
-                               ec.Emit (OpCodes.Box, ec.CurrentType);\r
+                               ec.Emit (OpCodes.Box, ec.CurrentType);
                        }
                }
 
@@ -8191,12 +8266,12 @@ namespace Mono.CSharp {
                        } else {
                                ec.Report.Error (1512, loc, "Keyword `base' is not available in the current context");
                        }
-               }\r
-\r
-               public override void ResolveBase (ResolveContext ec)\r
-               {\r
-                       base.ResolveBase (ec);\r
-                       type = ec.CurrentType.BaseType;\r
+               }
+
+               public override void ResolveBase (ResolveContext ec)
+               {
+                       base.ResolveBase (ec);
+                       type = ec.CurrentType.BaseType;
                }
        }
 
@@ -8228,9 +8303,10 @@ namespace Mono.CSharp {
 
                public static readonly EmptyExpression LValueMemberAccess = new EmptyExpression ();
                public static readonly EmptyExpression LValueMemberOutAccess = new EmptyExpression ();
-               public static readonly EmptyExpression UnaryAddress = new EmptyExpression ();\r
-               public static readonly EmptyExpression EventAddition = new EmptyExpression ();\r
+               public static readonly EmptyExpression UnaryAddress = new EmptyExpression ();
+               public static readonly EmptyExpression EventAddition = new EmptyExpression ();
                public static readonly EmptyExpression EventSubtraction = new EmptyExpression ();
+               public static readonly EmptyExpression MissingValue = new EmptyExpression (InternalType.FakeInternalType);
 
                static EmptyExpression temp = new EmptyExpression ();
                public static EmptyExpression Grab ()
@@ -8484,8 +8560,10 @@ namespace Mono.CSharp {
                                        UnsafeError (ec.Compiler.Report, loc);
                                }
 
-                               type = PointerContainer.MakeType (type);
-                               single_spec = single_spec.Next;
+                               do {
+                                       type = PointerContainer.MakeType (type);
+                                       single_spec = single_spec.Next;
+                               } while (single_spec != null && single_spec.IsPointer);
                        }
 
                        if (single_spec != null && single_spec.Dimension > 0) {
@@ -8728,41 +8806,47 @@ namespace Mono.CSharp {
                                return EmptyExpressionStatement.Instance;
 
                        var t = ec.CurrentInitializerVariable.Type;
-                       
-                       var member = MemberLookup (ec, ec.CurrentType, t, Name, 0, false, loc);
-                       if (member == null) {
-                               member = Expression.MemberLookup (null, ec.CurrentType, t, Name, 0, false, loc);
+                       if (t == InternalType.Dynamic) {
+                               Arguments args = new Arguments (1);
+                               args.Add (new Argument (ec.CurrentInitializerVariable));
+                               target = new DynamicMemberBinder (Name, args, loc);
+                       } else {
+
+                               var member = MemberLookup (ec, ec.CurrentType, t, Name, 0, false, loc);
+                               if (member == null) {
+                                       member = Expression.MemberLookup (null, ec.CurrentType, t, Name, 0, false, loc);
 
-                               if (member != null) {
-                                       // TODO: ec.Report.SymbolRelatedToPreviousError (member);
-                                       ErrorIsInaccesible (ec, member.GetSignatureForError (), loc);
+                                       if (member != null) {
+                                               // TODO: ec.Report.SymbolRelatedToPreviousError (member);
+                                               ErrorIsInaccesible (ec, member.GetSignatureForError (), loc);
+                                               return null;
+                                       }
+                               }
+
+                               if (member == null) {
+                                       Error_TypeDoesNotContainDefinition (ec, loc, t, Name);
                                        return null;
                                }
-                       }
 
-                       if (member == null) {
-                               Error_TypeDoesNotContainDefinition (ec, loc, t, Name);
-                               return null;
-                       }
+                               if (!(member is PropertyExpr || member is FieldExpr)) {
+                                       ec.Report.Error (1913, loc,
+                                               "Member `{0}' cannot be initialized. An object initializer may only be used for fields, or properties",
+                                               member.GetSignatureForError ());
 
-                       if (!(member is PropertyExpr || member is FieldExpr)) {
-                               ec.Report.Error (1913, loc,
-                                       "Member `{0}' cannot be initialized. An object initializer may only be used for fields, or properties",
-                                       member.GetSignatureForError ());
+                                       return null;
+                               }
 
-                               return null;
-                       }
+                               var me = member as MemberExpr;
+                               if (me.IsStatic) {
+                                       ec.Report.Error (1914, loc,
+                                               "Static field or property `{0}' cannot be assigned in an object initializer",
+                                               me.GetSignatureForError ());
+                               }
 
-                       var me = member as MemberExpr;
-                       if (me.IsStatic) {
-                               ec.Report.Error (1914, loc,
-                                       "Static field or property `{0}' cannot be assigned in an object initializer",
-                                       me.GetSignatureForError ());
+                               target = me;
+                               me.InstanceExpression = ec.CurrentInitializerVariable;
                        }
 
-                       target = me;
-                       me.InstanceExpression = ec.CurrentInitializerVariable;
-
                        if (source is CollectionOrObjectInitializers) {
                                Expression previous = ec.CurrentInitializerVariable;
                                ec.CurrentInitializerVariable = target;
@@ -9285,7 +9369,7 @@ namespace Mono.CSharp {
                        }
 
                        type = e.Type;
-                       if (type == TypeManager.void_type || type == TypeManager.null_type ||
+                       if (type == TypeManager.void_type || type == InternalType.Null ||
                                type == InternalType.AnonymousMethod || type.IsPointer) {
                                Error_InvalidInitializer (ec, e.GetSignatureForError ());
                                return null;
index a911771f90aa9cc875dff477c8be1f46d85cb808..70c8e750f788bac9c9f12a5daa2bc883ba2bcb6f 100644 (file)
@@ -327,7 +327,7 @@ namespace Mono.CSharp
                        fs.state |= StateFlags.PendingMetaInflate;
 
                        // Gets back FieldInfo in case of metaInfo was inflated
-                       fs.metaInfo = MemberCache.GetMember (DeclaringType.GetDefinition (), this).metaInfo;
+                       fs.metaInfo = MemberCache.GetMember (TypeParameterMutator.GetMemberDeclaringType (DeclaringType), this).metaInfo;
                        return fs;
                }
        }
index 10c5d906e7784212c84b6af1e85b74d18f8258f7..e05c459377da72a5f2ccb5524c1318d955fd7288 100644 (file)
@@ -90,7 +90,7 @@ namespace Mono.CSharp {
 
                bool CheckConflictingInheritedConstraint (TypeSpec ba, TypeSpec bb, IMemberContext context, Location loc)
                {
-                       if (!TypeManager.IsSubclassOf (ba, bb) && !TypeManager.IsSubclassOf (bb, ba)) {
+                       if (!TypeSpec.IsBaseClass (ba, bb, false) && !TypeSpec.IsBaseClass (bb, ba, false)) {
                                context.Compiler.Report.Error (455, loc,
                                        "Type parameter `{0}' inherits conflicting constraints `{1}' and `{2}'",
                                        tparam.Value,
@@ -1169,6 +1169,29 @@ namespace Mono.CSharp {
                        this.var = var;
                }
 
+               #region Properties
+
+               public TypeParameter[] MethodTypeParameters {
+                       get {
+                               return mvar;
+                       }
+               }
+
+               #endregion
+
+               public static TypeSpec GetMemberDeclaringType (TypeSpec type)
+               {
+                       if (type is InflatedTypeSpec) {
+                               if (type.DeclaringType == null)
+                                       return type.GetDefinition ();
+
+                               var parent = GetMemberDeclaringType (type.DeclaringType);
+                               type = MemberCache.GetMember<TypeSpec> (parent, type);
+                       }
+
+                       return type;
+               }
+
                public TypeSpec Mutate (TypeSpec ts)
                {
                        TypeSpec value;
@@ -1180,12 +1203,6 @@ namespace Mono.CSharp {
                        return value;
                }
 
-               public FieldInfo Mutate (FieldSpec fs)
-               {
-                       // TODO:
-                       return fs.GetMetaInfo ();
-               }
-
                public TypeParameterSpec Mutate (TypeParameterSpec tp)
                {
                        for (int i = 0; i < mvar.Length; ++i) {
@@ -1368,9 +1385,6 @@ namespace Mono.CSharp {
                        if (TypeManager.IsNullableType (open_type))
                                return targs[0].GetSignatureForError () + "?";
 
-                       if (MemberDefinition is AnonymousTypeClass)
-                               return ((AnonymousTypeClass) MemberDefinition).GetSignatureForError ();
-
                        return base.GetSignatureForError ();
                }
 
@@ -1754,7 +1768,7 @@ namespace Mono.CSharp {
 
                //
                // Checks the constraints of open generic type against type
-               // arguments. Has to be called onafter all members are defined
+               // arguments. Has to be called after all members have been defined
                //
                public bool CheckConstraints (IMemberContext ec)
                {
@@ -1787,12 +1801,23 @@ namespace Mono.CSharp {
 
                static bool HasDynamicArguments (TypeSpec[] args)
                {
-                       foreach (var item in args) {
+                       for (int i = 0; i < args.Length; ++i) {
+                               var item = args[i];
+
                                if (item == InternalType.Dynamic)
                                        return true;
 
                                if (TypeManager.IsGenericType (item))
                                        return HasDynamicArguments (TypeManager.GetTypeArguments (item));
+
+                               if (item.IsArray) {
+                                       while (item.IsArray) {
+                                               item = ((ArrayContainer) item).Element;
+                                       }
+
+                                       if (item == InternalType.Dynamic)
+                                               return true;
+                               }
                        }
 
                        return false;
@@ -1835,10 +1860,10 @@ namespace Mono.CSharp {
 
        static class ConstraintChecker
        {
-               /// <summary>
-               ///   Check the constraints; we're called from ResolveAsTypeTerminal()
-               ///   after fully resolving the constructed type.
-               /// </summary>
+               //
+               // Checks all type arguments againts type parameters constraints
+               // NOTE: It can run in probing mode when `mc' is null
+               //
                public static bool CheckAll (IMemberContext mc, MemberSpec context, TypeSpec[] targs, TypeParameterSpec[] tparams, Location loc)
                {
                        for (int i = 0; i < tparams.Length; i++) {
@@ -1855,24 +1880,37 @@ namespace Mono.CSharp {
                        // First, check the `class' and `struct' constraints.
                        //
                        if (tparam.HasSpecialClass && !TypeManager.IsReferenceType (atype)) {
-                               mc.Compiler.Report.Error (452, loc,
-                                       "The type `{0}' must be a reference type in order to use it as type parameter `{1}' in the generic type or method `{2}'",
-                                       TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                               if (mc != null) {
+                                       mc.Compiler.Report.Error (452, loc,
+                                               "The type `{0}' must be a reference type in order to use it as type parameter `{1}' in the generic type or method `{2}'",
+                                               TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                               }
+
                                return false;
                        }
 
                        if (tparam.HasSpecialStruct && (!TypeManager.IsValueType (atype) || TypeManager.IsNullableType (atype))) {
-                               mc.Compiler.Report.Error (453, loc,
-                                       "The type `{0}' must be a non-nullable value type in order to use it as type parameter `{1}' in the generic type or method `{2}'",
-                                       TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                               if (mc != null) {
+                                       mc.Compiler.Report.Error (453, loc,
+                                               "The type `{0}' must be a non-nullable value type in order to use it as type parameter `{1}' in the generic type or method `{2}'",
+                                               TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                               }
+
                                return false;
                        }
 
+                       bool ok = true;
+
                        //
                        // The class constraint comes next.
                        //
                        if (tparam.HasTypeConstraint) {
-                               CheckConversion (mc, context, atype, tparam, tparam.BaseType, loc);
+                               if (!CheckConversion (mc, context, atype, tparam, tparam.BaseType, loc)) {
+                                       if (mc == null)
+                                               return false;
+
+                                       ok = false;
+                               }
                        }
 
                        //
@@ -1880,12 +1918,21 @@ namespace Mono.CSharp {
                        //
                        if (tparam.Interfaces != null) {
                                if (TypeManager.IsNullableType (atype)) {
+                                       if (mc == null)
+                                               return false;
+
                                        mc.Compiler.Report.Error (313, loc,
                                                "The type `{0}' cannot be used as type parameter `{1}' in the generic type or method `{2}'. The nullable type `{0}' never satisfies interface constraint",
                                                atype.GetSignatureForError (), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                                       ok = false;
                                } else {
                                        foreach (TypeSpec iface in tparam.Interfaces) {
-                                               CheckConversion (mc, context, atype, tparam, iface, loc);
+                                               if (!CheckConversion (mc, context, atype, tparam, iface, loc)) {
+                                                       if (mc == null)
+                                                               return false;
+
+                                                       ok = false;
+                                               }
                                        }
                                }
                        }
@@ -1894,23 +1941,28 @@ namespace Mono.CSharp {
                        // Finally, check the constructor constraint.
                        //
                        if (!tparam.HasSpecialConstructor)
-                               return true;
+                               return ok;
 
                        if (!HasDefaultConstructor (atype)) {
-                               mc.Compiler.Report.SymbolRelatedToPreviousError (atype);
-                               mc.Compiler.Report.Error (310, loc,
-                                       "The type `{0}' must have a public parameterless constructor in order to use it as parameter `{1}' in the generic type or method `{2}'",
-                                       TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                               if (mc != null) {
+                                       mc.Compiler.Report.SymbolRelatedToPreviousError (atype);
+                                       mc.Compiler.Report.Error (310, loc,
+                                               "The type `{0}' must have a public parameterless constructor in order to use it as parameter `{1}' in the generic type or method `{2}'",
+                                               TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+                               }
                                return false;
                        }
 
-                       return true;
+                       return ok;
                }
 
-               static void CheckConversion (IMemberContext mc, MemberSpec context, TypeSpec atype, TypeParameterSpec tparam, TypeSpec ttype, Location loc)
+               static bool CheckConversion (IMemberContext mc, MemberSpec context, TypeSpec atype, TypeParameterSpec tparam, TypeSpec ttype, Location loc)
                {
                        var expr = new EmptyExpression (atype);
-                       if (!Convert.ImplicitStandardConversionExists (expr, ttype)) {
+                       if (Convert.ImplicitStandardConversionExists (expr, ttype))
+                               return true;
+
+                       if (mc != null) {
                                mc.Compiler.Report.SymbolRelatedToPreviousError (tparam);
                                if (TypeManager.IsValueType (atype)) {
                                        mc.Compiler.Report.Error (315, loc, "The type `{0}' cannot be used as type parameter `{1}' in the generic type or method `{2}'. There is no boxing conversion from `{0}' to `{3}'",
@@ -1923,6 +1975,8 @@ namespace Mono.CSharp {
                                                atype.GetSignatureForError (), tparam.GetSignatureForError (), context.GetSignatureForError (), ttype.GetSignatureForError ());
                                }
                        }
+
+                       return false;
                }
 
                static bool HasDefaultConstructor (TypeSpec atype)
@@ -2320,7 +2374,7 @@ namespace Mono.CSharp {
                        Upper   = 2
                }
 
-               class BoundInfo
+               class BoundInfo : IEquatable<BoundInfo>
                {
                        public readonly TypeSpec Type;
                        public readonly BoundKind Kind;
@@ -2336,11 +2390,14 @@ namespace Mono.CSharp {
                                return Type.GetHashCode ();
                        }
 
-                       public override bool Equals (object obj)
+                       #region IEquatable<BoundInfo> Members
+
+                       public bool Equals (BoundInfo other)
                        {
-                               BoundInfo a = (BoundInfo) obj;
-                               return Type == a.Type && Kind == a.Kind;
+                               return Type == other.Type && Kind == other.Kind;
                        }
+
+                       #endregion
                }
 
                readonly TypeSpec[] unfixed_types;
@@ -2401,23 +2458,15 @@ namespace Mono.CSharp {
 
                        var a = bounds [index];
                        if (a == null) {
-                               a = new List<BoundInfo> ();
+                               a = new List<BoundInfo> (2);
+                               a.Add (bound);
                                bounds [index] = a;
-                       } else {
-                               if (a.Contains (bound))
-                                       return;
+                               return;
                        }
 
-                       //
-                       // SPEC: does not cover type inference using constraints
-                       //
-                       //if (TypeManager.IsGenericParameter (t)) {
-                       //    GenericConstraints constraints = TypeManager.GetTypeParameterConstraints (t);
-                       //    if (constraints != null) {
-                       //        //if (constraints.EffectiveBaseClass != null)
-                       //        //    t = constraints.EffectiveBaseClass;
-                       //    }
-                       //}
+                       if (a.Contains (bound))
+                               return;
+
                        a.Add (bound);
                }
                
@@ -2605,13 +2654,20 @@ namespace Mono.CSharp {
                                        }
 
                                        if (bound.Kind == BoundKind.Exact || cbound.Kind == BoundKind.Exact) {
-                                               if (cbound.Kind != BoundKind.Exact) {
+                                               if (cbound.Kind == BoundKind.Lower) {
                                                        if (!Convert.ImplicitConversionExists (ec, new TypeExpression (cbound.Type, Location.Null), bound.Type)) {
                                                                break;
                                                        }
 
                                                        continue;
                                                }
+                                               if (cbound.Kind == BoundKind.Upper) {
+                                                       if (!Convert.ImplicitConversionExists (ec, new TypeExpression (bound.Type, Location.Null), cbound.Type)) {
+                                                               break;
+                                                       }
+
+                                                       continue;
+                                               }
                                                
                                                if (bound.Kind != BoundKind.Exact) {
                                                        if (!Convert.ImplicitConversionExists (ec, new TypeExpression (bound.Type, Location.Null), cbound.Type)) {
@@ -2626,21 +2682,46 @@ namespace Mono.CSharp {
                                        }
 
                                        if (bound.Kind == BoundKind.Lower) {
-                                               if (!Convert.ImplicitConversionExists (ec, new TypeExpression (cbound.Type, Location.Null), bound.Type)) {
-                                                       break;
+                                               if (cbound.Kind == BoundKind.Lower) {
+                                                       if (!Convert.ImplicitConversionExists (ec, new TypeExpression (cbound.Type, Location.Null), bound.Type)) {
+                                                               break;
+                                                       }
+                                               } else {
+                                                       if (!Convert.ImplicitConversionExists (ec, new TypeExpression (bound.Type, Location.Null), cbound.Type)) {
+                                                               break;
+                                                       }
+
+                                                       bound = cbound;
                                                }
-                                       } else {
+
+                                               continue;
+                                       }
+
+                                       if (bound.Kind == BoundKind.Upper) {
                                                if (!Convert.ImplicitConversionExists (ec, new TypeExpression (bound.Type, Location.Null), cbound.Type)) {
                                                        break;
                                                }
+                                       } else {
+                                               throw new NotImplementedException ("variance conversion");
                                        }
                                }
 
                                if (cii != candidates_count)
                                        continue;
 
-                               if (best_candidate != null && best_candidate != bound.Type)
-                                       return false;
+                               //
+                               // We already have the best candidate, break if thet are different
+                               //
+                               // Dynamic is never ambiguous as we prefer dynamic over other best candidate types
+                               //
+                               if (best_candidate != null) {
+
+                                       if (best_candidate == InternalType.Dynamic)
+                                               continue;
+
+                                       if (bound.Type != InternalType.Dynamic && best_candidate != bound.Type)
+                                               return false;
+                               }
 
                                best_candidate = bound.Type;
                        }
@@ -2816,7 +2897,7 @@ namespace Mono.CSharp {
                                        //
                                        if (unique_candidate_targs != null) {
                                                TypeSpec[] second_unique_candidate_targs = TypeManager.GetTypeArguments (u_candidate);
-                                               if (TypeSpecComparer.Default.Equals (unique_candidate_targs, second_unique_candidate_targs)) {
+                                               if (TypeSpecComparer.Equals (unique_candidate_targs, second_unique_candidate_targs)) {
                                                        unique_candidate_targs = second_unique_candidate_targs;
                                                        continue;
                                                }
@@ -2911,7 +2992,7 @@ namespace Mono.CSharp {
 
                                MethodGroupExpr mg = (MethodGroupExpr) e;
                                Arguments args = DelegateCreation.CreateDelegateMethodArguments (invoke.Parameters, param_types, e.Location);
-                               mg = mg.OverloadResolve (ec, ref args, null, OverloadResolver.Restrictions.Covariant | OverloadResolver.Restrictions.ProbingOnly);
+                               mg = mg.OverloadResolve (ec, ref args, null, OverloadResolver.Restrictions.CovariantDelegate | OverloadResolver.Restrictions.ProbingOnly);
                                if (mg == null)
                                        return 0;
 
index d0064cf4a8a9f88236054f86eea96d33e135046a..1a7e3c88b07ec9f9c47623b3c0595479398698fb 100644 (file)
@@ -18,15 +18,25 @@ using System.Runtime.InteropServices;
 
 namespace Mono.CSharp
 {
-       public static class Import
+       public class ReflectionMetaImporter
        {
-               static Dictionary<Type, TypeSpec> import_cache;
-               static Dictionary<Type, PredefinedTypeSpec> type_2_predefined;
+               Dictionary<Type, TypeSpec> import_cache;
+               Dictionary<Type, PredefinedTypeSpec> type_2_predefined;
 
-               public static void Initialize ()
+               public ReflectionMetaImporter ()
                {
                        import_cache = new Dictionary<Type, TypeSpec> (1024, ReferenceEquality<Type>.Default);
+                       IgnorePrivateMembers = true;
+               }
+
+               #region Properties
+
+               public bool IgnorePrivateMembers { get; set; }
+
+               #endregion
 
+               public void Initialize ()
+               {
                        // Setup mapping for predefined types
                        type_2_predefined = new Dictionary<Type, PredefinedTypeSpec> () {
                                { typeof (object), TypeManager.object_type },
@@ -67,7 +77,7 @@ namespace Mono.CSharp
                        };
                }
 
-               public static FieldSpec CreateField (FieldInfo fi, TypeSpec declaringType)
+               public FieldSpec CreateField (FieldInfo fi, TypeSpec declaringType)
                {
                        Modifiers mod = 0;
                        var fa = fi.Attributes;
@@ -85,26 +95,36 @@ namespace Mono.CSharp
                                        mod = Modifiers.PROTECTED | Modifiers.INTERNAL;
                                        break;
                                default:
+                                       // Ignore private fields (even for error reporting) to not require extra dependencies
+                                       if (IgnorePrivateMembers || fi.IsDefined (typeof (CompilerGeneratedAttribute), false))
+                                               return null;
+
                                        mod = Modifiers.PRIVATE;
                                        break;
                        }
 
-                       // Ignore private fields (even for error reporting) to not require extra dependencies
-                       if (mod == Modifiers.PRIVATE)
-                               return null;
-
                        var definition = new ImportedMemberDefinition (fi);
+                       TypeSpec field_type;
+
+                       try {
+                               field_type = ImportType (fi.FieldType);
+                       } catch (Exception e) {
+                               // TODO: I should construct fake TypeSpec based on TypeRef signature
+                               // but there is no way to do it with System.Reflection
+                               throw new InternalErrorException (e, "Cannot import field `{0}.{1}' referenced in assembly `{2}'",
+                                       declaringType.GetSignatureForError (), fi.Name, declaringType.Assembly);
+                       }
 
                        if ((fa & FieldAttributes.Literal) != 0) {
-                               var     c = Constant.CreateConstantFromValue (ImportType (fi.FieldType), fi.GetValue (fi), Location.Null);
-                               return new ConstSpec (declaringType, definition, ImportType (fi.FieldType), fi, mod, c);
+                               var c = Constant.CreateConstantFromValue (field_type, fi.GetValue (fi), Location.Null);
+                               return new ConstSpec (declaringType, definition, field_type, fi, mod, c);
                        }
 
                        if ((fa & FieldAttributes.InitOnly) != 0) {
-                               if (fi.FieldType == typeof (decimal)) {
+                               if (field_type == TypeManager.decimal_type) {
                                        var dc = ReadDecimalConstant (fi);
                                        if (dc != null)
-                                               return new ConstSpec (declaringType, definition, ImportType (fi.FieldType), fi, mod, dc);
+                                               return new ConstSpec (declaringType, definition, field_type, fi, mod, dc);
                                }
 
                                mod |= Modifiers.READONLY;
@@ -123,17 +143,17 @@ namespace Mono.CSharp
                        if ((fa & FieldAttributes.Static) != 0)
                                mod |= Modifiers.STATIC;
 
-                       if (fi.FieldType.IsValueType) {
+                       if (field_type.IsStruct) {
                                 if (fi.IsDefined (typeof (FixedBufferAttribute), false)) {
                                        var element_field = CreateField (fi.FieldType.GetField (FixedField.FixedElementName), declaringType);
                                        return new FixedFieldSpec (declaringType, definition, fi, element_field, mod);
                                }
                        }
 
-                       return new FieldSpec (declaringType, definition, ImportType (fi.FieldType), fi, mod);
+                       return new FieldSpec (declaringType, definition, field_type, fi, mod);
                }
 
-               public static EventSpec CreateEvent (EventInfo ei, TypeSpec declaringType, MethodSpec add, MethodSpec remove)
+               public EventSpec CreateEvent (EventInfo ei, TypeSpec declaringType, MethodSpec add, MethodSpec remove)
                {
                        add.IsAccessor = true;
                        remove.IsAccessor = true;
@@ -145,7 +165,7 @@ namespace Mono.CSharp
                        return new EventSpec (declaringType, definition, ImportType (ei.EventHandlerType), add.Modifiers, add, remove);
                }
 
-               static T[] CreateGenericParameters<T> (Type type, TypeSpec declaringType) where T : TypeSpec
+               T[] CreateGenericParameters<T> (Type type, TypeSpec declaringType) where T : TypeSpec
                {
                        Type[] tparams = type.GetGenericArguments ();
 
@@ -185,14 +205,14 @@ namespace Mono.CSharp
                        return CreateGenericParameters<T> (parent_owned_count, tparams);
                }
 
-               static T[] CreateGenericParameters<T> (int first, Type[] tparams) where T : TypeSpec
+               T[] CreateGenericParameters<T> (int first, Type[] tparams) where T : TypeSpec
                {
                        var tspec = new T [tparams.Length - first];
                        for (int pos = first; pos < tparams.Length; ++pos) {
                                var type = tparams[pos];
                                if (type.HasElementType) {
                                        var element = type.GetElementType ();
-                                       var spec = CreateType (element);
+                                       var spec = ImportType (element);
 
                                        if (type.IsArray) {
                                                tspec[pos - first] = (T) (TypeSpec) ArrayContainer.MakeType (spec, type.GetArrayRank ());
@@ -208,17 +228,13 @@ namespace Mono.CSharp
                        return tspec;
                }
 
-               public static MethodSpec CreateMethod (MethodBase mb, TypeSpec declaringType)
+               public MethodSpec CreateMethod (MethodBase mb, TypeSpec declaringType)
                {
                        Modifiers mod = ReadMethodModifiers (mb, declaringType);
-                       //if (declaringType.IsInterface) {
-                       //    mod = (mod & ~Modifiers.ABSTRACT) | Modifiers.VIRTUAL;
-                       //}
-
                        TypeParameterSpec[] tparams;
                        ImportedMethodDefinition definition;
 
-                       var parameters = ParametersImported.Create (declaringType, mb);
+                       var parameters = CreateParameters (declaringType, mb.GetParameters (), mb);
 
                        if (mb.IsGenericMethod) {
                                if (!mb.IsGenericMethodDefinition)
@@ -288,10 +304,78 @@ namespace Mono.CSharp
                        return ms;
                }
 
+               //
+               // Imports System.Reflection parameters
+               //
+               AParametersCollection CreateParameters (TypeSpec parent, ParameterInfo[] pi, MethodBase method)
+               {
+                       int varargs = method != null && (method.CallingConvention & CallingConventions.VarArgs) != 0 ? 1 : 0;
+
+                       if (pi.Length == 0 && varargs == 0)
+                               return ParametersCompiled.EmptyReadOnlyParameters;
+
+                       TypeSpec[] types = new TypeSpec[pi.Length + varargs];
+                       IParameterData[] par = new IParameterData[pi.Length + varargs];
+                       bool is_params = false;
+                       for (int i = 0; i < pi.Length; i++) {
+                               ParameterInfo p = pi[i];
+                               Parameter.Modifier mod = 0;
+                               Expression default_value = null;
+                               if (p.ParameterType.IsByRef) {
+                                       if ((p.Attributes & (ParameterAttributes.Out | ParameterAttributes.In)) == ParameterAttributes.Out)
+                                               mod = Parameter.Modifier.OUT;
+                                       else
+                                               mod = Parameter.Modifier.REF;
+
+                                       //
+                                       // Strip reference wrapping
+                                       //
+                                       types[i] = ImportType (p.ParameterType.GetElementType ());
+                               } else if (i == 0 && method.IsStatic && parent.IsStatic && // TODO: parent.Assembly.IsExtension &&
+                                       HasExtensionAttribute (CustomAttributeData.GetCustomAttributes (method)) != null) {
+                                       mod = Parameter.Modifier.This;
+                                       types[i] = ImportType (p.ParameterType);
+                               } else {
+                                       types[i] = ImportType (p.ParameterType);
+
+                                       if (i >= pi.Length - 2 && types[i] is ArrayContainer) {
+                                               var cattrs = CustomAttributeData.GetCustomAttributes (p);
+                                               if (cattrs != null && cattrs.Any (l => l.Constructor.DeclaringType == typeof (ParamArrayAttribute))) {
+                                                       mod = Parameter.Modifier.PARAMS;
+                                                       is_params = true;
+                                               }
+                                       }
+
+                                       if (!is_params && p.IsOptional) {
+                                               object value = p.DefaultValue;
+                                               if (value == Missing.Value) {
+                                                       default_value = EmptyExpression.Null;
+                                               } else if (value == null) {
+                                                       default_value = new NullLiteral (Location.Null);
+                                               } else {
+                                                       default_value = Constant.CreateConstant (null, ImportType (value.GetType ()), value, Location.Null);
+                                               }
+                                       }
+                               }
+
+                               par[i] = new ParameterData (p.Name, mod, default_value);
+                       }
+
+                       if (varargs != 0) {
+                               par[par.Length - 1] = new ArglistParameter (Location.Null);
+                               types[types.Length - 1] = InternalType.Arglist;
+                       }
+
+                       return method != null ?
+                               new ParametersImported (par, types, varargs != 0, is_params) :
+                               new ParametersImported (par, types, is_params);
+               }
+
+
                //
                // Returns null when the property is not valid C# property
                //
-               public static PropertySpec CreateProperty (PropertyInfo pi, TypeSpec declaringType, MethodSpec get, MethodSpec set)
+               public PropertySpec CreateProperty (PropertyInfo pi, TypeSpec declaringType, MethodSpec get, MethodSpec set)
                {
                        var definition = new ImportedMemberDefinition (pi);
 
@@ -407,7 +491,7 @@ namespace Mono.CSharp
                        return spec;
                }
 
-               public static TypeSpec CreateType (Type type)
+               public TypeSpec CreateType (Type type)
                {
                        TypeSpec declaring_type;
                        if (type.IsNested && !type.IsGenericParameter)
@@ -418,7 +502,7 @@ namespace Mono.CSharp
                        return CreateType (type, declaring_type);
                }
 
-               public static TypeSpec CreateType (Type type, TypeSpec declaringType)
+               public TypeSpec CreateType (Type type, TypeSpec declaringType)
                {
                        TypeSpec spec;
                        if (import_cache.TryGetValue (type, out spec))
@@ -478,6 +562,7 @@ namespace Mono.CSharp
                        } else if (type.IsClass || type.IsAbstract) {                           // SRE: System.Enum returns false for IsClass
                                if ((ma & TypeAttributes.Sealed) != 0 && type.IsSubclassOf (typeof (MulticastDelegate))) {
                                        kind = MemberKind.Delegate;
+                                       mod |= Modifiers.SEALED;
                                } else {
                                        kind = MemberKind.Class;
 
@@ -504,7 +589,7 @@ namespace Mono.CSharp
                                mod |= Modifiers.SEALED;
                        }
 
-                       var definition = new ImportedTypeDefinition (type);
+                       var definition = new ImportedTypeDefinition (this, type);
                        PredefinedTypeSpec pt;
 
                        if (kind == MemberKind.Enum) {
@@ -514,7 +599,7 @@ namespace Mono.CSharp
 
                                var type_members = type.GetFields (underlying_member);
                                foreach (var type_member in type_members) {
-                                       spec = new EnumSpec (declaringType, definition, Import.CreateType (type_member.FieldType), type, mod);
+                                       spec = new EnumSpec (declaringType, definition, CreateType (type_member.FieldType), type, mod);
                                        break;
                                }
 
@@ -549,14 +634,14 @@ namespace Mono.CSharp
                        var ifaces = type.GetInterfaces ();
                        if (ifaces.Length > 0) {
                                foreach (Type iface in ifaces) {
-                                       spec.AddInterface (Import.CreateType (iface));
+                                       spec.AddInterface (CreateType (iface));
                                }
                        }
 
                        return spec;
                }
 
-               static TypeParameterSpec CreateTypeParameter (Type type, TypeSpec declaringType)
+               TypeParameterSpec CreateTypeParameter (Type type, TypeSpec declaringType)
                {
                        Variance variance;
                        switch (type.GenericParameterAttributes & GenericParameterAttributes.VarianceMask) {
@@ -595,9 +680,13 @@ namespace Mono.CSharp
                        import_cache.Add (type, spec);
 
                        var constraints = type.GetGenericParameterConstraints ();
+                       List<TypeSpec> tparams = null;
                        foreach (var ct in constraints) {
-                               // TODO MemberCache: What to do ??
                                if (ct.IsGenericParameter) {
+                                       if (tparams == null)
+                                               tparams = new List<TypeSpec> ();
+
+                                       tparams.Add (CreateType (ct));
                                        continue;
                                }
 
@@ -617,10 +706,68 @@ namespace Mono.CSharp
                        if (spec.BaseType == null)
                                spec.BaseType = TypeManager.object_type;
 
+                       if (tparams != null)
+                               spec.TypeArguments = tparams.ToArray ();
+
                        return spec;
                }
 
-               public static TypeSpec ImportType (Type type)
+               static Type HasExtensionAttribute (IList<CustomAttributeData> attributes)
+               {
+                       foreach (var attr in attributes) {
+                               var dt = attr.Constructor.DeclaringType;
+                               if (dt.Name == "ExtensionAttribute" && dt.Namespace == "System.Runtime.CompilerServices") {
+                                       return dt;
+                               }
+                       }
+
+                       return null;
+               }
+
+               public void ImportAssembly (Assembly assembly, Namespace targetNamespace)
+               {
+                       Type extension_type = HasExtensionAttribute (CustomAttributeData.GetCustomAttributes (assembly));
+
+                       //
+                       // This part tries to simulate loading of top-level
+                       // types only, any missing dependencies are ignores here.
+                       // Full error report is reported later when the type is
+                       // actually used
+                       //
+                       Type[] all_types;
+                       try {
+                               all_types = assembly.GetTypes ();
+                       } catch (ReflectionTypeLoadException e) {
+                               all_types = e.Types;
+                       }
+
+                       Namespace ns = targetNamespace;
+                       string prev_namespace = null;
+                       foreach (var t in all_types) {
+                               if (t == null || t.IsNested)
+                                       continue;
+
+                               if (t.Name[0] == '<')
+                                       continue;
+
+                               var it = CreateType (t, null);
+                               if (it == null)
+                                       continue;
+
+                               if (prev_namespace != t.Namespace) {
+                                       ns = t.Namespace == null ? targetNamespace : targetNamespace.GetNamespace (t.Namespace, true);
+                                       prev_namespace = t.Namespace;
+                               }
+
+                               ns.AddType (it);
+
+                               if (it.IsStatic && extension_type != null && t.IsDefined (extension_type, false)) {
+                                       it.SetExtensionMethodContainer ();
+                               }
+                       }
+               }
+
+               public TypeSpec ImportType (Type type)
                {
                        if (type.HasElementType) {
                                var element = type.GetElementType ();
@@ -683,16 +830,22 @@ namespace Mono.CSharp
 
                        if ((ma & MethodAttributes.Static) != 0) {
                                mod |= Modifiers.STATIC;
-                       } else if ((ma & MethodAttributes.Final) != 0) {
-                               mod |= Modifiers.SEALED;
-                       } else if ((ma & MethodAttributes.Abstract) != 0 && declaringType.IsClass) {
+                               return mod;
+                       }
+                       if ((ma & MethodAttributes.Abstract) != 0 && declaringType.IsClass) {
                                mod |= Modifiers.ABSTRACT;
+                               return mod;
                        }
 
+                       if ((ma & MethodAttributes.Final) != 0)
+                               mod |= Modifiers.SEALED;
+
                        // It can be sealed and override
                        if ((ma & MethodAttributes.Virtual) != 0) {
-                               if ((ma & MethodAttributes.NewSlot) != 0 || !declaringType.IsClass || mod == Modifiers.PRIVATE) {
-                                       mod |= Modifiers.VIRTUAL;
+                               if ((ma & MethodAttributes.NewSlot) != 0 || !declaringType.IsClass) {
+                                       // No private virtual or sealed virtual
+                                       if ((mod & (Modifiers.PRIVATE | Modifiers.SEALED)) == 0)
+                                               mod |= Modifiers.VIRTUAL;
                                } else {
                                        mod |= Modifiers.OVERRIDE;
                                }
@@ -719,7 +872,9 @@ namespace Mono.CSharp
                                AttributesBag bag = null;
                                List<string> conditionals = null;
 
-                               var attrs = CustomAttributeData.GetCustomAttributes (mi);
+                               // It should not throw any loading exception
+                               IList<CustomAttributeData> attrs = CustomAttributeData.GetCustomAttributes (mi);
+
                                foreach (var a in attrs) {
                                        var type = a.Constructor.DeclaringType;
                                        if (type == typeof (ObsoleteAttribute)) {
@@ -920,10 +1075,12 @@ namespace Mono.CSharp
        {
                TypeParameterSpec[] tparams;
                string name;
+               ReflectionMetaImporter meta_import;
 
-               public ImportedTypeDefinition (Type type)
+               public ImportedTypeDefinition (ReflectionMetaImporter metaImport, Type type)
                        : base (type)
                {
+                       this.meta_import = metaImport;
                }
 
                #region Properties
@@ -970,7 +1127,7 @@ namespace Mono.CSharp
                        if (attr.Length < 1)
                                return null;
 
-                       return Import.CreateType (((CoClassAttribute) attr[0]).CoClass);
+                       return meta_import.CreateType (((CoClassAttribute) attr[0]).CoClass);
                }
 
                public string GetAttributeDefaultMember ()
@@ -991,6 +1148,12 @@ namespace Mono.CSharp
 
                public MemberCache LoadMembers (TypeSpec declaringType)
                {
+                       //
+                       // Not interested in members of nested private types unless the importer needs them
+                       //
+                       if (declaringType.IsPrivate && meta_import.IgnorePrivateMembers)
+                               return MemberCache.Empty;
+
                        var loading_type = (Type) provider;
                        const BindingFlags all_members = BindingFlags.DeclaredOnly |
                                BindingFlags.Static | BindingFlags.Instance |
@@ -1001,12 +1164,10 @@ namespace Mono.CSharp
                                        MethodAttributes.Final;
 
                        Dictionary<MethodBase, MethodSpec> possible_accessors = null;
+                       List<EventSpec> imported_events = null;
+                       EventSpec event_spec;
                        MemberSpec imported;
                        MethodInfo m;
-
-                       //
-                       // This requires methods to be returned first which seems to work for both Mono and .NET
-                       //
                        MemberInfo[] all;
                        try {
                                all = loading_type.GetMembers (all_members);
@@ -1015,6 +1176,9 @@ namespace Mono.CSharp
                                        declaringType.GetSignatureForError (), declaringType.Assembly.Location);
                        }
 
+                       //
+                       // The logic here requires methods to be returned first which seems to work for both Mono and .NET
+                       //
                        var cache = new MemberCache (all.Length);
                        foreach (var member in all) {
                                switch (member.MemberType) {
@@ -1030,7 +1194,7 @@ namespace Mono.CSharp
                                        if (mb.IsPrivate && mb.IsDefined (typeof (CompilerGeneratedAttribute), false))
                                                continue;
 
-                                       imported = Import.CreateMethod (mb, declaringType);
+                                       imported = meta_import.CreateMethod (mb, declaringType);
                                        if (imported.Kind == MemberKind.Method && !imported.IsGeneric) {
                                                if (possible_accessors == null)
                                                        possible_accessors = new Dictionary<MethodBase, MethodSpec> (ReferenceEquality<MethodBase>.Default);
@@ -1061,7 +1225,7 @@ namespace Mono.CSharp
                                        if (get == null && set == null)
                                                continue;
 
-                                       imported = Import.CreateProperty (p, declaringType, get, set);
+                                       imported = meta_import.CreateProperty (p, declaringType, get, set);
                                        if (imported == null)
                                                continue;
 
@@ -1087,19 +1251,38 @@ namespace Mono.CSharp
                                        if (add == null || remove == null)
                                                continue;
 
-                                       imported = Import.CreateEvent (e, declaringType, add, remove);
+                                       event_spec = meta_import.CreateEvent (e, declaringType, add, remove);
+                                       if (!meta_import.IgnorePrivateMembers) {
+                                               if (imported_events == null)
+                                                       imported_events = new List<EventSpec> ();
+
+                                               imported_events.Add (event_spec);
+                                       }
+
+                                       imported = event_spec;
                                        break;
                                case MemberTypes.Field:
                                        var fi = (FieldInfo) member;
 
-                                       // Ignore compiler generated fields
-                                       if (fi.IsPrivate && fi.IsDefined (typeof (CompilerGeneratedAttribute), false))
-                                               continue;
-
-                                       imported = Import.CreateField (fi, declaringType);
+                                       imported = meta_import.CreateField (fi, declaringType);
                                        if (imported == null)
                                                continue;
 
+                                       //
+                                       // For dynamic binder event has to be fully restored to allow operations
+                                       // within the type container to work correctly
+                                       //
+                                       if (imported_events != null) {
+                                               // The backing event field should be private but it may not
+                                               int index = imported_events.FindIndex (l => l.Name == fi.Name);
+                                               if (index >= 0) {
+                                                       event_spec = imported_events[index];
+                                                       event_spec.BackingField = (FieldSpec) imported;
+                                                       imported_events.RemoveAt (index);
+                                                       continue;
+                                               }
+                                       }
+
                                        break;
                                case MemberTypes.NestedType:
                                        Type t = (Type) member;
@@ -1108,7 +1291,7 @@ namespace Mono.CSharp
                                        if (t.IsNotPublic && t.IsDefined (typeof (CompilerGeneratedAttribute), false))
                                                continue;
 
-                                       imported = Import.CreateType (t, declaringType);
+                                       imported = meta_import.CreateType (t, declaringType);
                                        break;
                                default:
                                        throw new NotImplementedException (member.ToString ());
index d72993675a9d9dd2a8b10ee0d23a663f3d65f5b4..5511b0a35300d609aa9b6638a3946b4090ffaef9 100644 (file)
@@ -241,7 +241,7 @@ namespace Mono.CSharp {
                                        if (TypeManager.int_interlocked_compare_exchange == null) {
                                                TypeSpec t = TypeManager.CoreLookupType (ec.Compiler, "System.Threading", "Interlocked", MemberKind.Class, true);
                                                if (t != null) {
-                                                       var p = ParametersCompiled.CreateFullyResolved (
+                                                       var p = new ParametersImported (
                                                                new[] {
                                                                        new ParameterData (null, Parameter.Modifier.REF),
                                                                        new ParameterData (null, Parameter.Modifier.NONE),
@@ -249,8 +249,8 @@ namespace Mono.CSharp {
                                                                },
                                                                new[] {
                                                                        TypeManager.int32_type, TypeManager.int32_type, TypeManager.int32_type
-                                                               }
-                                                               );
+                                                               },
+                                                               false);
                                                        var f = new MemberFilter ("CompareExchange", 0, MemberKind.Method, p, TypeManager.int32_type);
                                                        TypeManager.int_interlocked_compare_exchange = TypeManager.GetPredefinedMethod (t, f, loc);
                                                }
@@ -387,7 +387,7 @@ namespace Mono.CSharp {
 
                public IteratorStorey (Iterator iterator)
                        : base (iterator.Container.Toplevel, iterator.Host,
-                         iterator.OriginalMethod as MemberBase, iterator.GenericMethod, "Iterator")
+                         iterator.OriginalMethod as MemberBase, iterator.GenericMethod == null ? null : iterator.GenericMethod.CurrentTypeParameters, "Iterator")
                {
                        this.Iterator = iterator;
                }
index eb4907b1816bd663a7df3120411ff50119a3f3ca..a7c3d1420bdbd33a0dc45f00e3d2b5048003189c 100644 (file)
@@ -31,7 +31,7 @@ namespace Mono.CSharp {
                        if (ec.IsInProbingMode)
                                return this;
 
-                       BlockContext bc = new BlockContext (ec.MemberContext, ec.CurrentBlock.Explicit, TypeManager.void_type) {
+                       BlockContext bc = new BlockContext (ec.MemberContext, ec.ConstructorBlock, TypeManager.void_type) {
                                CurrentAnonymousMethod = ec.CurrentAnonymousMethod
                        };
 
@@ -100,24 +100,21 @@ namespace Mono.CSharp {
                        return Parameters;
                }
 
-               protected override Expression DoResolve (ResolveContext ec)
+               protected override AnonymousMethodBody CompatibleMethodFactory (TypeSpec returnType, TypeSpec delegateType, ParametersCompiled p, ToplevelBlock b)
+               {
+                       return new LambdaMethod (p, b, returnType, delegateType, loc);
+               }
+
+               protected override bool DoResolveParameters (ResolveContext rc)
                {
                        //
                        // Only explicit parameters can be resolved at this point
                        //
                        if (HasExplicitParameters) {
-                               if (!Parameters.Resolve (ec))
-                                       return null;
+                               return Parameters.Resolve (rc);
                        }
 
-                       eclass = ExprClass.Value;
-                       type = InternalType.AnonymousMethod;
-                       return this;
-               }
-
-               protected override AnonymousMethodBody CompatibleMethodFactory (TypeSpec returnType, TypeSpec delegateType, ParametersCompiled p, ToplevelBlock b)
-               {
-                       return new LambdaMethod (p, b, returnType, delegateType, loc);
+                       return true;
                }
 
                public override string GetSignatureForError ()
@@ -126,7 +123,7 @@ namespace Mono.CSharp {
                }
        }
 
-       public class LambdaMethod : AnonymousMethodBody
+       class LambdaMethod : AnonymousMethodBody
        {
                public LambdaMethod (ParametersCompiled parameters,
                                        ToplevelBlock block, TypeSpec return_type, TypeSpec delegate_type,
@@ -135,10 +132,7 @@ namespace Mono.CSharp {
                {
                }
 
-               protected override void CloneTo (CloneContext clonectx, Expression target)
-               {
-                       // TODO: nothing ??
-               }
+               #region Properties
 
                public override string ContainerType {
                        get {
@@ -146,6 +140,13 @@ namespace Mono.CSharp {
                        }
                }
 
+               #endregion
+
+               protected override void CloneTo (CloneContext clonectx, Expression target)
+               {
+                       // TODO: nothing ??
+               }
+
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
                        BlockContext bc = new BlockContext (ec.MemberContext, Block, ReturnType);
index e904f132b3702994be23ec4d74d4a22fc916c9a1..d4a010d4e4ff85994dbea56f6cbaf25f21932bc1 100644 (file)
@@ -167,7 +167,8 @@ namespace Mono.CSharp {
        ///
        ///   http://lists.ximian.com/pipermail/mono-devel-list/2004-December/009508.html
        /// </remarks>
-       public struct Location {
+       public struct Location : IEquatable<Location>
+       {
                int token; 
 
                struct Checkpoint {
@@ -464,6 +465,15 @@ if (checkpoints.Length <= CheckpointIndex) throw new Exception (String.Format ("
                                return (CompilationUnit) source_list [index - 1];
                        }
                }
+
+               #region IEquatable<Location> Members
+
+               public bool Equals (Location other)
+               {
+                       return this.token == other.token;
+               }
+
+               #endregion
        }
 
        //
index b5a6027d86fcc8d352e1eb6b0d90b0751a94f6bf..e7ae71be916e14be7e65d175254e89a7a63a78ec 100644 (file)
@@ -14,8 +14,6 @@
 using System;
 using System.Text;
 using System.Collections.Generic;
-using System.Globalization;
-using System.Reflection.Emit;
 using System.Reflection;
 using System.Linq;
 
@@ -232,9 +230,6 @@ namespace Mono.CSharp {
                                }
 
                                foreach (var ce in entry.Value) {
-                                       if (ce.DeclaringType != iface)
-                                               break;
-
                                        if (list.Contains (ce))
                                                continue;
 
@@ -242,6 +237,12 @@ namespace Mono.CSharp {
                                                member_hash[entry.Key] = list;
                                }
                        }
+
+                       // Add also all base interfaces
+                       if (iface.Interfaces != null) {
+                               foreach (var base_iface in iface.Interfaces)
+                                       AddInterface (base_iface);
+                       }
                }
 
                public void AddMember (InterfaceMemberBase imb, string exlicitName, MemberSpec ms)
@@ -613,6 +614,10 @@ namespace Mono.CSharp {
                                return MemberKind.Interface;
                        if (member is EventProperty)
                                return MemberKind.Event;
+                       if (member is Delegate)
+                               return MemberKind.Delegate;
+                       if (member is Enum)
+                               return MemberKind.Enum;
 
                        throw new NotImplementedException (member.GetType ().ToString ());
                }
index 6bf279f613309b23fee1835ea6ba7fc6997d6c0b..3ce8429f43ef801df8ab5a21572cce9dace782e3 100644 (file)
@@ -307,7 +307,11 @@ namespace Mono.CSharp {
                        }
 
                        if ((state & StateFlags.PendingMakeMethod) != 0) {
-                               metaInfo = ((MethodInfo) metaInfo).MakeGenericMethod (targs.Select (l => l.GetMetaInfo ()).ToArray ());
+                               var sre_targs = new Type[targs.Length];
+                               for (int i = 0; i < sre_targs.Length; ++i)
+                                       sre_targs[i] = targs[i].GetMetaInfo ();
+
+                               metaInfo = ((MethodInfo) metaInfo).MakeGenericMethod (sre_targs);
                                state &= ~StateFlags.PendingMakeMethod;
                        }
 
@@ -407,7 +411,7 @@ namespace Mono.CSharp {
                        var ms = (MethodSpec) MemberwiseClone ();
                        if (decl != DeclaringType) {
                                // Gets back MethodInfo in case of metaInfo was inflated
-                               ms.metaInfo = MemberCache.GetMember (DeclaringType.GetDefinition (), this).metaInfo;
+                               ms.metaInfo = MemberCache.GetMember (TypeParameterMutator.GetMemberDeclaringType (DeclaringType), this).metaInfo;
 
                                ms.declaringType = decl;
                                ms.state |= StateFlags.PendingMetaInflate;
@@ -759,33 +763,15 @@ namespace Mono.CSharp {
 
        public class Method : MethodOrOperator, IGenericMethodDefinition
        {
-               /// <summary>
-               ///   Modifiers allowed in a class declaration
-               /// </summary>
-               const Modifiers AllowedModifiers =
-                       Modifiers.NEW |
-                       Modifiers.PUBLIC |
-                       Modifiers.PROTECTED |
-                       Modifiers.INTERNAL |
-                       Modifiers.PRIVATE |
-                       Modifiers.STATIC |
-                       Modifiers.VIRTUAL |
-                       Modifiers.SEALED |
-                       Modifiers.OVERRIDE |
-                       Modifiers.ABSTRACT |
-                       Modifiers.UNSAFE |
-                       Modifiers.EXTERN;
-
-               const Modifiers AllowedInterfaceModifiers = 
-                       Modifiers.NEW | Modifiers.UNSAFE;
-
                Method partialMethodImplementation;
 
                public Method (DeclSpace parent, GenericMethod generic,
                               FullNamedExpression return_type, Modifiers mod,
                               MemberName name, ParametersCompiled parameters, Attributes attrs)
                        : base (parent, generic, return_type, mod,
-                               parent.PartialContainer.Kind == MemberKind.Interface ? AllowedInterfaceModifiers : AllowedModifiers,
+                               parent.PartialContainer.Kind == MemberKind.Interface ? AllowedModifiersClass :
+                               parent.PartialContainer.Kind == MemberKind.Struct ? AllowedModifiersStruct :
+                               AllowedModifiersClass,
                                name, attrs, parameters)
                {
                }
@@ -826,6 +812,7 @@ namespace Mono.CSharp {
 
                public TypeParameterSpec[] TypeParameters {
                        get {
+                               // TODO: Cache this
                                return CurrentTypeParameters.Select (l => l.Type).ToArray ();
                        }
                }
@@ -889,13 +876,13 @@ namespace Mono.CSharp {
                                        return;
                                }
 
-                               if (ReturnType != TypeManager.void_type) {
-                                       Report.Error (578, Location, "Conditional not valid on `{0}' because its return type is not void", GetSignatureForError ());
+                               if ((ModFlags & Modifiers.OVERRIDE) != 0) {
+                                       Report.Error (243, Location, "Conditional not valid on `{0}' because it is an override method", GetSignatureForError ());
                                        return;
                                }
 
-                               if ((ModFlags & Modifiers.OVERRIDE) != 0) {
-                                       Report.Error (243, Location, "Conditional not valid on `{0}' because it is an override method", GetSignatureForError ());
+                               if (ReturnType != TypeManager.void_type) {
+                                       Report.Error (578, Location, "Conditional not valid on `{0}' because its return type is not void", GetSignatureForError ());
                                        return;
                                }
 
@@ -937,10 +924,21 @@ namespace Mono.CSharp {
                        if (((ModFlags & Modifiers.OVERRIDE) != 0 || IsExplicitImpl)) {
                                if (base_method != null) {
                                        base_tparams = base_method.GenericDefinition.TypeParameters;
+                               
                                        if (base_method.DeclaringType.IsGeneric) {
                                                base_decl_tparams = base_method.DeclaringType.MemberDefinition.TypeParameters;
                                                base_targs = Parent.BaseType.TypeArguments;
                                        }
+
+                                       if (base_method.IsGeneric) {
+                                               if (base_decl_tparams.Length != 0) {
+                                                       base_decl_tparams = base_decl_tparams.Concat (base_tparams).ToArray ();
+                                                       base_targs = base_targs.Concat (tparams.Select<TypeParameter, TypeSpec> (l => l.Type)).ToArray ();
+                                               } else {
+                                                       base_decl_tparams = base_tparams;
+                                                       base_targs = tparams.Select (l => l.Type).ToArray ();
+                                               }
+                                       }
                                } else if (MethodData.implementing != null) {
                                        base_tparams = MethodData.implementing.GenericDefinition.TypeParameters;
                                        if (MethodData.implementing.DeclaringType.IsGeneric) {
@@ -1085,16 +1083,18 @@ namespace Mono.CSharp {
                public override void Emit ()
                {
                        try {
-                               Report.Debug (64, "METHOD EMIT", this, MethodBuilder, Location, Block, MethodData);
                                if (IsPartialDefinition) {
                                        //
                                        // Use partial method implementation builder for partial method declaration attributes
                                        //
                                        if (partialMethodImplementation != null) {
                                                MethodBuilder = partialMethodImplementation.MethodBuilder;
-                                               return;
                                        }
-                               } else if ((ModFlags & Modifiers.PARTIAL) != 0 && (caching_flags & Flags.PartialDefinitionExists) == 0) {
+
+                                       return;
+                               }
+                               
+                               if ((ModFlags & Modifiers.PARTIAL) != 0 && (caching_flags & Flags.PartialDefinitionExists) == 0) {
                                        Report.Error (759, Location, "A partial method `{0}' implementation is missing a partial method declaration",
                                                GetSignatureForError ());
                                }
@@ -2313,9 +2313,9 @@ namespace Mono.CSharp {
                                }
 
                                TypeSpec conv_type;
-                               if (TypeManager.IsEqual (declaring_type, return_type) || declaring_type == return_type_unwrap) {
+                               if (declaring_type == return_type || declaring_type == return_type_unwrap) {
                                        conv_type = first_arg_type;
-                               } else if (TypeManager.IsEqual (declaring_type, first_arg_type) || declaring_type == first_arg_type_unwrap) {
+                               } else if (declaring_type == first_arg_type || declaring_type == first_arg_type_unwrap) {
                                        conv_type = return_type;
                                } else {
                                        Report.Error (556, Location,
@@ -2338,13 +2338,13 @@ namespace Mono.CSharp {
                                }
 
                                if (conv_type.IsClass) {
-                                       if (TypeManager.IsSubclassOf (declaring_type, conv_type)) {
+                                       if (TypeSpec.IsBaseClass (declaring_type, conv_type, true)) {
                                                Report.Error (553, Location, "User-defined conversion `{0}' cannot convert to or from a base class",
                                                        GetSignatureForError ());
                                                return false;
                                        }
 
-                                       if (TypeManager.IsSubclassOf (conv_type, declaring_type)) {
+                                       if (TypeSpec.IsBaseClass (conv_type, declaring_type, false)) {
                                                Report.Error (554, Location, "User-defined conversion `{0}' cannot convert to or from a derived class",
                                                        GetSignatureForError ());
                                                return false;
@@ -2359,7 +2359,7 @@ namespace Mono.CSharp {
                                // Checks for Unary operators
 
                                if (OperatorType == OpType.Increment || OperatorType == OpType.Decrement) {
-                                       if (return_type != declaring_type && !TypeManager.IsSubclassOf (return_type, declaring_type)) {
+                                       if (return_type != declaring_type && !TypeSpec.IsBaseClass (return_type, declaring_type, false)) {
                                                Report.Error (448, Location,
                                                        "The return type for ++ or -- operator must be the containing type or derived from the containing type");
                                                return false;
@@ -2371,7 +2371,7 @@ namespace Mono.CSharp {
                                        }
                                }
 
-                               if (!TypeManager.IsEqual (first_arg_type_unwrap, declaring_type)) {
+                               if (first_arg_type_unwrap != declaring_type) {
                                        Report.Error (562, Location,
                                                "The parameter type of a unary operator must be the containing type");
                                        return false;
@@ -2387,14 +2387,14 @@ namespace Mono.CSharp {
                                        }
                                }
 
-                       } else if (!TypeManager.IsEqual (first_arg_type_unwrap, declaring_type)) {
+                       } else if (first_arg_type_unwrap != declaring_type) {
                                // Checks for Binary operators
 
                                var second_arg_type = ParameterTypes[1];
                                if (TypeManager.IsNullableType (second_arg_type))
                                        second_arg_type = TypeManager.GetTypeArguments (second_arg_type)[0];
 
-                               if (!TypeManager.IsEqual (second_arg_type, declaring_type)) {
+                               if (second_arg_type != declaring_type) {
                                        Report.Error (563, Location,
                                                "One of the parameters of a binary operator must be the containing type");
                                        return false;
index 0310e9801d58ac2f572e6ff0a11c978e3a299d40..f3c806193a17c6fbea6949d913dc464af028c753 100644 (file)
@@ -249,15 +249,16 @@ namespace Mono.CSharp
                                if ((i & invalid_flags) == 0)
                                        continue;
 
-                               Error_InvalidModifier (l, Name ((Modifiers) i), Report);
+                               Error_InvalidModifier ((Modifiers)i, l, Report);
                        }
 
                        return allowed & mod;
                }
 
-               public static void Error_InvalidModifier (Location l, string name, Report Report)
+               static void Error_InvalidModifier (Modifiers mod, Location l, Report Report)
                {
-                       Report.Error (106, l, "The modifier `{0}' is not valid for this item", name);
+                       Report.Error (106, l, "The modifier `{0}' is not valid for this item",
+                               Name (mod));
                }
        }
 }
index db93a05bcbacb1c00a2b4d3f2b1108f62d65d505..8fd3dff0f54d82a57a40a6758a194670ba95faa9 100644 (file)
@@ -50,7 +50,7 @@ namespace Mono.CSharp {
                {
                        foreach (Assembly a in referenced_assemblies) {
                                try {
-                                       ImportAssembly (a);
+                                       ctx.MetaImporter.ImportAssembly (a, this);
                                } catch (TypeLoadException e) {
                                        ctx.Report.Error (11, Location.Null, e.Message);
                                } catch (System.IO.FileNotFoundException) {
@@ -77,57 +77,6 @@ namespace Mono.CSharp {
                                GetNamespace (dotted_name, true);
                }
 
-               public void ImportAssembly (Assembly assembly)
-               {
-                       Type extension_type = null;
-                       var all_attributes = CustomAttributeData.GetCustomAttributes (assembly);
-                       foreach (var attr in all_attributes) {
-                               var dt = attr.Constructor.DeclaringType;
-                               if (dt.Name == "ExtensionAttribute" && dt.Namespace == "System.Runtime.CompilerServices") {
-                                       extension_type = dt;
-                                       break;
-                               }
-                       }
-
-                       //
-                       // This part tries to simulate loading of top-level
-                       // types only, any missing dependencies are ignores here.
-                       // Full error report is reported later when the type is
-                       // actually used
-                       //
-                       Type[] all_types;
-                       try {
-                               all_types = assembly.GetTypes ();
-                       } catch (ReflectionTypeLoadException e) {
-                               all_types = e.Types;
-                       }
-
-                       Namespace ns = this;
-                       string prev_namespace = null;
-                       foreach (var t in all_types) {
-                               if (t == null || t.IsNested)
-                                       continue;
-
-                               if (t.Name[0] == '<')
-                                       continue;
-
-                               var it = Import.CreateType (t, null);
-                               if (it == null)
-                                       continue;
-
-                               if (prev_namespace != t.Namespace) {
-                                       ns = t.Namespace == null ? this : GetNamespace (t.Namespace, true);
-                                       prev_namespace = t.Namespace;
-                               }
-
-                               ns.AddType (it);
-
-                               if (it.IsStatic && extension_type != null && t.IsDefined (extension_type, false)) {
-                                       it.SetExtensionMethodContainer ();
-                               }
-                       }
-               }
-
                public override string GetSignatureForError ()
                {
                        return alias_name + "::";
@@ -1034,7 +983,7 @@ namespace Mono.CSharp {
                /// Does extension methods look up to find a method which matches name and extensionType.
                /// Search starts from this namespace and continues hierarchically up to top level.
                ///
-               public ExtensionMethodGroupExpr LookupExtensionMethod (TypeSpec extensionType, string name, int arity, Location loc)
+               public IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope)
                {
                        List<MethodSpec> candidates = null;
                        foreach (Namespace n in GetUsingTable ()) {
@@ -1048,8 +997,9 @@ namespace Mono.CSharp {
                                        candidates.AddRange (a);
                        }
 
+                       scope = parent;
                        if (candidates != null)
-                               return new ExtensionMethodGroupExpr (candidates, parent, extensionType, loc);
+                               return candidates;
 
                        if (parent == null)
                                return null;
@@ -1061,7 +1011,7 @@ namespace Mono.CSharp {
                        do {
                                candidates = parent_ns.LookupExtensionMethod (extensionType, null, name, arity);
                                if (candidates != null)
-                                       return new ExtensionMethodGroupExpr (candidates, parent, extensionType, loc);
+                                       return candidates;
 
                                parent_ns = parent_ns.Parent;
                        } while (parent_ns != null);
@@ -1069,7 +1019,7 @@ namespace Mono.CSharp {
                        //
                        // Continue in parent scope
                        //
-                       return parent.LookupExtensionMethod (extensionType, name, arity, loc);
+                       return parent.LookupExtensionMethod (extensionType, name, arity, ref scope);
                }
 
                public FullNamedExpression LookupNamespaceOrType (string name, int arity, Location loc, bool ignore_cs0104)
index 323aac379a7c411b1e1f1de6116fd83f2599669c..301536caa59443c105a6a9af6d71eda73aa61ebd 100644 (file)
@@ -286,7 +286,7 @@ namespace Mono.CSharp.Nullable
                        // Avoid unwraping and wraping of the same type
                        //
                        Unwrap unwrap = expr as Unwrap;
-                       if (unwrap != null && TypeManager.IsEqual (expr.Type, NullableInfo.GetUnderlyingType (type)))
+                       if (unwrap != null && expr.Type == NullableInfo.GetUnderlyingType (type))
                                return unwrap.Original;
                
                        return new Wrap (expr, type);
@@ -803,7 +803,7 @@ namespace Mono.CSharp.Nullable
                        //
                        // Avoid double conversion
                        //
-                       if (left_unwrap == null || left_null_lifted || !TypeManager.IsEqual (left_unwrap.Type, left.Type) || (left_unwrap != null && right_null_lifted)) {
+                       if (left_unwrap == null || left_null_lifted || left_unwrap.Type != left.Type || (left_unwrap != null && right_null_lifted)) {
                                lifted_type = new NullableType (left.Type, loc);
                                lifted_type = lifted_type.ResolveAsTypeTerminal (ec, false);
                                if (lifted_type == null)
@@ -815,7 +815,7 @@ namespace Mono.CSharp.Nullable
                                        left = EmptyCast.Create (left, lifted_type.Type);
                        }
 
-                       if (left != right && (right_unwrap == null || right_null_lifted || !TypeManager.IsEqual (right_unwrap.Type, right.Type) || (right_unwrap != null && left_null_lifted))) {
+                       if (left != right && (right_unwrap == null || right_null_lifted || right_unwrap.Type != right.Type || (right_unwrap != null && left_null_lifted))) {
                                lifted_type = new NullableType (right.Type, loc);
                                lifted_type = lifted_type.ResolveAsTypeTerminal (ec, false);
                                if (lifted_type == null)
@@ -918,7 +918,7 @@ namespace Mono.CSharp.Nullable
                
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
-                       if (left.Type == TypeManager.null_type)
+                       if (left is NullLiteral)
                                ec.Report.Error (845, loc, "An expression tree cannot contain a coalescing operator with null left side");
 
                        UserCast uc = left as UserCast;
@@ -1042,8 +1042,12 @@ namespace Mono.CSharp.Nullable
                        }
 
                        left.Emit (ec);
-
                        ec.Emit (OpCodes.Dup);
+
+                       // Only to make verifier happy
+                       if (left.Type.IsGenericParameter)
+                               ec.Emit (OpCodes.Box, left.Type);
+
                        ec.Emit (OpCodes.Brtrue, end_label);
 
                        ec.Emit (OpCodes.Pop);
index aa740d2ad8ce7cd3858bb85d60bad3cc68200518..803b913114cc3561aa253b35c03bc988578f69a6 100644 (file)
@@ -265,6 +265,15 @@ namespace Mono.CSharp {
                }
 
 #region Properties
+               public Expression DefaultValue {
+                       get {
+                               return default_expr;
+                       }
+                       set {
+                               default_expr = value;
+                       }
+               }
+
                public FullNamedExpression TypeExpression  {
                        get {
                                return texpr;
@@ -331,7 +340,7 @@ namespace Mono.CSharp {
                
                public virtual bool CheckAccessibility (InterfaceMemberBase member)
                {
-                       if (parameter_type == null || TypeManager.IsGenericParameter (parameter_type))
+                       if (parameter_type == null)
                                return true;
 
                        return member.IsAccessibleAs (parameter_type);
@@ -388,8 +397,43 @@ namespace Mono.CSharp {
 
                public void ResolveDefaultValue (ResolveContext rc)
                {
-                       if (default_expr != null)
+                       //
+                       // Default value was specified using an expression
+                       //
+                       if (default_expr != null) {
                                default_expr = ResolveDefaultExpression (rc);
+                               return;
+                       }
+
+                       if (attributes == null)
+                               return;
+                       
+                       var pa = attributes.Search (PredefinedAttributes.Get.OptionalParameter);
+                       if (pa == null)
+                               return;
+
+                       //
+                       // Default value was specified using an attribute
+                       //
+                       attributes.Attrs.Remove (pa);
+
+                       TypeSpec expr_type = null;
+                       pa = attributes.Search (PredefinedAttributes.Get.DefaultParameterValue);
+                       if (pa != null) {
+                               attributes.Attrs.Remove (pa);
+                               default_expr = pa.GetParameterDefaultValue (out expr_type);
+                       } else {
+                               default_expr = EmptyExpression.MissingValue;
+                       }
+
+                       if (default_expr == null) {
+                               if (expr_type == null)
+                                       expr_type = parameter_type;
+
+                               default_expr = new DefaultValueExpression (new TypeExpression (expr_type, Location), Location);
+                       }
+
+                       default_expr = default_expr.Resolve (rc);
                }
 
                Expression ResolveDefaultExpression (ResolveContext rc)
@@ -412,7 +456,7 @@ namespace Mono.CSharp {
                                return null;
                        }
 
-                       if (TypeManager.IsEqual (default_expr.Type, parameter_type))
+                       if (default_expr.Type == parameter_type)
                                return default_expr;
 
                        if (TypeManager.IsNullableType (parameter_type)) {
@@ -590,11 +634,6 @@ namespace Mono.CSharp {
                                Expression.CreateExpressionFactoryCall (ec, "Parameter", null, arguments, Location));
                }
 
-               public Expression DefaultValue {
-                       get { return default_expr; }
-                       set { default_expr = value; }
-               }
-
                public void Emit (EmitContext ec)
                {
                        int arg_idx = idx;
@@ -900,15 +939,7 @@ namespace Mono.CSharp {
        //
        public class ParametersImported : AParametersCollection
        {
-               ParametersImported (AParametersCollection param, TypeSpec[] types)
-               {
-                       this.parameters = param.FixedParameters;
-                       this.types = types;
-                       has_arglist = param.HasArglist;
-                       has_params = param.HasParams;
-               }
-
-               ParametersImported (IParameterData [] parameters, TypeSpec [] types, bool hasArglist, bool hasParams)
+               public ParametersImported (IParameterData [] parameters, TypeSpec [] types, bool hasArglist, bool hasParams)
                {
                        this.parameters = parameters;
                        this.types = types;
@@ -922,91 +953,6 @@ namespace Mono.CSharp {
                        this.types = types;
                        this.has_params = hasParams;
                }
-
-               public static AParametersCollection Create (TypeSpec parent, MethodBase method)
-               {
-                       return Create (parent, method.GetParameters (), method);
-               }
-
-               //
-               // Imports System.Reflection parameters
-               //
-               public static AParametersCollection Create (TypeSpec parent, ParameterInfo [] pi, MethodBase method)
-               {
-                       int varargs = method != null && (method.CallingConvention & CallingConventions.VarArgs) != 0 ? 1 : 0;
-
-                       if (pi.Length == 0 && varargs == 0)
-                               return ParametersCompiled.EmptyReadOnlyParameters;
-
-                       TypeSpec [] types = new TypeSpec [pi.Length + varargs];
-                       IParameterData [] par = new IParameterData [pi.Length + varargs];
-                       bool is_params = false;
-                       for (int i = 0; i < pi.Length; i++) {
-                               ParameterInfo p = pi [i];
-                               Parameter.Modifier mod = 0;
-                               Expression default_value = null;
-                               if (p.ParameterType.IsByRef) {
-                                       if ((p.Attributes & (ParameterAttributes.Out | ParameterAttributes.In)) == ParameterAttributes.Out)
-                                               mod = Parameter.Modifier.OUT;
-                                       else
-                                               mod = Parameter.Modifier.REF;
-
-                                       //
-                                       // Strip reference wrapping
-                                       //
-                                       types [i] = Import.ImportType (p.ParameterType.GetElementType ());
-                               } else if (i == 0 && method.IsStatic && parent.IsStatic && // TODO: parent.Assembly.IsExtension &&
-                                       HasExtensionAttribute (method)) {
-                                       mod = Parameter.Modifier.This;
-                                       types[i] = Import.ImportType (p.ParameterType);
-                               } else {
-                                       types[i] = Import.ImportType (p.ParameterType);
-
-                                       if (i >= pi.Length - 2 && types[i] is ArrayContainer) {
-                                               var cattrs = CustomAttributeData.GetCustomAttributes (p);
-                                               if (cattrs != null && cattrs.Any (l => l.Constructor.DeclaringType == typeof (ParamArrayAttribute))) {
-                                                       mod = Parameter.Modifier.PARAMS;
-                                                       is_params = true;
-                                               }
-                                       }
-
-                                       if (!is_params && p.IsOptional) {
-                                               object value = p.DefaultValue;
-                                               if (value == Missing.Value) {
-                                                       default_value = EmptyExpression.Null;
-                                               } else if (value == null) {
-                                                       default_value = new NullLiteral (Location.Null);
-                                               } else {
-                                                       default_value = Constant.CreateConstant (null, Import.ImportType (value.GetType ()), value, Location.Null);
-                                               }
-                                       }
-                               }
-
-                               par [i] = new ParameterData (p.Name, mod, default_value);
-                       }
-
-                       if (varargs != 0) {
-                               par [par.Length - 1] = new ArglistParameter (Location.Null);
-                               types [types.Length - 1] = InternalType.Arglist;
-                       }
-
-                       return method != null ?
-                               new ParametersImported (par, types, varargs != 0, is_params) :
-                               new ParametersImported (par, types, is_params);
-               }
-
-               static bool HasExtensionAttribute (MethodBase mb)
-               {
-                       var all_attributes = CustomAttributeData.GetCustomAttributes (mb);
-                       foreach (var attr in all_attributes) {
-                               var dt = attr.Constructor.DeclaringType;
-                               if (dt.Name == "ExtensionAttribute" && dt.Namespace == "System.Runtime.CompilerServices") {
-                                       return true;
-                               }
-                       }
-
-                       return false;
-               }
        }
 
        /// <summary>
@@ -1025,7 +971,7 @@ namespace Mono.CSharp {
                        types = TypeSpec.EmptyTypes;
                }
 
-               private ParametersCompiled (IParameterData [] parameters, TypeSpec [] types)
+               private ParametersCompiled (IParameterData[] parameters, TypeSpec[] types)
                {
                        this.parameters = parameters;
                    this.types = types;
@@ -1048,15 +994,17 @@ namespace Mono.CSharp {
                        }
 
                        for (int i = 0; i < count; i++){
-                               string base_name = parameters [i].Name;
                                has_params |= (parameters [i].ModFlags & Parameter.Modifier.PARAMS) != 0;
+                               if (ctx != null) {
+                                       string base_name = parameters[i].Name;
 
-                               for (int j = i + 1; j < count; j++){
-                                       if (base_name != parameters [j].Name)
-                                               continue;
+                                       for (int j = i + 1; j < count; j++) {
+                                               if (base_name != parameters[j].Name)
+                                                       continue;
 
-                                       ErrorDuplicateName (parameters[i], ctx.Report);
-                                       i = j;
+                                               ErrorDuplicateName (parameters[i], ctx.Report);
+                                               i = j;
+                                       }
                                }
                        }
                }
@@ -1072,11 +1020,15 @@ namespace Mono.CSharp {
                        return new ParametersCompiled (new Parameter [] { p }, new TypeSpec [] { type });
                }
                
-               public static ParametersCompiled CreateFullyResolved (IParameterData[] parameters, TypeSpec[] types)
+               public static ParametersCompiled CreateFullyResolved (Parameter[] parameters, TypeSpec[] types)
                {
                        return new ParametersCompiled (parameters, types);
                }
 
+               //
+               // TODO: This does not fit here, it should go to different version of AParametersCollection
+               // as the underlying type is not Parameter and some methods will fail to cast
+               //
                public static AParametersCollection CreateFullyResolved (TypeSpec[] types)
                {
                        var pd = new ParameterData [types.Length];
@@ -1209,10 +1161,19 @@ namespace Mono.CSharp {
                        return ok;
                }
 
-               public void ResolveDefaultValues (ResolveContext rc)
+               public void ResolveDefaultValues (MemberCore m)
                {
-                       for (int i = 0; i < FixedParameters.Length; ++i) {
-                               this [i].ResolveDefaultValue (rc);
+                       var count = parameters.Length;
+
+                       //
+                       // Try not to enter default values resolution if there are not any
+                       //
+                       if (parameters[count - 1].HasDefaultValue || (HasParams && count > 1 && parameters[count - 2].HasDefaultValue) ||
+                               ((Parameter) parameters[count - 1]).OptAttributes != null) {
+                               var rc = new ResolveContext (m);
+                               for (int i = 0; i < count; ++i) {
+                                       this [i].ResolveDefaultValue (rc);
+                               }
                        }
                }
 
index c92598d0fd6efc3610c5463f1dbb6504ae6f98ac..9ce7aab4a91404159d22f9723a078c43dc066e07 100644 (file)
@@ -728,27 +728,12 @@ namespace Mono.CSharp
                        }
                }
 
-               const Modifiers AllowedModifiers =
-                       Modifiers.NEW |
-                       Modifiers.PUBLIC |
-                       Modifiers.PROTECTED |
-                       Modifiers.INTERNAL |
-                       Modifiers.PRIVATE |
-                       Modifiers.STATIC |
-                       Modifiers.SEALED |
-                       Modifiers.OVERRIDE |
-                       Modifiers.ABSTRACT |
-                       Modifiers.UNSAFE |
-                       Modifiers.EXTERN |
-                       Modifiers.VIRTUAL;
-
-               const Modifiers AllowedInterfaceModifiers =
-                       Modifiers.NEW;
-
                public Property (DeclSpace parent, FullNamedExpression type, Modifiers mod,
                                 MemberName name, Attributes attrs)
                        : base (parent, type, mod,
-                               parent.PartialContainer.Kind == MemberKind.Interface ? AllowedInterfaceModifiers : AllowedModifiers,
+                               parent.PartialContainer.Kind == MemberKind.Interface ? AllowedModifiersInterface :
+                               parent.PartialContainer.Kind == MemberKind.Struct ? AllowedModifiersStruct :
+                               AllowedModifiersClass,
                                name, attrs)
                {
                }
@@ -814,6 +799,11 @@ namespace Mono.CSharp
 
                        base.Emit ();
                }
+
+               public override string GetDocCommentName (DeclSpace ds)
+               {
+                       return String.Concat (DocCommentHeader, ds.Name, ".", GetFullName (ShortName).Replace ('.', '#'));
+               }
        }
 
        /// <summary>
@@ -1153,31 +1143,15 @@ namespace Mono.CSharp
                        }
                }
 
-
-               const Modifiers AllowedModifiers =
-                       Modifiers.NEW |
-                       Modifiers.PUBLIC |
-                       Modifiers.PROTECTED |
-                       Modifiers.INTERNAL |
-                       Modifiers.PRIVATE |
-                       Modifiers.STATIC |
-                       Modifiers.VIRTUAL |
-                       Modifiers.SEALED |
-                       Modifiers.OVERRIDE |
-                       Modifiers.UNSAFE |
-                       Modifiers.ABSTRACT |
-                       Modifiers.EXTERN;
-
-               const Modifiers AllowedInterfaceModifiers =
-                       Modifiers.NEW;
-
                AEventAccessor add, remove;
                EventBuilder EventBuilder;
                protected EventSpec spec;
 
                protected Event (DeclSpace parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, Attributes attrs)
                        : base (parent, null, type, mod_flags,
-                               parent.PartialContainer.Kind == MemberKind.Interface ? AllowedInterfaceModifiers : AllowedModifiers,
+                               parent.PartialContainer.Kind == MemberKind.Interface ? AllowedModifiersInterface :
+                               parent.PartialContainer.Kind == MemberKind.Struct ? AllowedModifiersStruct :
+                               AllowedModifiersClass,
                                name, attrs)
                {
                }
index 2c5111b9337529da30bbb56cd4f3e18372addc17..9f989954da5485a1e4f028bf848ee3a936444d44 100644 (file)
@@ -13,7 +13,6 @@ using System.Text;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Reflection;
-using System.Reflection.Emit;
 
 namespace Mono.CSharp {
 
@@ -31,12 +30,14 @@ namespace Mono.CSharp {
 
                public static int DebugFlags = 0;
 
+               public const int RuntimeErrorId = 10000;
+
                //
                // Keeps track of the warnings that we are ignoring
                //
-               public Dictionary<int, bool> warning_ignore_table;
+               HashSet<int> warning_ignore_table;
 
-               Dictionary<string, WarningRegions> warning_regions_table;
+               Dictionary<int, WarningRegions> warning_regions_table;
 
                int warning_level;
 
@@ -61,20 +62,16 @@ namespace Mono.CSharp {
                        809,
                        1030, 1058, 1066,
                        1522, 1570, 1571, 1572, 1573, 1574, 1580, 1581, 1584, 1587, 1589, 1590, 1591, 1592,
-                       1616, 1633, 1634, 1635, 1685, 1690, 1691, 1692,
-                       1700, 1717, 1718, 1720,
-                       1901,
+                       1616, 1633, 1634, 1635, 1685, 1690, 1691, 1692, 1695, 1696, 1699,
+                       1700, 1709, 1717, 1718, 1720,
+                       1901, 1981,
                        2002, 2023, 2029,
                        3000, 3001, 3002, 3003, 3005, 3006, 3007, 3008, 3009,
                        3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019,
                        3021, 3022, 3023, 3024, 3026, 3027
                };
 
-               static Report ()
-               {
-                       // Just to be sure that binary search is working
-                       Array.Sort (AllWarnings);
-               }
+               static HashSet<int> AllWarningsHashSet;
 
                public Report (ReportPrinter printer)
                {
@@ -124,32 +121,29 @@ namespace Mono.CSharp {
                                feature);
                }
                
-               static bool IsValidWarning (int code)
-               {       
-                       return Array.BinarySearch (AllWarnings, code) >= 0;
-               }
-
                bool IsWarningEnabled (int code, int level, Location loc)
                {
                        if (WarningLevel < level)
                                return false;
 
-                       if (warning_ignore_table != null) {
-                               if (warning_ignore_table.ContainsKey (code)) {
-                                       return false;
-                               }
-                       }
+                       if (IsWarningDisabledGlobally (code))
+                               return false;
 
                        if (warning_regions_table == null || loc.IsNull)
                                return true;
 
                        WarningRegions regions;
-                       if (!warning_regions_table.TryGetValue (loc.Name, out regions))
+                       if (!warning_regions_table.TryGetValue (loc.File, out regions))
                                return true;
 
                        return regions.IsWarningEnabled (code, loc.Row);
                }
 
+               public bool IsWarningDisabledGlobally (int code)
+               {
+                       return warning_ignore_table != null && warning_ignore_table.Contains (code);
+               }
+
                bool IsWarningAsError (int code)
                {
                        bool is_error = WarningsAreErrors;
@@ -192,7 +186,7 @@ namespace Mono.CSharp {
 
                        if (mc != null) {
                                SymbolRelatedToPreviousError (mc);
-                       } else {
+                       } else if (ms.MemberDefinition != null) {
                                SymbolRelatedToPreviousError (ms.MemberDefinition.Assembly.Location, "");
                        }
                }
@@ -217,10 +211,11 @@ namespace Mono.CSharp {
                        try {
                                id = int.Parse (warningId);
                        } catch {
-                               id = -1;
+                               CheckWarningCode (warningId, Location.Null);
+                               return;
                        }
 
-                       if (!CheckWarningCode (id, warningId, Location.Null))
+                       if (!CheckWarningCode (id, Location.Null))
                                return;
 
                        if (warnings_as_error == null)
@@ -235,10 +230,11 @@ namespace Mono.CSharp {
                        try {
                                id = int.Parse (warningId);
                        } catch {
-                               id = -1;
+                               CheckWarningCode (warningId, Location.Null);
+                               return;
                        }
 
-                       if (!CheckWarningCode (id, warningId, Location.Null))
+                       if (!CheckWarningCode (id, Location.Null))
                                return;
 
                        if (warnings_only == null)
@@ -247,18 +243,21 @@ namespace Mono.CSharp {
                        warnings_only.Add (id);
                }
 
-               public bool CheckWarningCode (int code, Location loc)
+               public bool CheckWarningCode (string code, Location loc)
                {
-                       return CheckWarningCode (code, code.ToString (), loc);
+                       Warning (1691, 1, loc, "`{0}' is not a valid warning number", code);
+                       return false;
                }
 
-               public bool CheckWarningCode (int code, string scode, Location loc)
+               public bool CheckWarningCode (int code, Location loc)
                {
-                       if (IsValidWarning (code))
+                       if (AllWarningsHashSet == null)
+                               AllWarningsHashSet = new HashSet<int> (AllWarnings);
+
+                       if (AllWarningsHashSet.Contains (code))
                                return true;
 
-                       Warning (1691, 1, loc, "`{0}' is not a valid warning number", scode);
-                       return false;
+                       return CheckWarningCode (code.ToString (), loc);
                }
 
                public void ExtraInformation (Location loc, string msg)
@@ -271,14 +270,14 @@ namespace Mono.CSharp {
                        WarningRegions regions;
                        if (warning_regions_table == null) {
                                regions = null;
-                               warning_regions_table = new Dictionary<string, WarningRegions> ();
+                               warning_regions_table = new Dictionary<int, WarningRegions> ();
                        } else {
-                               warning_regions_table.TryGetValue (location.Name, out regions);
+                               warning_regions_table.TryGetValue (location.File, out regions);
                        }
 
                        if (regions == null) {
                                regions = new WarningRegions ();
-                               warning_regions_table.Add (location.Name, regions);
+                               warning_regions_table.Add (location.File, regions);
                        }
 
                        return regions;
@@ -410,9 +409,9 @@ namespace Mono.CSharp {
                public void SetIgnoreWarning (int code)
                {
                        if (warning_ignore_table == null)
-                               warning_ignore_table = new Dictionary<int, bool> ();
+                               warning_ignore_table = new HashSet<int> ();
 
-                       warning_ignore_table [code] = true;
+                       warning_ignore_table.Add (code);
                }
 
                public ReportPrinter SetPrinter (ReportPrinter printer)
@@ -758,10 +757,13 @@ namespace Mono.CSharp {
                        if (messages_to_print == null)
                                return false;
 
-                       foreach (AbstractMessage msg in messages_to_print)
+                       bool error_msg = false;
+                       foreach (AbstractMessage msg in messages_to_print) {
                                dest.Print (msg);
+                               error_msg |= !msg.IsWarning;
+                       }
 
-                       return true;
+                       return error_msg;
                }
        }
 
@@ -1163,8 +1165,13 @@ namespace Mono.CSharp {
 
                public void WarningEnable (Location location, int code, Report Report)
                {
-                       if (Report.CheckWarningCode (code, location))
-                               regions.Add (new Enable (location.Row, code));
+                       if (!Report.CheckWarningCode (code, location))
+                               return;
+
+                       if (Report.IsWarningDisabledGlobally (code))
+                               Report.Warning (1635, 1, location, "Cannot restore warning `CS{0:0000}' because it was disabled globally", code);
+
+                       regions.Add (new Enable (location.Row, code));
                }
 
                public bool IsWarningEnabled (int code, int src_line)
index 3d3e7dde9ac226c3835914f30ac317bd2ba6016d..1df9c4d07546962fb908596c7d54708503f82c5b 100644 (file)
@@ -248,6 +248,12 @@ namespace Mono.CSharp {
                        args[2] = TypeManager.enum_type.GetMetaInfo ();
                        args[3] = TypeManager.void_type.GetMetaInfo ();
                        set_corlib_type_builders.Invoke (CodeGen.Assembly.Builder, args);
+               }
+
+               static void HackCorlibEnums ()
+               {
+                       if (StdLib)
+                               return;
 
                        // Another Mono corlib HACK
                        // mono_class_layout_fields requires to have enums created
@@ -268,7 +274,7 @@ namespace Mono.CSharp {
                // </remarks>
                static public void CloseTypes ()
                {
-                       HackCorlib ();
+                       HackCorlibEnums ();
 
                        foreach (TypeContainer tc in root.Types){
                                tc.CloseType ();
@@ -328,6 +334,8 @@ namespace Mono.CSharp {
                        foreach (var tc in ToplevelTypes.Types)
                                tc.DefineConstants ();
 
+                       HackCorlib ();
+
                        foreach (TypeContainer tc in ToplevelTypes.Types)
                                tc.EmitType ();
 
index 01f4f88f26f73b3db4742f7ca1e6b35398a9bee3..96e6eddf86f74f19c8367d156e6451c41763789d 100644 (file)
@@ -730,33 +730,43 @@ namespace Mono.CSharp {
                        if (Expr == null) {
                                if (ec.ReturnType == TypeManager.void_type)
                                        return true;
-                               
-                               ec.Report.Error (126, loc,
-                                       "An object of a type convertible to `{0}' is required for the return statement",
-                                       TypeManager.CSharpName (ec.ReturnType));
+
+                               if (ec.CurrentIterator != null) {
+                                       Error_ReturnFromIterator (ec);
+                               } else {
+                                       ec.Report.Error (126, loc,
+                                               "An object of a type convertible to `{0}' is required for the return statement",
+                                               ec.ReturnType.GetSignatureForError ());
+                               }
+
                                return false;
                        }
 
-                       if (ec.CurrentBlock.Toplevel.IsIterator) {
-                               ec.Report.Error (1622, loc, "Cannot return a value from iterators. Use the yield return " +
-                                                 "statement to return a value, or yield break to end the iteration");
-                       }
+                       Expr = Expr.Resolve (ec);
 
                        AnonymousExpression am = ec.CurrentAnonymousMethod;
-                       if (am == null && ec.ReturnType == TypeManager.void_type) {
-                               ec.Report.Error (127, loc, "`{0}': A return keyword must not be followed by any expression when method returns void",
-                                       ec.GetSignatureForError ());
+                       if (am == null) {
+                               if (ec.ReturnType == TypeManager.void_type) {
+                                       ec.Report.Error (127, loc,
+                                               "`{0}': A return keyword must not be followed by any expression when method returns void",
+                                               ec.GetSignatureForError ());
+                               }
+                       } else {
+                               if (am.IsIterator) {
+                                       Error_ReturnFromIterator (ec);
+                                       return false;
+                               }
+
+                               var l = am as AnonymousMethodBody;
+                               if (l != null && l.ReturnTypeInference != null && Expr != null) {
+                                       l.ReturnTypeInference.AddCommonTypeBound (Expr.Type);
+                                       return true;
+                               }
                        }
 
-                       Expr = Expr.Resolve (ec);
                        if (Expr == null)
                                return false;
 
-                       if (ec.HasSet (ResolveContext.Options.InferReturnType)) {
-                               ec.ReturnTypeInference.AddCommonTypeBound (Expr.Type);
-                               return true;
-                       }
-
                        if (Expr.Type != ec.ReturnType) {
                                Expr = Convert.ImplicitConversionRequired (ec, Expr, ec.ReturnType, loc);
 
@@ -788,6 +798,12 @@ namespace Mono.CSharp {
                                ec.Emit (OpCodes.Ret);
                }
 
+               void Error_ReturnFromIterator (ResolveContext rc)
+               {
+                       rc.Report.Error (1622, loc,
+                               "Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration");
+               }
+
                protected override void CloneTo (CloneContext clonectx, Statement t)
                {
                        Return target = (Return) t;
@@ -1138,7 +1154,8 @@ namespace Mono.CSharp {
        //
        // The information about a user-perceived local variable
        //
-       public class LocalInfo : IKnownVariable, ILocalVariable {
+       public class LocalInfo : IKnownVariable, ILocalVariable
+       {
                public readonly FullNamedExpression Type;
 
                public TypeSpec VariableType;
@@ -1444,7 +1461,7 @@ namespace Mono.CSharp {
                //
                // If this is a switch section, the enclosing switch block.
                //
-               Block switch_block;
+               protected ExplicitBlock switch_block;
 
                protected List<Statement> scope_initializers;
 
@@ -1521,11 +1538,11 @@ namespace Mono.CSharp {
 
                #endregion
 
-               public Block CreateSwitchBlock (Location start)
+               public ExplicitBlock CreateSwitchBlock (Location start)
                {
-                       // FIXME: should this be implicit?
-                       Block new_block = new ExplicitBlock (this, start, start);
-                       new_block.switch_block = this;
+                       // FIXME: Only explicit block should be created
+                       var new_block = new ExplicitBlock (this, start, start);
+                       new_block.switch_block = Explicit;
                        return new_block;
                }
 
@@ -1939,7 +1956,7 @@ namespace Mono.CSharp {
                                constants.Remove (name);
 
                                if (!variable_type.IsConstantCompatible) {
-                                       Const.Error_InvalidConstantType (variable_type, loc, ec.Report);
+                                       Const.Error_InvalidConstantType (variable_type, vi.Location, ec.Report);
                                        continue;
                                }
 
@@ -2249,8 +2266,9 @@ namespace Mono.CSharp {
 
                        clonectx.AddBlockMap (this, target);
 
-                       target.Toplevel = (ToplevelBlock) clonectx.LookupBlock (Toplevel);
-                       target.Explicit = (ExplicitBlock) clonectx.LookupBlock (Explicit);
+                       target.Toplevel = (ToplevelBlock) (Toplevel == this ? target : clonectx.LookupBlock (Toplevel));
+                       target.Explicit = (ExplicitBlock) (Explicit == this ? target : clonectx.LookupBlock (Explicit));
+
                        if (Parent != null)
                                target.Parent = clonectx.RemapBlockCopy (Parent);
 
@@ -2335,14 +2353,22 @@ namespace Mono.CSharp {
                        if (ec.CurrentIterator != null)
                            return ec.CurrentIterator.Storey;
 
+                       //
+                       // Switch block does not follow sequential flow and we cannot emit
+                       // storey initialization inside the block because it can be jumped over
+                       // for all non-first cases. Instead we push it to the parent block to be
+                       // always initialized
+                       //
+                       if (switch_block != null)
+                               return switch_block.CreateAnonymousMethodStorey (ec);
+
                        if (am_storey == null) {
                                MemberBase mc = ec.MemberContext as MemberBase;
-                               GenericMethod gm = mc == null ? null : mc.GenericMethod;
 
                                //
                                // Creates anonymous method storey for this block
                                //
-                               am_storey = new AnonymousMethodStorey (this, ec.CurrentMemberDefinition.Parent.PartialContainer, mc, gm, "AnonStorey");
+                               am_storey = new AnonymousMethodStorey (this, ec.CurrentMemberDefinition.Parent.PartialContainer, mc, ec.CurrentTypeParameters, "AnonStorey");
                        }
 
                        return am_storey;
@@ -2599,10 +2625,11 @@ namespace Mono.CSharp {
 
                protected override void CloneTo (CloneContext clonectx, Statement t)
                {
-                       ToplevelBlock target = (ToplevelBlock) t;
                        base.CloneTo (clonectx, t);
 
                        if (parameters.Count != 0) {
+                               ToplevelBlock target = (ToplevelBlock) t;
+
                                target.parameter_info = new ToplevelParameterInfo[parameters.Count];
                                for (int i = 0; i < parameters.Count; ++i)
                                        target.parameter_info[i] = new ToplevelParameterInfo (target, i);
@@ -2634,7 +2661,7 @@ namespace Mono.CSharp {
                        for (int i = 0; i < n; ++i) {
                                parameter_info [i] = new ToplevelParameterInfo (this, i);
 
-                               Parameter p = parameters [i];
+                               var p = parameters.FixedParameters [i];
                                if (p == null)
                                        continue;
 
@@ -2700,7 +2727,7 @@ namespace Mono.CSharp {
                        int count = parameters.Count;
                        Arguments args = new Arguments (count);
                        for (int i = 0; i < count; ++i) {
-                               var arg_expr = new ParameterReference (parameter_info[i], parameters[i].Location);
+                               var arg_expr = new ParameterReference (parameter_info[i], parameter_info[i].Location);
                                args.Add (new Argument (arg_expr));
                        }
 
@@ -4076,13 +4103,7 @@ namespace Mono.CSharp {
 
                        ok &= base.Resolve (ec);
 
-                       // Avoid creating libraries that reference the internal
-                       // mcs NullType:
-                       TypeSpec t = expr.Type;
-                       if (t == TypeManager.null_type)
-                               t = TypeManager.object_type;
-                       
-                       temp = new TemporaryVariable (t, loc);
+                       temp = new TemporaryVariable (expr.Type, loc);
                        temp.Resolve (ec);
 
                        if (TypeManager.void_monitor_enter_object == null || TypeManager.void_monitor_exit_object == null) {
@@ -4568,7 +4589,7 @@ namespace Mono.CSharp {
 
                                        type = te.Type;
 
-                                       if (type != TypeManager.exception_type && !TypeManager.IsSubclassOf (type, TypeManager.exception_type)){
+                                       if (type != TypeManager.exception_type && !TypeSpec.IsBaseClass (type, TypeManager.exception_type, false)){
                                                ec.Report.Error (155, loc, "The type caught or thrown must be derived from System.Exception");
                                                return false;
                                        }
@@ -4707,7 +4728,7 @@ namespace Mono.CSharp {
 
                                TypeSpec resolved_type = c.CatchType;
                                for (int ii = 0; ii < last_index; ++ii) {
-                                       if (resolved_type == prev_catches [ii] || TypeManager.IsSubclassOf (resolved_type, prev_catches [ii])) {
+                                       if (resolved_type == prev_catches[ii] || TypeSpec.IsBaseClass (resolved_type, prev_catches[ii], true)) {
                                                ec.Report.Error (160, c.loc,
                                                        "A previous catch clause already catches all exceptions of this or a super type `{0}'",
                                                        TypeManager.CSharpName (prev_catches [ii]));
@@ -4816,14 +4837,15 @@ namespace Mono.CSharp {
                        if (expr == null)
                                return false;
 
-                       if (!expr.Type.ImplementsInterface (TypeManager.idisposable_type) &&
-                               Convert.ImplicitConversion (ec, expr, TypeManager.idisposable_type, loc) == null) {
-                               if (expr.Type != InternalType.Dynamic) {
+                       if (expr.Type != TypeManager.idisposable_type && !expr.Type.ImplementsInterface (TypeManager.idisposable_type)) {
+                               if (TypeManager.IsNullableType (expr.Type)) {
+                                       // Will handle it a custom code
+                               } else if (expr.Type == InternalType.Dynamic) {
+                                       expr = Convert.ImplicitConversionStandard (ec, expr, TypeManager.idisposable_type, loc);
+                               } else {
                                        Using.Error_IsNotConvertibleToIDisposable (ec, expr);
                                        return false;
                                }
-
-                               expr = Convert.ImplicitConversionRequired (ec, expr, TypeManager.idisposable_type, loc);
                        }
 
                        var expr_type = expr.Type;
@@ -4973,20 +4995,16 @@ namespace Mono.CSharp {
                                return true;
                        }
 
-                       Expression e = Convert.ImplicitConversionStandard (ec, assign, TypeManager.idisposable_type, var.Location);
-                       if (e == null) {
-                               if (assign.Type == InternalType.Dynamic) {
-                                       e = Convert.ImplicitConversionRequired (ec, assign, TypeManager.idisposable_type, loc);
-                                       var = new TemporaryVariable (e.Type, loc);
-                                       assign = new SimpleAssign (var, e, loc).ResolveStatement (ec);
-                                       return true;
-                               }
-
-                               Error_IsNotConvertibleToIDisposable (ec, var);
-                               return false;
+                       Expression e;
+                       if (assign.Type == InternalType.Dynamic) {
+                               e = Convert.ImplicitConversionStandard (ec, assign, TypeManager.idisposable_type, loc);
+                           var = new TemporaryVariable (e.Type, loc);
+                           assign = new SimpleAssign (var, e, loc).ResolveStatement (ec);
+                           return true;
                        }
 
-                       throw new NotImplementedException ("covariance?");
+                       Error_IsNotConvertibleToIDisposable (ec, var);
+                       return false;
                }
 
                protected override void CloneTo (CloneContext clonectx, Statement t)
@@ -5279,6 +5297,7 @@ namespace Mono.CSharp {
                        Statement statement;
                        Expression var_type;
                        ExpressionStatement init;
+                       bool ambiguous_getenumerator_name;
 
                        public CollectionForeach (Expression var_type, Expression var,
                                                  Expression expr, Statement stmt, Location l)
@@ -5303,14 +5322,6 @@ namespace Mono.CSharp {
                                                enumerator.ReturnType.GetSignatureForError (), enumerator.GetSignatureForError ());
                        }
 
-                       void Error_AmbiguousIEnumerable (ResolveContext rc, TypeSpec type)
-                       {
-                               rc.Report.SymbolRelatedToPreviousError (type);
-                               rc.Report.Error (1640, loc,
-                                       "foreach statement cannot operate on variables of type `{0}' because it contains multiple implementation of `{1}'. Try casting to a specific implementation",
-                                       type.GetSignatureForError (), TypeManager.generic_ienumerable_type.GetSignatureForError ());
-                       }
-
                        MethodGroupExpr ResolveGetEnumerator (ResolveContext rc)
                        {
                                //
@@ -5324,6 +5335,10 @@ namespace Mono.CSharp {
                                        Arguments args = new Arguments (0);
                                        mg = mg.OverloadResolve (rc, ref args, this, OverloadResolver.Restrictions.None);
 
+                                       // For ambiguous GetEnumerator name warning CS0278 was reported, but Option 2 could still apply
+                                       if (ambiguous_getenumerator_name)
+                                               mg = null;
+
                                        if (mg != null && args.Count == 0 && !mg.BestCandidate.IsStatic && mg.BestCandidate.IsPublic) {
                                                return mg;
                                        }
@@ -5339,7 +5354,11 @@ namespace Mono.CSharp {
                                                foreach (var iface in ifaces) {
                                                        if (TypeManager.generic_ienumerable_type != null && iface.MemberDefinition == TypeManager.generic_ienumerable_type.MemberDefinition) {
                                                                if (iface_candidate != null && iface_candidate != TypeManager.ienumerable_type) {
-                                                                       Error_AmbiguousIEnumerable (rc, expr.Type);
+                                                                       rc.Report.SymbolRelatedToPreviousError (expr.Type);
+                                                                       rc.Report.Error (1640, loc,
+                                                                               "foreach statement cannot operate on variables of type `{0}' because it contains multiple implementation of `{1}'. Try casting to a specific implementation",
+                                                                               expr.Type.GetSignatureForError (), TypeManager.generic_ienumerable_type.GetSignatureForError ());
+
                                                                        return null;
                                                                }
 
@@ -5436,8 +5455,16 @@ namespace Mono.CSharp {
 
                                VarExpr ve = var_type as VarExpr;
                                if (ve != null) {
-                                       // Infer implicitly typed local variable from foreach enumerable type
-                                       var_type = new TypeExpression (current_pe.Type, var_type.Location);
+                                       if (is_dynamic) {
+                                               // Source type is dynamic, set element type to dynamic too
+                                               var_type = new TypeExpression (InternalType.Dynamic, var_type.Location);
+                                       } else {
+                                               // Infer implicitly typed local variable from foreach enumerable type
+                                               var_type = new TypeExpression (current_pe.Type, var_type.Location);
+                                       }
+                               } else if (is_dynamic) {
+                                       // Explicit cast of dynamic collection elements has to be done at runtime
+                                       current_pe = EmptyCast.Create (current_pe, InternalType.Dynamic);
                                }
 
                                var_type = var_type.ResolveAsTypeTerminal (ec, false);
@@ -5497,7 +5524,7 @@ namespace Mono.CSharp {
                                        expr.Type.GetSignatureForError (), "enumerable",
                                        best.GetSignatureForError (), ambiguous.GetSignatureForError ());
 
-                               Error_AmbiguousIEnumerable (ec, expr.Type);
+                               ambiguous_getenumerator_name = true;
                                return true;
                        }
 
index 5159f73d0bfa97257b8ddbb4a305a6a7123db94b..38e69963a3f75eaa7e0a8d6b98d1f9e3f7bbc68e 100644 (file)
@@ -27,10 +27,10 @@ namespace Mono.CSharp {
 #if !NET_4_0
                        delegate int GetILOffsetFunc (ILGenerator ig);
                        GetILOffsetFunc get_il_offset_func;
-#endif
-                       delegate Guid GetGuidFunc (ModuleBuilder mb);
 
+                       delegate Guid GetGuidFunc (ModuleBuilder mb);
                        GetGuidFunc get_guid_func;
+#endif
 
                        ModuleBuilder module_builder;
 
@@ -51,14 +51,20 @@ namespace Mono.CSharp {
 
                        public void WriteSymbolFile ()
                        {
-                               Guid guid = get_guid_func (module_builder);
+                               Guid guid;
+#if NET_4_0
+                               guid = module_builder.ModuleVersionId;
+#else
+                               guid = get_guid_func (module_builder);
+#endif
                                WriteSymbolFile (guid);
                        }
 
                        public bool Initialize ()
                        {
-                               MethodInfo mi;
 #if !NET_4_0
+                               MethodInfo mi;
+
                                mi = typeof (ILGenerator).GetMethod (
                                        "Mono_GetCurrentOffset",
                                        BindingFlags.Static | BindingFlags.NonPublic);
@@ -67,7 +73,6 @@ namespace Mono.CSharp {
 
                                get_il_offset_func = (GetILOffsetFunc) System.Delegate.CreateDelegate (
                                        typeof (GetILOffsetFunc), mi);
-#endif
 
                                mi = typeof (ModuleBuilder).GetMethod (
                                        "Mono_GetGuid",
@@ -77,9 +82,9 @@ namespace Mono.CSharp {
 
                                get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
                                        typeof (GetGuidFunc), mi);
+#endif
 
                                Location.DefineSymbolDocuments (this);
-
                                return true;
                        }
                }
index ff147f5d436823811cb4c4d66edfb5c01c25a4f8..25fe7d780c846a7de3e899dd299bcd001d011c74 100644 (file)
@@ -61,7 +61,6 @@ namespace Mono.CSharp {
        static public PredefinedTypeSpec exception_type;
 
 
-       static public TypeSpec null_type;
        static public TypeSpec typed_reference_type;
        static public TypeSpec arg_iterator_type;
        static public TypeSpec mbr_type;
@@ -368,6 +367,15 @@ namespace Mono.CSharp {
                PredefinedAttributes.Get.ParamArray.Initialize (ctx, false);
                PredefinedAttributes.Get.Out.Initialize (ctx, false);
 
+               if (InternalType.Dynamic.GetMetaInfo () == null) {
+                       InternalType.Dynamic.SetMetaInfo (object_type.GetMetaInfo ());
+
+                       if (object_type.MemberDefinition.IsImported)
+                               InternalType.Dynamic.MemberCache = object_type.MemberCache;
+
+                       InternalType.Null.SetMetaInfo (object_type.GetMetaInfo ());
+               }
+
                return ctx.Report.Errors == 0;
        }
 
@@ -376,11 +384,6 @@ namespace Mono.CSharp {
        //
        public static void InitOptionalCoreTypes (CompilerContext ctx)
        {
-               //
-               // These are only used for compare purposes
-               //
-               null_type = InternalType.Null;
-
                void_ptr_type = PointerContainer.MakeType (void_type);
 
                //
@@ -565,18 +568,6 @@ namespace Mono.CSharp {
                return t.IsStruct;
        }
 
-       public static bool IsSubclassOf (TypeSpec type, TypeSpec base_type)
-       {
-               do {
-                       if (type == base_type)
-                               return true;
-
-                       type = type.BaseType;
-               } while (type != null);
-
-               return false;
-       }
-
        public static bool IsFamilyAccessible (TypeSpec type, TypeSpec parent)
        {
 //             TypeParameter tparam = LookupTypeParameter (type);
@@ -627,12 +618,12 @@ namespace Mono.CSharp {
                type = type.GetDefinition (); // DropGenericTypeArguments (type);
                parent = parent.GetDefinition (); // DropGenericTypeArguments (parent);
 
-               if (IsEqual (type, parent))
+               if (type == parent)
                        return false;
 
                type = type.DeclaringType;
                while (type != null) {
-                       if (IsEqual (type.GetDefinition (), parent))
+                       if (type.GetDefinition () == parent)
                                return true;
 
                        type = type.DeclaringType;
@@ -853,11 +844,6 @@ namespace Mono.CSharp {
                return type.GetMetaInfo ().ContainsGenericParameters;
        }
 
-       public static bool IsEqual (TypeSpec a, TypeSpec b)
-       {
-               return a == b && !(a is InternalType);
-       }
-
        public static TypeSpec[] GetTypeArguments (TypeSpec t)
        {
                // TODO: return empty array !!
index 22278a08dacd4806887da44e02ad0cfb9f93184e..242dacdb2734ba9a116f81c600f030bd53b99acd 100644 (file)
@@ -269,6 +269,8 @@ namespace Mono.CSharp
 
                        if (IsNested) {
                                s = DeclaringType.GetSignatureForError ();
+                       } else if (MemberDefinition is AnonymousTypeClass) {
+                               return ((AnonymousTypeClass) MemberDefinition).GetSignatureForError ();
                        } else {
                                s = MemberDefinition.Namespace;
                        }
@@ -293,7 +295,7 @@ namespace Mono.CSharp
                        do {
                                if (t.Interfaces != null) {     // TODO: Try t.iface
                                        foreach (TypeSpec i in t.Interfaces) {
-                                               if (i == iface || TypeSpecComparer.Variant.IsEqual (i, iface))
+                                               if (i == iface || TypeSpecComparer.Variant.IsEqual (i, iface) || TypeSpecComparer.IsEqual (i, iface))
                                                        return true;
                                        }
                                }
@@ -306,14 +308,38 @@ namespace Mono.CSharp
 
                protected virtual void InitializeMemberCache (bool onlyTypes)
                {
-                       //
-                       // Not interested in members of nested private types
-                       //
-                       if (IsPrivate) {
-                               cache = new MemberCache (0);
-                       } else {
-                               cache = MemberDefinition.LoadMembers (this);
+                       cache = MemberDefinition.LoadMembers (this);
+               }
+
+               //
+               // Is @baseClass base implementation of @type. With enabled @dynamicIsEqual the slower
+               // comparison is used to hide differences between `object' and `dynamic' for generic
+               // types. Should not be used for comparisons where G<object> != G<dynamic>
+               //
+               public static bool IsBaseClass (TypeSpec type, TypeSpec baseClass, bool dynamicIsObject)
+               {
+                       if (dynamicIsObject && baseClass.IsGeneric) {
+                               //
+                               // Returns true for a hierarchies like this when passing baseClass of A<dynamic>
+                               //
+                               // class B : A<object> {}
+                               //
+                               while (type != null) {
+                                       type = type.BaseType;
+                                       if (TypeSpecComparer.IsEqual (type, baseClass))
+                                               return true;
+                               }
+
+                               return false;
                        }
+
+                       while (type != null) {
+                               type = type.BaseType;
+                               if (type == baseClass)
+                                       return true;
+                       }
+
+                       return false;
                }
 
                public override MemberSpec InflateMember (TypeParameterInflator inflator)
@@ -382,6 +408,8 @@ namespace Mono.CSharp
                        this.ns = ns;
                }
 
+               #region Properties
+
                public override int Arity {
                        get {
                                return 0;
@@ -400,6 +428,8 @@ namespace Mono.CSharp
                        }
                }
 
+               #endregion
+
                public override string GetSignatureForError ()
                {
                        switch (name) {
@@ -442,22 +472,22 @@ namespace Mono.CSharp
        static class TypeSpecComparer
        {
                //
-               // Default reference comparison
+               // Does strict reference comparion only
                //
                public static readonly DefaultImpl Default = new DefaultImpl ();
 
-               public class DefaultImpl : IEqualityComparer<TypeSpec[]>, IEqualityComparer<Tuple<TypeSpec, TypeSpec[]>>
+               public class DefaultImpl : IEqualityComparer<TypeSpec[]>
                {
                        #region IEqualityComparer<TypeSpec[]> Members
 
-                       public bool Equals (TypeSpec[] x, TypeSpec[] y)
+                       bool IEqualityComparer<TypeSpec[]>.Equals (TypeSpec[] x, TypeSpec[] y)
                        {
-                               if (x.Length != y.Length)
-                                       return false;
-
                                if (x == y)
                                        return true;
 
+                               if (x.Length != y.Length)
+                                       return false;
+
                                for (int i = 0; i < x.Length; ++i)
                                        if (x[i] != y[i])
                                                return false;
@@ -465,7 +495,7 @@ namespace Mono.CSharp
                                return true;
                        }
 
-                       public int GetHashCode (TypeSpec[] obj)
+                       int IEqualityComparer<TypeSpec[]>.GetHashCode (TypeSpec[] obj)
                        {
                                int hash = 0;
                                for (int i = 0; i < obj.Length; ++i)
@@ -475,20 +505,6 @@ namespace Mono.CSharp
                        }
 
                        #endregion
-
-                       #region IEqualityComparer<Tuple<TypeSpec,TypeSpec[]>> Members
-
-                       bool IEqualityComparer<Tuple<TypeSpec, TypeSpec[]>>.Equals (Tuple<TypeSpec, TypeSpec[]> x, Tuple<TypeSpec, TypeSpec[]> y)
-                       {
-                               return Equals (x.Item2, y.Item2) && x.Item1 == y.Item1;
-                       }
-
-                       int IEqualityComparer<Tuple<TypeSpec, TypeSpec[]>>.GetHashCode (Tuple<TypeSpec, TypeSpec[]> obj)
-                       {
-                               return GetHashCode (obj.Item2) ^ obj.Item1.GetHashCode ();
-                       }
-
-                       #endregion
                }
 
                //
@@ -622,16 +638,7 @@ namespace Mono.CSharp
                                var targs_definition = target_type_def.TypeParameters;
 
                                if (!type1.IsInterface && !type1.IsDelegate) {
-                                       //
-                                       // Internal compiler variance between G<object> and G<dynamic>
-                                       //
-                                       for (int i = 0; i < targs_definition.Length; ++i) {
-                                               if ((t1_targs[i] != TypeManager.object_type && t1_targs[i] != InternalType.Dynamic) ||
-                                                       (t2_targs[i] != TypeManager.object_type && t2_targs[i] != InternalType.Dynamic))
-                                                       return false;
-                                       }
-
-                                       return true;
+                                       return TypeSpecComparer.Equals (t1_targs, t2_targs);
                                }
 
                                for (int i = 0; i < targs_definition.Length; ++i) {
@@ -763,6 +770,51 @@ namespace Mono.CSharp
                                return false;
                        }
                }
+
+               public static bool Equals (TypeSpec[] x, TypeSpec[] y)
+               {
+                       if (x == y)
+                               return true;
+
+                       if (x.Length != y.Length)
+                               return false;
+
+                       for (int i = 0; i < x.Length; ++i)
+                               if (!IsEqual (x[i], y[i]))
+                                       return false;
+
+                       return true;
+               }
+
+               //
+               // Identity type conversion
+               //
+               // Default reference comparison, it has to be used when comparing
+               // two possible dynamic/internal types
+               //
+               public static bool IsEqual (TypeSpec a, TypeSpec b)
+               {
+                       if (a == b) {
+                               // This also rejects dynamic == dynamic
+                               return a.Kind != MemberKind.InternalCompilerType || a == InternalType.Dynamic;
+                       }
+
+                       //
+                       // object and dynamic are considered equivalent there is an identity conversion
+                       // between object and dynamic, and between constructed types that are the same
+                       // when replacing all occurences of dynamic with object.
+                       //
+                       if (a == InternalType.Dynamic || b == InternalType.Dynamic)
+                               return b == TypeManager.object_type || a == TypeManager.object_type;
+
+                       if (a == null || !a.IsGeneric || b == null || !b.IsGeneric)
+                               return false;
+
+                       if (a.MemberDefinition != b.MemberDefinition)
+                               return false;
+
+                       return Equals (a.TypeArguments, b.TypeArguments);
+               }
        }
 
        public interface ITypeDefinition : IMemberDefinition
@@ -779,29 +831,22 @@ namespace Mono.CSharp
 
        class InternalType : TypeSpec
        {
-               private class DynamicType : InternalType
-               {
-                       public DynamicType ()
-                               : base ("dynamic")
-                       {
-                       }
-
-                       public override Type GetMetaInfo ()
-                       {
-                               return typeof (object);
-                       }
-               }
-
-               public static readonly TypeSpec AnonymousMethod = new InternalType ("anonymous method");
-               public static readonly TypeSpec Arglist = new InternalType ("__arglist");
-               public static readonly TypeSpec Dynamic = new DynamicType ();
-               public static readonly TypeSpec MethodGroup = new InternalType ("method group");
-               public static readonly TypeSpec Null = new InternalType ("null");
-               public static readonly TypeSpec FakeInternalType = new InternalType ("<fake$type>");
+               public static readonly InternalType AnonymousMethod = new InternalType ("anonymous method");
+               public static readonly InternalType Arglist = new InternalType ("__arglist");
+               public static readonly InternalType Dynamic = new InternalType ("dynamic", null);
+               public static readonly InternalType MethodGroup = new InternalType ("method group");
+               public static readonly InternalType Null = new InternalType ("null");
+               public static readonly InternalType FakeInternalType = new InternalType ("<fake$type>");
 
                readonly string name;
 
-               protected InternalType (string name)
+               InternalType (string name, MemberCache cache)
+                       : this (name)
+               {
+                       this.cache = cache;
+               }
+
+               InternalType (string name)
                        : base (MemberKind.InternalCompilerType, null, null, null, Modifiers.PUBLIC)
                {
                        this.name = name;
@@ -811,6 +856,8 @@ namespace Mono.CSharp
                        state = (state & ~(StateFlags.CLSCompliant_Undetected | StateFlags.Obsolete_Undetected)) | StateFlags.CLSCompliant;
                }
 
+               #region Properties
+
                public override int Arity {
                        get {
                                return 0;
@@ -823,6 +870,8 @@ namespace Mono.CSharp
                        }
                }
 
+               #endregion
+
                public override string GetSignatureForError ()
                {
                        return name;
diff --git a/mcs/tests/.cvsignore b/mcs/tests/.cvsignore
deleted file mode 100644 (file)
index a9b913c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-*.dll
-*.exe
-*.log
-*.netmodule
-boot-casts.out
-dir-gmcs
-dir-mcs
-mcs-casts.out
-semantic.cache
index b823b23c280b7bbe692ba06062da7259e70d69c9..f0e072c97c48e94697462b9bc6938965c417bcb3 100644 (file)
@@ -1,8 +1,3 @@
-/gtest-504-lib.cs -crlf
-/gtest-523.cs -crlf
-/gtest-xml-2-ref.xml -crlf
-/gtest-xml-3-ref.xml -crlf
-/test-746.cs -crlf
 /test-xml-001-ref.xml -crlf
 /test-xml-002-ref.xml -crlf
 /test-xml-003-ref.xml -crlf
@@ -42,7 +37,3 @@
 /test-xml-037-ref.xml -crlf
 /test-xml-038-ref.xml -crlf
 /test-xml-050-ref.xml -crlf
-/gtest-522.cs -crlf
-/gtest-525.cs -crlf
-/gtest-linq-24.cs -crlf
-/test-788.cs -crlf
index c901784e6184dd0965e2c88c451412437b6f8481..e1f811268a899cd447bc9b624d93ea4bda6c8f22 100644 (file)
@@ -49,7 +49,7 @@ COMPILER_NAME = dmcs
 TEST_PATTERN = 'v4'
 LOCAL_RUNTIME_FLAGS = --verify-all
 DEFINES = -compiler-options:"-d:NET_4_0"
-#TOPTIONS += '-il:ver-il-dmcs.xml'
+TOPTIONS += '-il:ver-il-dmcs.xml'
 endif
 ifeq (moonlight, $(PROFILE))
 COMPILER_NAME = smcs
diff --git a/mcs/tests/anon-test b/mcs/tests/anon-test
deleted file mode 100644 (file)
index 827588d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-for i in a-*.cs; do
-        n=`basename $i .cs`
-       if mono --debug mcs.exe -unsafe $i >& $n.log; then
-           if mono --debug `basename $i .cs`.exe >& $n.run; then
-               echo "  Test passes: $i"
-           else
-               echo "   Test fails: $i"
-           fi
-       else
-               echo "Compile Fails: $i"
-        fi
-done
index 5789eefcced72e512acb643bc60eabb6c96e3162..d729de720671cc9d7323ebdeaf61a679d332bae8 100644 (file)
@@ -25,11 +25,10 @@ class AssertDynamicObject : DynamicMetaObject
        DynamicMetaObject GetFakeMetaObject (object value)
        {
                Type t = value == null ? typeof (object) : value.GetType ();
-               var v = Expression.Variable (t);
-               Expression e = Expression.Block (new[] { v }, Expression.Default (t));
+               Expression<Func<object>> et = () => value;
 
                Expression restr = Expression.Constant (true);
-               return new DynamicMetaObject (e, BindingRestrictions.GetExpressionRestriction (restr));
+               return new DynamicMetaObject (Expression.Convert (et.Body, t), BindingRestrictions.GetExpressionRestriction (restr));
        }
 
        public override DynamicMetaObject BindBinaryOperation (BinaryOperationBinder binder, DynamicMetaObject arg)
@@ -217,8 +216,7 @@ class Tester : DynamicObjectMock
                if (values.Count != expected.Length)
                        throw new ApplicationException (name + ": Array length does not match " + values.Count + " != " + expected.Length);
 
-               for (int i = 0; i < expected.Length; i++)
-               {
+               for (int i = 0; i < expected.Length; i++) {
                        Assert (flags.GetValue (expected[i]), flags.GetValue (values[i]), "flags");
                }
        }
@@ -300,7 +298,7 @@ class Tester : DynamicObjectMock
 
                d = checked (d + 3);
        }
-       
+
        void BinaryAddChecked_2 (dynamic d, DynamicObjectMock mock)
        {
                mock.BinaryOperation = (binder, arg) => {
@@ -317,7 +315,7 @@ class Tester : DynamicObjectMock
                checked {
                        r = () => d + 3;
                }
-               
+
                r ();
        }
 
@@ -729,10 +727,10 @@ class Tester : DynamicObjectMock
                mock.ConvertOperation = (binder) => {
                        Assert (binder.Explicit, false, "Explicit");
                        Assert (binder.Type, typeof (int), "Type");
-                       return 2;
+                       return 1;
                };
 
-               object[] o = new object [2];
+               object[] o = new object[2];
                d = o[d];
        }
 
@@ -745,7 +743,7 @@ class Tester : DynamicObjectMock
                        return (byte) 2;
                };
 
-               object b = checked((byte) d);
+               object b = checked ((byte) d);
        }
 
        void Convert_4 (dynamic d, DynamicObjectMock mock)
@@ -759,6 +757,20 @@ class Tester : DynamicObjectMock
                var g = new int[d];
        }
 
+       void Convert_5 (dynamic d, DynamicObjectMock mock)
+       {
+               int counter = 0;
+               mock.ConvertOperation = (binder) => {
+                       Assert (binder.Explicit, false, "Explicit");
+                       Assert (binder.Type, typeof (System.Collections.IEnumerable), "Type");
+                       return new object[] { 1 };
+               };
+
+               foreach (int v in d) {
+//                     Console.WriteLine (v);
+               }
+       }
+
        void GetIndex_1 (dynamic d, DynamicObjectMock mock)
        {
                mock.GetIndexOperation = (binder, args) => {
@@ -769,10 +781,10 @@ class Tester : DynamicObjectMock
                                CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.Constant | CSharpArgumentInfoFlags.UseCompileTimeType, null) },
                                "ArgumentInfo");
 
-                       Assert ((IList<object>)args, new object[] { 0 }, "args");
+                       Assert ((IList<object>) args, new object[] { 0 }, "args");
                };
 
-               var o = d [0];
+               var o = d[0];
        }
 
        void GetIndex_2 (dynamic d, DynamicObjectMock mock)
@@ -832,7 +844,7 @@ class Tester : DynamicObjectMock
                                CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.None, null),
                                CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.Constant | CSharpArgumentInfoFlags.UseCompileTimeType, null),
                                CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.Constant | CSharpArgumentInfoFlags.UseCompileTimeType, null)
-                       },      "ArgumentInfo");
+                       }, "ArgumentInfo");
 
                        Assert ((IList<object>) args, new object[] { "foo", null }, "args");
                };
@@ -878,9 +890,9 @@ class Tester : DynamicObjectMock
                        Assert ((IList<object>) args, new object[] { typeof (bool), -1 }, "args");
                };
 
-               d (typeof (bool), name:-1);
+               d (typeof (bool), name: -1);
        }
-       
+
        void Invoke_5 (dynamic d, DynamicObjectMock mock)
        {
                mock.InvokeOperation = (binder, args) => {
@@ -894,10 +906,10 @@ class Tester : DynamicObjectMock
                        Assert ((IList<object>) args, new object[] { typeof (bool), -1 }, "args");
                };
 
-               Action<object> a = (i) => {};
+               Action<object> a = (i) => { };
                a (d);
        }
-       
+
        void InvokeMember_1 (dynamic d, DynamicObjectMock mock)
        {
                mock.InvokeMemberOperation = (binder, args) => {
@@ -1090,7 +1102,7 @@ class Tester : DynamicObjectMock
                        AssertArgument (binder, new[] {
                                CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.None, null),
                                CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null) // CSC bug?
-                       },      "ArgumentInfo");
+                       }, "ArgumentInfo");
 
                        Assert (value, d_const, "value");
                };
@@ -1293,7 +1305,7 @@ class Tester : DynamicObjectMock
                        return true;
                };
 
-               object g = d ? 1 :4;
+               object g = d ? 1 : 4;
        }
 
        void UnaryIsTrue_2 (dynamic d, DynamicObjectMock mock)
@@ -1319,7 +1331,7 @@ class Tester : DynamicObjectMock
 
                object x = d || null;
        }
-       
+
 #pragma warning restore 168, 169, 219
 
        static bool RunTest (MethodInfo test)
@@ -1327,7 +1339,7 @@ class Tester : DynamicObjectMock
                Console.Write ("Running test {0, -25}", test.Name);
                try {
                        var d = new DynamicObjectMock ();
-                       test.Invoke (new Tester (), new [] { d, d });
+                       test.Invoke (new Tester (), new[] { d, d });
                        if (d.HitCounter < 1)
                                Assert (true, false, "HitCounter");
 
index 65c7a1c7edbfbf05b00a2387a3350e49c5c2560f..505ae215cffc5c82afd5cfe0aa85f9696cfa6737 100644 (file)
@@ -75,6 +75,20 @@ class Class
        {
                return i [0] * i.Length;
        }
+       
+       public static void ArglistMethod (__arglist)
+       {
+       }
+}
+
+class EventClass
+{
+       internal event Func<int> OutEvent;
+       
+       public int CallEvent ()
+       {
+               return OutEvent ();
+       }
 }
 
 class Tester
@@ -96,6 +110,10 @@ class Tester
                        // passed
                }
        }
+       
+       event Func<int> e;
+       int field;
+
 
 #pragma warning disable 169
 
@@ -149,6 +167,14 @@ class Tester
                Assert (2, Class.StaticMethod (d), "#2");
                Class.StaticMethod (d); 
        }
+       
+       void InvokeMember_Error ()
+       {
+               AssertError (() => {
+                               dynamic d_arg = "a";
+                               Class.ArglistMethod (d_arg);
+                       }, "#1");
+       }
 
        void InvokeConstructor ()
        {
@@ -161,18 +187,18 @@ class Tester
                var r2 = new D2 (d);
        }
 
-       event Func<int> e;
-       int field;
        void IsEvent ()
        {
                dynamic d = this;
                d.e += new Func<int> (() => 3);
-               
-               // FIXME:
-               //Assert (3, d.e (), "#1");
+               Assert (3, d.e (), "#1");
                
                d.field += 5;
                Assert (5, d.field, "#2");
+               
+               d = new EventClass ();
+               d.OutEvent += new Func<int> (() => 100);
+               Assert (100, d.CallEvent (), "#3");
        }
 
        void MemberGetTest ()
index e2d8e7e35167bc96932f2f55905913d230c942cf..e234ac990ec5860174ec459b05f7619d5c485109 100644 (file)
@@ -30,6 +30,18 @@ public class Test
                Console.WriteLine (res);
                return res == 31;
        }
+       
+       bool ForEachTest_2()
+       {
+               dynamic c = new int [2] { 5, 7 };
+               int total = 0;
+               foreach (var v in c)
+               {
+                       total += v;
+               }
+               
+               return total == 12;
+       }
 
        bool UsingTest ()
        {
@@ -61,8 +73,11 @@ public class Test
                if (!t.ForEachTest ())
                        return 1;
 
-               if (!t.UsingTest ())
+               if (!t.ForEachTest_2 ())
                        return 2;
+               
+               if (!t.UsingTest ())
+                       return 3;
 
                Console.WriteLine ("ok");
                return 0;
index 7ca9d8f801d40dd14e1e08114d8fa7afdba0df1e..f9a5cf867abe1417d21a3da5d0adb5a3558d52ef 100644 (file)
@@ -1,5 +1,28 @@
+class A
+{
+       public static int operator != (A a, dynamic b)
+       {
+               return -1;
+       }
+       
+       public static int operator == (A a, dynamic b)
+       {
+               return +1;
+       }
+}
+
 public class C
 {
+       public static bool operator == (C a, object b)
+       {
+               return ReferenceEquals (a, b);
+       }
+
+       public static bool operator != (C a, dynamic b)
+       {
+               return !ReferenceEquals (a, b);
+       }
+       
        public static decimal operator -(dynamic p1, C p2)
        {
                return 9;
diff --git a/mcs/tests/dtest-015.cs b/mcs/tests/dtest-015.cs
new file mode 100644 (file)
index 0000000..0cf2afa
--- /dev/null
@@ -0,0 +1,18 @@
+using System;
+
+class Program
+{
+       static int Main ()
+       {
+               dynamic d = new Program ();
+               var p = d as int?;
+               if (p != null)
+                       return 1;
+
+               var p2 = d as Program;
+               if (p2 == null)
+                       return 2;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-016.cs b/mcs/tests/dtest-016.cs
new file mode 100644 (file)
index 0000000..efeb1a8
--- /dev/null
@@ -0,0 +1,59 @@
+using System;
+
+class Foo
+{
+       public virtual void Dyn (out dynamic o)
+       {
+               o = null;
+       }
+}
+
+class Bar : Foo
+{
+       public override void Dyn (out dynamic o)
+       {
+               base.Dyn (out o);
+       }
+}
+
+public class C
+{
+       public void Method_A (ref int i)
+       {
+       }
+
+       public void Method_B (ref dynamic i)
+       {
+       }
+}
+
+class Program
+{
+       static void DynOut (out dynamic d)
+       {
+               d = null;
+       }
+
+       static void DynRef (ref object d)
+       {
+               d = null;
+       }
+       
+       void TestErrorVersions ()
+       {
+               var c = new C ();
+               dynamic d = null;
+               c.Method_A (d);
+               c.Method_A (d); 
+       }
+
+       static int Main ()
+       {
+               object o;
+               DynOut (out o);
+
+               dynamic d = null;
+               DynRef (ref d);
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-017.cs b/mcs/tests/dtest-017.cs
new file mode 100644 (file)
index 0000000..9fcd0ac
--- /dev/null
@@ -0,0 +1,57 @@
+using System;
+
+class B<U>
+{
+}
+
+class C<T> : B<T>
+{
+}
+
+interface I<T> : IA<T>
+{
+}
+
+interface IA<U>
+{
+}
+
+delegate dynamic D (dynamic d);
+
+class DynamicAssignments
+{
+       static int Main ()
+       {
+               dynamic d1 = null;
+               dynamic d2 = null;
+               d1 = d2;
+               d2 = d1;
+
+               B<object> g1 = null;
+               B<dynamic> g2 = null;
+               g1 = g2;
+               g2 = g1;
+
+               B<B<object>> g_n1 = null;
+               B<B<dynamic>> g_n2 = null;
+               g_n1 = g_n2;
+               g_n2 = g_n1;
+               
+               object[] o = null;
+               dynamic[] d = o;
+
+               C<object> a = null;
+               B<dynamic> b = a;
+               a = (C<object>)b;
+               a = (C<dynamic>)b;
+
+               I<object> io = null;
+               IA<dynamic> id = io;
+               
+               D del = delegate (object del_arg) {
+                        return (object) null;
+               };
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-018.cs b/mcs/tests/dtest-018.cs
new file mode 100644 (file)
index 0000000..d56ccce
--- /dev/null
@@ -0,0 +1,18 @@
+class XValue
+{
+       public long Y { get; set; }
+}
+
+class A
+{
+       public dynamic X = new XValue ();
+       
+       static int Main()
+       {
+               var v = new A { X = { Y = 467 } };
+               if (v.X.Y != 467)
+                       return 1;
+               
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-019.cs b/mcs/tests/dtest-019.cs
new file mode 100644 (file)
index 0000000..6ab5bab
--- /dev/null
@@ -0,0 +1,29 @@
+public class C
+{
+       delegate void D (dynamic d);
+       delegate void D2 (out dynamic d);
+       
+       static void Method (dynamic d)
+       {
+       }
+
+       static void Method (dynamic d, dynamic d2)
+       {
+       }
+
+       static void Method2 (dynamic d, int i)
+       {
+       }
+
+       static void Method2 (out object d)
+       {
+               d = null;
+       }
+
+       public static void Main ()
+       {
+               D d = Method;
+               D2 d2 = Method2;
+       }
+}
+
diff --git a/mcs/tests/dtest-020.cs b/mcs/tests/dtest-020.cs
new file mode 100644 (file)
index 0000000..294989e
--- /dev/null
@@ -0,0 +1,27 @@
+class Class1
+{
+       public int Method1 () { return 1000; }
+}
+
+class Class2<T>
+{
+       public T t;
+}
+
+class Class3 : Class2<dynamic>
+{
+       public void Method2 ()
+       {
+               t.Method1 ();
+       }
+}
+
+class Program
+{
+       public static void Main ()
+       {
+               var c3 = new Class3 ();
+               c3.t = new Class1 ();
+               c3.Method2 ();
+       }
+}
diff --git a/mcs/tests/dtest-021.cs b/mcs/tests/dtest-021.cs
new file mode 100644 (file)
index 0000000..284c68d
--- /dev/null
@@ -0,0 +1,25 @@
+public class T
+{
+       class B
+       {
+               public dynamic this [int i] {
+                       set {
+                               int v = (dynamic) value;
+                       }
+                       get {
+                               return i;
+                       }
+               }
+       }
+
+       public class Program 
+       {
+               public static int Main ()
+               {
+                       B b = new B ();
+                       b [4] = 1;
+                       dynamic d = b [9];
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/dtest-022.cs b/mcs/tests/dtest-022.cs
new file mode 100644 (file)
index 0000000..a204674
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+public class C
+{
+       static void M<T> (T t) where T : new ()
+       {
+       }
+
+       public static int Main ()
+       {
+               M<dynamic> (null);
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-023.cs b/mcs/tests/dtest-023.cs
new file mode 100644 (file)
index 0000000..9b4602c
--- /dev/null
@@ -0,0 +1,16 @@
+struct S
+{
+}
+
+class C
+{
+       public static int Main ()
+       {
+               dynamic d = new S ();
+               bool b = d is S;
+               if (!b)
+                       return 1;
+               
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-024.cs b/mcs/tests/dtest-024.cs
new file mode 100644 (file)
index 0000000..cf4d1f2
--- /dev/null
@@ -0,0 +1,23 @@
+using System;
+
+// Tests private accessibility for dynamic binder
+
+class Test
+{
+       private delegate int D ();
+       private int field = 9;
+
+       public static int Main ()
+       {
+               D del = () => 5;
+               dynamic d = del;
+               if (d () != 5)
+                       return 1;
+
+               d = new Test ();
+               if (d.field != 9)
+                       return 2;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-025.cs b/mcs/tests/dtest-025.cs
new file mode 100644 (file)
index 0000000..6e5912a
--- /dev/null
@@ -0,0 +1,13 @@
+class C
+{
+       public static int Main ()
+       {
+               int? x = null;
+               dynamic y = 50;
+               int v =  x.GetValueOrDefault(y);
+               if (v != 50)
+                       return 1;
+               
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-026.cs b/mcs/tests/dtest-026.cs
new file mode 100644 (file)
index 0000000..09790ed
--- /dev/null
@@ -0,0 +1,21 @@
+// Dynamic and value types
+
+struct S
+{
+       public int Value;
+}
+
+class C
+{
+       static dynamic f;
+       
+       public static int Main ()
+       {
+               f = new S ();
+               f.Value = 5;
+               if (f.Value != 5)
+                       return 1;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-027.cs b/mcs/tests/dtest-027.cs
new file mode 100644 (file)
index 0000000..ab8431b
--- /dev/null
@@ -0,0 +1,33 @@
+class C
+{
+       public int M (object d, long s)
+       {
+               return 1;
+       }
+       
+       public int M (long s, object d)
+       {
+               return 2;
+       }
+
+       public int M (dynamic d, dynamic s)
+       {
+               return 3;
+       }
+}
+
+public class Test
+{
+       public static int Main ()
+       {
+               dynamic d = new C ();
+               byte s = 5;
+               object o = 2;
+               int v = d.M (s, o);
+               
+               if (v != 2)
+                       return 1;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-028.cs b/mcs/tests/dtest-028.cs
new file mode 100644 (file)
index 0000000..65b6b1a
--- /dev/null
@@ -0,0 +1,32 @@
+class C
+{
+       public void MethodRef (ref int a)
+       {
+               a += 10;
+       }
+       
+       public void MethodOut (out ushort a)
+       {
+               a = 40;
+       }
+}
+
+public class Test
+{
+       public static int Main ()
+       {
+               dynamic d = new C ();
+               int i = 1;
+               
+               d.MethodRef (ref i);
+               if (i != 11)
+                       return 1;
+
+               ushort u = 9;
+               d.MethodOut (out u);
+               if (u != 40)
+                       return 2;
+               
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-029.cs b/mcs/tests/dtest-029.cs
new file mode 100644 (file)
index 0000000..3c2af4b
--- /dev/null
@@ -0,0 +1,35 @@
+class C
+{
+       static bool Test<T, U>(T t, U u)
+       {
+               dynamic d1 = 1;
+               dynamic d2 = "a";
+               return d1 == t && d2 == u;
+       }
+       
+       static bool Test2(int i)
+       {
+               dynamic d1 = 1;
+               return d1 == i;
+       }
+       
+       public static int Main ()
+       {
+               if (!Test (1, "a"))
+                       return 1;
+               
+               if (Test (2, "a"))
+                       return 2;
+
+               if (Test (1, "----"))
+                       return 3;
+
+               if (!Test2 (1))
+                       return 4;
+
+               if (Test2 (2))
+                       return 5;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/dtest-implicitarray-01.cs b/mcs/tests/dtest-implicitarray-01.cs
new file mode 100644 (file)
index 0000000..b14e374
--- /dev/null
@@ -0,0 +1,14 @@
+public class C
+{
+       void Method ()
+       {
+       }
+       
+       public static int Main ()
+       {
+               dynamic d = new C ();
+               var a = new [] { d, (object) null };
+               a[0].Method();
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/dtest-iter-01.cs b/mcs/tests/dtest-iter-01.cs
new file mode 100644 (file)
index 0000000..6ce2a46
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+static class Program
+{
+       public static IEnumerable<dynamic> D1 ()
+       {
+               yield break;
+       }
+
+       public static IEnumerable<Func<dynamic>> D2 ()
+       {
+               yield break;
+       }
+
+       static void Main ()
+       {
+       }
+}
\ No newline at end of file
index ad4d52db5dce71efe63edd9cade019ea82a7a470..75ab7feb8b071f7d0bb62b1ffec31d5630c5b35a 100644 (file)
@@ -1,4 +1,4 @@
-// Compiler options: -t:library\r
-\r
-public class A<TB, TC> where TC : A<TB, TC> { }\r
+// Compiler options: -t:library
+
+public class A<TB, TC> where TC : A<TB, TC> { }
 public class B<TC> where TC : A<B<TC>, TC> { }
index ea00831aecb3ca36251c2bc6ee434c779c9fb532..59510d13b0149fccfdc1c7448ba241a957c1f09a 100644 (file)
@@ -1,25 +1,25 @@
-using System;\r
-\r
-class C<T>\r
-{\r
-       public static int Foo;\r
-}\r
-\r
-class X\r
-{\r
-       public static void Main ()\r
-       {\r
-       }\r
-       \r
-       void Test<T> (T A)\r
-       {\r
-               A<T> ();\r
-               \r
-               object C;\r
-               var c = C<int>.Foo;\r
-       }\r
-       \r
-       static void A<U> ()\r
-       {\r
-       }\r
-}\r
+using System;
+
+class C<T>
+{
+       public static int Foo;
+}
+
+class X
+{
+       public static void Main ()
+       {
+       }
+       
+       void Test<T> (T A)
+       {
+               A<T> ();
+               
+               object C;
+               var c = C<int>.Foo;
+       }
+       
+       static void A<U> ()
+       {
+       }
+}
index ab91bee5ba99714ccf1b791d01c601d56d830f46..7840a15b4e3d5ab51a671e52ff5e539d9dbedc04 100644 (file)
@@ -1,97 +1,97 @@
-using System;\r
-using System.Collections.Generic;\r
-\r
-namespace Test\r
-{\r
-       internal struct TestClass4<T> : IEquatable<TestClass4<T>>, IEquatable<T>, IEqualityComparer<TestClass4<T>> where T : class\r
-       {\r
-               public bool Equals (T obj)\r
-               {\r
-                       return true;\r
-               }\r
-\r
-               public bool Equals (TestClass4<T> entry)\r
-               {\r
-                       return true;\r
-               }\r
-\r
-               public bool Equals (TestClass4<T> x, TestClass4<T> y)\r
-               {\r
-                       return x.Equals (y);\r
-               }\r
-\r
-               public int GetHashCode (TestClass4<T> obj)\r
-               {\r
-                       return obj.GetHashCode ();\r
-               }\r
-\r
-               public override int GetHashCode ()\r
-               {\r
-                       return 1;\r
-               }\r
-\r
-               public override bool Equals (object obj)\r
-               {\r
-                       return false;\r
-               }\r
-\r
-               public static bool operator == (TestClass4<T> entry1, TestClass4<T> entry2)\r
-               {\r
-                       return entry1.Equals (entry2);\r
-               }\r
-\r
-               public static bool operator == (T entry1, TestClass4<T> entry2)\r
-               {\r
-                       return entry2.Equals (entry1);\r
-               }\r
-\r
-               public static bool operator == (TestClass4<T> entry1, T entry2)\r
-               {\r
-                       return entry1.Equals (entry2);\r
-               }\r
-\r
-               public static bool operator == (object entry1, TestClass4<T> entry2)\r
-               {\r
-                       return entry2.Equals (entry1);\r
-               }\r
-\r
-               public static bool operator == (TestClass4<T> entry1, object entry2)\r
-               {\r
-                       return entry1.Equals (entry2);\r
-               }\r
-\r
-               public static bool operator != (TestClass4<T> entry1, TestClass4<T> entry2)\r
-               {\r
-                       return !(entry1 == entry2);\r
-               }\r
-\r
-               public static bool operator != (T entry1, TestClass4<T> entry2)\r
-               {\r
-                       return !(entry1 == entry2);\r
-               }\r
-\r
-               public static bool operator != (TestClass4<T> entry1, T entry2)\r
-               {\r
-                       return !(entry1 == entry2);\r
-               }\r
-\r
-               public static bool operator != (object entry1, TestClass4<T> entry2)\r
-               {\r
-                       return !(entry1 == entry2);\r
-               }\r
-\r
-               public static bool operator != (TestClass4<T> entry1, object entry2)\r
-               {\r
-                       return !(entry1 == entry2);\r
-               }\r
-       }\r
-\r
-       class C\r
-       {\r
-               public static void Main ()\r
-               {\r
-                       new TestClass4<string> ();\r
-               }\r
-       }\r
-}\r
-\r
+using System;
+using System.Collections.Generic;
+
+namespace Test
+{
+       internal struct TestClass4<T> : IEquatable<TestClass4<T>>, IEquatable<T>, IEqualityComparer<TestClass4<T>> where T : class
+       {
+               public bool Equals (T obj)
+               {
+                       return true;
+               }
+
+               public bool Equals (TestClass4<T> entry)
+               {
+                       return true;
+               }
+
+               public bool Equals (TestClass4<T> x, TestClass4<T> y)
+               {
+                       return x.Equals (y);
+               }
+
+               public int GetHashCode (TestClass4<T> obj)
+               {
+                       return obj.GetHashCode ();
+               }
+
+               public override int GetHashCode ()
+               {
+                       return 1;
+               }
+
+               public override bool Equals (object obj)
+               {
+                       return false;
+               }
+
+               public static bool operator == (TestClass4<T> entry1, TestClass4<T> entry2)
+               {
+                       return entry1.Equals (entry2);
+               }
+
+               public static bool operator == (T entry1, TestClass4<T> entry2)
+               {
+                       return entry2.Equals (entry1);
+               }
+
+               public static bool operator == (TestClass4<T> entry1, T entry2)
+               {
+                       return entry1.Equals (entry2);
+               }
+
+               public static bool operator == (object entry1, TestClass4<T> entry2)
+               {
+                       return entry2.Equals (entry1);
+               }
+
+               public static bool operator == (TestClass4<T> entry1, object entry2)
+               {
+                       return entry1.Equals (entry2);
+               }
+
+               public static bool operator != (TestClass4<T> entry1, TestClass4<T> entry2)
+               {
+                       return !(entry1 == entry2);
+               }
+
+               public static bool operator != (T entry1, TestClass4<T> entry2)
+               {
+                       return !(entry1 == entry2);
+               }
+
+               public static bool operator != (TestClass4<T> entry1, T entry2)
+               {
+                       return !(entry1 == entry2);
+               }
+
+               public static bool operator != (object entry1, TestClass4<T> entry2)
+               {
+                       return !(entry1 == entry2);
+               }
+
+               public static bool operator != (TestClass4<T> entry1, object entry2)
+               {
+                       return !(entry1 == entry2);
+               }
+       }
+
+       class C
+       {
+               public static void Main ()
+               {
+                       new TestClass4<string> ();
+               }
+       }
+}
+
index a7ea3b6c7f307f6e4f65b919ef3934c6f7a6a7e5..66a151ba1ddebf3506f76c093109909a1fbd2895 100644 (file)
@@ -1,29 +1,29 @@
-using System;\r
-\r
-class A\r
-{\r
-       static void MA<T> (string s)\r
-       {\r
-       }\r
-\r
-       static void F ()\r
-       {\r
-       }\r
-\r
-       class C\r
-       {\r
-               Func<int> MA;\r
-               int F;\r
-               \r
-               void Foo ()\r
-               {\r
-                       F ();\r
-                       MA<int> ("");\r
-               }\r
-               \r
-               public static void Main ()\r
-               {\r
-                       new C ().Foo ();\r
-               }\r
-       }\r
+using System;
+
+class A
+{
+       static void MA<T> (string s)
+       {
+       }
+
+       static void F ()
+       {
+       }
+
+       class C
+       {
+               Func<int> MA;
+               int F;
+               
+               void Foo ()
+               {
+                       F ();
+                       MA<int> ("");
+               }
+               
+               public static void Main ()
+               {
+                       new C ().Foo ();
+               }
+       }
 }
\ No newline at end of file
diff --git a/mcs/tests/gtest-527.cs b/mcs/tests/gtest-527.cs
new file mode 100644 (file)
index 0000000..b449387
--- /dev/null
@@ -0,0 +1,20 @@
+public static class CoalescingWithGenericsBug
+{
+       class Service { public void Foo () { } }
+
+       static T Provide<T> () where T : class
+       {
+               return FindExisting<T> () ?? System.Activator.CreateInstance<T> ();
+       }
+
+       static T FindExisting<T> () where T : class
+       {
+               return null;
+       }
+
+       static int Main ()
+       {
+               Provide<Service> ().Foo ();
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-528.cs b/mcs/tests/gtest-528.cs
new file mode 100644 (file)
index 0000000..9a3b3f9
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+
+public class GenericType<U> where U : IEquatable<U>
+{
+       public U u;
+}
+
+public class Base
+{
+       public virtual T Test<T> (GenericType<T> gt) where T : IEquatable<T>
+       {
+               return gt.u;
+       }
+}
+
+public class Override : Base
+{
+       public override T Test<T> (GenericType<T> gt)
+       {
+               return base.Test (gt);
+       }
+
+       public static int Main ()
+       {
+               Base b = new Override ();
+               b.Test (new GenericType<int> ());
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-529.cs b/mcs/tests/gtest-529.cs
new file mode 100644 (file)
index 0000000..ea42c75
--- /dev/null
@@ -0,0 +1,32 @@
+using System;
+
+public class GenericType<U, V> where U : IEquatable<U> where V : IEquatable<V>
+{
+       public U u;
+}
+
+public class Base<V> where V : IEquatable<V>
+{
+       public virtual T Test<T> (GenericType<T, V> gt) where T : IEquatable<T>
+       {
+               return gt.u;
+       }
+}
+
+public class Override<W> : Base<W> where W : IEquatable<W>
+{
+       public override T Test<T> (GenericType<T, W> gt)
+       {
+               return base.Test (gt);
+       }
+}
+
+class M
+{
+       public static int Main ()
+       {
+               Base<byte> b = new Override<byte> ();
+               b.Test (new GenericType<int, byte> ());
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-530.cs b/mcs/tests/gtest-530.cs
new file mode 100644 (file)
index 0000000..85d1fb6
--- /dev/null
@@ -0,0 +1,25 @@
+class B : B2.IB
+{
+       public interface IA
+       {
+       }
+       
+       public static void Main ()
+       {
+       }
+}
+
+class B2 : A
+{
+       public interface IB
+       {
+       }
+}
+
+class A : G<int>
+{
+}
+
+class G<T>
+{
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-531.cs b/mcs/tests/gtest-531.cs
new file mode 100644 (file)
index 0000000..3cf23b5
--- /dev/null
@@ -0,0 +1,43 @@
+class ATop<T> : IA<T>
+{
+       IA<T> list;
+       
+       T[] IB<T>.ToArray (T[] t)
+       {
+               return null;
+       }
+       
+       void IC.ToArray ()
+       {
+       }
+       
+       public void Test ()
+       {
+               list = this;
+               list.ToArray (new T [0]);
+               list.ToArray ();
+       }
+}
+
+interface IA<U> : IC, IB<U>
+{
+}
+
+interface IB<V> : IC
+{
+       V[] ToArray (V[] array);
+}
+
+interface IC
+{
+       void ToArray ();
+}
+
+class M
+{
+       static int Main ()
+       {
+               new ATop<short>().Test ();
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-532-lib.cs b/mcs/tests/gtest-532-lib.cs
new file mode 100644 (file)
index 0000000..2f3db35
--- /dev/null
@@ -0,0 +1,7 @@
+// Compiler options: -t:library
+
+public interface IServicesContainer
+{
+       void Register<I, T> () where T : I;
+       void Register<I> (object instance);
+}
diff --git a/mcs/tests/gtest-532.cs b/mcs/tests/gtest-532.cs
new file mode 100644 (file)
index 0000000..c42cc45
--- /dev/null
@@ -0,0 +1,26 @@
+// Compiler options: -r:gtest-532-lib.dll
+
+using System;
+
+public class DictionaryServicesContainer : IServicesContainer
+{
+       public void Register<I, T> () where T : I
+       {
+               throw new NotImplementedException ();
+       }
+
+       public void Register<I> (object instance)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public I Resolve<I> ()
+       {
+               throw new NotImplementedException ();
+       }
+
+       public static void Main ()
+       {
+               new DictionaryServicesContainer ();
+       }
+}
diff --git a/mcs/tests/gtest-533.cs b/mcs/tests/gtest-533.cs
new file mode 100644 (file)
index 0000000..dafc015
--- /dev/null
@@ -0,0 +1,24 @@
+public class List<X>
+{
+       public class Comp<Y>
+       {
+               public List<Y>.Comp<X> flip (Y y, X x)
+               {
+                       return new Flip<Y> (this);
+               }
+       }
+       public class Flip<Z> : List<Z>.Comp<X>
+       {
+               Comp<Z> c;
+               public Flip (Comp<Z> cc) { c = cc; }
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               var a = new List<short>.Comp<bool> ().flip (true, 3);
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-534-lib.cs b/mcs/tests/gtest-534-lib.cs
new file mode 100644 (file)
index 0000000..f29f03a
--- /dev/null
@@ -0,0 +1,10 @@
+// Compiler options: -t:library
+
+public interface IG<T>
+{
+}
+
+public interface IA
+{
+       void Method (IG<double[][]> arg);
+}
diff --git a/mcs/tests/gtest-534.cs b/mcs/tests/gtest-534.cs
new file mode 100644 (file)
index 0000000..3225663
--- /dev/null
@@ -0,0 +1,14 @@
+// Compiler options: -r:gtest-534-lib.dll
+
+class A : IA
+{
+       public void Method (IG<double[][]> arg)
+       {
+       }
+       
+       public static int Main ()
+       {
+               new A ().Method (null);
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-535.cs b/mcs/tests/gtest-535.cs
new file mode 100644 (file)
index 0000000..9a35120
--- /dev/null
@@ -0,0 +1,27 @@
+class G<T> where T : class
+{
+}
+
+class A
+{
+       static int Foo<T> (T a, G<T> y) where T : class
+       {
+               return 1;
+       }
+
+       static int Foo<T> (T a, object y)
+       {
+               return 2;
+       }
+
+       public static int Main ()
+       {
+               if (A.Foo<int> (99, null) != 2)
+                       return 1;
+
+               if (A.Foo (66, null) != 2)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-exmethod-37.cs b/mcs/tests/gtest-exmethod-37.cs
new file mode 100644 (file)
index 0000000..37241a0
--- /dev/null
@@ -0,0 +1,38 @@
+using System;
+
+static class S
+{
+       public static void Extension (this A b, string s, bool n)
+       {
+               throw new ApplicationException ("wrong overload");
+       }
+}
+
+class A
+{
+       public void Extension (string s)
+       {
+       }
+}
+
+class Test
+{
+       static void TestMethod (Action<bool> arg)
+       {
+       }
+
+       static int TestMethod (Action<string> arg)
+       {
+               arg ("hola");
+               return 2;
+       }
+
+       public static int Main ()
+       {
+               var a = new A ();
+               if (TestMethod (a.Extension) != 2)
+                       return 1;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-exmethod-38.cs b/mcs/tests/gtest-exmethod-38.cs
new file mode 100644 (file)
index 0000000..df40362
--- /dev/null
@@ -0,0 +1,35 @@
+using System;
+
+namespace Repro2
+{
+       struct Color
+       {
+               public static Color Black = new Color (0);
+               public static Color White = new Color (255);
+               public static Color Transparent = new Color (-1);
+
+               public int ID;
+
+               public Color (int id)
+               {
+                       this.ID = id;
+               }
+       }
+
+       static class ExtensionMethods
+       {
+               public static Color Transparent (this Color c)
+               {
+                       return Color.White;
+               }
+       }
+
+       class MainClass
+       {
+               public static int Main ()
+               {
+                       var c = Color.Black.Transparent ();
+                       return 0;
+               }
+       }
+}
index 66e9083015ca76d827941c99644f497ba49ab706..184b5138ca0b8d9ef4c53795bfa33368ac5c8ac4 100644 (file)
@@ -23,6 +23,8 @@ public class Test
                const byte b = 100;
                var a7 = new[] { b, 10, b, 999, b };
                
+               var a8 = new[] { new Test (), 22,  new object(), string.Empty, null };
+               
                return 0;
        }
 }
diff --git a/mcs/tests/gtest-iter-15.cs b/mcs/tests/gtest-iter-15.cs
new file mode 100644 (file)
index 0000000..4955cee
--- /dev/null
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+internal class C<TFirst>
+{
+       internal struct VSlot<T>
+       {
+               public readonly T Value;
+
+               public VSlot (T value)
+               {
+                       Value = value;
+               }
+       }
+
+       internal IEnumerable<V> GetEnumerable<V> (IEnumerable<VSlot<V>> input)
+       {
+               foreach (var v in input)
+                       yield return v.Value;
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               var c = new C<long> ();
+               string value = null;
+               foreach (var v in c.GetEnumerable (new[] { new C<long>.VSlot<string> ("foo") })) {
+                       value = v;
+               }
+
+               if (value != "foo")
+                       return 1;
+
+               return 0;
+       }
+}
index add699bec111eab0f551d7ff57178deaebc4c027..8c3b5d4ac07355ebe6d698b33e892fe43b01c079 100644 (file)
@@ -1,29 +1,29 @@
-using System;\r
-using System.Linq;\r
-\r
-class A\r
-{\r
-       public int Value;\r
-}\r
-\r
-class C\r
-{\r
-       A[] Prop {\r
-               get {\r
-                       return new A [1] { new A () };\r
-               }\r
-       }\r
-       \r
-       void Test ()\r
-       {\r
-               int i = 9;\r
-               var c = new C ();\r
-               var r = Prop.Select (l => l.Value).ToArray ();\r
-       }\r
-       \r
-       public static int Main ()\r
-       {\r
-               new C().Test ();\r
-               return 0;\r
-       }\r
-}\r
+using System;
+using System.Linq;
+
+class A
+{
+       public int Value;
+}
+
+class C
+{
+       A[] Prop {
+               get {
+                       return new A [1] { new A () };
+               }
+       }
+       
+       void Test ()
+       {
+               int i = 9;
+               var c = new C ();
+               var r = Prop.Select (l => l.Value).ToArray ();
+       }
+       
+       public static int Main ()
+       {
+               new C().Test ();
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-named-03.cs b/mcs/tests/gtest-named-03.cs
new file mode 100644 (file)
index 0000000..144a33b
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+
+public class C
+{
+       static int Foo (int a, int b = 1, int c = 1)
+       {
+               return a;
+       }
+
+       public static int Main ()
+       {
+               if (Foo (c: 5, a: 10) != 10)
+                       return 1;
+
+               if (Foo (a: 10) != 10)
+                       return 2;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-optional-09.cs b/mcs/tests/gtest-optional-09.cs
new file mode 100644 (file)
index 0000000..6b7df25
--- /dev/null
@@ -0,0 +1,106 @@
+using System;
+
+public class Program
+{
+       static int Test_1 (int i, sbyte s = 1)
+       {
+               return 1;
+       }
+
+       static int Test_1<T> (T s)
+       {
+               return 0;
+       }
+
+       static int Test_1 (int i, long s = 1)
+       {
+               return 2;
+       }
+
+       static int Test_2 (short s)
+       {
+               return 1;
+       }
+
+       static int Test_2 (int i, sbyte s = 1)
+       {
+               return 0;
+       }
+
+       static int Test_3 (string s)
+       {
+               return 0;
+       }
+
+       static int Test_3 (string s, sbyte s2 = 1)
+       {
+               return 1;
+       }
+
+       static int Test_4 (object o = null)
+       {
+               return 1;
+       }
+
+       static int Test_4 (params object[] a)
+       {
+               return 0;
+       }
+
+       static int Test_5 ()
+       {
+               return 0;
+       }
+
+       static int Test_5 (int i = 1, params object[] a)
+       {
+               return 1;
+       }
+
+       static int Test_6 (params object[] o)
+       {
+               return 0;
+       }
+
+       static int Test_6 (int i = 1, params object[] a)
+       {
+               return 1;
+       }
+
+       static int Test_7 (bool b, params object[] o)
+       {
+               return 0;
+       }
+
+       static int Test_7 (bool b, int i = 1, params object[] a)
+       {
+               return 1;
+       }
+
+       static int Main ()
+       {
+               if (Test_1 (5) != 0)
+                       return 1;
+
+               if (Test_2 (6) != 0)
+                       return 2;
+
+               if (Test_3 ("") != 0)
+                       return 3;
+
+               if (Test_4 (null) != 0)
+                       return 4;
+
+               if (Test_5 () != 0)
+                       return 5;
+
+               if (Test_6 () != 0)
+                       return 6;
+
+               if (Test_7 (false) != 0)
+                       return 7;
+
+               Console.WriteLine ("ok");
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-optional-10.cs b/mcs/tests/gtest-optional-10.cs
new file mode 100644 (file)
index 0000000..bd0e645
--- /dev/null
@@ -0,0 +1,18 @@
+public class Program
+{      
+       static void Main()
+       {
+               new Program<object>();
+       }
+}
+
+public class Program<T>
+{
+       public Program(Generic<T> generic = null)
+       {
+       }
+}
+
+public class Generic<T>
+{      
+}
diff --git a/mcs/tests/gtest-optional-11.cs b/mcs/tests/gtest-optional-11.cs
new file mode 100644 (file)
index 0000000..a97b41d
--- /dev/null
@@ -0,0 +1,38 @@
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+public class C
+{
+       public static int TestA ([Optional][DefaultParameterValue (1)] int u)
+       {
+               return u;
+       }
+
+       public static T TestB<T> (T a, [Optional] T u)
+       {
+               return u;
+       }
+       
+       public static object TestC ([Optional] object a)
+       {
+               return a;
+       }
+
+       public static int Main ()
+       {
+               if (TestA () != 1)
+                       return 1;
+
+               if (TestB (-4) != 0)
+                       return 2;
+
+               if (TestB ((object) null) != Missing.Value)
+                       return 3;
+
+               if (TestC () != Missing.Value)
+                       return 4;
+               
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-optional-12.cs b/mcs/tests/gtest-optional-12.cs
new file mode 100644 (file)
index 0000000..f08e34b
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+
+public class C
+{
+       static int M (string s = "s", int k = 0, params int[] args)
+       {
+               return args[1];
+       }
+
+       public static int Main ()
+       {
+               if (M (args: new int[] { 10, 20, 30 }) != 20)
+                       return 1;
+
+               return 0;
+       }
+}
index 1092456a52e0bed51ce2310b4a1da33bce90f82c..758450cd62d115abda18594e406b21e435cc66ba 100644 (file)
@@ -30,15 +30,13 @@ public class MyTest {
        static void Main ()
        {
                Evaluator.Init (new string [0]); //new string [] { "-v", "-v" });
-               //
-               // This fails because of the grammar issue with the pointer type
-               // Evaluate ("multiply", "1*2;", 2);
-               //
+
                Run ("1",      "System.Console.WriteLine (100);");
                Run ("Length", "var a = new int [] {1,2,3}; var b = a.Length;");
                
                Evaluate ("CompareString", "\"foo\" == \"bar\";", false);
                Evaluate ("CompareInt", "var a = 1; a+2;", 3);
+               Evaluate ("Multiply", "2 * 4;", 8);
 
                Evaluator.Run ("using System; using System.Linq;");
                Run ("LINQ-1", "var a = new int[]{1,2,3};\nfrom x in a select x;");
diff --git a/mcs/tests/gtest-variance-14.cs b/mcs/tests/gtest-variance-14.cs
new file mode 100644 (file)
index 0000000..c469afc
--- /dev/null
@@ -0,0 +1,27 @@
+using System;
+
+public class A
+{
+}
+
+public class B : A
+{
+}
+
+public class C : A
+{
+       delegate void D<in T> (T t);
+       delegate T D<out T, U> (U u);
+       
+       public static int Main ()
+       {
+               D<string> d_a = null;
+               D<object> d_b = (D<object>) d_a;
+
+               D<A, string> d2_a = null;
+               D<B, string> d2_b = (D<B, string>) d2_a;
+               D<C, string> d2_c = (D<C, string>) d2_a;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-variance-15.cs b/mcs/tests/gtest-variance-15.cs
new file mode 100644 (file)
index 0000000..7a357ff
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+public class C
+{
+       delegate void D<in T> (T t);
+       
+       static void M<T> (ref T t, D<T> a)
+       {
+               a (t);
+       }
+
+       static void M2<T> (T t, D<T> a)
+       {
+               a (t);
+       }
+       
+       static void MethodArg (object o)
+       {
+       }
+       
+       public static int Main ()
+       {
+               D<object> action = l => Console.WriteLine (l);
+               string s = "value";
+               
+               M (ref s, action);
+               M2 (s, action);
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-variance-16.cs b/mcs/tests/gtest-variance-16.cs
new file mode 100644 (file)
index 0000000..0910935
--- /dev/null
@@ -0,0 +1,31 @@
+using System;
+
+struct S
+{
+       public static implicit operator string (S s)
+       {
+               return "s";
+       }
+}
+
+interface I<in T>
+{
+}
+
+class C : I<string>
+{
+       static T Foo<T> (T a, I<T> b)
+       {
+               return a;
+       }
+       
+       public static int Main ()
+       {
+               S s = new S ();
+               I<string> i = new C ();
+               if (Foo (s, i) != "s")
+                       return 1;
+
+               return 0;
+       }
+}
index a594242f3af1d35612dcfcd0cab647e5c7d5a5d6..65563c460aed3e195785a7af3008a252790ea083 100644 (file)
@@ -7,9 +7,9 @@
 test-xml-027.cs
 
 gtest-230.cs
-gtest-316.cs verifier
 gtest-437.cs
 
+test-106.cs bug #628662
 test-416.cs bug #504085
 test-418.cs bug #504085
 test-454.cs bug #593342
@@ -19,4 +19,4 @@ test-715.cs bug #504085
 test-759.cs IGNORE bug #604218
 
 test-xml-030.cs
-
+test-xml-035.cs
index ce9791b998db2c6dfb3696e22617c42a32fc9888..65563c460aed3e195785a7af3008a252790ea083 100644 (file)
@@ -7,9 +7,9 @@
 test-xml-027.cs
 
 gtest-230.cs
-gtest-316.cs verifier
 gtest-437.cs
 
+test-106.cs bug #628662
 test-416.cs bug #504085
 test-418.cs bug #504085
 test-454.cs bug #593342
index 6bdd6c1fadea26ec8c97cde4680eb8d3c03f6a04..c4d7a7761b505c380f27b8ae9045281d832f2336 100644 (file)
@@ -2,49 +2,45 @@ using System;
 using System.Threading;
 using System.Runtime.InteropServices;
 
-class Test {
+class Test
+{
        delegate int SimpleDelegate (int a);
 
        static int cb_state = 0;
-       
-       static int F (int a) {
+
+       static int F (int a)
+       {
                Console.WriteLine ("Test.F from delegate: " + a);
-               throw new NotImplementedException ();
+               throw new NotImplementedException ("F");
        }
 
        static void async_callback (IAsyncResult ar)
        {
                Console.WriteLine ("Async Callback " + ar.AsyncState);
                cb_state = 1;
-               throw new NotImplementedException ();
        }
-       
-       static int Main () {
+
+       static int Main ()
+       {
                SimpleDelegate d = new SimpleDelegate (F);
                AsyncCallback ac = new AsyncCallback (async_callback);
                string state1 = "STATE1";
                int res = 0;
-               
+
+               // Call delegate via ThreadPool and check that the exception is rethrown correctly
                IAsyncResult ar1 = d.BeginInvoke (1, ac, state1);
 
-               ar1.AsyncWaitHandle.WaitOne ();
+               while (cb_state == 0)
+                       Thread.Sleep (0);
 
                try {
-                       res = d.EndInvoke (ar1);                        
+                       res = d.EndInvoke (ar1);
+                       Console.WriteLine ("NO EXCEPTION");
+                       return 1;
                } catch (NotImplementedException) {
-                       res = 1;
                        Console.WriteLine ("received exception ... OK");
                }
 
-               while (cb_state == 0)
-                       Thread.Sleep (0);
-
-               if (cb_state != 1)
-                       return 1;
-               
-               if (res != 1)
-                       return 2;
-
                return 0;
        }
 }
index 63de7d027789848902311bfb02cd8383babecc51..bd5a7d3111e8da3eb3b53eb1f9836080e45393ce 100644 (file)
@@ -9,11 +9,11 @@ public class Test
         
     public static void Main ()
     {
-        #pragma warning disable 219, 612
+        #pragma warning disable 219     ,       612
         int i = 0;
         Method ();
-        #pragma warning restore 612
-        #pragma warning disable
+        #pragma warning restore 612   // Some comment here
+        #pragma warning disable // Some comment here
         Method ();
         #pragma warning restore
     }
index 49c1d88ca32b029a9c298630343579481b8f4f42..7ed53fdb00f04cc81e4549da58a926e52f917b25 100644 (file)
@@ -1,27 +1,27 @@
-// Compiler options: -warnaserror -warn:4\r
+// Compiler options: -warnaserror -warn:4
 
 using System;
 
-interface IList \r
+interface IList 
 {
        int Count { get; set; }
 }
 
-interface ICounter\r
-{\r
+interface ICounter
+{
        void Count (int i);
 }
-\r
-interface IEx\r
-{\r
-       void Count (params int[] i);\r
-}\r
 
-interface IListCounter: IEx, IList, ICounter\r
-{\r
+interface IEx
+{
+       void Count (params int[] i);
+}
+
+interface IListCounter: IEx, IList, ICounter
+{
 }
 
-class Test\r
+class Test
 {
        static void Foo (IListCounter t)
        {
index 4e421e0ffb660048c0a14ea13117d0d455d0b5a3..f3df83c242bb1c6104f53781956894915eff2866 100644 (file)
@@ -1,35 +1,35 @@
-using System;\r
-\r
-class Program\r
-{\r
-       static int Main ()\r
-       {\r
-               B b = new B ();\r
-               if (b.Message != "OK")\r
-                       return 1;\r
-               return 0;\r
-       }\r
-}\r
-\r
-class A\r
-{\r
-       public virtual string Message\r
-       {\r
-               get\r
-               {\r
-                       return "OK";\r
-               }\r
-       }\r
-}\r
-\r
-class B : A\r
-{\r
-       new string Message\r
-       {\r
-               get\r
-               {\r
-                       throw new Exception ();\r
-               }\r
-       }\r
-}\r
-\r
+using System;
+
+class Program
+{
+       static int Main ()
+       {
+               B b = new B ();
+               if (b.Message != "OK")
+                       return 1;
+               return 0;
+       }
+}
+
+class A
+{
+       public virtual string Message
+       {
+               get
+               {
+                       return "OK";
+               }
+       }
+}
+
+class B : A
+{
+       new string Message
+       {
+               get
+               {
+                       throw new Exception ();
+               }
+       }
+}
+
diff --git a/mcs/tests/test-789.cs b/mcs/tests/test-789.cs
new file mode 100644 (file)
index 0000000..c91de6f
--- /dev/null
@@ -0,0 +1,10 @@
+using System;
+
+class Program {
+    static void Main ()
+    {
+        Action action = () => Console.WriteLine (1);
+        action += null;
+        action ();
+    }
+}
diff --git a/mcs/tests/test-790.cs b/mcs/tests/test-790.cs
new file mode 100644 (file)
index 0000000..b3daa39
--- /dev/null
@@ -0,0 +1,42 @@
+struct S
+{
+       public S (double d)
+       {
+       }
+}
+
+enum E
+{
+}
+
+struct Test
+{
+       static void Verify_1 (out Test a, out Test b)
+       {
+               a = b = new Test ();
+       }
+
+       static void Verify_2 (ref S a, ref S b)
+       {
+               a = b = new S (4.31);
+       }
+
+       static void Verify_3 (out E a, out E b)
+       {
+               a = b = new E ();
+       }
+
+       public static int Main ()
+       {
+               Test t1, t2;
+               Verify_1 (out t1, out t2);
+
+               S s1, s2;
+               Verify_2 (ref s1, ref s2);
+
+               E e1, e2;
+               Verify_3 (out e1, out e2);
+               return 0;
+       }
+}
+
diff --git a/mcs/tests/test-791.cs b/mcs/tests/test-791.cs
new file mode 100644 (file)
index 0000000..2e5ccca
--- /dev/null
@@ -0,0 +1,45 @@
+using System;
+using System.Collections;
+
+namespace testApp
+{
+       public interface IA
+       {
+               bool GetEnumerator ();
+       }
+
+       public interface IC : IA, IEnumerable
+       {
+       }
+
+       public class TestApp : IC
+       {
+               public static int Main ()
+               {
+                       IC ic = new TestApp ();
+                       foreach (int v in ic) {
+                       }
+
+                       return 0;
+               }
+
+               #region IA Members
+
+               public bool GetEnumerator ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               #endregion
+
+               #region IEnumerable Members
+
+               IEnumerator IEnumerable.GetEnumerator ()
+               {
+                       return new int[0].GetEnumerator ();
+               }
+
+               #endregion
+       }
+}
+
diff --git a/mcs/tests/test-792-lib.il b/mcs/tests/test-792-lib.il
new file mode 100644 (file)
index 0000000..e7d4b8b
--- /dev/null
@@ -0,0 +1,61 @@
+.assembly extern mscorlib
+{
+}
+
+.assembly extern 'missing-lib'
+{
+}
+
+.assembly 'test-792-lib'
+{
+}
+
+.module 'test-792-lib.dll'
+
+.class public auto ansi beforefieldinit A
+       extends [mscorlib]System.Attribute
+{
+  .method public hidebysig specialname rtspecialname 
+          instance void  .ctor(class [mscorlib]System.Type 'type') cil managed
+  {
+    .maxstack  8
+    IL_0000:  ldarg.0
+    IL_0001:  call       instance void [mscorlib]System.Attribute::.ctor()
+    IL_0006:  ret
+  }
+}
+
+.class public auto ansi beforefieldinit X extends [mscorlib]System.Object
+{
+  .custom instance void A::.ctor(class [mscorlib]System.Type) = ( 01 00 44 58 58 2C 20 62 75 67 2D 31 2D 6C 69 62   // ..DXX, missing-lib
+                                                                  2C 20 56 65 72 73 69 6F 6E 3D 30 2E 30 2E 30 2E   // , Version=0.0.0.
+                                                                  30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72   // 0, Culture=neutr
+                                                                  61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B   // al, PublicKeyTok
+                                                                  65 6E 3D 6E 75 6C 6C 00 00 )                      // en=null..
+  .custom instance void [mscorlib]System.ObsoleteAttribute::.ctor() = ( 01 00 00 00 ) 
+  .field private class [mscorlib]System.Collections.Generic.List`1<valuetype ['missing-lib']XX> field2
+  .field private class ['missing-lib']XX field3
+  .method public hidebysig specialname rtspecialname 
+          instance void  .ctor() cil managed
+  {
+    .maxstack  8
+    IL_0000:  ldarg.0
+    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
+    IL_0006:  ret
+  }
+}
+
+.class public auto ansi beforefieldinit MultipleSameNames extends [mscorlib]System.Object
+{
+  .field private class [mscorlib]System.Int32 AA
+  .field public class [mscorlib]System.String AA
+  
+  .method public hidebysig specialname rtspecialname 
+          instance void  .ctor() cil managed
+  {
+    .maxstack  8
+    IL_0000:  ldarg.0
+    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
+    IL_0006:  ret
+  }  
+}
\ No newline at end of file
diff --git a/mcs/tests/test-792.cs b/mcs/tests/test-792.cs
new file mode 100644 (file)
index 0000000..2c4aacc
--- /dev/null
@@ -0,0 +1,19 @@
+// Compiler options: -r:test-792-lib.dll
+
+// Compilation test only for missing 2nd level dependecies
+
+class Program
+{
+       void Test ()
+       {
+               new X();
+               
+               var s = new MultipleSameNames ();
+               s.AA = "1";
+       }
+
+       static void Main ()
+       {
+       }
+}
+
diff --git a/mcs/tests/test-793.cs b/mcs/tests/test-793.cs
new file mode 100644 (file)
index 0000000..688a1ca
--- /dev/null
@@ -0,0 +1,35 @@
+// Compiler options: -unsafe
+
+using System;
+
+namespace MonoPointerBugTest
+{
+       struct MyStructure
+       {
+               int q;
+               int z;
+               int a;
+       }
+
+       class Program
+       {
+               static int Main ()
+               {
+                       unsafe {
+                               MyStructure structure = new MyStructure ();
+
+                               MyStructure* pointer1 = &structure;
+                               MyStructure* pointer2 = pointer1;
+
+                               //on the Mac this works like: pointer2++;
+                               pointer2 += 10;
+
+                               int difference = (int) ((byte*) pointer2 - (byte*) pointer1);
+                               if (difference != 120)
+                                       return 1;
+
+                               return 0;
+                       }
+               }
+       }
+}
diff --git a/mcs/tests/test-794.cs b/mcs/tests/test-794.cs
new file mode 100644 (file)
index 0000000..293c0f1
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+internal interface IA
+{
+       void SomeMethod ();
+}
+
+public class C : IA
+{
+       public static void Main ()
+       {
+               new C ().TestCallOnly ();
+       }
+
+       // The body should contain call (not callvirt) only
+       void TestCallOnly ()
+       {
+               int i = 0;
+               var v = new int[0].GetType ();
+
+               new C ().SomeMethod ();
+               this.SomeMethod ();
+               typeof (C).GetType ();
+               new Action (SomeMethod).GetType ();
+       }
+
+       public void SomeMethod ()
+       {
+       }
+}
diff --git a/mcs/tests/test-795.cs b/mcs/tests/test-795.cs
new file mode 100644 (file)
index 0000000..ba533ce
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.Reflection;
+
+public class Test : MarshalByRefObject
+{
+       public DateTime Stamp = new DateTime (1968, 1, 2);
+
+       public static int Main ()
+       {
+               var setup = new AppDomainSetup();
+               setup.ApplicationBase = System.Environment.CurrentDirectory;
+
+               AppDomain d = AppDomain.CreateDomain ("foo", AppDomain.CurrentDomain.Evidence, setup);
+
+               Test t = (Test) d.CreateInstanceAndUnwrap (Assembly.GetExecutingAssembly().FullName, typeof (Test).FullName);
+               t.Stamp = new DateTime (1968, 1, 3);
+               Console.WriteLine (t.Stamp);
+               return 0;
+       }
+}
diff --git a/mcs/tests/test-796.cs b/mcs/tests/test-796.cs
new file mode 100644 (file)
index 0000000..c4eae06
--- /dev/null
@@ -0,0 +1,22 @@
+// Compiler options: -warnaserror -warn:4
+
+// No CS0649 warnings
+
+using System;
+
+[Foo (Product = "Mono")]
+class Program
+{
+       static void Main ()
+       {
+       }
+}
+
+class FooAttribute : Attribute
+{
+       public string Product;
+
+       public FooAttribute ()
+       {
+       }
+}
diff --git a/mcs/tests/test-797.cs b/mcs/tests/test-797.cs
new file mode 100644 (file)
index 0000000..289289a
--- /dev/null
@@ -0,0 +1,13 @@
+// Compiler options: -warnaserror -debug
+
+#pragma checksum "c:\foo\Pragma.txt" "{606ea660-14cf-cc82-b6f0-42d48170a799}" "AB"
+#pragma checksum "b.txt" "{ee1816fc-aa5e-4d10-8ff7-6f4963833f60}" "EE0BAA"
+#pragma checksum "b.txt" "{ee1816fc-aa5e-4d10-8ff7-6f4963833f60}" "7F9B77ACAA31C1F80B3DA15F6E748916"
+#pragma checksum " " "{00000000-0000-0000-0000-000000000000}" ""  // some comments
+
+class C
+{
+       public static void Main ()
+       {
+       }
+}
diff --git a/mcs/tests/test-798.cs b/mcs/tests/test-798.cs
new file mode 100644 (file)
index 0000000..79510db
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+class A
+{
+       public void Foo (out int a)
+       {
+               a = 100;
+       }
+}
+
+class B : A
+{
+       public void Foo (ref int a)
+       {
+               throw new ApplicationException ("should not be called");
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               int x;
+               new B().Foo (out x);
+               if (x != 100)
+                       return 1;
+               
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-799.cs b/mcs/tests/test-799.cs
new file mode 100644 (file)
index 0000000..999645c
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+
+public class Test2
+{
+       protected internal class Foo
+       {
+       }
+
+       private class Bar
+       {
+               public Bar (Test2.Foo baseArg4)
+               {
+               }
+       }
+       static int Main ()
+       {
+               new Bar (new Foo ());
+               return 0;
+       }
+}
diff --git a/mcs/tests/test-800.cs b/mcs/tests/test-800.cs
new file mode 100644 (file)
index 0000000..0f08ed3
--- /dev/null
@@ -0,0 +1,25 @@
+// Compiler options: -unsafe
+
+struct S
+{
+}
+
+unsafe class C
+{
+       const int***[] m_p = null;
+       const S**[,] m_s2 = null;
+       
+       public static void Main ()
+       {
+               const int*[] c = null;
+               const S*[,] s = null;
+               const void*[][][][] v = null;
+                       
+               const int***[] c2 = m_p;
+               const S**[,] s2 = m_s2;
+               const void**[][] v2 = null;
+               
+               int***[] a1 = m_p;
+               S**[,] a2 = m_s2;
+       }
+}
diff --git a/mcs/tests/test-anon-94-lib.cs b/mcs/tests/test-anon-94-lib.cs
new file mode 100644 (file)
index 0000000..14479c7
--- /dev/null
@@ -0,0 +1,9 @@
+// Compiler options: -t:library
+
+using System;
+
+public class BaseClassLibrary
+{
+       public int i;
+       public virtual void Print (int arg) { Console.WriteLine ("BaseClass.Print"); i = arg; }
+}
index 0c1dfa1b863e8fbb75637dfa7e365b17e00e1722..4406ee895b2fc491942c10220ad42b787aa77d7f 100644 (file)
@@ -1,3 +1,5 @@
+// Compiler options: -r:test-anon-94-lib.dll
+
 using System;
 
 class Program
@@ -16,6 +18,15 @@ class Program
                        a ();
                }
        }
+       
+       public class DerivedLibrary : BaseClassLibrary
+       {
+               public override void Print (int arg)
+               {
+                       Action a = () => base.Print (30);
+                       a ();
+               }
+       }
 
        public static int Main ()
        {
@@ -25,6 +36,12 @@ class Program
                if (d.i != 90)
                        return 1;
 
+               var d2 = new DerivedLibrary ();
+               d2.Print (0);
+
+               if (d2.i != 30)
+                       return 2;
+
                return 0;
        }
 }
diff --git a/mcs/tests/test-anon-96.cs b/mcs/tests/test-anon-96.cs
new file mode 100644 (file)
index 0000000..adad3ff
--- /dev/null
@@ -0,0 +1,54 @@
+using System;
+
+class P
+{
+       public int A;
+}
+
+static class Program
+{
+       static int Extra () { return 36; }
+
+       delegate int D ();
+
+       static D Get (int dummy)
+       {
+               var p = new P { A = 6 };
+               switch (dummy) {
+               case 0:
+                       int extra = Extra ();
+                       return () => p.A + extra;
+               case 1:
+                       extra = 9;
+                       return () => p.A * extra;
+               case 2:
+                       return () => p.A * 2;
+               }
+               throw new NotSupportedException ();
+       }
+
+       static int Run (int i)
+       {
+               return Get (i) ();
+       }
+
+       static int Main ()
+       {
+               if (Run (0) != 42)
+                       return 1;
+
+               if (Run (1) != 54)
+                       return 2;
+
+               if (Run (2) != 12)
+                       return 3;
+
+               if (Run (1) != 54)
+                       return 4;
+
+               if (Run (0) != 42)
+                       return 5;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/test-partial-29.cs b/mcs/tests/test-partial-29.cs
new file mode 100644 (file)
index 0000000..d7ce035
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+static partial class C
+{
+       static partial void Foo_1 (this string s);
+
+       [Obsolete]
+       static partial void Foo_2 (string s);
+
+       static void Main()
+       {
+       }
+}
diff --git a/mcs/tests/test-xml-053-ref.xml b/mcs/tests/test-xml-053-ref.xml
new file mode 100644 (file)
index 0000000..70612af
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>test-xml-053</name>
+    </assembly>
+    <members>
+        <member name="T:Outer`2">
+            <summary>T:Outer`2</summary>
+        </member>
+        <member name="T:Outer`2.Inner`1">
+            <summary>T:Outer`2:Inner`1</summary>
+        </member>
+        <member name="M:Outer`2.Inner`1.Bar(`0@,`1,`2)">
+            <summary>M:Outer`2.Inner`1.Bar(`0@,`1,`2)</summary>
+        </member>
+        <member name="M:Outer`2.CopyTo(`0[],System.Int32)">
+            <summary>M:Outer`2.CopyTo(`0[],System.Int32)</summary>
+        </member>
+        <member name="M:Outer`2.CopyTo(`0[,,],System.Int32)">
+            <summary>M:Outer`2.CopyTo(`0[,,],System.Int32)</summary>
+        </member>
+        <member name="M:Outer`2.CopyTo(`0[,,][,][])">
+            <summary>M:Outer`2.CopyTo(`0[,,][,][])</summary>
+        </member>
+        <member name="M:Outer`2.CopyTo(System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.List{`1}}[],System.Int32)">
+            <summary>M:Outer`2.CopyTo(System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.List{`1}}[],System.Int32)</summary>
+        </member>
+        <member name="M:Outer`2.CopyTo``2(System.Collections.Generic.KeyValuePair{``0,System.Collections.Generic.List{``1}}[],System.Int32)">
+            <summary>M:Outer`2.CopyTo``2(System.Collections.Generic.KeyValuePair{``0,System.Collections.Generic.List{``1}}[],System.Int32)</summary>
+        </member>
+        <member name="M:Outer`2.CopyTo``1(System.Collections.Generic.KeyValuePair{`1,System.Collections.Generic.List{``0}}[],System.Int32)">
+            <summary>M:Outer`2.CopyTo``1(System.Collections.Generic.KeyValuePair{`1,System.Collections.Generic.List{``0}}[],System.Int32)</summary>
+        </member>
+        <member name="M:Outer`2.Foo``1(``0[])">
+            <summary>M:Outer`2.Foo``1(``0[])</summary>
+        </member>
+        <member name="M:Outer`2.Foo``1(``0[],`0)">
+            <summary>M:Outer`2.Foo``1(``0[],`0)</summary>
+        </member>
+        <member name="T:Util">
+            <summary>T:Util</summary>
+        </member>
+        <member name="M:Util.Convert``2(``1[])">
+            <summary>M:Util.Convert``2(``1[])</summary>
+        </member>
+    </members>
+</doc>
diff --git a/mcs/tests/test-xml-053.cs b/mcs/tests/test-xml-053.cs
new file mode 100644 (file)
index 0000000..b402e5e
--- /dev/null
@@ -0,0 +1,71 @@
+// Compiler options: -doc:xml-053.xml
+
+/// <summary>T:Outer`2</summary>
+public class Outer<T, U> {
+       /// <summary>M:Outer`2.CopyTo(`0[],System.Int32)</summary>
+       public void CopyTo(T[] array, int n)
+       {
+       }
+
+       /// <summary>M:Outer`2.CopyTo(`0[,,],System.Int32)</summary>
+       public void CopyTo(T[,,] array, int n)
+       {
+       }
+
+       /// <summary>M:Outer`2.CopyTo(`0[,,][,][])</summary>
+       public void CopyTo(T[][,][,,] array)
+       {
+       }
+
+       /// <summary>M:Outer`2.CopyTo(System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.List{`1}}[],System.Int32)</summary>
+       public void CopyTo(System.Collections.Generic.KeyValuePair<T,System.Collections.Generic.List<U>>[] array, int n)
+       {
+       }
+
+       /// <summary>M:Outer`2.CopyTo``2(System.Collections.Generic.KeyValuePair{``0,System.Collections.Generic.List{``1}}[],System.Int32)</summary>
+       public void CopyTo<W,X>(System.Collections.Generic.KeyValuePair<W,System.Collections.Generic.List<X>>[] array, int n)
+       {
+       }
+
+       /// <summary>M:Outer`2.CopyTo``1(System.Collections.Generic.KeyValuePair{`1,System.Collections.Generic.List{``0}}[],System.Int32)</summary>
+       public void CopyTo<V>(System.Collections.Generic.KeyValuePair<U,System.Collections.Generic.List<V>>[] array, int n)
+       {
+       }
+
+       /// <summary>M:Outer`2.Foo``1(``0[])</summary>
+       public void Foo<T>(T[] array)
+       {
+       }
+
+       /// <summary>M:Outer`2.Foo``1(``0[],`0)</summary>
+       public void Foo<S>(S[] array, T value)
+       {
+       }
+
+       /// <summary>T:Outer`2:Inner`1</summary>
+       public class Inner<V> {
+               /// <summary>M:Outer`2.Inner`1.Bar(`0@,`1,`2)</summary>
+               public static void Bar(ref T t, U u, V v)
+               {
+               }
+       }
+}
+
+/// <summary>T:Util</summary>
+public class Util {
+       // from #624242
+
+       /// <summary>M:Util.Convert``2(``1[])</summary>
+       public static TResult Convert<TResult,TSource>(TSource[] input)
+               where TResult : TSource
+       {
+               return default (TResult);
+       }
+}
+
+class Test {
+       public static void Main ()
+       {
+       }
+}
+
diff --git a/mcs/tests/test-xml-054-ref.xml b/mcs/tests/test-xml-054-ref.xml
new file mode 100644 (file)
index 0000000..8bfa02a
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>test-xml-054</name>
+    </assembly>
+    <members>
+        <member name="T:Container`2">
+            <summary>T:Container`2</summary>
+        </member>
+        <member name="M:Container`2.#ctor">
+            <summary>M:Container`2.#ctor</summary>
+        </member>
+        <member name="T:Container`2.Element">
+            <summary>T:Container`2.Element</summary>
+        </member>
+        <member name="M:Container`2.Element.System#ICloneable#Clone">
+            <summary>M:Container`2.Element.System#ICloneable#Clone</summary>
+        </member>
+        <member name="M:Container`2.Element.Clone">
+            <summary>M:Container`2.Element.Clone</summary>
+        </member>
+        <member name="P:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#Item(System.Int32)">
+            <summary>P:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#Item(System.Int32)</summary>
+        </member>
+        <member name="P:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#IsReadOnly">
+            <summary>P:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#IsReadOnly</summary>
+        </member>
+        <member name="P:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Count">
+            <summary>P:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Count</summary>
+        </member>
+        <member name="M:Container`2.A#I#Bar``1(``0)">
+            <summary>T:Container`2.A#I#Bar``1(``0)</summary>
+        </member>
+        <member name="M:Container`2.A#I#Foo">
+            <summary>T:Container`2.A#I#Foo</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#IEnumerable#GetEnumerator">
+            <summary>M:Container`2.System#Collections#IEnumerable#GetEnumerator</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#RemoveAt(System.Int32)">
+            <summary>M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#RemoveAt(System.Int32)</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#Insert(System.Int32,`1)">
+            <summary>M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#IndexOf(System.Int32,`1)</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#IndexOf(`1)">
+            <summary>M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#IndexOf(`1)</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#CopyTo(`1[],System.Int32)">
+            <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#CopyTo(`1[],System.Int32)</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Contains(`1)">
+            <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Contains(`1)</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Clear">
+            <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Clear</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Remove(`1)">
+            <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Remove(`1)</summary>
+        </member>
+        <member name="M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Add(`1)">
+            <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Add(`1)</summary>
+        </member>
+        <member name="M:Container`2.GetEnumerator">
+            <summary>M:Container`2.GetEnumerator</summary>
+        </member>
+    </members>
+</doc>
diff --git a/mcs/tests/test-xml-054.cs b/mcs/tests/test-xml-054.cs
new file mode 100644 (file)
index 0000000..b9b86c3
--- /dev/null
@@ -0,0 +1,101 @@
+// Compiler options: -doc:xml-054.xml
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+public class A {
+       public interface I {
+               void Foo ();
+               void Bar<T>(T value);
+       }
+}
+
+/// <summary>T:Container`2</summary>
+public class Container<TKey, TValue> : IList<TValue>, A.I {
+
+       /// <summary>M:Container`2.#ctor</summary>
+       public Container ()
+       {
+       }
+
+       /// <summary>P:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Count</summary>
+       int ICollection<TValue>.Count {get {return 0;}}
+
+       /// <summary>P:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#IsReadOnly</summary>
+       bool ICollection<TValue>.IsReadOnly {get {return true;}}
+
+       /// <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Add(`1)</summary>
+       void ICollection<TValue>.Add (TValue value) {}
+
+       /// <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Remove(`1)</summary>
+       bool ICollection<TValue>.Remove (TValue value) {return false;}
+
+       /// <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Clear</summary>
+       void ICollection<TValue>.Clear () {}
+
+       /// <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#Contains(`1)</summary>
+       bool ICollection<TValue>.Contains (TValue value) {return false;}
+
+       /// <summary>M:Container`2.System#Collections#Generic#ICollection&lt;TValue&gt;#CopyTo(`1[],System.Int32)</summary>
+       void ICollection<TValue>.CopyTo (TValue[] array, int arrayIndex) {}
+
+       /// <summary>M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#IndexOf(`1)</summary>
+       int IList<TValue>.IndexOf (TValue value) {return -1;}
+
+       /// <summary>M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#IndexOf(System.Int32,`1)</summary>
+       void IList<TValue>.Insert (int index, TValue item) {}
+
+       /// <summary>M:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#RemoveAt(System.Int32)</summary>
+       void IList<TValue>.RemoveAt (int index) {}
+
+       /// <summary>P:Container`2.System#Collections#Generic#IList&lt;TValue&gt;#Item(System.Int32)</summary>
+       TValue IList<TValue>.this [int index] {
+               get {return default (TValue);}
+               set {}
+       }
+
+       /// <summary>M:Container`2.System#Collections#IEnumerable#GetEnumerator</summary>
+       IEnumerator IEnumerable.GetEnumerator ()
+       {
+               return GetEnumerator ();
+       }
+
+       /// <summary>M:Container`2.GetEnumerator</summary>
+       public IEnumerator<TValue> GetEnumerator ()
+       {
+               yield break;
+       }
+
+       /// <summary>T:Container`2.A#I#Foo</summary>
+       void A.I.Foo ()
+       {
+       }
+
+       /// <summary>T:Container`2.A#I#Bar``1(``0)</summary>
+       void A.I.Bar<T> (T value)
+       {
+       }
+
+       /// <summary>T:Container`2.Element</summary>
+       public class Element : ICloneable {
+
+               /// <summary>M:Container`2.Element.System#ICloneable#Clone</summary>
+               object ICloneable.Clone ()
+               {
+                       return Clone ();
+               }
+
+               /// <summary>M:Container`2.Element.Clone</summary>
+               public Element Clone ()
+               {
+                       return (Element) MemberwiseClone ();
+               }
+       }
+}
+
+class Test {
+       public static void Main ()
+       {
+       }
+}
+
diff --git a/mcs/tests/ver-il-dmcs.xml b/mcs/tests/ver-il-dmcs.xml
new file mode 100644 (file)
index 0000000..0bb93cc
--- /dev/null
@@ -0,0 +1,50695 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--This file contains expected IL and metadata produced by compiler for each test-->
+<tests>
+  <test name="dtest-001.cs">
+    <type name="C">
+      <method name="Void set_Prop(System.Object)">
+        <size>8</size>
+      </method>
+      <method name="System.Object get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Prop2(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void set_Item(System.Object, System.Object)">
+        <size>1</size>
+      </method>
+      <method name="System.Object get_Item(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="System.Object Method(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor(Object)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Del">
+      <method name="System.Object Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>987</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-002.cs">
+    <type name="C">
+      <method name="System.Object D()">
+        <size>2</size>
+      </method>
+      <method name="System.Object D2()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AC">
+      <method name="Void Foo(System.Object[])">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BC">
+      <method name="Void Foo(System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-003.cs">
+    <type name="AssertDynamicObject">
+      <method name="System.Dynamic.DynamicMetaObject GetFakeMetaObject(System.Object)">
+        <size>120</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Dynamic.DynamicMetaObject)">
+        <size>62</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindConvert(System.Dynamic.ConvertBinder)">
+        <size>53</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindGetIndex(System.Dynamic.GetIndexBinder, System.Dynamic.DynamicMetaObject[])">
+        <size>96</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindGetMember(System.Dynamic.GetMemberBinder)">
+        <size>56</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindInvoke(System.Dynamic.InvokeBinder, System.Dynamic.DynamicMetaObject[])">
+        <size>96</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindInvokeMember(System.Dynamic.InvokeMemberBinder, System.Dynamic.DynamicMetaObject[])">
+        <size>96</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindSetIndex(System.Dynamic.SetIndexBinder, System.Dynamic.DynamicMetaObject[], System.Dynamic.DynamicMetaObject)">
+        <size>102</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindSetMember(System.Dynamic.SetMemberBinder, System.Dynamic.DynamicMetaObject)">
+        <size>62</size>
+      </method>
+      <method name="System.Dynamic.DynamicMetaObject BindUnaryOperation(System.Dynamic.UnaryOperationBinder)">
+        <size>53</size>
+      </method>
+      <method name="System.Object &lt;BindGetIndex&gt;m__0(System.Dynamic.DynamicMetaObject)">
+        <size>7</size>
+      </method>
+      <method name="System.Object &lt;BindInvoke&gt;m__1(System.Dynamic.DynamicMetaObject)">
+        <size>7</size>
+      </method>
+      <method name="System.Object &lt;BindInvokeMember&gt;m__2(System.Dynamic.DynamicMetaObject)">
+        <size>7</size>
+      </method>
+      <method name="System.Object &lt;BindSetIndex&gt;m__3(System.Dynamic.DynamicMetaObject)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(DynamicObjectMock, Expression)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="DynamicObjectMock">
+      <method name="System.Dynamic.DynamicMetaObject GetMetaObject(System.Linq.Expressions.Expression)">
+        <size>22</size>
+      </method>
+      <method name="Void DMethod(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void DStaticMethod(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void Assert[T](T, T, System.String)">
+        <size>97</size>
+      </method>
+      <method name="Void Assert[T](IList`1, IList`1, System.String)">
+        <size>249</size>
+      </method>
+      <method name="Void AssertArgument(System.Runtime.CompilerServices.CallSiteBinder, Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo[], System.String)">
+        <size>169</size>
+      </method>
+      <method name="Void BinaryAdd_1(System.Object, DynamicObjectMock)">
+        <size>123</size>
+      </method>
+      <method name="Void BinaryAdd_2(System.Object, DynamicObjectMock)">
+        <size>133</size>
+      </method>
+      <method name="Void BinaryAdd_3(System.Object, DynamicObjectMock)">
+        <size>123</size>
+      </method>
+      <method name="Void BinaryAdd_4(System.Object, DynamicObjectMock)">
+        <size>127</size>
+      </method>
+      <method name="Void BinaryAddChecked_1(System.Object, DynamicObjectMock)">
+        <size>123</size>
+      </method>
+      <method name="Void BinaryAddChecked_2(System.Object, DynamicObjectMock)">
+        <size>69</size>
+      </method>
+      <method name="Void BinaryAddAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryAddAssignChecked_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryAnd_1(System.Object, DynamicObjectMock)">
+        <size>123</size>
+      </method>
+      <method name="Void BinaryAndAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryDivide_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryDivideAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryEqual_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryExclusiveOr_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryExclusiveOrAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryGreaterThan_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryGreaterThanOrEqual_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryLeftShift_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryLeftShiftAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryLessThan_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryLessThanOrEqual_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryModulo_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryModuloAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryMultiply_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryMultiplyAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryNotEqual_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryOr_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryOrAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryRightShift_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinaryRightShiftAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinarySubtract_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void BinarySubtractAssign_1(System.Object, DynamicObjectMock)">
+        <size>124</size>
+      </method>
+      <method name="Void Convert_1(System.Object, DynamicObjectMock)">
+        <size>110</size>
+      </method>
+      <method name="Void Convert_2(System.Object, DynamicObjectMock)">
+        <size>115</size>
+      </method>
+      <method name="Void Convert_3(System.Object, DynamicObjectMock)">
+        <size>110</size>
+      </method>
+      <method name="Void Convert_4(System.Object, DynamicObjectMock)">
+        <size>110</size>
+      </method>
+      <method name="Void GetIndex_1(System.Object, DynamicObjectMock)">
+        <size>121</size>
+      </method>
+      <method name="Void GetIndex_2(System.Object, DynamicObjectMock)">
+        <size>139</size>
+      </method>
+      <method name="Void GetIndex_3(System.Object, DynamicObjectMock)">
+        <size>122</size>
+      </method>
+      <method name="Void GetMember_1(System.Object, DynamicObjectMock)">
+        <size>115</size>
+      </method>
+      <method name="Void Invoke_1(System.Object, DynamicObjectMock)">
+        <size>139</size>
+      </method>
+      <method name="Void Invoke_2(System.Object, DynamicObjectMock)">
+        <size>113</size>
+      </method>
+      <method name="Void Invoke_3(System.Object, DynamicObjectMock)">
+        <size>139</size>
+      </method>
+      <method name="Void Invoke_4(System.Object, DynamicObjectMock)">
+        <size>148</size>
+      </method>
+      <method name="Void Invoke_5(System.Object, DynamicObjectMock)">
+        <size>154</size>
+      </method>
+      <method name="Void InvokeMember_1(System.Object, DynamicObjectMock)">
+        <size>131</size>
+      </method>
+      <method name="Void InvokeMember_2(System.Object, DynamicObjectMock)">
+        <size>136</size>
+      </method>
+      <method name="Void InvokeMember_3(System.Object, DynamicObjectMock)">
+        <size>135</size>
+      </method>
+      <method name="Void InvokeMember_4(System.Object, DynamicObjectMock)">
+        <size>132</size>
+      </method>
+      <method name="Void InvokeMember_5(System.Object, DynamicObjectMock)">
+        <size>105</size>
+      </method>
+      <method name="Void InvokeMember_6(System.Object, DynamicObjectMock)">
+        <size>142</size>
+      </method>
+      <method name="Void InvokeMember_7(System.Object, DynamicObjectMock)">
+        <size>137</size>
+      </method>
+      <method name="Void SetIndex_1(System.Object, DynamicObjectMock)">
+        <size>136</size>
+      </method>
+      <method name="Void SetIndex_2(System.Object, DynamicObjectMock)">
+        <size>150</size>
+      </method>
+      <method name="Void SetIndex_3(System.Object, DynamicObjectMock)">
+        <size>139</size>
+      </method>
+      <method name="Void SetMember_1(System.Object, DynamicObjectMock)">
+        <size>133</size>
+      </method>
+      <method name="Void UnaryPlus_1(System.Object, DynamicObjectMock)">
+        <size>113</size>
+      </method>
+      <method name="Void UnaryMinus_1(System.Object, DynamicObjectMock)">
+        <size>113</size>
+      </method>
+      <method name="Void UnaryNot_1(System.Object, DynamicObjectMock)">
+        <size>113</size>
+      </method>
+      <method name="Void UnaryOnesComplement_1(System.Object, DynamicObjectMock)">
+        <size>113</size>
+      </method>
+      <method name="Void UnaryDecrement_1(System.Object, DynamicObjectMock)">
+        <size>116</size>
+      </method>
+      <method name="Void UnaryDecrement_2(System.Object, DynamicObjectMock)">
+        <size>118</size>
+      </method>
+      <method name="Void UnaryIncrement_1(System.Object, DynamicObjectMock)">
+        <size>116</size>
+      </method>
+      <method name="Void UnaryIncrement_2(System.Object, DynamicObjectMock)">
+        <size>118</size>
+      </method>
+      <method name="Void UnaryIsFalse_1(System.Object, DynamicObjectMock)">
+        <size>158</size>
+      </method>
+      <method name="Void UnaryIsFalse_2(System.Object, DynamicObjectMock)">
+        <size>158</size>
+      </method>
+      <method name="Void UnaryIsFalse_3(System.Object, DynamicObjectMock)">
+        <size>157</size>
+      </method>
+      <method name="Void UnaryIsTrue_1(System.Object, DynamicObjectMock)">
+        <size>129</size>
+      </method>
+      <method name="Void UnaryIsTrue_2(System.Object, DynamicObjectMock)">
+        <size>158</size>
+      </method>
+      <method name="Boolean RunTest(System.Reflection.MethodInfo)">
+        <size>130</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>179</size>
+      </method>
+      <method name="Void &lt;BinaryAdd_1&gt;m__4(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;BinaryAdd_2&gt;m__5(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>67</size>
+      </method>
+      <method name="Void &lt;BinaryAdd_3&gt;m__6(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;BinaryAdd_4&gt;m__7(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;BinaryAddChecked_1&gt;m__8(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;BinaryAddChecked_2&gt;m__9(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;BinaryAddAssign_1&gt;m__B(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__C(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryAnd_1&gt;m__D(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;BinaryAndAssign_1&gt;m__E(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryDivide_1&gt;m__F(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryDivideAssign_1&gt;m__10(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryEqual_1&gt;m__11(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryExclusiveOr_1&gt;m__12(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__13(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryGreaterThan_1&gt;m__14(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__15(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryLeftShift_1&gt;m__16(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__17(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryLessThan_1&gt;m__18(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__19(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryModulo_1&gt;m__1A(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryModuloAssign_1&gt;m__1B(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryMultiply_1&gt;m__1C(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__1D(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryNotEqual_1&gt;m__1E(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryOr_1&gt;m__1F(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryOrAssign_1&gt;m__20(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryRightShift_1&gt;m__21(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__22(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinarySubtract_1&gt;m__23(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;BinarySubtractAssign_1&gt;m__24(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>73</size>
+      </method>
+      <method name="System.Object &lt;Convert_1&gt;m__25(System.Dynamic.ConvertBinder)">
+        <size>50</size>
+      </method>
+      <method name="System.Object &lt;Convert_2&gt;m__26(System.Dynamic.ConvertBinder)">
+        <size>50</size>
+      </method>
+      <method name="System.Object &lt;Convert_3&gt;m__27(System.Dynamic.ConvertBinder)">
+        <size>50</size>
+      </method>
+      <method name="System.Object &lt;Convert_4&gt;m__28(System.Dynamic.ConvertBinder)">
+        <size>50</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Object)">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>34</size>
+      </method>
+      <method name="Void Convert_5(System.Object, DynamicObjectMock)">
+        <size>226</size>
+      </method>
+      <method name="System.Object &lt;Convert_5&gt;m__29(System.Dynamic.ConvertBinder)">
+        <size>59</size>
+      </method>
+      <method name="Void &lt;GetIndex_1&gt;m__2A(System.Dynamic.GetIndexBinder, System.Object[])">
+        <size>92</size>
+      </method>
+      <method name="Void &lt;GetIndex_2&gt;m__2B(System.Dynamic.GetIndexBinder, System.Object[])">
+        <size>111</size>
+      </method>
+      <method name="Void &lt;GetMember_1&gt;m__2D(System.Dynamic.GetMemberBinder)">
+        <size>66</size>
+      </method>
+      <method name="Void &lt;Invoke_1&gt;m__2E(System.Dynamic.InvokeBinder, System.Object[])">
+        <size>101</size>
+      </method>
+      <method name="Void &lt;Invoke_2&gt;m__2F(System.Dynamic.InvokeBinder, System.Object[])">
+        <size>73</size>
+      </method>
+      <method name="Void &lt;Invoke_4&gt;m__30(System.Dynamic.InvokeBinder, System.Object[])">
+        <size>127</size>
+      </method>
+      <method name="Void &lt;Invoke_5&gt;m__31(System.Dynamic.InvokeBinder, System.Object[])">
+        <size>127</size>
+      </method>
+      <method name="Void &lt;Invoke_5&gt;m__32(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;InvokeMember_1&gt;m__33(System.Dynamic.InvokeMemberBinder, System.Object[])">
+        <size>110</size>
+      </method>
+      <method name="Void &lt;InvokeMember_3&gt;m__35(System.Dynamic.InvokeMemberBinder, System.Object[])">
+        <size>111</size>
+      </method>
+      <method name="Void &lt;InvokeMember_4&gt;m__36(System.Dynamic.InvokeMemberBinder, System.Object[])">
+        <size>110</size>
+      </method>
+      <method name="Void &lt;InvokeMember_7&gt;m__38(System.Dynamic.InvokeMemberBinder, System.Object[])">
+        <size>90</size>
+      </method>
+      <method name="Void &lt;SetIndex_1&gt;m__39(System.Dynamic.SetIndexBinder, System.Object[], System.Object)">
+        <size>124</size>
+      </method>
+      <method name="Void &lt;SetIndex_2&gt;m__3A(System.Dynamic.SetIndexBinder, System.Object[], System.Object)">
+        <size>139</size>
+      </method>
+      <method name="Void &lt;SetMember_1&gt;m__3C(System.Dynamic.SetMemberBinder, System.Object)">
+        <size>101</size>
+      </method>
+      <method name="System.Object &lt;UnaryPlus_1&gt;m__3D(System.Dynamic.UnaryOperationBinder)">
+        <size>47</size>
+      </method>
+      <method name="System.Object &lt;UnaryMinus_1&gt;m__3E(System.Dynamic.UnaryOperationBinder)">
+        <size>47</size>
+      </method>
+      <method name="System.Object &lt;UnaryNot_1&gt;m__3F(System.Dynamic.UnaryOperationBinder)">
+        <size>47</size>
+      </method>
+      <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__40(System.Dynamic.UnaryOperationBinder)">
+        <size>47</size>
+      </method>
+      <method name="System.Object &lt;UnaryDecrement_1&gt;m__41(System.Dynamic.UnaryOperationBinder)">
+        <size>47</size>
+      </method>
+      <method name="System.Object &lt;UnaryDecrement_2&gt;m__42(System.Dynamic.UnaryOperationBinder)">
+        <size>51</size>
+      </method>
+      <method name="System.Object &lt;UnaryIncrement_1&gt;m__43(System.Dynamic.UnaryOperationBinder)">
+        <size>47</size>
+      </method>
+      <method name="System.Object &lt;UnaryIncrement_2&gt;m__44(System.Dynamic.UnaryOperationBinder)">
+        <size>51</size>
+      </method>
+      <method name="System.Object &lt;UnaryIsFalse_1&gt;m__45(System.Dynamic.UnaryOperationBinder)">
+        <size>52</size>
+      </method>
+      <method name="Void &lt;UnaryIsFalse_1&gt;m__46(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>68</size>
+      </method>
+      <method name="System.Object &lt;UnaryIsFalse_2&gt;m__47(System.Dynamic.UnaryOperationBinder)">
+        <size>52</size>
+      </method>
+      <method name="Void &lt;UnaryIsFalse_2&gt;m__48(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>68</size>
+      </method>
+      <method name="System.Object &lt;UnaryIsFalse_3&gt;m__49(System.Dynamic.UnaryOperationBinder)">
+        <size>52</size>
+      </method>
+      <method name="Void &lt;UnaryIsFalse_3&gt;m__4A(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>67</size>
+      </method>
+      <method name="System.Object &lt;UnaryIsTrue_1&gt;m__4B(System.Dynamic.UnaryOperationBinder)">
+        <size>52</size>
+      </method>
+      <method name="System.Object &lt;UnaryIsTrue_2&gt;m__4C(System.Dynamic.UnaryOperationBinder)">
+        <size>52</size>
+      </method>
+      <method name="Void &lt;UnaryIsTrue_2&gt;m__4D(System.Dynamic.BinaryOperationBinder, System.Object)">
+        <size>68</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__4E(System.Reflection.MethodInfo)">
+        <size>12</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__4F(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__50(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__51(Boolean)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="AssertDynamicObject+&lt;GetFakeMetaObject&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey1">
+      <method name="System.Object &lt;&gt;m__A()">
+        <size>91</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey2">
+      <method name="Void &lt;&gt;m__2C(System.Dynamic.GetIndexBinder, System.Object[])">
+        <size>92</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey3">
+      <method name="Void &lt;&gt;m__34(System.Dynamic.InvokeMemberBinder, System.Object[])">
+        <size>109</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey4">
+      <method name="Void &lt;&gt;m__37(System.Dynamic.InvokeMemberBinder, System.Object[])">
+        <size>119</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey5">
+      <method name="Void &lt;&gt;m__3B(System.Dynamic.SetIndexBinder, System.Object[], System.Object)">
+        <size>119</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;InvokeMember_3&gt;c__DynamicSite0+Container0">
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;InvokeMember_4&gt;c__DynamicSite0+Container0">
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-004.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="System.Object Create()">
+        <size>7</size>
+      </method>
+      <method name="Void M[T]()">
+        <size>18</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>113</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-005.cs">
+    <type name="MyObject">
+      <method name="Boolean TryGetMember(System.Dynamic.GetMemberBinder, System.Object ByRef)">
+        <size>27</size>
+      </method>
+      <method name="Boolean TryInvokeMember(System.Dynamic.InvokeMemberBinder, System.Object[], System.Object ByRef)">
+        <size>27</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Int32 Main()">
+        <size>242</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-006.cs">
+    <type name="InverseLogicalOperator">
+      <method name="Boolean op_True(InverseLogicalOperator)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_False(InverseLogicalOperator)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(Boolean)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="MyType">
+      <method name="Int16 get_ShortProp()">
+        <size>7</size>
+      </method>
+      <method name="Void set_ShortProp(Int16)">
+        <size>8</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>6</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="Boolean op_True(MyType)">
+        <size>14</size>
+      </method>
+      <method name="Boolean op_False(MyType)">
+        <size>11</size>
+      </method>
+      <method name="MyType op_Addition(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Subtraction(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Division(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Multiply(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Modulus(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_BitwiseAnd(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_BitwiseOr(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_ExclusiveOr(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="Boolean op_Equality(MyType, MyType)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_Inequality(MyType, MyType)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_GreaterThan(MyType, MyType)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_LessThan(MyType, MyType)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_GreaterThanOrEqual(MyType, MyType)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_LessThanOrEqual(MyType, MyType)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_LogicalNot(MyType)">
+        <size>11</size>
+      </method>
+      <method name="Int32 op_OnesComplement(MyType)">
+        <size>9</size>
+      </method>
+      <method name="MyType op_Increment(MyType)">
+        <size>15</size>
+      </method>
+      <method name="MyType op_Decrement(MyType)">
+        <size>15</size>
+      </method>
+      <method name="Int32 op_RightShift(MyType, Int32)">
+        <size>13</size>
+      </method>
+      <method name="Int32 op_LeftShift(MyType, Int32)">
+        <size>13</size>
+      </method>
+      <method name="MyType op_UnaryNegation(MyType)">
+        <size>14</size>
+      </method>
+      <method name="MyType op_UnaryPlus(MyType)">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="MyTypeExplicit">
+      <method name="Int32 op_Explicit(MyTypeExplicit)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="MyTypeImplicitOnly">
+      <method name="Int16 op_Implicit(MyTypeImplicitOnly)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_Implicit(MyTypeImplicitOnly)">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor(Int16)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void add_ev_assign(System.Action)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_ev_assign(System.Action)">
+        <size>24</size>
+      </method>
+      <method name="Void Assert[T](T, T, System.String)">
+        <size>78</size>
+      </method>
+      <method name="Void AssertChecked[T](System.Func`1[T], T, System.String)">
+        <size>42</size>
+      </method>
+      <method name="Void AssertChecked(System.Action, System.String)">
+        <size>35</size>
+      </method>
+      <method name="Void AddTest()">
+        <size>1370</size>
+      </method>
+      <method name="Void AddNullableTest()">
+        <size>2277</size>
+      </method>
+      <method name="Void AddEnumTest()">
+        <size>874</size>
+      </method>
+      <method name="Void AddCheckedTest()">
+        <size>345</size>
+      </method>
+      <method name="Void AddStringTest()">
+        <size>1144</size>
+      </method>
+      <method name="Void AddAssignTest()">
+        <size>1154</size>
+      </method>
+      <method name="Void AddAssignNullableTest()">
+        <size>13</size>
+      </method>
+      <method name="Void AddAssignEnumTest()">
+        <size>443</size>
+      </method>
+      <method name="Void AddAssignCheckedTest()">
+        <size>319</size>
+      </method>
+      <method name="Void AddAssignStringTest()">
+        <size>876</size>
+      </method>
+      <method name="Void AddAssignEvent()">
+        <size>3</size>
+      </method>
+      <method name="Void AndTest()">
+        <size>1536</size>
+      </method>
+      <method name="Void AndTestEnum()">
+        <size>670</size>
+      </method>
+      <method name="Void AndTestNullable()">
+        <size>1807</size>
+      </method>
+      <method name="Void AndAssignedTest()">
+        <size>911</size>
+      </method>
+      <method name="Void AndAssignedTestEnum()">
+        <size>683</size>
+      </method>
+      <method name="Void AndAlsoTest()">
+        <size>892</size>
+      </method>
+      <method name="Void DivideTest()">
+        <size>927</size>
+      </method>
+      <method name="Void DivideNullableTest()">
+        <size>2305</size>
+      </method>
+      <method name="Void DivideCheckedTest()">
+        <size>1</size>
+      </method>
+      <method name="Void DivideAssignTest()">
+        <size>1143</size>
+      </method>
+      <method name="Void DivideAssignCheckedTest()">
+        <size>1</size>
+      </method>
+      <method name="Void ConvertImplicitTest()">
+        <size>1331</size>
+      </method>
+      <method name="Int32 ConvertImplicitReturnTest()">
+        <size>75</size>
+      </method>
+      <method name="IEnumerable`1 ConvertImplicitReturnTest_2()">
+        <size>16</size>
+      </method>
+      <method name="Void ConvertExplicitTest()">
+        <size>502</size>
+      </method>
+      <method name="Void ConvertExplicitCheckedTest()">
+        <size>87</size>
+      </method>
+      <method name="Void ConvertArray()">
+        <size>167</size>
+      </method>
+      <method name="Void EqualTest()">
+        <size>1941</size>
+      </method>
+      <method name="Void EqualNullableTest()">
+        <size>3032</size>
+      </method>
+      <method name="Void EqualEnumTest()">
+        <size>1047</size>
+      </method>
+      <method name="Void EqualStringTest()">
+        <size>630</size>
+      </method>
+      <method name="Void EqualDelegateTest()">
+        <size>18</size>
+      </method>
+      <method name="Void ExclusiveOrTest()">
+        <size>1546</size>
+      </method>
+      <method name="Void ExclusiveOrNullableTest()">
+        <size>1815</size>
+      </method>
+      <method name="Void ExclusiveOrTestEnum()">
+        <size>692</size>
+      </method>
+      <method name="Void ExclusiveOrAssignedTest()">
+        <size>893</size>
+      </method>
+      <method name="Void ExclusiveOrAssignedTestEnum()">
+        <size>685</size>
+      </method>
+      <method name="Void GreaterThanTest()">
+        <size>1983</size>
+      </method>
+      <method name="Void GreaterThanNullableTest()">
+        <size>2405</size>
+      </method>
+      <method name="Void GreaterThanEnumTest()">
+        <size>1047</size>
+      </method>
+      <method name="Void GreaterThanEqualTest()">
+        <size>1983</size>
+      </method>
+      <method name="Void GreaterThanEqualNullableTest()">
+        <size>2405</size>
+      </method>
+      <method name="Void GreaterThanEqualEnumTest()">
+        <size>1047</size>
+      </method>
+      <method name="Void LeftShiftTest()">
+        <size>1366</size>
+      </method>
+      <method name="Void LeftShiftNullableTest()">
+        <size>1137</size>
+      </method>
+      <method name="Void LeftShiftAssignTest()">
+        <size>649</size>
+      </method>
+      <method name="Void LeftShiftAssignNullableTest()">
+        <size>443</size>
+      </method>
+      <method name="Void LessThanTest()">
+        <size>1983</size>
+      </method>
+      <method name="Void LessThanNullableTest()">
+        <size>2419</size>
+      </method>
+      <method name="Void LessThanEnumTest()">
+        <size>1047</size>
+      </method>
+      <method name="Void LessThanOrEqualTest()">
+        <size>1983</size>
+      </method>
+      <method name="Void LessThanOrEqualNullableTest()">
+        <size>2405</size>
+      </method>
+      <method name="Void LessThanOrEqualEnumTest()">
+        <size>1047</size>
+      </method>
+      <method name="Void ModuloTest()">
+        <size>923</size>
+      </method>
+      <method name="Void ModuloNullableTest()">
+        <size>2293</size>
+      </method>
+      <method name="Void ModuloAssignTest()">
+        <size>1137</size>
+      </method>
+      <method name="Void MultiplyTest()">
+        <size>1167</size>
+      </method>
+      <method name="Void MultiplyNullableTest()">
+        <size>2293</size>
+      </method>
+      <method name="Void MultiplyCheckedTest()">
+        <size>343</size>
+      </method>
+      <method name="Void MultiplyAssignTest()">
+        <size>1327</size>
+      </method>
+      <method name="Void MultiplyAssignCheckedTest()">
+        <size>317</size>
+      </method>
+      <method name="Void Negate()">
+        <size>1311</size>
+      </method>
+      <method name="Void NegateNullable()">
+        <size>1117</size>
+      </method>
+      <method name="Void NegateChecked()">
+        <size>51</size>
+      </method>
+      <method name="Void Not()">
+        <size>404</size>
+      </method>
+      <method name="Void NotEqualTest()">
+        <size>1945</size>
+      </method>
+      <method name="Void NotEqualNullableTest()">
+        <size>3032</size>
+      </method>
+      <method name="Void NotEqualEnumTest()">
+        <size>1047</size>
+      </method>
+      <method name="Void NotEqualStringTest()">
+        <size>630</size>
+      </method>
+      <method name="Void OnesComplement()">
+        <size>818</size>
+      </method>
+      <method name="Void OnesComplementNullable()">
+        <size>418</size>
+      </method>
+      <method name="Void OrTest()">
+        <size>1546</size>
+      </method>
+      <method name="Void OrTestEnum()">
+        <size>674</size>
+      </method>
+      <method name="Void OrTestNullable()">
+        <size>1591</size>
+      </method>
+      <method name="Void OrAssignedTest()">
+        <size>911</size>
+      </method>
+      <method name="Void OrAssignedTestEnum()">
+        <size>685</size>
+      </method>
+      <method name="Void OrElseTest()">
+        <size>896</size>
+      </method>
+      <method name="Void RightShiftTest()">
+        <size>1152</size>
+      </method>
+      <method name="Void RightShiftNullableTest()">
+        <size>1136</size>
+      </method>
+      <method name="Void RightShiftAssignTest()">
+        <size>649</size>
+      </method>
+      <method name="Void RightShiftAssignNullableTest()">
+        <size>442</size>
+      </method>
+      <method name="Void SubtractTest()">
+        <size>1132</size>
+      </method>
+      <method name="Void SubtractNullableTest()">
+        <size>2288</size>
+      </method>
+      <method name="Void SubtractEnumTest()">
+        <size>896</size>
+      </method>
+      <method name="Void SubtractCheckedTest()">
+        <size>346</size>
+      </method>
+      <method name="Void SubtractAssignTest()">
+        <size>1154</size>
+      </method>
+      <method name="Void SubtractAssignEnumTest()">
+        <size>454</size>
+      </method>
+      <method name="Void SubtractAssignCheckedTest()">
+        <size>319</size>
+      </method>
+      <method name="Void SubtractAssignEvent()">
+        <size>33</size>
+      </method>
+      <method name="Void UnaryDecrement()">
+        <size>991</size>
+      </method>
+      <method name="Void UnaryDecrementCheckedTest()">
+        <size>295</size>
+      </method>
+      <method name="Void UnaryIncrement()">
+        <size>992</size>
+      </method>
+      <method name="Void UnaryIncrementCheckedTest()">
+        <size>292</size>
+      </method>
+      <method name="Void UnaryIsTrue()">
+        <size>428</size>
+      </method>
+      <method name="Void UnaryPlus()">
+        <size>1114</size>
+      </method>
+      <method name="Void UnaryPlusNullable()">
+        <size>1119</size>
+      </method>
+      <method name="Boolean RunTest(System.Reflection.MethodInfo)">
+        <size>87</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>179</size>
+      </method>
+      <method name="Void &lt;SubtractAssignEvent&gt;m__C()">
+        <size>11</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__F(System.Reflection.MethodInfo)">
+        <size>12</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__10(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__11(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__12(Boolean)">
+        <size>5</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+EmptyDelegate">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;AddCheckedTest&gt;c__AnonStorey1">
+      <method name="System.Object &lt;&gt;m__0()">
+        <size>96</size>
+      </method>
+      <method name="System.Object &lt;&gt;m__1()">
+        <size>96</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;AddAssignCheckedTest&gt;c__AnonStorey2">
+      <method name="Void &lt;&gt;m__2()">
+        <size>233</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;ConvertImplicitReturnTest_2&gt;c__Iterator0">
+      <method name="System.String System.Collections.Generic.IEnumerator&lt;string&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>147</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;ConvertExplicitCheckedTest&gt;c__AnonStorey3">
+      <method name="Int32 &lt;&gt;m__3()">
+        <size>74</size>
+      </method>
+      <method name="Nullable`1 &lt;&gt;m__4()">
+        <size>74</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MultiplyCheckedTest&gt;c__AnonStorey4">
+      <method name="System.Object &lt;&gt;m__5()">
+        <size>97</size>
+      </method>
+      <method name="System.Object &lt;&gt;m__6()">
+        <size>97</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MultiplyAssignCheckedTest&gt;c__AnonStorey5">
+      <method name="Void &lt;&gt;m__7()">
+        <size>233</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;NegateChecked&gt;c__AnonStorey6">
+      <method name="System.Object &lt;&gt;m__8()">
+        <size>81</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;SubtractCheckedTest&gt;c__AnonStorey7">
+      <method name="System.Object &lt;&gt;m__9()">
+        <size>97</size>
+      </method>
+      <method name="System.Object &lt;&gt;m__A()">
+        <size>97</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;SubtractAssignCheckedTest&gt;c__AnonStorey8">
+      <method name="Void &lt;&gt;m__B()">
+        <size>233</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;UnaryDecrementCheckedTest&gt;c__AnonStorey9">
+      <method name="Void &lt;&gt;m__D()">
+        <size>223</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;UnaryIncrementCheckedTest&gt;c__AnonStoreyA">
+      <method name="Void &lt;&gt;m__E()">
+        <size>219</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-007.cs">
+    <type name="D">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="D2">
+      <method name="Void Invoke(Decimal)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Decimal, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Class">
+      <method name="UInt32 get_Item(Byte)">
+        <size>9</size>
+      </method>
+      <method name="Void set_Item(Byte, UInt32)">
+        <size>8</size>
+      </method>
+      <method name="Byte get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Prop(Byte)">
+        <size>8</size>
+      </method>
+      <method name="Void set_FixedValue(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_FixedValue()">
+        <size>6</size>
+      </method>
+      <method name="System.String Method(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Method(Int32, Byte)">
+        <size>4</size>
+      </method>
+      <method name="Void MethodInOut(Int32 ByRef, System.String ByRef)">
+        <size>11</size>
+      </method>
+      <method name="Void GenericVoid[T](T)">
+        <size>1</size>
+      </method>
+      <method name="Int32 StaticMethod(System.Int32[])">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>44</size>
+      </method>
+      <method name="Void .ctor(SByte)">
+        <size>52</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void add_e(System.Func`1[System.Int32])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_e(System.Func`1[System.Int32])">
+        <size>24</size>
+      </method>
+      <method name="Void Assert[T](T, T, System.String)">
+        <size>78</size>
+      </method>
+      <method name="Void AssertError(System.Action, System.String)">
+        <size>35</size>
+      </method>
+      <method name="Void GetIndexTest()">
+        <size>915</size>
+      </method>
+      <method name="Void GetIndexError_Null()">
+        <size>36</size>
+      </method>
+      <method name="Void InvokeTest()">
+        <size>458</size>
+      </method>
+      <method name="Void InvokeMember()">
+        <size>906</size>
+      </method>
+      <method name="Void InvokeConstructor()">
+        <size>231</size>
+      </method>
+      <method name="Void IsEvent()">
+        <size>1999</size>
+      </method>
+      <method name="Void MemberGetTest()">
+        <size>810</size>
+      </method>
+      <method name="Void MemberGetError_Null()">
+        <size>36</size>
+      </method>
+      <method name="Void MemberSetTest()">
+        <size>2971</size>
+      </method>
+      <method name="Void MemberSetError_Null()">
+        <size>36</size>
+      </method>
+      <method name="Void SetIndexTest()">
+        <size>2900</size>
+      </method>
+      <method name="Void SetIndexError_Null()">
+        <size>36</size>
+      </method>
+      <method name="Boolean RunTest(System.Reflection.MethodInfo)">
+        <size>87</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>179</size>
+      </method>
+      <method name="Int32 &lt;InvokeTest&gt;m__1(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;GetIndexError_Null&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>91</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberGetError_Null&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberSetError_Null&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;SetIndexError_Null&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="EventClass">
+      <method name="Void add_OutEvent(System.Func`1[System.Int32])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_OutEvent(System.Func`1[System.Int32])">
+        <size>24</size>
+      </method>
+      <method name="Int32 CallEvent()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Int32 &lt;IsEvent&gt;m__4()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Class">
+      <method name="Void ArglistMethod(...)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void InvokeMember_Error()">
+        <size>40</size>
+      </method>
+      <method name="Void &lt;InvokeMember_Error&gt;m__2()">
+        <size>111</size>
+      </method>
+      <method name="Void &lt;InvokeConstructor&gt;m__3(Decimal)">
+        <size>1</size>
+      </method>
+      <method name="Int32 &lt;IsEvent&gt;m__5()">
+        <size>3</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__9(System.Reflection.MethodInfo)">
+        <size>12</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__A(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__B(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__C(Boolean)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberGetError_Null&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__6()">
+        <size>85</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberSetError_Null&gt;c__AnonStorey2">
+      <method name="Void &lt;&gt;m__7()">
+        <size>95</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;SetIndexError_Null&gt;c__AnonStorey3">
+      <method name="Void &lt;&gt;m__8()">
+        <size>101</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;InvokeMember&gt;c__DynamicSite0+Container0">
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef, System.String ByRef)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-008.cs">
+    <type name="Disposable">
+      <method name="Void Dispose()">
+        <size>15</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Boolean ForEachTest()">
+        <size>512</size>
+      </method>
+      <method name="Boolean UsingTest()">
+        <size>862</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean ForEachTest_2()">
+        <size>300</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-009.cs">
+    <type name="B">
+      <method name="Void Test(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>123</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-010.cs">
+    <type name="A">
+      <method name="T Test[T](T, T)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 TestCall()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>388</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-011.cs">
+    <type name="C">
+      <method name="Void foo(Int32)">
+        <size>17</size>
+      </method>
+      <method name="Void foo(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Void foo_static(Int64)">
+        <size>17</size>
+      </method>
+      <method name="Void test()">
+        <size>196</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-012.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="dynamic.C">
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-013.cs">
+    <type name="ndynamic.C`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ndynamic.C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-014.cs">
+    <type name="A">
+      <method name="Int32 op_Inequality(A, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 op_Equality(A, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+      <method name="Boolean op_Equality(C, System.Object)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_Inequality(C, System.Object)">
+        <size>252</size>
+      </method>
+      <method name="Decimal op_Subtraction(System.Object, C)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-015.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>49</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-016.cs">
+    <type name="Foo">
+      <method name="Void Dyn(System.Object ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void Dyn(System.Object ByRef)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Method_A(Int32 ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void Method_B(System.Object ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void DynOut(System.Object ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void DynRef(System.Object ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void TestErrorVersions()">
+        <size>197</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-017.cs">
+    <type name="B`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="System.Object Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="DynamicAssignments">
+      <method name="Int32 Main()">
+        <size>102</size>
+      </method>
+      <method name="System.Object &lt;Main&gt;m__0(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-018.cs">
+    <type name="XValue">
+      <method name="Int64 get_Y()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Y(Int64)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Int32 Main()">
+        <size>361</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-019.cs">
+    <type name="C">
+      <method name="Void Method(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Method(System.Object, System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Method2(System.Object, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Method2(System.Object ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void Main()">
+        <size>27</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+D2">
+      <method name="Void Invoke(System.Object ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(System.Object ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-020.cs">
+    <type name="Class1">
+      <method name="Int32 Method1()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Class2`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Class3">
+      <method name="Void Method2()">
+        <size>89</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-021.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T+B">
+      <method name="Void set_Item(Int32, System.Object)">
+        <size>69</size>
+      </method>
+      <method name="System.Object get_Item(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T+Program">
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-022.cs">
+    <type name="C">
+      <method name="Void M[T](T)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-023.cs">
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>35</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-024.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>524</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-025.cs">
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>187</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-026.cs">
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>362</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-027.cs">
+    <type name="C">
+      <method name="Int32 M(System.Object, Int64)">
+        <size>2</size>
+      </method>
+      <method name="Int32 M(Int64, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 M(System.Object, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>194</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-028.cs">
+    <type name="C">
+      <method name="Void MethodRef(Int32 ByRef)">
+        <size>8</size>
+      </method>
+      <method name="Void MethodOut(UInt16 ByRef)">
+        <size>5</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>225</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Main&gt;c__DynamicSite0+Container0">
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Main&gt;c__DynamicSite0+Container1">
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, UInt16 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-029.cs">
+    <type name="C">
+      <method name="Boolean Test[T,U](T, U)">
+        <size>335</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>82</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test2(Int32)">
+        <size>160</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-error-01.cs">
+    <type name="Helper">
+      <method name="Int32* Foo(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void Unsafe_1()">
+        <size>41</size>
+      </method>
+      <method name="Void AssertError(System.Action, System.String)">
+        <size>53</size>
+      </method>
+      <method name="Boolean RunTest(System.Reflection.MethodInfo)">
+        <size>92</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>179</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__1(System.Reflection.MethodInfo)">
+        <size>12</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__2(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__4(Boolean)">
+        <size>5</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;Unsafe_1&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>110</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-implicitarray-01.cs">
+    <type name="C">
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>104</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="dtest-iter-01.cs">
+    <type name="Program">
+      <method name="IEnumerable`1 D1()">
+        <size>16</size>
+      </method>
+      <method name="IEnumerable`1 D2()">
+        <size>16</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Program+&lt;D1&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;dynamic&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;dynamic&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+&lt;D2&gt;c__Iterator1">
+      <method name="System.Func`1[System.Object] System.Collections.Generic.IEnumerator&lt;System.Func&lt;dynamic&gt;&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;System.Func&lt;dynamic&gt;&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-001.cs">
+    <type name="Stack`1[type]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Boot">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-002.cs">
+    <type name="Cell`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-003.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-004.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Stack`1[Test])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-005.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-006.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>23</size>
+      </method>
+      <method name="Void Push(T)">
+        <size>30</size>
+      </method>
+      <method name="T Pop()">
+        <size>29</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-007.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-008.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-009.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Test(T)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-010.cs">
+    <type name="J">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-011.cs">
+    <type name="Stack`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(S)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-012.cs">
+    <type name="Stack`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(S)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-013.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-014.cs">
+    <type name="Stack`1[S]">
+      <method name="Void .ctor(S)">
+        <size>7</size>
+      </method>
+      <method name="Void Push(S)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-015.cs">
+    <type name="Stack`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[T,U](S, T, U)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-016.cs">
+    <type name="Stack`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[T](S, T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-017.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Stack)">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-018.cs">
+    <type name="Stack">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[T](T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Stack)">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-019.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-020.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Stack`1[S]">
+      <method name="Void Hello(S)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-021.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(Int32)">
+        <size>58</size>
+      </method>
+      <method name="Void Test()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="Bar`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Print(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Void Main()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(String)">
+        <size>8</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-022.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello()">
+        <size>1</size>
+      </method>
+      <method name="Void World(T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-023.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello()">
+        <size>1</size>
+      </method>
+      <method name="Void World(T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-024.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>13</size>
+      </method>
+      <method name="Void Whatever(System.Object)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Foo`1[System.Int32])">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-025.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[T](T)">
+        <size>13</size>
+      </method>
+      <method name="Void Whatever(System.Object)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Foo)">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-026.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-027.cs">
+    <type name="TheBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void BaseFunc()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Stack`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(S)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>36</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-028.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="System.Object Test()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Test(Stack`1[System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-029.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor(Int32)">
+        <size>19</size>
+      </method>
+      <method name="System.Object Test()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-030.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bar`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(T, U)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Bar`2[System.Int32,System.String])">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-031.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Bar`2[System.Int32,System.String])">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-032.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Bar`2)">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-033.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Bar`3)">
+        <size>35</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-034.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-035.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-036.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Stack`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-037.cs">
+    <type name="Foo`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Foo`2[T,U])">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Bar`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Foo`2[T,System.Int64])">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Baz`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-038.cs">
+    <type name="Queue`1[T]">
+      <method name="Void .ctor(T, T)">
+        <size>38</size>
+      </method>
+      <method name="Queue`1+Node`1[T,T] GetFoo()">
+        <size>7</size>
+      </method>
+      <method name="Queue`1+Node`1[T,T] get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>12</size>
+      </method>
+      <method name="Void Test()">
+        <size>74</size>
+      </method>
+    </type>
+    <type name="Queue`1+Node`1[T,U]">
+      <method name="Void .ctor(Node`1, U)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-039.cs">
+    <type name="Zoo`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="IMonkey`1 GetTheMonkey[U](U)">
+        <size>8</size>
+      </method>
+      <method name="T get_Name()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Zoo`1+Monkey`2[T,V,W]">
+      <method name="Void .ctor(Zoo`1, W)">
+        <size>21</size>
+      </method>
+      <method name="W Jump()">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-040.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor(T)">
+        <size>26</size>
+      </method>
+      <method name="INode`1 GetNode()">
+        <size>7</size>
+      </method>
+      <method name="Stack`1+Foo`1[T,T] GetFoo(T)">
+        <size>7</size>
+      </method>
+      <method name="Stack`1+Bar`1[T,T] GetBar(T)">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="Stack`1+Node[T]">
+      <method name="Void .ctor(Stack`1)">
+        <size>14</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Stack`1+Foo`1[T,T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Stack`1+Bar`1[T,T] GetBar()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Stack`1+Bar`1[T,U]">
+      <method name="Void .ctor(U)">
+        <size>14</size>
+      </method>
+      <method name="Stack`1+Foo`1[T,T] GetFoo(Stack`1[T])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Stack`1+Bar`1+Baz`1[T,U,V]">
+      <method name="Void .ctor(V)">
+        <size>14</size>
+      </method>
+      <method name="Stack`1+Foo`1[T,T] GetFoo(Stack`1[T])">
+        <size>12</size>
+      </method>
+      <method name="Stack`1+Bar`1[T,V] GetBar()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+Test`1[U,T]">
+      <method name="A`1+Test`1+Nested`1[U,T,T] Foo()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+Test`1+Nested`1[U,T,X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Int32 Main()">
+        <size>39</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-041.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int32, T[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-042.cs">
+    <type name="A.A`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.B`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.C`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.D`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.E`2[X,Y]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.F`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B.MyTest`2[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C.S`1[K]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C.C`1[K]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-043.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>13</size>
+      </method>
+      <method name="Int32 GetCount()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 DoTheTest[T]()">
+        <size>107</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>134</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-044.cs">
+    <type name="X`1[T]">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="X`1[T] op_Increment(X`1[T])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-045.cs">
+    <type name="Test`2[A,B]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[U](U)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[V](V[], V)">
+        <size>1</size>
+      </method>
+      <method name="Void Hello[V,W](V, W, Test`2[V,W])">
+        <size>1</size>
+      </method>
+      <method name="Void ArrayMethod[V](V[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>86</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-046.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_MyEvent(Test`1[T])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MyEvent(Test`1[T])">
+        <size>24</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void do_hello(System.String)">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="Test`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-047.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-048.cs">
+    <type name="Stack`1[T]">
+      <method name="Void .ctor()">
+        <size>20</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-049.cs">
+    <type name="X`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A(T)">
+        <size>1</size>
+      </method>
+      <method name="Void A(T[])">
+        <size>1</size>
+      </method>
+      <method name="Void A(T[,])">
+        <size>1</size>
+      </method>
+      <method name="Void A(T[][])">
+        <size>1</size>
+      </method>
+      <method name="Void B(T[])">
+        <size>1</size>
+      </method>
+      <method name="Void B(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void C(T[])">
+        <size>1</size>
+      </method>
+      <method name="Void C(T[,])">
+        <size>1</size>
+      </method>
+      <method name="Void C(System.Int32[,,])">
+        <size>1</size>
+      </method>
+      <method name="Void D(Int32, T)">
+        <size>1</size>
+      </method>
+      <method name="Void D(T, Int64)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-050.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T F[T](System.String, T)">
+        <size>2</size>
+      </method>
+      <method name="T G[T]()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(System.String, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-051.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>43</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-052.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Create()">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-053.cs">
+    <type name="ReferenceTypeCounters.SimpleCounter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Increment()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="ReferenceTypeCounters.PrintingCounter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="Void Increment()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="ReferenceTypeCounters.ExplicitCounter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ICounter.Increment()">
+        <size>15</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="ReferenceTypeCounters.InterfaceCounter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ICounter.Increment()">
+        <size>15</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="Void Increment()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test.Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(T)">
+        <size>50</size>
+      </method>
+    </type>
+    <type name="Test.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>97</size>
+      </method>
+    </type>
+    <type name="ValueTypeCounters.SimpleCounter">
+      <method name="Void Increment()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="ValueTypeCounters.PrintingCounter">
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="Void Increment()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="ValueTypeCounters.ExplicitCounter">
+      <method name="Void ICounter.Increment()">
+        <size>15</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="ValueTypeCounters.InterfaceCounter">
+      <method name="Void ICounter.Increment()">
+        <size>15</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="Void Increment()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-054.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello()">
+        <size>1</size>
+      </method>
+      <method name="C op_Implicit(B)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="B op_Explicit(C)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Simple[T](T)">
+        <size>36</size>
+      </method>
+      <method name="Void Interface[T](T)">
+        <size>8</size>
+      </method>
+      <method name="Void Class[T](T)">
+        <size>71</size>
+      </method>
+      <method name="Void Array[T](T[])">
+        <size>21</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-055.cs">
+    <type name="N1.A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.A`1+B[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.A`1+C`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-056.cs">
+    <type name="Log`1[T]">
+      <method name="Void .ctor()">
+        <size>31</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_InstanceCount()">
+        <size>6</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>32</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>7</size>
+      </method>
+      <method name="T get_Last()">
+        <size>47</size>
+      </method>
+      <method name="Void set_Last(T)">
+        <size>68</size>
+      </method>
+      <method name="T[] get_All()">
+        <size>70</size>
+      </method>
+    </type>
+    <type name="TestLog">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestLog+MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>203</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-057.cs">
+    <type name="Hello`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IHello`1 Test[U]()">
+        <size>6</size>
+      </method>
+      <method name="Void Print(T)">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>48</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-058.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1[T] get_Blah()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-059.cs">
+    <type name="X`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-060.cs">
+    <type name="MyList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="MyList`1[T] Map[T]()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-061.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="U Method[U](Test`2[T,U])">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>83</size>
+      </method>
+    </type>
+    <type name="Test`2[A,B]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="B Invoke(A)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(A, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="B EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="System.String &lt;Main&gt;m__0(Double)">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-062.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Test(Int32, Int64)">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>84</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>107</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-063.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 IndexOf[T](T[], T, Int32, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 IndexOf(System.Array, System.Object)">
+        <size>15</size>
+      </method>
+      <method name="Int32 IndexOf(System.Array, System.Object, Int32, Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>65</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-064.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1+Hello[T] GetHello()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1+Hello[T]">
+      <method name="Void .ctor(Foo`1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="IHello`1 IFoo&lt;T&gt;.GetHello()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-065.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>17</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>216</size>
+      </method>
+    </type>
+    <type name="ComparablePair`2[T,U]">
+      <method name="Void .ctor(T, U)">
+        <size>15</size>
+      </method>
+      <method name="Int32 CompareTo(ComparablePair`2)">
+        <size>68</size>
+      </method>
+      <method name="Boolean Equals(ComparablePair`2)">
+        <size>73</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>64</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-066.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1+Bar`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.FooEx`2[V,W]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-067.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U](Test+Foo`1[U], U)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Add(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Void Main()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test+Foo`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(T, T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-068.cs">
+    <type name="Martin.Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Baulig.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-069.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(IFoo`1)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(IFoo)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-070.cs">
+    <type name="Martin.Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-071.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Test[U](U)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-072.cs">
+    <type name="Log`1[T]">
+      <method name="Void .ctor()">
+        <size>31</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_InstanceCount()">
+        <size>6</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>32</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>7</size>
+      </method>
+      <method name="T get_Last()">
+        <size>47</size>
+      </method>
+      <method name="Void set_Last(T)">
+        <size>68</size>
+      </method>
+      <method name="T[] get_All()">
+        <size>70</size>
+      </method>
+    </type>
+    <type name="TestLog">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestLog+MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>208</size>
+      </method>
+      <method name="Void TestPairLog()">
+        <size>182</size>
+      </method>
+    </type>
+    <type name="Pair`2[T,U]">
+      <method name="Void .ctor(T, U)">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-073.cs">
+    <type name="MyList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="MyList`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(T)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="MyList`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-074.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor(T, T)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>85</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(T, T)">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-075.cs">
+    <type name="ArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ArrayList`1[T]">
+      <method name="Void IExtensible&lt;T&gt;.AddAll[U](U)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-076.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1 GetFoo(T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(T)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-078.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>66</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>187</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>64</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-079.cs">
+    <type name="A.ArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void InsertAll(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B.ArrayList`2[X,Y]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddAll[Z](Z)">
+        <size>18</size>
+      </method>
+      <method name="Void InsertAll(Y)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C.Foo`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C.ArrayList`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddAll[Y](Y)">
+        <size>13</size>
+      </method>
+      <method name="Void InsertAll(C.Foo`1[X])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A.ArrayList`1[T]">
+      <method name="Void A.IExtensible&lt;T&gt;.AddAll[U](U)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-080.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[T](IFoo`1)">
+        <size>8</size>
+      </method>
+      <method name="Void InsertAll[U](IFoo`1)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-081.cs">
+    <type name="ArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddAll[U](U)">
+        <size>18</size>
+      </method>
+      <method name="Void InsertAll(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-082.cs">
+    <type name="Queue`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Queue`1+Enumerator[T]">
+      <method name="Void .ctor(Queue`1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-083.cs">
+    <type name="CollectionValueBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T[] ToArray()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="CollectionBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="SequencedBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ArrayBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T[] ToArray()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-084.cs">
+    <type name="HasherBuilder.ByPrototype`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IHasher`1 Examine()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="ArrayList`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IHasher`1 GetHasher()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-085.cs">
+    <type name="ArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 InsertAll[U](IFoo`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 InsertAll(IFoo`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 AddAll(IFoo`1)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-086.cs">
+    <type name="ArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 InsertAll[U](IFoo`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 InsertAll(IFoo`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 AddAll(IFoo`1)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-087.cs">
+    <type name="C5.HashedArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="C5.HashSet`1[T]">
+      <method name="Void .ctor(IHasher`1)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C5.KeyValuePairHasher`2[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-088.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="KeyValuePair`2[K,V]">
+      <method name="Void .ctor(K, V)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor(K)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-089.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(T, Int32 ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void Hello(T)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-090.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T InsertAll[U](U)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Bar`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T InsertAll[U](U)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-091.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1+Node[T] Test[V]()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1+Node[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-092.cs">
+    <type name="Element`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Void GetItem(T ByRef)">
+        <size>13</size>
+      </method>
+      <method name="T GetItem(Int32, T ByRef)">
+        <size>7</size>
+      </method>
+      <method name="Void SetItem(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1+Node[T] Test()">
+        <size>52</size>
+      </method>
+    </type>
+    <type name="Foo`1+Node[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-093.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Void Hello[U]()">
+        <size>8</size>
+      </method>
+      <method name="Void maketreer(Foo`1+Node[T] ByRef)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Foo`1+Node[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-094.cs">
+    <type name="LinkedList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="LinkedList`1+Node[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="HashedLinkedList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-095.cs">
+    <type name="GuardedCollectionValue`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IDirectedCollectionValue`1 Backwards()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="GuardedSequenced`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IDirectedCollectionValue`1 Test()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="GuardedCollectionValue`1[T]">
+      <method name="IDirectedEnumerable`1 IDirectedEnumerable&lt;T&gt;.Backwards()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-096.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[T](Foo`1[T][], Int32)">
+        <size>27</size>
+      </method>
+      <method name="Void Quicksort[U](Foo`1[U][])">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-097.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IFoo.Test[Y,Z]()">
+        <size>1</size>
+      </method>
+      <method name="Void IFoo.Test[X]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bar`3[X,Y,Z]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bar`3[X,Y,Z]">
+      <method name="Void IBar&lt;X&gt;.Test()">
+        <size>1</size>
+      </method>
+      <method name="Void IBar&lt;Y,Z&gt;.Test()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-098.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IFoo.Test[Y,Z]()">
+        <size>1</size>
+      </method>
+      <method name="Void IFoo.Test[X]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bar`3[X,Y,Z]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bar`3[X,Y,Z]">
+      <method name="Void IBar&lt;X&gt;.Test()">
+        <size>1</size>
+      </method>
+      <method name="Void IBar&lt;Y,Z&gt;.Test()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-100.cs">
+    <type name="C5.ArrayBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C5.ArrayList`1[V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C5.ArrayBase`1[T]">
+      <method name="Void C5.ICollection&lt;T&gt;.Test[U]()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-101.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="SimpleStruct`1[T]">
+      <method name="Void .ctor(T)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-102.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`2[U,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-103.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void World[U](U, IFoo`1)">
+        <size>1</size>
+      </method>
+      <method name="Void World[V](IFoo`1)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Foo)">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-104.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="MainClass+Gen`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MainClass+Der">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-105.cs">
+    <type name="A.KeyValuePairComparer`2[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Compare(KeyValuePair`2)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="A.TreeBag`1[T]">
+      <method name="Void .ctor(IComparer`1)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Find(T ByRef)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="A.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>33</size>
+      </method>
+    </type>
+    <type name="B.KeyValuePair`2[X,Y]">
+      <method name="Void .ctor(X, Y)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B.KeyValuePairComparer`2[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Compare(B.KeyValuePair`2[K,V])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="B.TreeBag`1[T]">
+      <method name="Void .ctor(IComparer`1)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Find(T ByRef)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="B.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="A.KeyValuePair`2[X,Y]">
+      <method name="Void .ctor(X, Y)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-106.cs">
+    <type name="KeyValuePairComparer`2[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Compare(KeyValuePair`2)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="TreeBag`1[T]">
+      <method name="Void .ctor(IComparer`1, T)">
+        <size>21</size>
+      </method>
+      <method name="Int32 Find()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="KeyValuePair`2[X,Y]">
+      <method name="Void .ctor(X, Y)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-107.cs">
+    <type name="Tree`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Void Map[V](Mapper`2[T,V])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String themap(Int32)">
+        <size>17</size>
+      </method>
+      <method name="Void Test()">
+        <size>26</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Mapper`2[T,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="V Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="V EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-108.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="Test`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>75</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-109.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-110.cs">
+    <type name="List`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Map[U](U)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="SpecialList`1[V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Map[W](W)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-111.cs">
+    <type name="Collection`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Void Find(T ByRef)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="KeyValuePair`2[K,V]">
+      <method name="Void .ctor(K, V)">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor(K)">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-112.cs">
+    <type name="IC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Compare(Foo`1)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="List`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Sort(IComparer`1, T)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Sorting">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IntroSort[T](IComparer`1, T)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Sorting+Sorter`1[T]">
+      <method name="Void .ctor(IComparer`1, Int32, T)">
+        <size>26</size>
+      </method>
+      <method name="Void InsertionSort(Int32)">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="Foo`1[K]">
+      <method name="Void .ctor(K)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-113.cs">
+    <type name="List`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Map[V](Mapper`2[T,V])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="Mapper`2[T,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="V Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="V EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Double &lt;Main&gt;m__0(Int32)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-114.cs">
+    <type name="NaturalComparer`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Compare(T, T)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="X+Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 CompareTo(X+Test)">
+        <size>2</size>
+      </method>
+      <method name="Boolean Equals(X+Test)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-115.cs">
+    <type name="LinkedList`1[T]">
+      <method name="Void .ctor()">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor(T[])">
+        <size>44</size>
+      </method>
+      <method name="IMyList`1 Map[U](Mapper`2[T,U])">
+        <size>69</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>7</size>
+      </method>
+      <method name="T get_Item(Int32)">
+        <size>13</size>
+      </method>
+      <method name="Void set_Item(Int32, T)">
+        <size>14</size>
+      </method>
+      <method name="LinkedList`1+Node[T] get(Int32)">
+        <size>114</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>14</size>
+      </method>
+      <method name="Void Insert(Int32, T)">
+        <size>256</size>
+      </method>
+      <method name="Void RemoveAt(Int32)">
+        <size>113</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>148</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>68</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="LinkedList`1[T] op_Explicit(T[])">
+        <size>7</size>
+      </method>
+      <method name="LinkedList`1[T] op_Addition(LinkedList`1[T], LinkedList`1[T])">
+        <size>123</size>
+      </method>
+    </type>
+    <type name="LinkedList`1+Node[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor(T, Node, Node)">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="LinkedList`1+LinkedListEnumerator[T]">
+      <method name="Void .ctor(LinkedList`1)">
+        <size>26</size>
+      </method>
+      <method name="T get_Current()">
+        <size>24</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>71</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="SortedList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Insert(T)">
+        <size>137</size>
+      </method>
+    </type>
+    <type name="PrintableLinkedList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Print(System.IO.TextWriter)">
+        <size>89</size>
+      </method>
+    </type>
+    <type name="MyString">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Int32 CompareTo(MyString)">
+        <size>18</size>
+      </method>
+      <method name="Boolean Equals(MyString)">
+        <size>18</size>
+      </method>
+      <method name="System.String get_Value()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>467</size>
+      </method>
+    </type>
+    <type name="Mapper`2[A,R]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="R Invoke(A)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(A, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="R EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="LinkedList`1+LinkedListEnumerator[T]">
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="MyTest">
+      <method name="System.String &lt;Main&gt;m__0(Double)">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-116.cs">
+    <type name="Slow.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DoNothing[T]()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Slow.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>201</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-117.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test(T)">
+        <size>15</size>
+      </method>
+      <method name="Boolean Test()">
+        <size>25</size>
+      </method>
+      <method name="Boolean TestB()">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="Y`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Foo()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean TestB[T](T)">
+        <size>15</size>
+      </method>
+      <method name="Boolean TestA(System.Object)">
+        <size>10</size>
+      </method>
+      <method name="Int32 TestC()">
+        <size>32</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>107</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-118.cs">
+    <type name="Polynomial`1[E]">
+      <method name="Void .ctor()">
+        <size>19</size>
+      </method>
+      <method name="Void .ctor(E[])">
+        <size>14</size>
+      </method>
+      <method name="Polynomial`1[E] Add(Polynomial`1[E])">
+        <size>301</size>
+      </method>
+      <method name="Polynomial`1[E] Add(E)">
+        <size>26</size>
+      </method>
+      <method name="Polynomial`1[E] Mul(E)">
+        <size>78</size>
+      </method>
+      <method name="Polynomial`1[E] Mul(Polynomial`1[E])">
+        <size>221</size>
+      </method>
+      <method name="E Eval(E)">
+        <size>106</size>
+      </method>
+    </type>
+    <type name="TestPolynomial">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>148</size>
+      </method>
+    </type>
+    <type name="Int">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int Add(Int)">
+        <size>20</size>
+      </method>
+      <method name="Int Mul(Int)">
+        <size>20</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-119.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-120.cs">
+    <type name="SequencedHasher`2[S,W]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(S, S)">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="Sequenced`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(ISequenced`1)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-121.cs">
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Add(T)">
+        <size>2</size>
+      </method>
+      <method name="Void AddRange(System.Object)">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-122.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>26</size>
+      </method>
+      <method name="Void D(Int32)">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="A`1[T]">
+      <method name="Void .ctor(B, T)">
+        <size>21</size>
+      </method>
+      <method name="Void Run()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="A`1+B[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-123.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A`1+Foo[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="A`1+Bar`1[T,U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-124.cs">
+    <type name="FooCollection`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="FooCollection`1[T]">
+      <method name="T IFoo&lt;T&gt;.get_Item(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Void IFoo&lt;T&gt;.set_Item(Int32, T)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-125.cs">
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-126.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean foo()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="MyFilter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="K Is(IB)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="MyBFilter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="B Is(IB)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Collections.Generic.List`1[T] foo1[T](Filter`1)">
+        <size>38</size>
+      </method>
+      <method name="Void Main()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="K">
+      <method name="Boolean foo()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-127.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add__changed(A`1+Changed[T])">
+        <size>24</size>
+      </method>
+      <method name="Void remove__changed(A`1+Changed[T])">
+        <size>24</size>
+      </method>
+      <method name="Void Register(A`1+Changed[T])">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+      <method name="Void Del(A`1[System.Int32])">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="A`1+Changed[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(A`1[T])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(A`1[T], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-128.cs">
+    <type name="FLMID.Bugs.ParametersOne.Class`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="FLMID.Bugs.ParametersOne.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>120</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-129.cs">
+    <type name="B.Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-130.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>846</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-131.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>1330</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-132.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Nullable`1 Sqrt(Nullable`1)">
+        <size>55</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>63</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-133.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>201</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Int32 get_X()">
+        <size>7</size>
+      </method>
+      <method name="Void set_X(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void Set(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-134.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>112</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="System.String Fmt()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-135.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>116</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-136.cs">
+    <type name="Martin.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>148</size>
+      </method>
+    </type>
+    <type name="Martin.A">
+      <method name="Void .ctor(Int64)">
+        <size>8</size>
+      </method>
+      <method name="B op_Explicit(A)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Martin.B">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="A op_Implicit(B)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-137.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>134</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-138.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-140.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>132</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-141.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>90</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-142.cs">
+    <type name="Assert">
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void IsNull[T](System.String, Nullable`1)">
+        <size>24</size>
+      </method>
+      <method name="Void IsNotNull[T](System.String, Nullable`1)">
+        <size>24</size>
+      </method>
+      <method name="Int32 get_Errors()">
+        <size>6</size>
+      </method>
+      <method name="Void Error(System.String, System.String)">
+        <size>25</size>
+      </method>
+      <method name="Void IsTrue(System.String, Boolean)">
+        <size>18</size>
+      </method>
+      <method name="Void IsFalse(System.String, Boolean)">
+        <size>18</size>
+      </method>
+      <method name="Void IsTrue(System.String, Nullable`1)">
+        <size>36</size>
+      </method>
+      <method name="Void IsFalse(System.String, Nullable`1)">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>1599</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-143.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>497</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-144.cs">
+    <type name="Test.Application">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-145.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor(T[,])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-146.cs">
+    <type name="MyLinkedList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyLinkedList`1+Node[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="SortedList`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Insert(U)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-147.cs">
+    <type name="B.Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A.IFoo.Hello(IFoo)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-148.cs">
+    <type name="Test1">
+      <method name="Void Foo[S,OP](UInt32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test1+IOp`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test2">
+      <method name="Void Foo[T,OP](UInt32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test2+IOp`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-149.cs">
+    <type name="Test1">
+      <method name="Void Foo[S,OP](UInt32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test1+IOp`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test2">
+      <method name="Void Foo[T,OP](UInt32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test2+IOp`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-150.cs">
+    <type name="Test1">
+      <method name="Void Foo[T,OP](UInt32)">
+        <size>35</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test1+Op">
+      <method name="UInt16 Test1.IOp&lt;ushort&gt;.Func(UInt32)">
+        <size>5</size>
+      </method>
+      <method name="UInt32 Test1.IOp&lt;uint&gt;.Func(UInt32)">
+        <size>4</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-151.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-152.cs">
+    <type name="EnumerableBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IFoo IFoo.Hello()">
+        <size>7</size>
+      </method>
+      <method name="IFoo`1 Hello()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="CollectionBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="HashBag`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IFoo`1 Hello()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-153.cs">
+    <type name="MyClass`1[T]">
+      <method name="Void .ctor()">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-154.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T`1[X] M[X]()">
+        <size>13</size>
+      </method>
+      <method name="T`1[System.Int64] N()">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="T`1[X]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(X)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(X, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Int32 &lt;N&gt;m__1(Int64)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;M`1&gt;m__0[X](X)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-155.cs">
+    <type name="MyClass`1[T]">
+      <method name="Void .ctor()">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-156.cs">
+    <type name="FLMID.Bugs.Marshal15.D">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-157.cs">
+    <type name="kv`2[k,v]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="m`2[k,v]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="m`2[k,v]">
+      <method name="Void a&lt;kv&lt;k,v&gt;&gt;.x()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-158.cs">
+    <type name="Moo`1[C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Moo`1+Foo[C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-159.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>98</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-160.cs">
+    <type name="Fun`2[A,B]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="List`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="List`1[T2] Map[T2](Fun`2[T,T2])">
+        <size>6</size>
+      </method>
+      <method name="Void foo[T2]()">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-161.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="U apply[T,U](T, FP+Mapping`2[T,U])">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>56</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__0(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-162.cs">
+    <type name="Generic`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+    </type>
+    <type name="Generic`1+Delegate[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Generic`1[T], T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Generic`1[T], T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-163.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 getEnumerator(Int32)">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo`1+&lt;getEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>95</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-164.cs">
+    <type name="FunEnumerable">
+      <method name="Void .ctor(Int32, Int2Int)">
+        <size>21</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Int2Int">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="FunEnumerable+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>91</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-165.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable GetIt(System.Int32[])">
+        <size>30</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>119</size>
+      </method>
+    </type>
+    <type name="X+A">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>201</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>22</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-166.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>324</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="TestNew">
+      <method name="Void SetTest()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-167.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestNotAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestMultiAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Class1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Class2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Class3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>86</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-168.cs">
+    <type name="lis`1[a]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="lis`1[a] Rev[a](lis`1[a])">
+        <size>2</size>
+      </method>
+      <method name="lis`1[b] MapFromArray[a,b](a[])">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-169.cs">
+    <type name="list`1[A]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="list`1+Cons`1[A,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="list`1+Nil`1[A,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Rev[T](list`1[T])">
+        <size>43</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-170.cs">
+    <type name="C`1[A]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo[B](C`1[B])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void append[A](C`1[A])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-171.cs">
+    <type name="list`1[a]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Nil`1[a]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-172.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-173.cs">
+    <type name="List`1[t]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo[b](List`1[t])">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-174.cs">
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-175.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo Test(Foo, Foo)">
+        <size>10</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-176.cs">
+    <type name="lis`1[a]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="fn`3[a,b,r]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="r apply(a, b)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="fn1`1[a]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="lis`1[a] apply(lis`1[a], lis`1[a])">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="b FoldLeft[a,b](a, b, fn`3[a,b,b])">
+        <size>9</size>
+      </method>
+      <method name="lis`1[a] RevAppend[a](lis`1[a], lis`1[a])">
+        <size>2</size>
+      </method>
+      <method name="lis`1[lis`1[a]] Concat[a](lis`1[lis`1[a]])">
+        <size>17</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-177.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>25</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>96</size>
+      </method>
+    </type>
+    <type name="X`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 Y(IEnumerable`1)">
+        <size>7</size>
+      </method>
+      <method name="T Z(IList`1, Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-178.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-179.cs">
+    <type name="X`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_i()">
+        <size>2</size>
+      </method>
+      <method name="Void set_i(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 myMain()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-180.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>197</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-181.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator get_GetIt()">
+        <size>8</size>
+      </method>
+      <method name="Void set_GetIt(IEnumerator)">
+        <size>1</size>
+      </method>
+      <method name="IEnumerable get_Item(Int32)">
+        <size>30</size>
+      </method>
+      <method name="Void set_Item(Int32, IEnumerable)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>186</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>126</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>145</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-182.cs">
+    <type name="C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetId()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo[a](a)">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-183.cs">
+    <type name="test.Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Lookup(T)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="test.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>71</size>
+      </method>
+    </type>
+    <type name="test.Test`1+&lt;Lookup&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>84</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-184.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>68</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__0(System.String)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-185.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>47</size>
+      </method>
+    </type>
+    <type name="FP">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T[] appendArrays[T](T[][])">
+        <size>140</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-186.cs">
+    <type name="Tuple`2[a,b]">
+      <method name="Void .ctor(a, b)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>120</size>
+      </method>
+    </type>
+    <type name="TestSimpleObject">
+      <method name="Void .ctor()">
+        <size>25</size>
+      </method>
+      <method name="Void Print()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-187.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T next()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Goo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-188.cs">
+    <type name="Foo">
+      <method name="Void .ctor(Object[])">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor(Object[], Object)">
+        <size>217</size>
+      </method>
+      <method name="Void add_DoSomething(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_DoSomething(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;Foo&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;Foo&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-189.cs">
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Cont`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-190.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1+Node[T] GetRoot()">
+        <size>6</size>
+      </method>
+      <method name="Void Test(Foo`1+Node[T])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo`1+Node[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1+ConcatNode[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-191.cs">
+    <type name="Test1.Test">
+      <method name="IEnumerable`1 Replace[T]()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Test2.Test`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Replace[T]()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Test3.Test`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Replace[T](IEnumerable`1, IEnumerable`1)">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Test4.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Replace[T]()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Test5.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Replace[T](T)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="Test6.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Replace[T](T)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="Test7.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Replace[T](T[])">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test1.Test+&lt;Replace&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test2.Test`1+&lt;Replace&gt;c__Iterator1`1[S,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator2`1[S,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test4.Test+&lt;Replace&gt;c__Iterator3`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test5.Test+&lt;Replace&gt;c__Iterator4`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>70</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test6.Test+&lt;Replace&gt;c__Iterator5`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>82</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test7.Test+&lt;Replace&gt;c__Iterator6`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>82</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test1.Test+&lt;Replace&gt;c__Iterator0`1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test2.Test`1+&lt;Replace&gt;c__Iterator1`1[S,T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator2`1[S,T]">
+      <method name="KeyValuePair`2 System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test4.Test+&lt;Replace&gt;c__Iterator3`1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test5.Test+&lt;Replace&gt;c__Iterator4`1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="Test6.Test+&lt;Replace&gt;c__Iterator5`1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="Test7.Test+&lt;Replace&gt;c__Iterator6`1[T]">
+      <method name="T[] System.Collections.Generic.IEnumerator&lt;T[]&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T[]&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-192.cs">
+    <type name="xX">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-193.cs">
+    <type name="OrderedMultiDictionary`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 EnumerateRange(RedBlackTree`1+RangeTester[S])">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+RangeTester[S]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(S)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(S, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="OrderedMultiDictionary`2+&lt;EnumerateKeys&gt;c__Iterator0[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>48</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="OrderedMultiDictionary`2+&lt;EnumerateKeys&gt;c__Iterator0[T,U]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator1[S]">
+      <method name="S System.Collections.Generic.IEnumerator&lt;S&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-194.cs">
+    <type name="RedBlackTree`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 EnumerateRange(RedBlackTree`1+RangeTester[S])">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="OrderedMultiDictionary`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+RangeTester[S]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(S)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(S, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator0[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="OrderedMultiDictionary`2+&lt;EnumerateKeys&gt;c__Iterator1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>48</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator0[S]">
+      <method name="S System.Collections.Generic.IEnumerator&lt;S&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="OrderedMultiDictionary`2+&lt;EnumerateKeys&gt;c__Iterator1[T,U]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-195.cs">
+    <type name="OrderedMultiDictionary`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void EnumerateRange(RedBlackTree`1+RangeTester[S])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="RedBlackTree`1+RangeTester[S]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(S)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(S, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-196.cs">
+    <type name="Dict">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>114</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-197.cs">
+    <type name="Martin.Collections.Generic.EqualityComparer`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>95</size>
+      </method>
+      <method name="Int32 GetHashCode(T)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Equals(T, T)">
+        <size>0</size>
+      </method>
+      <method name="Martin.Collections.Generic.EqualityComparer`1[T] get_Default()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Martin.Collections.Generic.EqualityComparer`1+DefaultComparer[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetHashCode(T)">
+        <size>14</size>
+      </method>
+      <method name="Boolean Equals(T, T)">
+        <size>41</size>
+      </method>
+    </type>
+    <type name="Martin.Collections.Generic.IEquatableOfTEqualityComparer`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetHashCode(T)">
+        <size>14</size>
+      </method>
+      <method name="Boolean Equals(T, T)">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="Martin.Collections.Generic.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-198.cs">
+    <type name="ClassLibrary2.List1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassLibrary2.List2`1[T]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Void AddItem(T)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="ClassLibrary2.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-199.cs">
+    <type name="Splay`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-200.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T QueryInterface[T](System.Object)">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-201.cs">
+    <type name="HashSet`1[T]">
+      <method name="Void .ctor(Int64)">
+        <size>14</size>
+      </method>
+      <method name="Int64 Test()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>83</size>
+      </method>
+    </type>
+    <type name="HashSet`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>75</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Int64 System.Collections.Generic.IEnumerator&lt;long&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-202.cs">
+    <type name="Generic`1[T]">
+      <method name="Void .ctor()">
+        <size>20</size>
+      </method>
+      <method name="T get_Item(Int32, Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32, T)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Fault">
+      <method name="Void Main()">
+        <size>51</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-203.cs">
+    <type name="C`2[X,Y]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo[A,B]()">
+        <size>14</size>
+      </method>
+      <method name="Void bar[A,B]()">
+        <size>69</size>
+      </method>
+    </type>
+    <type name="C`2+Q`2[X,Y,A,B]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void apply(C`2[X,Y])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-204.cs">
+    <type name="Map`1[b]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="a Fold1[a](a)">
+        <size>2</size>
+      </method>
+      <method name="c Fold[c](c)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="LocalContext">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="a Fold[a](a)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-205.cs">
+    <type name="Foo`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Func(U)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(System.Type, System.Object)">
+        <size>31</size>
+      </method>
+      <method name="Void Main()">
+        <size>144</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-206.cs">
+    <type name="Continuation`2[R,A]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Continuation`2[R,A] CallCC[B](System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Continuation`2[B,A] myTry[A,B](B, A)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-207.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void p(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-208.cs">
+    <type name="SomeClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Do(System.Object)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-209.cs">
+    <type name="ClassLibrary3.Dictionary1`2[TKey,TValue]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassLibrary3.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-210.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T next()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Goo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-211.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void f(Boolean, Boolean)">
+        <size>59</size>
+      </method>
+      <method name="Void Main()">
+        <size>448</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-212.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Fun[T](T)">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="SomeStruct">
+      <method name="Boolean get_Valid()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-213.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Fun[T](T)">
+        <size>78</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="SomeStruct">
+      <method name="Int32 get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Foo(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-214.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>83</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-215.cs">
+    <type name="R">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-216.cs">
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Ret`1 Foo[T]()">
+        <size>2</size>
+      </method>
+      <method name="Ret Foo()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="DerivedClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Ret`1 Foo[T]()">
+        <size>2</size>
+      </method>
+      <method name="Ret Foo()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-217.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], IEnumerable`1)">
+        <size>44</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>97</size>
+      </method>
+      <method name="IEnumerable`1 FromTo(Int32, Int32)">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="Fun`2[A1,R]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="R Invoke(A1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(A1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="R EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MyTest">
+      <method name="System.String &lt;Main&gt;m__0(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="MyTest+&lt;Map&gt;c__Iterator0`4[Aa,Af,Rf,Rr]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>207</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MyTest+&lt;FromTo&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>118</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MyTest+&lt;Map&gt;c__Iterator0`4[Aa,Af,Rf,Rr]">
+      <method name="Rr System.Collections.Generic.IEnumerator&lt;Rr&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Rr&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+    <type name="MyTest+&lt;FromTo&gt;c__Iterator1">
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-218.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-219.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>75</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-220.cs">
+    <type name="A`1[T1]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+B`1[T1,T2]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+B`1+C`1[T1,T2,T3]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="PopQuiz">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>148</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-221.cs">
+    <type name="C1`1[IFoo]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="C1`1[T] Hoge[T](C1`1[T])">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="C1`1[T] Hoge[T](C1`1[T])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-222.cs">
+    <type name="Mona`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Mona`1[K] GetMona[K]()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-223.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo`1[K] Hoge[K]()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>72</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-224.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-225.cs">
+    <type name="Set`1[Element]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Locator locate(Element)">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="Set`1+Node[Element]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="SetTest">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Set`1+Locator+Replace[Element]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Set`1+Node[Element])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Set`1+Node[Element], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Set`1+&lt;locate&gt;c__AnonStorey0[Element]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(Set`1+Node[Element])">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Set`1+Locator[Element]">
+      <method name="Void .ctor(Replace)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-226.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>84</size>
+      </method>
+    </type>
+    <type name="Container`1[T]">
+      <method name="Void .ctor(T)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-227.cs">
+    <type name="Foo`1[G]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-228.cs">
+    <type name="GenParAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="cons`2[A,B]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void abc[M]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-229.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 CompareTo(B)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-231.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-233.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>25</size>
+      </method>
+      <method name="Void list_ListChanged(System.Object, System.ComponentModel.ListChangedEventArgs)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-234.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IFoo`1 GetFooGeneric[T]()">
+        <size>2</size>
+      </method>
+      <method name="IFoo GetFoo()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-235.cs">
+    <type name="GettingStarted">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-236.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Foo`1[T])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test(Foo`1[System.Int32])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-237.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(T)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>60</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-238.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>39</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-239.cs">
+    <type name="Foo`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(T, U)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test(Int32, U)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test(T, Single)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test(Int32, Single)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>237</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-240.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Void IMyInterface&lt;string&gt;.add_MyEvent(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void IMyInterface&lt;string&gt;.remove_MyEvent(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void IMyInterface&lt;int&gt;.add_MyEvent(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void IMyInterface&lt;int&gt;.remove_MyEvent(System.EventHandler)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-241.cs">
+    <type name="a">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void func[T](T ByRef)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="b">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void func[T](T ByRef)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="main">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-242.cs">
+    <type name="Container`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ReferenceType">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 CompareTo(ReferenceType)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="MyValueType">
+      <method name="Int32 CompareTo(MyValueType)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-243.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo[T]()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>148</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-244.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Get[T]()">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Get[T]()">
+        <size>30</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-245.cs">
+    <type name="DerivedGenericClass`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void Baz()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-246.cs">
+    <type name="TestCase.CTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Bar()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestCase.CGenericTest`2[T,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="V Foo()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-247.cs">
+    <type name="EnumerableBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="CollectionValueBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void raiseItemsAdded(T, Int32)">
+        <size>1</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="CollectionValueBase`1+RaiseForRemoveAllHandler[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CircularQueue`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>8</size>
+      </method>
+      <method name="Void Enqueue(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="HashSet`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void RemoveAll[U](IEnumerable`1)">
+        <size>7</size>
+      </method>
+      <method name="Void AddAll[U](IEnumerable`1)">
+        <size>63</size>
+      </method>
+      <method name="Boolean searchoradd(T ByRef, Boolean, Boolean, Boolean)">
+        <size>2</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CircularQueue`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="HashSet`1+&lt;GetEnumerator&gt;c__Iterator1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="CircularQueue`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="HashSet`1+&lt;GetEnumerator&gt;c__Iterator1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-248.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test(System.Object)">
+        <size>19</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-249.cs">
+    <type name="EnumerableBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="ArrayBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="HashedArrayList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ArrayBase`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-250.cs">
+    <type name="GuardedIndexedSorted`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IIndexedSorted`1 Map[V](Fun`2[T,V])">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Fun`2[R,S]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="S Invoke(R)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(R, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="S EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-251.cs">
+    <type name="SortedIndexedTester`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(ISorted`1)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-252.cs">
+    <type name="EqualityComparer`1[T]">
+      <method name="Void .cctor()">
+        <size>16</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="SequencedEqualityComparer`2[T,W]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-253.cs">
+    <type name="CollectionValueTester`2[R,S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ExtensibleTester`1[U]">
+      <method name="Void .ctor(U)">
+        <size>14</size>
+      </method>
+      <method name="Void Direct()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Extensible`1[V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddAll[W](IEnumerable`1)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-254.cs">
+    <type name="HashedLinkedList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="HashedLinkedList`1[T] GetList()">
+        <size>6</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>55</size>
+      </method>
+      <method name="Void Test(HashedLinkedList`1[T])">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-255.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Foo[T]()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Foo[T]()">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-256.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void Run()">
+        <size>151</size>
+      </method>
+    </type>
+    <type name="Test+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>129</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.String System.Collections.Generic.IEnumerator&lt;string&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-257.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-258.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-259.cs">
+    <type name="Class1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MethodOfClass1(T, MyType)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="MyType">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MethodOfMyBaseType()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MyBaseType">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MethodOfMyBaseType()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-260.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-261.cs">
+    <type name="Cons`2[T,U]">
+      <method name="Void .ctor(T, U)">
+        <size>21</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="List`1[A]">
+      <method name="Void .ctor(A)">
+        <size>9</size>
+      </method>
+      <method name="Void .ctor(A, List`1)">
+        <size>9</size>
+      </method>
+      <method name="Void zip[B](List`1[B])">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-262.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void f1(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void f2(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void f3(Test)">
+        <size>1</size>
+      </method>
+      <method name="Void f4(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void f5(Int16)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>163</size>
+      </method>
+      <method name="Void f6(ParamEnum)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-263.cs">
+    <type name="Foo`1[S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="ICloneable Test(S)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="ConvertHelper">
+      <method name="IEnumerator`1 Test[S,T](S)">
+        <size>22</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ConvertHelper+&lt;Test&gt;c__Iterator0`2[S,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>80</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-264.cs">
+    <type name="BaseList`1[SubType]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="XXX">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Crash">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-265.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-266.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test`1+Inner`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-267.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](Handler`1[T])">
+        <size>34</size>
+      </method>
+      <method name="Void Response[T](Handler`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Handler`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="T+&lt;Foo&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(IAsyncResult)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-268.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-269.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Beer(Nullable`1)">
+        <size>54</size>
+      </method>
+      <method name="Int64 PubToLong(IrishPub)">
+        <size>12</size>
+      </method>
+      <method name="Int32 Test(Nullable`1)">
+        <size>53</size>
+      </method>
+      <method name="Int32 TestWithNull(Nullable`1)">
+        <size>55</size>
+      </method>
+      <method name="Nullable`1 Foo(Boolean)">
+        <size>24</size>
+      </method>
+      <method name="Int32 Test(Boolean)">
+        <size>54</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>194</size>
+      </method>
+    </type>
+    <type name="IrishPub">
+      <method name="Void .ctor(IrishBeer)">
+        <size>8</size>
+      </method>
+      <method name="Int64 op_Implicit(Nullable`1)">
+        <size>36</size>
+      </method>
+      <method name="Nullable`1 op_Implicit(Int64)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-270.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Nullable`1)">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-271.cs">
+    <type name="Qux`2[X,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>8</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Foo`2[X,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 CompareTo(Test`1[T])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="Qux`2+GetEnumerator&gt;c__Iterator0[X,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Qux`2+&lt;GetEnumerator&gt;c__Iterator1[X,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Qux`2+GetEnumerator&gt;c__Iterator0[X,V]">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Qux`2+&lt;GetEnumerator&gt;c__Iterator1[X,V]">
+      <method name="V System.Collections.Generic.IEnumerator&lt;V&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-272.cs">
+    <type name="X">
+      <method name="Void Foo[T](Handler`1[T])">
+        <size>27</size>
+      </method>
+      <method name="Void Response[T](Handler`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Void Test[T](T)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Handler`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Foo&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(IAsyncResult)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-273.cs">
+    <type name="ThisBaseClass`3[A,B,C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ThatBaseClass`3[B,A,C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ThisClass`3[A,B,C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ThatClass`3[B,A,C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ThisClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ThatClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-274.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>447</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Int64)">
+        <size>8</size>
+      </method>
+      <method name="Foo op_Implicit(Int64)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor(Foo)">
+        <size>8</size>
+      </method>
+      <method name="Bar op_Implicit(Foo)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Baz">
+      <method name="Void .ctor(Foo)">
+        <size>8</size>
+      </method>
+      <method name="Baz op_Explicit(Foo)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-275.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="Test+C">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Test+D`2[T,U]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Test+E`1[T]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-276.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="Tests+GenericClass`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Z(IList`1, Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-277.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-278.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-279.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IList`1 Bar[T]()">
+        <size>12</size>
+      </method>
+      <method name="Void Bar()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="BugReport">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-280.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>69</size>
+      </method>
+    </type>
+    <type name="Test+TestDel">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-281.cs">
+    <type name="List">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddRange[T](ICollection`1)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-282.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo+Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-283.cs">
+    <type name="Point">
+      <method name="Void .ctor(Int32, Int32)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="TestPoint">
+      <method name="Void Serialize(IFoo)">
+        <size>39</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-284.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CollectionTester">
+      <method name="Int32 Test[T](IList`1)">
+        <size>67</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>522</size>
+      </method>
+    </type>
+    <type name="InterfaceTester">
+      <method name="Void .cctor()">
+        <size>136</size>
+      </method>
+      <method name="Int32 Test(System.Type, System.Type[])">
+        <size>434</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>532</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>36</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-285.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-286.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor(Type)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>76</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-287.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>36</size>
+      </method>
+      <method name="Void D()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-288.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test(Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Foo(Int32)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-289.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Ev1(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Ev1(D)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Consts">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>94</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-290.cs">
+    <type name="GenericEventNotUsedTest`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_TestEvent(GenericEventHandler`2[GenericEventNotUsedTest`1[T],T])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_TestEvent(GenericEventHandler`2[GenericEventNotUsedTest`1[T],T])">
+        <size>24</size>
+      </method>
+      <method name="Void RaiseTestEvent(T)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="TestEntry">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="GenericEventHandler`2[U,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(U, V)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(U, V, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-291.cs">
+    <type name="Global">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+      <method name="System.String Test2(Nullable`1)">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-292.cs">
+    <type name="Test.A`1[TA]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test.Handler`1[TA]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(TA)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(TA, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-293.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Invalid(T)">
+        <size>21</size>
+      </method>
+      <method name="Void Other(IEnumerable`1)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-294.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="A Test(A, B)">
+        <size>10</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>73</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-295.cs">
+    <type name="Test.Cache`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.MyType`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-296.cs">
+    <type name="MyCollection`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-297.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-298.cs">
+    <type name="A">
+      <method name="Void .ctor(TestFunc`1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>46</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="TestFunc`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void &lt;a&gt;m__0(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-299.cs">
+    <type name="N.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-300.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>66</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-301.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-302.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+    <type name="Test+GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test+GetEnumerator&gt;c__Iterator0">
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-303.cs">
+    <type name="test.BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Hello()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="test.Printer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Print[T](T)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="test.PrinterImpl">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Print[T](T)">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="test.Starter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-304.cs">
+    <type name="test.BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Hello()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="test.Printer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Print[T](System.Object)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="test.PrinterImpl">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Print[T](System.Object)">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="test.Starter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-305.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>82</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>54</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-306.cs">
+    <type name="FuParentClass`1[Trow]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FuParentClass`1+FuChildClass[Trow]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-307.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 g()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="Foo`1+F[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-308.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Comparison`1[U] WrapComparison[U](System.Comparison`1[U])">
+        <size>26</size>
+      </method>
+      <method name="Test+MyComparison`1[W] WrapMyComparison[W](Test+MyComparison`1[W])">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 compare(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 compare(System.String, System.String)">
+        <size>8</size>
+      </method>
+      <method name="Void test(Int32)">
+        <size>29</size>
+      </method>
+      <method name="Void Main()">
+        <size>141</size>
+      </method>
+    </type>
+    <type name="Test+MyComparison`1[V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(V, V)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(V, V, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;WrapComparison&gt;c__AnonStorey0`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0(U, U)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Test+&lt;WrapMyComparison&gt;c__AnonStorey1`1[W]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1(W, W)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-309.cs">
+    <type name="Test`2[A,B]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[V,W](Test`2[A,W], Test`2[V,B])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-310.cs">
+    <type name="MonoBugs.IncompleteGenericInference">
+      <method name="Void DoSomethingGeneric[T1,T2](IEnumerable`1, IDictionary`2)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-312.cs">
+    <type name="CantCastGenericListToArray">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>51</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-313.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor(TestEnum)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-314.cs">
+    <type name="test.App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="test.ThisClass`2[T,O]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="test.OtherClass`2[O,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-315.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+B[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-316.cs">
+    <type name="X">
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Base">
+      <method name="Void Method[R]()">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void Method[S]()">
+        <size>7</size>
+      </method>
+      <method name="Void Method2[T]()">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-317.cs">
+    <type name="Foo`1[K]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar`1[Q]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar`1+Baz[Q]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-318.cs">
+    <type name="Foo`1[K]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar`1[Q]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar`1+Baz[Q]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Goo`1[Q]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-319.cs">
+    <type name="Temp`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Temp`1+Foo[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Temp`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>69</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Temp`1+Foo[T] System.Collections.Generic.IEnumerator&lt;Temp&lt;T&gt;.Foo&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-320.cs">
+    <type name="Foo`1[K]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-321.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void TestMethod[T](System.String, App+TGenericDelegate`1[T])">
+        <size>25</size>
+      </method>
+      <method name="Void ADelegate[T](System.String)">
+        <size>12</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>13</size>
+      </method>
+      <method name="Void Run()">
+        <size>49</size>
+      </method>
+    </type>
+    <type name="App+TGenericDelegate`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-322.cs">
+    <type name="MyBase`2[K,V]">
+      <method name="Void .ctor(Callback)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor(Callback)">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MyBase`2+Callback[K,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(K, V)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(K, V, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-323.cs">
+    <type name="MyBase`2[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(MyBase`2+Callback[K,V])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MyBase`2+Callback[K,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor(Callback)">
+        <size>7</size>
+      </method>
+      <method name="Void Test(MyBase`2+Callback[System.String,System.Int32])">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-324.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>19</size>
+      </method>
+      <method name="Void add_D(A)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_D(A)">
+        <size>22</size>
+      </method>
+      <method name="Void C()">
+        <size>36</size>
+      </method>
+      <method name="Void F(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="B+&lt;C&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>54</size>
+      </method>
+    </type>
+    <type name="B+&lt;C&gt;c__AnonStorey1+&lt;C&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>57</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-325.cs">
+    <type name="SomeClass`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>37</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-326.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>55</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-327.cs">
+    <type name="Tester`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Do()">
+        <size>50</size>
+      </method>
+    </type>
+    <type name="Reference">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Value">
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-328.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>34</size>
+      </method>
+      <method name="Void TestMethod(System.String, System.Collections.Generic.List`1[System.String], App+MyClass[])">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="App+MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-329.cs">
+    <type name="NullableInt">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>53</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-330.cs">
+    <type name="BaseCollection`1[T]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="BaseIntList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="IntList">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+    <type name="BaseCollection`1[T]">
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-331.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Map[S](S)">
+        <size>14</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-332.cs">
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Type Test()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>77</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-333.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(System.Object)">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-334.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>105</size>
+      </method>
+      <method name="Void DelegateMethod(Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Int32 DelegateMethod(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test+DelegateA">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Boolean)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Boolean, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+DelegateB">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-335.cs">
+    <type name="TestClass">
+      <method name="Boolean Test_1()">
+        <size>43</size>
+      </method>
+      <method name="Boolean Test_2()">
+        <size>48</size>
+      </method>
+      <method name="Boolean Test_3()">
+        <size>46</size>
+      </method>
+      <method name="Boolean Test_4()">
+        <size>29</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>60</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-336.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Type)">
+        <size>14</size>
+      </method>
+      <method name="System.Object get_Type()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Type(System.Object)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="N.C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar()">
+        <size>1</size>
+      </method>
+      <method name="Void Bar2()">
+        <size>1</size>
+      </method>
+      <method name="Void Bar3()">
+        <size>1</size>
+      </method>
+      <method name="Void Bar4()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="N.CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-337.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void SetValue[T](System.Object, T)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-338.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](IList`1)">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="FooList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 IndexOf(T)">
+        <size>6</size>
+      </method>
+      <method name="Void Insert(Int32, T)">
+        <size>6</size>
+      </method>
+      <method name="Void RemoveAt(Int32)">
+        <size>6</size>
+      </method>
+      <method name="T get_Item(Int32)">
+        <size>6</size>
+      </method>
+      <method name="Void set_Item(Int32, T)">
+        <size>6</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>6</size>
+      </method>
+      <method name="Void Clear()">
+        <size>6</size>
+      </method>
+      <method name="Boolean Contains(T)">
+        <size>6</size>
+      </method>
+      <method name="Void CopyTo(T[], Int32)">
+        <size>6</size>
+      </method>
+      <method name="Boolean Remove(T)">
+        <size>6</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>6</size>
+      </method>
+      <method name="Boolean get_IsReadOnly()">
+        <size>6</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>6</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-339.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void SerializeDictionary(IDictionary)">
+        <size>1</size>
+      </method>
+      <method name="Void SerializeDictionary(IDictionary`2)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="SerializerLazyDictionary">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="LazyDictionary">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>0</size>
+      </method>
+      <method name="Void System.Collections.Generic.IDictionary&lt;string,object&gt;.Add(System.String, System.Object)">
+        <size>6</size>
+      </method>
+      <method name="Boolean System.Collections.Generic.IDictionary&lt;string,object&gt;.ContainsKey(System.String)">
+        <size>6</size>
+      </method>
+      <method name="ICollection`1 System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Keys()">
+        <size>6</size>
+      </method>
+      <method name="Boolean System.Collections.Generic.IDictionary&lt;string,object&gt;.Remove(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Boolean System.Collections.Generic.IDictionary&lt;string,object&gt;.TryGetValue(System.String, System.Object ByRef)">
+        <size>6</size>
+      </method>
+      <method name="ICollection`1 System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Values()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Item(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Void System.Collections.Generic.IDictionary&lt;string,object&gt;.set_Item(System.String, System.Object)">
+        <size>6</size>
+      </method>
+      <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Add(KeyValuePair`2)">
+        <size>6</size>
+      </method>
+      <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Clear()">
+        <size>6</size>
+      </method>
+      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Contains(KeyValuePair`2)">
+        <size>6</size>
+      </method>
+      <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.CopyTo(System.Collections.Generic.KeyValuePair`2[System.String,System.Object][], Int32)">
+        <size>6</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.get_Count()">
+        <size>6</size>
+      </method>
+      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.get_IsReadOnly()">
+        <size>6</size>
+      </method>
+      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Remove(KeyValuePair`2)">
+        <size>6</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.GetEnumerator()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-340.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T[] FindAll[T](T[], System.Predicate`1[T])">
+        <size>7</size>
+      </method>
+      <method name="Boolean ProtectedOnly(System.Reflection.MemberInfo)">
+        <size>2</size>
+      </method>
+      <method name="System.Reflection.MemberInfo[] foo()">
+        <size>44</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-341.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetLength()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-342.cs">
+    <type name="Base`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T op_Implicit(Base`1[T])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestMain">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-343.cs">
+    <type name="Implementer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Combine[TOImplementer]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-344.cs">
+    <type name="ConfigurationElement">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CustomConfigurationElement">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CustomConfigurationElementCollection">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseCollection`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-345.cs">
+    <type name="ShiftReduceParser`2[TokenValueType,TokenLocationType]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Dump(System.String)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Parser">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void NoCall[T](T)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-346.cs">
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CreateSimpleCallSite[A]()">
+        <size>1</size>
+      </method>
+      <method name="Void CreateSimpleCallSite[A](Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void CreateSimpleCallSite(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-347.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Enumerable[T](System.String)">
+        <size>6</size>
+      </method>
+      <method name="IEnumerable Enumerable(Int32)">
+        <size>6</size>
+      </method>
+      <method name="IEnumerable Enumerable(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-348.cs">
+    <type name="Bar`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void OnWorldDestroyed()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Baz`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DestroyWorld(U)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Bling">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-349.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>103</size>
+      </method>
+      <method name="Int32 f2(IList, IList)">
+        <size>2</size>
+      </method>
+      <method name="Int32 f2(IList, System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X+Function`3[T1,T2,R]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="R Invoke(T1, T2)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T1, T2, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="R EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-350.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(T)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-351.cs">
+    <type name="TestThing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="TestThing">
+      <method name="Int32 SetEnum(System.String, System.Enum)">
+        <size>2</size>
+      </method>
+      <method name="Int32 SetEnum(Int32, System.Enum)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-352.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>125</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-353.cs">
+    <type name="Bug.RedSkyTimeCode">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CopyTo(Bug.xxx*)">
+        <size>99</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Convert(Bug.xxx*, UInt64*)">
+        <size>93</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-354.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-355.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String Foo[T](System.String)">
+        <size>6</size>
+      </method>
+      <method name="Boolean Foo(System.String)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String Foo[T](System.String)">
+        <size>6</size>
+      </method>
+      <method name="Boolean Goo(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Boolean Foo(System.String)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-356.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(B+E)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-357.cs">
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-358.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Boolean op_Equality(Foo, Foo)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_Inequality(Foo, Foo)">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-359.cs">
+    <type name="BaseGeneric`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseGeneric`1+InnerDerived[T]">
+      <method name="Void .ctor(T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseGeneric`1+GenericInnerDerived`1[T,U]">
+      <method name="Void .ctor(T, U)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseConcrete">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Concrete_A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Concrete_B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseGeneric_2`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseGeneric_2`2+InnerDerived[T,U]">
+      <method name="Void .ctor(T, U)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseGeneric_1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Concrete_2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-360.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo[T](T, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo(System.String, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 InvokeMethod(System.String, System.Object[])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-361.cs">
+    <type name="Thing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>164</size>
+      </method>
+      <method name="Void Method(Thing+Handler, System.String[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Thing+Handler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Thing">
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__1()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-362.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Assert[T](T)">
+        <size>1</size>
+      </method>
+      <method name="Void Assert[T](T, T)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>83</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-363.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void InsertAt[T](T[], Int32, T[])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>39</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-364.cs">
+    <type name="BugReport.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>307</size>
+      </method>
+    </type>
+    <type name="BugReport.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Nullable`1 get_Counter()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Counter(Nullable`1)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-365.cs">
+    <type name="B.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>51</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-366.cs">
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Assert[T](T, T)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="MyType">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 op_Implicit(MyType)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-367.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Repro">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar[TFoo](TFoo)">
+        <size>19</size>
+      </method>
+      <method name="Void Baz[T](T, System.Action`1[T])">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Gazonk(Repro)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-368.cs">
+    <type name="C`1[T]">
+      <method name="Void .ctor(D)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+D[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-369.cs">
+    <type name="Db4objects.Db4o.Internal.ObjectContainerBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IList`1 Query[Extent](IList`1, IList`1)">
+        <size>2</size>
+      </method>
+      <method name="IList Query()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Db4objects.Db4o.Internal.ExternalObjectContainer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Db4objects.Db4o.Internal.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Db4objects.Db4o.Internal.ExternalObjectContainer">
+      <method name="IList Db4objects.Db4o.IObjectContainer.Query()">
+        <size>7</size>
+      </method>
+      <method name="IList`1 Db4objects.Db4o.IObjectContainer.Query[Extent](IList`1, IList`1)">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-370.cs">
+    <type name="N2.X`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.X`1+A`1[T,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.X`1+A`1+B`1[T,T,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.X`1+A`1+B`1+C`1[T,T,T,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-371.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>86</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-372.cs">
+    <type name="TestClass`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Check(T, T)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestClass2`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Check(T, T)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-373.cs">
+    <type name="MonoBug.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="MonoBug.GenericType`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="T op_Implicit(MonoBug.GenericType`1[T])">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-374.cs">
+    <type name="aClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-375.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Compute(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Boolean Compute2(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-376.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="S`1[T]">
+      <method name="System.Object Box(Nullable`1)">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-377.cs">
+    <type name="D">
+      <method name="Void .cctor()">
+        <size>26</size>
+      </method>
+      <method name="Void Main()">
+        <size>98</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-378.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object FooG[T](Nullable`1)">
+        <size>7</size>
+      </method>
+      <method name="System.Object Foo(Nullable`1)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>58</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-379.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Print(Nullable`1)">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Boolean op_Equality(S, S)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Inequality(S, S)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-380.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>175</size>
+      </method>
+    </type>
+    <type name="GTest`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-381.cs">
+    <type name="TestGoto">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>69</size>
+      </method>
+      <method name="IEnumerable`1 setX()">
+        <size>16</size>
+      </method>
+      <method name="IEnumerable`1 test()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="TestGoto+&lt;setX&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>106</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>46</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="TestGoto+&lt;test&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>178</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="TestGoto+&lt;setX&gt;c__Iterator0">
+      <method name="Boolean System.Collections.Generic.IEnumerator&lt;bool&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="TestGoto+&lt;test&gt;c__Iterator1">
+      <method name="Boolean System.Collections.Generic.IEnumerator&lt;bool&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-382.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>76</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-383.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>260</size>
+      </method>
+    </type>
+    <type name="MyTypeA">
+      <method name="Void .ctor(Int16)">
+        <size>8</size>
+      </method>
+      <method name="MyTypeA op_Addition(MyTypeA, MyTypeA)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_Equality(MyTypeA, MyTypeA)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Inequality(MyTypeA, MyTypeA)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_GreaterThan(MyTypeA, MyTypeA)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_LessThan(MyTypeA, MyTypeA)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MyTypeB">
+      <method name="Void .ctor(Int16)">
+        <size>8</size>
+      </method>
+      <method name="MyTypeB op_Addition(MyTypeB, MyTypeB)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Equality(MyTypeB, MyTypeB)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Inequality(MyTypeB, MyTypeB)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_GreaterThan(MyTypeB, MyTypeB)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_LessThan(MyTypeB, MyTypeB)">
+        <size>2</size>
+      </method>
+      <method name="MyTypeB op_BitwiseAnd(MyTypeB, MyTypeB)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-384.cs">
+    <type name="N.TestG">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="NonGeneric">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Generic`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="m">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="NonGeneric compiles_fine(NonGeneric, NonGeneric ByRef)">
+        <size>13</size>
+      </method>
+      <method name="Generic`1[System.Int32] does_not_compile(Generic`1[System.Int32], Generic`1[System.Int32] ByRef)">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-385.cs">
+    <type name="DocAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(String)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="Func`2[TArg,TRet]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-386.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>220</size>
+      </method>
+    </type>
+    <type name="MyType">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="MyType op_UnaryNegation(MyType)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-387.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>168</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-388.cs">
+    <type name="Data">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void f(Data)">
+        <size>19</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-389.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>234</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-390.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>4</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-391.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>121</size>
+      </method>
+      <method name="Boolean Test_1()">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-392.cs">
+    <type name="DieSubrangeType">
+      <method name="Void .ctor()">
+        <size>19</size>
+      </method>
+      <method name="Nullable`1 get_UpperBound()">
+        <size>7</size>
+      </method>
+      <method name="Void set_UpperBound(Nullable`1)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>61</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-393.cs">
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Type)">
+        <size>34</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-394.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void FindMembers(Test+MemberFilter)">
+        <size>1</size>
+      </method>
+      <method name="Void GetMethodGroup(Test+MemberFilter)">
+        <size>43</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+MemberFilter">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Boolean &lt;GetMethodGroup&gt;m__0()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-395.cs">
+    <type name="RuleBuilder`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="RubyMethod">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="RuleBuilder`1[T] IDynamicObject.GetRule[T]()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-396.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Invoke[A,TR](System.Func`2[A,System.Func`1[TR]], A, TR)">
+        <size>1</size>
+      </method>
+      <method name="System.Func`1[System.Int32] Method(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-397.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo NegateFoo(Foo)">
+        <size>12</size>
+      </method>
+      <method name="Foo NegateFooNullable(Nullable`1)">
+        <size>7</size>
+      </method>
+      <method name="Nullable`1 NegateBarNullable(Nullable`1)">
+        <size>7</size>
+      </method>
+      <method name="Nullable`1 NegateBar(Bar)">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>139</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Foo op_UnaryNegation(Nullable`1)">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Nullable`1 op_UnaryNegation(Nullable`1)">
+        <size>41</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-398.cs">
+    <type name="GenericClass`1[T]">
+      <method name="Void .ctor(T)">
+        <size>14</size>
+      </method>
+      <method name="Void Method()">
+        <size>42</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="ToStr">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke(System.String, IFormatProvider)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, IFormatProvider, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-399.cs">
+    <type name="TestIssue.Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestIssue.Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestIssue.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>39</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-400.cs">
+    <type name="Gen`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Foo(T)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Foo[T]()">
+        <size>17</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>66</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-401.cs">
+    <type name="ParserTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>165</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-402.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-403.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="S`1[T]">
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-404.cs">
+    <type name="Test.Program">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test.Class1`1[T1]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_doSomething(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_doSomething(System.EventHandler)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Test.Class2`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_DoSomething(System.EventHandler)">
+        <size>8</size>
+      </method>
+      <method name="Void remove_DoSomething(System.EventHandler)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-405.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-406.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[TOutput](System.Func`2[T,TOutput])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C`2[A,B]">
+      <method name="Void .ctor(IEnumerable`1)">
+        <size>46</size>
+      </method>
+      <method name="B &lt;C&gt;m__0(B)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-407.cs">
+    <type name="NullableColorTests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>99</size>
+      </method>
+    </type>
+    <type name="MyColor">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_Equality(MyColor, MyColor)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_Inequality(MyColor, MyColor)">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-408.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>92</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-409.cs">
+    <type name="ConditionalParsing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Nullable`1 Test_3[T](System.Func`3[T,T,T], T)">
+        <size>14</size>
+      </method>
+      <method name="Void Test_1(Boolean)">
+        <size>20</size>
+      </method>
+      <method name="Void Test_2()">
+        <size>31</size>
+      </method>
+      <method name="Void Test_4(Boolean, Boolean)">
+        <size>39</size>
+      </method>
+      <method name="Void Test_5(Boolean, IDisposable)">
+        <size>45</size>
+      </method>
+      <method name="Void Test_6(Boolean)">
+        <size>47</size>
+      </method>
+      <method name="Void Test_7(System.Object)">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ConditionalParsing+T">
+      <method name="Void .ctor(String, Boolean)">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor(String, Boolean, Int32, Int32, Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ConditionalParsing+Const">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ConditionalParsing">
+      <method name="Void Test_8(DateTime)">
+        <size>38</size>
+      </method>
+      <method name="Void Test_9()">
+        <size>43</size>
+      </method>
+      <method name="Void Test_10()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-410.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-411.cs">
+    <type name="Maybe">
+      <method name="Maybe`1[T] C[T](T)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Maybe`1[T]">
+      <method name="Void .ctor(T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Extensions">
+      <method name="R Match[T,R](T, System.Func`2[T,Maybe`1[R]][])">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>131</size>
+      </method>
+      <method name="Maybe`1[System.String] &lt;Main&gt;m__0(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Maybe`1[System.String] &lt;Main&gt;m__1(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Maybe`1[System.String] &lt;Main&gt;m__2(System.String)">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-412.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>218</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-413.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>95</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Int64 op_Addition(S, Int64)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-414.cs">
+    <type name="MonoTest.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MonoTest.TestImpl">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MonoTest.ITest.Get[T](System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Get[T]()">
+        <size>1</size>
+      </method>
+      <method name="Void Get[T](System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MonoTest.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MonoTest.IG&lt;int&gt;.M()">
+        <size>1</size>
+      </method>
+      <method name="Void MonoTest.IG&lt;string&gt;.M()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-415.cs">
+    <type name="S2">
+      <method name="Void Test()">
+        <size>39</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-416.cs">
+    <type name="Bug.Demo">
+      <method name="Boolean Fixed()">
+        <size>14</size>
+      </method>
+      <method name="Boolean Foo(System.Int32[])">
+        <size>43</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>65</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-417.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Goo()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-418.cs">
+    <type name="N.Nested">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.Nested+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 N.Nested.I&lt;int&gt;.get_P()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="N.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>173</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-419.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+      <method name="System.Object Test(System.String)">
+        <size>42</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-420.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(System.Object, System.Object, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test(System.Object, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>43</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-421.cs">
+    <type name="OneOff">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>50</size>
+      </method>
+      <method name="T[] Clone[T](T[])">
+        <size>171</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-422.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean op_GreaterThan(A, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_LessThan(A, System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+      <method name="Nullable`1 get_Id()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test()">
+        <size>51</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-423.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>33</size>
+      </method>
+      <method name="Void Test(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-424.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Block(A[])">
+        <size>6</size>
+      </method>
+      <method name="Void Block(IEnumerable`1, A[])">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-425.cs">
+    <type name="EventClass`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="EventClass`1+HookDelegate[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-426.cs">
+    <type name="OverloadTest.MyClass`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Method(MyInterface`1)">
+        <size>20</size>
+      </method>
+      <method name="Boolean Method(System.Action`1[T])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="OverloadTest.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-427.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>19</size>
+      </method>
+      <method name="Void Attach(EventHandler)">
+        <size>2</size>
+      </method>
+      <method name="Void Attach(EventHandler`1[System.String])">
+        <size>1</size>
+      </method>
+      <method name="Void OnClick(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="EventHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="EventHandler`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-428.cs">
+    <type name="CInt">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="CInt op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Implicit(CInt)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Klass">
+      <method name="Void .ctor(Nullable`1)">
+        <size>14</size>
+      </method>
+      <method name="Nullable`1 get_Value()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>173</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-429.cs">
+    <type name="CInt">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="CInt op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Implicit(CInt)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Klass">
+      <method name="Void .ctor(Nullable`1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-430.cs">
+    <type name="Tmp">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Nullable`1 get_Prop()">
+        <size>42</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-431.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-432.cs">
+    <type name="Test.Bar`2[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DoSomething[V]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test.Baz">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void GetInTroubleHere()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-433.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-434.cs">
+    <type name="testcase.Init">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void testcase.IInitializationExpression.AddRegistry[T](Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="testcase.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>75</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-435.cs">
+    <type name="testcase.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>258</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-436.cs">
+    <type name="SomeClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-438.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="ServiceType GetService[ServiceType](System.Object[])">
+        <size>17</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-439.cs">
+    <type name="MonoBug.Stuff">
+      <method name="MonoBug.GenericStuff`2[T1,T2] CreateThing[T1,T2](T1, T2)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="MonoBug.GenericStuff`2[T1,T2]">
+      <method name="Void .ctor(T1, T2)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="MonoBug.Program">
+      <method name="Void Main()">
+        <size>35</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-440.cs">
+    <type name="AnyObjectId">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_W1()">
+        <size>7</size>
+      </method>
+      <method name="Void set_W1(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="ObjectId">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-441.cs">
+    <type name="Name.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Name.Subclass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Collections.Generic.List`1[System.Int32] get_List()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-442.cs">
+    <type name="NonGenericBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="GenericBase`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T get_Instance()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="EntryPoint">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-443.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M[T]()">
+        <size>28</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-444.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>114</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-445.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[T](T ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[T](T[])">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[T](T[,])">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[T](T[,,])">
+        <size>1</size>
+      </method>
+      <method name="Void Bar(Int32 ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void Bar(System.Int32[])">
+        <size>1</size>
+      </method>
+      <method name="Void Bar(System.Int32[,])">
+        <size>1</size>
+      </method>
+      <method name="Void Bar(System.Int32[,,])">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-446.cs">
+    <type name="BugTest.Bug`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CreateObject(T ByRef)">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="BugTest.Program">
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-447.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-449.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-450.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-453.cs">
+    <type name="Test.CompilerTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Int32 DoSomething[T](System.String, T, T ByRef)">
+        <size>73</size>
+      </method>
+      <method name="Void ThisDoesNotWork()">
+        <size>27</size>
+      </method>
+      <method name="Void ThisWorksFine()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-454.cs">
+    <type name="TestNS.TestCase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Compare[T](T[], T[])">
+        <size>2</size>
+      </method>
+      <method name="Void DoSomething[T](System.Func`3[T,T,System.Int32])">
+        <size>30</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-455.cs">
+    <type name="ConsoleApplication1.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="ConsoleApplication1.Inner`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Compare(System.Object, T)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-456.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G`1+S[T]">
+      <method name="System.String Test()">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-457.cs">
+    <type name="Program">
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-458.cs">
+    <type name="MyList`1[T]">
+      <method name="MyList`1+Helper`2[T,U,V] GetHelper[U,V]()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyList`1+Helper`2[T,U,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-459.cs">
+    <type name="GenericTest.OuterGeneric`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="GenericTest.OuterGeneric`1+InnerGeneric`1[T,U]">
+      <method name="System.String GetTypeNames()">
+        <size>41</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="GenericTest.Program">
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-460.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1+Bar`1[T,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FooImpl">
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FooImpl+BarImpl">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-461.cs">
+    <type name="Test.BaseContext">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.MyDataContext">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Entity`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Person">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.TheBox`1[T]">
+      <method name="U GetById[U](Guid)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Program">
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-462.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>79</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+Tester`1[T]">
+      <method name="T Get(System.Object)">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-463.cs">
+    <type name="STuple`1[Ta]">
+      <method name="Void .ctor(Ta)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-464.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-465.cs">
+    <type name="DerivedClass">
+      <method name="Void GenericMethod_1[T]()">
+        <size>1</size>
+      </method>
+      <method name="Void GenericMethod_2[T]()">
+        <size>1</size>
+      </method>
+      <method name="Void GenericMethod_3[T]()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-466.cs">
+    <type name="Program">
+      <method name="Boolean Test[T](T)">
+        <size>10</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-467.cs">
+    <type name="S">
+      <method name="Int32 Main()">
+        <size>79</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="A op_Implicit(S)">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-468.cs">
+    <type name="TS">
+      <method name="Nullable`1 get_v()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>43</size>
+      </method>
+      <method name="Nullable`1 op_Implicit(TS)">
+        <size>7</size>
+      </method>
+      <method name="TS op_Implicit(Nullable`1)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-469.cs">
+    <type name="Foo`2[T1,T2]">
+      <method name="Void .ctor(T2)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-470.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-471.cs">
+    <type name="Q">
+      <method name="Void bar[T](T ByRef)">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-472.cs">
+    <type name="C`1[T]">
+      <method name="Void CopyUnsafe(T[], System.Int64[])">
+        <size>1</size>
+      </method>
+      <method name="Boolean CopyUnsafe(T[], Int64)">
+        <size>2</size>
+      </method>
+      <method name="Void CopyUnsafe(T[])">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-473.cs">
+    <type name="A`1[X]">
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void Foo[T]()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-474.cs">
+    <type name="A`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-475.cs">
+    <type name="Value`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test`2[T,U]">
+      <method name="Value`1[T] get_Value()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test`2+B[T,U]">
+      <method name="Void .ctor(Value`1)">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-476.cs">
+    <type name="Test`1[T]">
+      <method name="B First()">
+        <size>10</size>
+      </method>
+      <method name="IFoo Second()">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-477.cs">
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1+BNested[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AA`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AA`1+ANested[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-478.cs">
+    <type name="M">
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void GenFoo()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-479.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Test[T](I`1)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-480.cs">
+    <type name="C">
+      <method name="Void Foo()">
+        <size>57</size>
+      </method>
+      <method name="Void Main()">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-481.cs">
+    <type name="TestClass`1[T]">
+      <method name="Void Add(T[][] ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-482.cs">
+    <type name="TestBug.BugClass`1[T]">
+      <method name="Void add_Evt(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void remove_Evt(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void Bug()">
+        <size>19</size>
+      </method>
+      <method name="Void Handler(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestBug.MainClass">
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-483.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>86</size>
+      </method>
+      <method name="Void ReplaceContentsWith[T](T, T)">
+        <size>95</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Int32Collection">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>17</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>12</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>13</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void Add(Int32)">
+        <size>13</size>
+      </method>
+      <method name="Void Clear()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-484.cs">
+    <type name="MainClass">
+      <method name="Void Foo(System.Action`1[MainClass][][])">
+        <size>1</size>
+      </method>
+      <method name="System.Action`1[MainClass][] Set(System.Action`1[MainClass][])">
+        <size>2</size>
+      </method>
+      <method name="Void Bar(MainClass)">
+        <size>1</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>100</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-485.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-486.cs">
+    <type name="MyCollection`1[T]">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Void AddRange(IMyCollection`1)">
+        <size>1</size>
+      </method>
+      <method name="Void AddRange(IEnumerable`1)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>2</size>
+      </method>
+      <method name="Boolean get_IsReadOnly()">
+        <size>2</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>1</size>
+      </method>
+      <method name="Void Clear()">
+        <size>1</size>
+      </method>
+      <method name="Boolean Contains(T)">
+        <size>2</size>
+      </method>
+      <method name="Void CopyTo(T[], Int32)">
+        <size>1</size>
+      </method>
+      <method name="Boolean Remove(T)">
+        <size>2</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="P">
+      <method name="MyCollection`1[System.String] get_IgnoreTokens()">
+        <size>36</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-487.cs">
+    <type name="Limada.MonoTests.Generics.MultiDictionary`3[K,V,TDictionary]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Limada.MonoTests.Generics.Test">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-488.cs">
+    <type name="Ref">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Def">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FooProcessor`1[T]">
+      <method name="Void Attach(T, Def)">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-489.cs">
+    <type name="sample">
+      <method name="TValue Value[TKey,TValue]()">
+        <size>0</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="sample+nested`1[T]">
+      <method name="TValue Value[TKey,TValue]()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-490.cs">
+    <type name="Foo">
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Foo&gt;.GetEnumerator()">
+        <size>17</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>17</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-491.cs">
+    <type name="ArrayEqualityComparer`1[T]">
+      <method name="Boolean Equals(T[], T[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 GetHashCode(T[])">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-492.cs">
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+C[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-493.cs">
+    <type name="MonoGenericIteratorTest.MyType">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoGenericIteratorTest.MyCollectionBase`1[T]">
+      <method name="IEnumerator GetEnumerator()">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoGenericIteratorTest.MyCollection">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoGenericIteratorTest.MainClass">
+      <method name="Void Main(System.String[])">
+        <size>77</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-494.cs">
+    <type name="Grid`1[CT]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Grid`1+GPD[CT]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Grid`1+GPD+GC[CT]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="H">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="H+MyCT">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TheTest">
+      <method name="Void Main(System.String[])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-495.cs">
+    <type name="Repro">
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Repro+Outer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Repro+Outer+Inner`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-496.cs">
+    <type name="Base">
+      <method name="T EndExecute[T](System.Object, System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Derived EndExecute[TElement](System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="a">
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-497.cs">
+    <type name="Item">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ItemCollection`1[T]">
+      <method name="Void Bind[U](ItemCollection`1[U])">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="a">
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-498.cs">
+    <type name="A">
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-499.cs">
+    <type name="C">
+      <method name="Int32 Test[T](T[])">
+        <size>21</size>
+      </method>
+      <method name="Int32 TestExtra[T](T[,])">
+        <size>22</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>118</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-500.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>85</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-501.cs">
+    <type name="UndoableDictionary`2[TKey,TValue]">
+      <method name="Void TestFunc()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="UpdateableCollection`1[T]">
+      <method name="Void AddReferences()">
+        <size>1</size>
+      </method>
+      <method name="Void TestFunc()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="UpdateableCollection`1+X[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-502.cs">
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="C`1+Foo`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+Simple[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+N`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-503.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor(Type)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+N`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-504.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-505.cs">
+    <type name="C">
+      <method name="Int32 Test(System.Collections.Generic.List`1[System.Int32])">
+        <size>3</size>
+      </method>
+      <method name="Int32 Test(System.String)">
+        <size>3</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>2</size>
+      </method>
+      <method name="R Method[T,R](IEnumerable`1, System.Func`2[T,R])">
+        <size>16</size>
+      </method>
+      <method name="R Method2[T,R](IEnumerable`1, System.Func`2[System.Collections.Generic.List`1[T],R])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>73</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-506.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>9</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-507.cs">
+    <type name="A">
+      <method name="Int32 Main()">
+        <size>26</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1[T]">
+      <method name="Int32 get_Item(T)">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_Item(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-508.cs">
+    <type name="B">
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="A`1[T]">
+      <method name="Void .ctor(T)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-509.cs">
+    <type name="Test.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.TestClass">
+      <method name="T Test.IBase.Get[T](System.Object)">
+        <size>10</size>
+      </method>
+      <method name="T Get[T](System.Object)">
+        <size>10</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-510.cs">
+    <type name="CA`2[U,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Map`2[K,T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-511.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Foo[T](A`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void Foo[T](A`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>81</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-512.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>5</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-513.cs">
+    <type name="S">
+      <method name="Void System.IDisposable.Dispose()">
+        <size>13</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void System.IDisposable.Dispose()">
+        <size>1</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>154</size>
+      </method>
+      <method name="Void GenMethod[T](T)">
+        <size>33</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-514.cs">
+    <type name="test2.Test`3[T,U,V]">
+      <method name="Void Method()">
+        <size>128</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="test2.MainClass">
+      <method name="Void Dispose()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-515.cs">
+    <type name="A">
+      <method name="I`1 Foo[T]()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AA">
+      <method name="I`1 Foo[V]()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void Dispose()">
+        <size>1</size>
+      </method>
+      <method name="I`1 Foo[R]()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-516.cs">
+    <type name="B">
+      <method name="Void Foo()">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-517.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-518.cs">
+    <type name="Top`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Top`1+C[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-519.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void Foo[U]()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-520.cs">
+    <type name="A">
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>6</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator()">
+        <size>16</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+GetEnumerator">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>118</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-521.cs">
+    <type name="D">
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="E`1[T]">
+      <method name="Void Test()">
+        <size>25</size>
+      </method>
+      <method name="Void EH(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="E`1+I[T]">
+      <method name="Void add_E(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_E(D)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-522.cs">
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Test[T](T)">
+        <size>12</size>
+      </method>
+      <method name="Void A[U]()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-523.cs">
+    <type name="Test.TestClass4`1[T]">
+      <method name="Boolean Equals(T)">
+        <size>2</size>
+      </method>
+      <method name="Boolean Equals(TestClass4`1)">
+        <size>2</size>
+      </method>
+      <method name="Boolean Equals(TestClass4`1, TestClass4`1)">
+        <size>9</size>
+      </method>
+      <method name="Int32 GetHashCode(TestClass4`1)">
+        <size>14</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>2</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Equality(TestClass4`1, TestClass4`1)">
+        <size>9</size>
+      </method>
+      <method name="Boolean op_Equality(T, TestClass4`1)">
+        <size>9</size>
+      </method>
+      <method name="Boolean op_Equality(TestClass4`1, T)">
+        <size>9</size>
+      </method>
+      <method name="Boolean op_Equality(System.Object, TestClass4`1)">
+        <size>15</size>
+      </method>
+      <method name="Boolean op_Equality(TestClass4`1, System.Object)">
+        <size>15</size>
+      </method>
+      <method name="Boolean op_Inequality(TestClass4`1, TestClass4`1)">
+        <size>11</size>
+      </method>
+      <method name="Boolean op_Inequality(T, TestClass4`1)">
+        <size>11</size>
+      </method>
+      <method name="Boolean op_Inequality(TestClass4`1, T)">
+        <size>11</size>
+      </method>
+      <method name="Boolean op_Inequality(System.Object, TestClass4`1)">
+        <size>11</size>
+      </method>
+      <method name="Boolean op_Inequality(TestClass4`1, System.Object)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Test.C">
+      <method name="Void Main()">
+        <size>9</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-524.cs">
+    <type name="C">
+      <method name="T M[T]()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-525.cs">
+    <type name="A">
+      <method name="Void MA[T](System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void F()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+C">
+      <method name="Void Foo()">
+        <size>16</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-526.cs">
+    <type name="A`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B`1+N[T]">
+      <method name="Void Test(C)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-527.cs">
+    <type name="CoalescingWithGenericsBug">
+      <method name="T Provide[T]()">
+        <size>23</size>
+      </method>
+      <method name="T FindExisting[T]()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="CoalescingWithGenericsBug+Service">
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-528.cs">
+    <type name="GenericType`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Base">
+      <method name="T Test[T](GenericType`1[T])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Override">
+      <method name="T Test[T](GenericType`1[T])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-529.cs">
+    <type name="GenericType`2[U,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Base`1[V]">
+      <method name="T Test[T](GenericType`2[T,V])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Override`1[W]">
+      <method name="T Test[T](GenericType`2[T,W])">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-530.cs">
+    <type name="B">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-531.cs">
+    <type name="ATop`1[T]">
+      <method name="T[] IB&lt;T&gt;.ToArray(T[])">
+        <size>2</size>
+      </method>
+      <method name="Void IC.ToArray()">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>37</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-532.cs">
+    <type name="DictionaryServicesContainer">
+      <method name="Void Register[I,T]()">
+        <size>6</size>
+      </method>
+      <method name="Void Register[I](System.Object)">
+        <size>6</size>
+      </method>
+      <method name="I Resolve[I]()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-533.cs">
+    <type name="List`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="List`1+Comp`1[X,Y]">
+      <method name="List`1+Comp`1[Y,X] flip(Y, X)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="List`1+Flip`1[X,Z]">
+      <method name="Void .ctor(Comp`1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-534.cs">
+    <type name="A">
+      <method name="Void Method(IG`1)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-535.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Int32 Foo[T](T, G`1[T])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo[T](T, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-1.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U](U)">
+        <size>1</size>
+      </method>
+      <method name="Void Test[T](T)">
+        <size>64</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-10.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Test[T](T, T)">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>97</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>110</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-11.cs">
+    <type name="Test`1[R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void World[S,T](S, T)">
+        <size>1</size>
+      </method>
+      <method name="Void Hello[U,V](U, V)">
+        <size>47</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test`1+&lt;Hello&gt;c__AnonStorey0`2[R,U,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-12.cs">
+    <type name="World`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U](U)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(T)">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="World`1+&lt;Test&gt;c__AnonStorey0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-13.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="X+ModuleBinder`1[TDelegate] CreateMethodUnscoped[TDelegate]()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X+ModuleBinder`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="T Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="TDelegate &lt;CreateMethodUnscoped`1&gt;m__0[TDelegate](System.Object)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-14.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void SomeMethod(System.Converter`2[System.Int32,System.Int32])">
+        <size>1</size>
+      </method>
+      <method name="Void SomeCaller()">
+        <size>36</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Int32 &lt;SomeCaller&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-15.cs">
+    <type name="Test`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[S](T, S)">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Foo`1[V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(V)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(V, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Bar`1[W]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(W)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(W, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test`1+&lt;Hello&gt;c__AnonStorey1`1[T,S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(Int64)">
+        <size>57</size>
+      </method>
+    </type>
+    <type name="Test`1+&lt;Hello&gt;c__AnonStorey1`1+&lt;Hello&gt;c__AnonStorey0`1[T,S]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1(T)">
+        <size>65</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-16.cs">
+    <type name="A">
+      <method name="Void .ctor(TestFunc`1)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>47</size>
+      </method>
+      <method name="Void Func[T](TestFunc`1[T])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestFunc`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void &lt;a&gt;m__0(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-17.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test[T,U](C+Func`1[T], U)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>75</size>
+      </method>
+    </type>
+    <type name="C+Func`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="T Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-18.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="TR Test[TR,TA](C+Func`2[TR,TA])">
+        <size>10</size>
+      </method>
+      <method name="TR Test[TR,TA,TB](C+Func`2[TR,TA], C+Func`2[TR,TB])">
+        <size>10</size>
+      </method>
+      <method name="Void Test2[T]()">
+        <size>19</size>
+      </method>
+      <method name="Void Main()">
+        <size>100</size>
+      </method>
+    </type>
+    <type name="C+Func`2[TR,TA]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="TR Invoke(TA)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(TA, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TR EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>16</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__2(Int32)">
+        <size>6</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__3(Int32)">
+        <size>6</size>
+      </method>
+      <method name="T &lt;Test2`1&gt;m__0[T](T)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-19.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void TestNaturalSort()">
+        <size>31</size>
+      </method>
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TestNaturalSort&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;&gt;m__1(System.Text.RegularExpressions.Match)">
+        <size>113</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 &lt;TestNaturalSort&gt;m__0(System.String, System.String)">
+        <size>106</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TestNaturalSort&gt;c__AnonStorey0">
+      <method name="System.String &lt;&gt;m__2(System.Text.RegularExpressions.Match)">
+        <size>113</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-2.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U](U)">
+        <size>1</size>
+      </method>
+      <method name="Void Test[T](T)">
+        <size>71</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1+&lt;Test&gt;c__AnonStorey1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-21.cs">
+    <type name="BaseObject">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Collections.Generic.List`1[T] Query[T](Nullable`1 ByRef)">
+        <size>53</size>
+      </method>
+      <method name="T MakeSomething[T]()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>10</size>
+      </method>
+      <method name="Void Closure(EmptyDelegate)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="EmptyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="BaseObject+&lt;Query&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-22.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(D1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo(D2)">
+        <size>2</size>
+      </method>
+      <method name="Int32 FooE(System.Linq.Expressions.Expression`1[D1])">
+        <size>2</size>
+      </method>
+      <method name="Int32 FooE(System.Linq.Expressions.Expression`1[D2])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>82</size>
+      </method>
+    </type>
+    <type name="D1">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="D2">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int64 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int64 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 &lt;Main&gt;m__0()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-23.cs">
+    <type name="MemberAccessData">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_MyTypeProperty(Nullable`1)">
+        <size>8</size>
+      </method>
+      <method name="Nullable`1 get_MyTypeProperty()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(C+D)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>212</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void &lt;Main&gt;m__3()">
+        <size>16</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__4()">
+        <size>16</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__5()">
+        <size>61</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void BaseM()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void InstanceTests()">
+        <size>18</size>
+      </method>
+      <method name="Void &lt;InstanceTests&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__6()">
+        <size>53</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__2()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void &lt;BaseM&gt;__BaseCallProxy0()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-24.cs">
+    <type name="Disposable`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Func`1[T[]] For[T](System.Collections.Generic.List`1[T])">
+        <size>38</size>
+      </method>
+      <method name="System.Func`1[T] Throw[T](T)">
+        <size>26</size>
+      </method>
+      <method name="System.Func`1[T] Do[T](T)">
+        <size>26</size>
+      </method>
+      <method name="System.Func`1[T] Lock[T](T)">
+        <size>26</size>
+      </method>
+      <method name="System.Func`1[T] Catch[T](T)">
+        <size>26</size>
+      </method>
+      <method name="System.Func`1[T] Finally[T](T)">
+        <size>26</size>
+      </method>
+      <method name="System.Func`1[T] Using[T](T)">
+        <size>57</size>
+      </method>
+      <method name="System.Func`1[T] Switch[T](T)">
+        <size>38</size>
+      </method>
+      <method name="System.Func`1[System.Collections.Generic.List`1[T]] ForForeach[T](T[])">
+        <size>26</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>577</size>
+      </method>
+    </type>
+    <type name="Test+&lt;For&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T[] &lt;&gt;m__0()">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Throw&gt;c__AnonStorey1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T &lt;&gt;m__1()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void ArrayMutate[T](T[])">
+        <size>27</size>
+      </method>
+      <method name="System.Func`1[T[][]] ArrayMultiMutate[T](T[][])">
+        <size>26</size>
+      </method>
+      <method name="System.Func`1[System.Type] TypeOf[T](T)">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TypeOf&gt;c__AnonStorey2`1[T]">
+      <method name="System.Type &lt;&gt;m__2()">
+        <size>56</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Do&gt;c__AnonStorey3`1[T]">
+      <method name="T &lt;&gt;m__3()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Lock&gt;c__AnonStorey4`1[T]">
+      <method name="T &lt;&gt;m__4()">
+        <size>65</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Catch&gt;c__AnonStorey5`1[T]">
+      <method name="T &lt;&gt;m__5()">
+        <size>48</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Finally&gt;c__AnonStorey6`1[T]">
+      <method name="T &lt;&gt;m__6()">
+        <size>50</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Using&gt;c__AnonStorey7`1[T]">
+      <method name="T &lt;&gt;m__7()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Switch&gt;c__AnonStorey8`1[T]">
+      <method name="T &lt;&gt;m__8()">
+        <size>35</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;ForForeach&gt;c__AnonStorey9`1[T]">
+      <method name="System.Collections.Generic.List`1[T] &lt;&gt;m__9()">
+        <size>56</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;ArrayMutate&gt;c__AnonStoreyA`1[T]">
+      <method name="Void &lt;&gt;m__A(Int32)">
+        <size>36</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyB`1[T]">
+      <method name="T[][] &lt;&gt;m__B()">
+        <size>48</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CA`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="System.Func`1[T[]] NestedTypeMutate[T]()">
+        <size>34</size>
+      </method>
+      <method name="System.Func`1[System.Int32] ArrayMultiMutate[T](T[,])">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyC`1[T]">
+      <method name="Int32 &lt;&gt;m__C()">
+        <size>27</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;NestedTypeMutate&gt;c__AnonStoreyD`1[T]">
+      <method name="T[] &lt;&gt;m__D()">
+        <size>37</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-25.cs">
+    <type name="HS`1[T]">
+      <method name="Void .ctor(IEqualityComparer`1)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](IEqualityComparer`1)">
+        <size>27</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Foo&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="HS`1[T] &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-26.cs">
+    <type name="MonoBugs.BrokenGenericCast">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Converter`2[TSource,TDest] GetUpcaster[TSource,TDest]()">
+        <size>13</size>
+      </method>
+      <method name="System.Converter`2[TSource,TDest] GetDowncaster[TSource,TDest]()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="TDest &lt;GetUpcaster`2&gt;m__0[TSource,TDest](TSource)">
+        <size>12</size>
+      </method>
+      <method name="TDest &lt;GetDowncaster`2&gt;m__1[TSource,TDest](TSource)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-27.cs">
+    <type name="BaseDataObjectFactory">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T GetBusinessQueryObjectFromReader[T]()">
+        <size>8</size>
+      </method>
+      <method name="T[] GetQueryObjects[T](System.String)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="BusinessQueryObject">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MySqlDataObjectFactory">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T[] GetQueryObjects[T](System.String)">
+        <size>63</size>
+      </method>
+      <method name="Void ExecuteReader(Int32, MySqlDataObjectFactory+PerformActionWithReader)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MySqlDataObjectFactory+PerformActionWithReader">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MySqlDataObjectFactory+&lt;GetQueryObjects&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-28.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B+Del">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void &lt;Foo`1&gt;m__0[T]()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-29.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean TryAction[T](Test+Creator`1[T], T ByRef)">
+        <size>17</size>
+      </method>
+      <method name="Boolean Func1[T](IList`1, Boolean, T ByRef)">
+        <size>32</size>
+      </method>
+      <method name="T Item[T](IList`1)">
+        <size>7</size>
+      </method>
+      <method name="T GetSingleItem[T](IList`1)">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test+Creator`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="T Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Func1&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-3.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U](U)">
+        <size>1</size>
+      </method>
+      <method name="Void Test[T](T)">
+        <size>28</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo`1[S]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(S)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(S, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;Test`1&gt;m__0[T](T)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-30.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U](U)">
+        <size>1</size>
+      </method>
+      <method name="Void Test[T](T)">
+        <size>46</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1+&lt;Test&gt;c__AnonStorey1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-31.cs">
+    <type name="A">
+      <method name="Void Fail[X]()">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A+&lt;Fail&gt;c__AnonStorey0`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)">
+        <size>36</size>
+      </method>
+      <method name="Void &lt;&gt;m__1(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-32.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](IList`1)">
+        <size>31</size>
+      </method>
+      <method name="Void Assert(System.Action`1[System.Int32])">
+        <size>9</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Foo&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(Int32)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-33.cs">
+    <type name="IEnumerableRocks">
+      <method name="System.String Implode[TSource,TResult](IEnumerable`1, System.String, System.Func`2[TSource,TResult])">
+        <size>33</size>
+      </method>
+      <method name="System.String Implode[TSource](IEnumerable`1, System.String, System.Action`2[System.Text.StringBuilder,TSource])">
+        <size>128</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>67</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__1(System.String)">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="IEnumerableRocks+&lt;Implode&gt;c__AnonStorey0`2[TSource,TResult]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(System.Text.StringBuilder, TSource)">
+        <size>34</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-34.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 get_Answer()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Answer(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>82</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-35.cs">
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Func`1[T] XX()">
+        <size>32</size>
+      </method>
+      <method name="T &lt;XX&gt;m__0()">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C2`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Func`1[C`1[T]] XX()">
+        <size>32</size>
+      </method>
+      <method name="C`1[T] &lt;XX&gt;m__1()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="N1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Func`1[T] XX[T]()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>98</size>
+      </method>
+    </type>
+    <type name="N1">
+      <method name="T &lt;XX`1&gt;m__2[T]()">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-36.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_handler(Handler`1[T])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_handler(Handler`1[T])">
+        <size>24</size>
+      </method>
+      <method name="Void add_Handler(Handler`1[T])">
+        <size>64</size>
+      </method>
+      <method name="Void remove_Handler(Handler`1[T])">
+        <size>24</size>
+      </method>
+      <method name="Void &lt;add_Handler&gt;m__0(System.Object)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Handler`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-37.cs">
+    <type name="Wrap`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Run[T](Wrap`1[T])">
+        <size>56</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Run&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-38.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean ContainsAll[U](IEnumerable`1)">
+        <size>40</size>
+      </method>
+      <method name="Boolean Contains(T)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="Foo`1+&lt;ContainsAll&gt;c__AnonStorey0`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__0()">
+        <size>201</size>
+      </method>
+    </type>
+    <type name="Foo`1+&lt;ContainsAll&gt;c__AnonStorey0`1+&lt;ContainsAll&gt;c__AnonStorey1`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-39.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test_1[T](T)">
+        <size>33</size>
+      </method>
+      <method name="Void Test_2[T](Nullable`1)">
+        <size>33</size>
+      </method>
+      <method name="Void Main()">
+        <size>39</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Test_1&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Test_2&gt;c__AnonStorey1`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>85</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="T Test_3[T](System.Object)">
+        <size>51</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Test_3&gt;c__AnonStorey2`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-4.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>59</size>
+      </method>
+      <method name="Int32 GetItem()">
+        <size>50</size>
+      </method>
+      <method name="IEnumerable`1 GetItems()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;GetItems&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>69</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-40.cs">
+    <type name="RunTests">
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test1.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test1[R](R, Int32)">
+        <size>150</size>
+      </method>
+      <method name="Void Run()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Test1.Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test1.X+&lt;Test1&gt;c__AnonStorey1`1[R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>71</size>
+      </method>
+    </type>
+    <type name="Test1.X+&lt;Test1&gt;c__AnonStorey0`1[R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test1.X+&lt;Test1&gt;c__AnonStorey2`1[R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-41.cs">
+    <type name="C">
+      <method name="Decimal Average[TSource](IEnumerable`1, System.Func`2[TSource,System.Decimal])">
+        <size>37</size>
+      </method>
+      <method name="TResult Average[TElement,TAggregate,TResult](IEnumerable`1, System.Func`3[TAggregate,TElement,TAggregate], System.Func`3[TAggregate,TElement,TResult])">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Decimal &lt;Average`1&gt;m__0[TSource](Decimal, Decimal)">
+        <size>8</size>
+      </method>
+      <method name="Decimal &lt;Average`1&gt;m__1[TSource](Decimal, Decimal)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-42.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test_3[T]()">
+        <size>20</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void &lt;Test_3`1&gt;m__0[T]()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-43.cs">
+    <type name="TestC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Func`1[System.Type] Test[T]()">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>76</size>
+      </method>
+      <method name="System.Type &lt;Test`1&gt;m__0[T]()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-44.cs">
+    <type name="UiaAtkBridgeTest.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Invoke(System.EventHandler)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="UiaAtkBridgeTest.GailTester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ThisCausesACrash[I]()">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;ThisCausesACrash`1&gt;m__0[I](System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-45.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AnyMethod[T]()">
+        <size>20</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="C+&lt;AnyMethod&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1(System.String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void &lt;AnyMethod`1&gt;m__0[T]()">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-46.cs">
+    <type name="TheClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](T, System.Func`2[T,T])">
+        <size>41</size>
+      </method>
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="TheClass+&lt;Foo&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Func`1[T] &lt;&gt;m__0()">
+        <size>31</size>
+      </method>
+      <method name="T &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-47.cs">
+    <type name="C">
+      <method name="System.Func`2[T1,System.Func`2[T2,System.Action`1[T3]]] Curry[T1,T2,T3](System.Action`3[T1,T2,T3])">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__3(Int32, Int32, Int32)">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Curry&gt;c__AnonStorey0`3[T1,T2,T3]">
+      <method name="System.Func`2[T2,System.Action`1[T3]] &lt;&gt;m__0(T1)">
+        <size>33</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3[T1,T2,T3]">
+      <method name="System.Action`1[T3] &lt;&gt;m__1(T2)">
+        <size>45</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3+&lt;Curry&gt;c__AnonStorey2`3[T1,T2,T3]">
+      <method name="Void &lt;&gt;m__2(T3)">
+        <size>35</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-48.cs">
+    <type name="GeneratorEnumerable`1[T]">
+      <method name="Void .ctor(Func`1)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="GeneratorExpression">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="GeneratorInvoker">
+      <method name="Void .ctor(GeneratorExpression)">
+        <size>7</size>
+      </method>
+      <method name="Void Invoke[T](T ByRef)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Interpreter">
+      <method name="System.Object InterpretGenerator[T](GeneratorExpression)">
+        <size>31</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Func`1[TResult]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="TResult Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TResult EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="GeneratorNext`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(T ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Interpreter+&lt;InterpretGenerator&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="GeneratorNext`1[T] &lt;&gt;m__0()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-49.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void DetermineLinkedCells()">
+        <size>74</size>
+      </method>
+    </type>
+    <type name="Test+&lt;DetermineLinkedCells&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;DetermineLinkedCells&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__1(System.Object)">
+        <size>13</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__0(System.Object)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-5.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>80</size>
+      </method>
+    </type>
+    <type name="Hello">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;Test&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>98</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="IEnumerable`1 Test(Foo)">
+        <size>42</size>
+      </method>
+      <method name="Void Hello(Int32)">
+        <size>19</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;Test&gt;c__Iterator0">
+      <method name="Foo System.Collections.Generic.IEnumerator&lt;Foo&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Foo&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-50.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="SomeGenericClass`1[SomeType]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Invoke(SomeGenericClass`1+SomeHandlerType[SomeType])">
+        <size>1</size>
+      </method>
+      <method name="Void FailsToCompile()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="SomeGenericClass`1+SomeHandlerType[SomeType]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="SomeGenericClass`1+&lt;FailsToCompile&gt;c__AnonStorey0[SomeType]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="SomeGenericClass`1[SomeType]">
+      <method name="Void &lt;FailsToCompile&gt;m__0()">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="SomeGenericClass`1+&lt;FailsToCompile&gt;c__AnonStorey0[SomeType]">
+      <method name="Void &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-51.cs">
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void P(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Repro()">
+        <size>100</size>
+      </method>
+    </type>
+    <type name="Bla">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Driver+&lt;Repro&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>35</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-52.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`1+B[T]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Void W[R](System.String, System.Func`2[T,R])">
+        <size>39</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A`1+B+&lt;W&gt;c__AnonStorey0`1[T,R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(T[])">
+        <size>55</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-53.cs">
+    <type name="TestComp.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestComp.Program+MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MyTemplate(TestComp.Program+MyClass+MyDelegate)">
+        <size>1</size>
+      </method>
+      <method name="Void UseATemplate()">
+        <size>36</size>
+      </method>
+      <method name="Void &lt;UseATemplate&gt;m__0(System.Collections.Generic.List`1[System.Int32] ByRef)">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="TestComp.Program+MyClass+MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Collections.Generic.List`1[System.Int32] ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Collections.Generic.List`1[System.Int32] ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(System.Collections.Generic.List`1[System.Int32] ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-54.cs">
+    <type name="Class">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Property()">
+        <size>6</size>
+      </method>
+      <method name="System.String Method()">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>39</size>
+      </method>
+    </type>
+    <type name="Class+&lt;Method&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;&gt;m__0()">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="Class+&lt;Method&gt;c__AnonStorey0+&lt;Method&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;&gt;m__1(System.String)">
+        <size>52</size>
+      </method>
+    </type>
+    <type name="Class+&lt;Method&gt;c__AnonStorey0+&lt;Method&gt;c__AnonStorey2+&lt;Method&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;&gt;m__2()">
+        <size>39</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-55.cs">
+    <type name="Thing`1[TFirst]">
+      <method name="Void .ctor(Action`1)">
+        <size>14</size>
+      </method>
+      <method name="Thing`1[TFirst] Create[TSecond](System.Func`2[TFirst,TSecond])">
+        <size>31</size>
+      </method>
+      <method name="Void SomeAction()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void Main()">
+        <size>42</size>
+      </method>
+      <method name="System.Object &lt;Main&gt;m__1(System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Thing`1+&lt;Create&gt;c__AnonStorey0`1[TFirst,TSecond]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(TFirst)">
+        <size>47</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-56.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T def()">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void cf[T]()">
+        <size>35</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="C+DF">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;cf&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-57.cs">
+    <type name="X`1[T]">
+      <method name="Void IFoo&lt;T&gt;.Test()">
+        <size>37</size>
+      </method>
+      <method name="Void &lt;Test&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-58.cs">
+    <type name="Test">
+      <method name="X Foo[X](Boolean)">
+        <size>45</size>
+      </method>
+      <method name="X FooNested[X](Boolean)">
+        <size>66</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Foo&gt;c__AnonStorey0`1[X]">
+      <method name="X &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;FooNested&gt;c__AnonStorey1`1[X]">
+      <method name="Call`1[X] &lt;&gt;m__1()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-59.cs">
+    <type name="TestGenericsSubtypeMatching.Sender`1[T]">
+      <method name="Void DoSend[TMessage](System.Action`1[T])">
+        <size>83</size>
+      </method>
+      <method name="Void Send(System.Action`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Void ActionOnObject(System.Object)">
+        <size>8</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGenericsSubtypeMatching.C">
+      <method name="Void Main()">
+        <size>40</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__1(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGenericsSubtypeMatching.Sender`1+&lt;DoSend&gt;c__AnonStorey0`1[T,TMessage]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGenericsSubtypeMatching.Sender`1+&lt;DoSend&gt;c__AnonStorey1`1[T,TMessage]">
+      <method name="Void &lt;&gt;m__0(T)">
+        <size>35</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-6.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello[U,V](U, V)">
+        <size>1</size>
+      </method>
+      <method name="Void Test[A,B,C](A, B, C)">
+        <size>49</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="Foo`2[R,S]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(R, S)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(R, S, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`3[A,B,C]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(A, Int32)">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-60.cs">
+    <type name="TestGenericsSubtypeMatching.Sender`1[T]">
+      <method name="Void DoSend[TMessage](System.Action`1[T])">
+        <size>83</size>
+      </method>
+      <method name="Void Send(System.Action`1[T])">
+        <size>1</size>
+      </method>
+      <method name="Void ActionOnObject(System.Object)">
+        <size>8</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGenericsSubtypeMatching.C">
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__1(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGenericsSubtypeMatching.Sender`1+&lt;DoSend&gt;c__AnonStorey0`1[T,TMessage]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGenericsSubtypeMatching.Sender`1+&lt;DoSend&gt;c__AnonStorey1`1[T,TMessage]">
+      <method name="Void &lt;&gt;m__0(T)">
+        <size>35</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-61.cs">
+    <type name="TestCase">
+      <method name="Void Main()">
+        <size>32</size>
+      </method>
+      <method name="Void Test[T](IList`1)">
+        <size>33</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestCase+&lt;Test&gt;c__AnonStorey0`1[T]">
+      <method name="Void &lt;&gt;m__0()">
+        <size>46</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1(IList`1)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-62.cs">
+    <type name="D">
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void Assert(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Execute(System.Action)">
+        <size>1</size>
+      </method>
+      <method name="D GetD[T](System.Object)">
+        <size>33</size>
+      </method>
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T+&lt;GetD&gt;c__AnonStorey2`1[T]">
+      <method name="Void &lt;&gt;m__0(System.Object)">
+        <size>77</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T+&lt;GetD&gt;c__AnonStorey2`1+&lt;GetD&gt;c__AnonStorey0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T+&lt;GetD&gt;c__AnonStorey2`1+&lt;GetD&gt;c__AnonStorey1`1[T]">
+      <method name="Void &lt;&gt;m__1()">
+        <size>51</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-63.cs">
+    <type name="A">
+      <method name="Void Foo[T](T, System.String[])">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void Test(Int32)">
+        <size>40</size>
+      </method>
+      <method name="Void Test2[T](T)">
+        <size>34</size>
+      </method>
+      <method name="Void &lt;Foo&gt;__BaseCallProxy0[T](T, System.String[])">
+        <size>9</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>32</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+&lt;Test2&gt;c__AnonStorey1`1[T]">
+      <method name="Void &lt;&gt;m__1()">
+        <size>40</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-7.cs">
+    <type name="MyDisposable">
+      <method name="Void .ctor()">
+        <size>26</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_ID()">
+        <size>7</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Test(Int32)">
+        <size>30</size>
+      </method>
+      <method name="Void Main()">
+        <size>60</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>180</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>66</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-8.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test[R](R, Int32)">
+        <size>88</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey1`1[R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>34</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1[R]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anon-9.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 get_Foo()">
+        <size>16</size>
+      </method>
+      <method name="Void set_Foo(IEnumerable`1)">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>80</size>
+      </method>
+      <method name="Foo op_Implicit(Test)">
+        <size>30</size>
+      </method>
+      <method name="IEnumerable`1 op_Addition(Test, Test)">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void &lt;op_Implicit&gt;m__0()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Test+&lt;&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>65</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test+&lt;op_Addition&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>98</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test+&lt;&gt;c__Iterator0">
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Test+&lt;op_Addition&gt;c__Iterator1">
+      <method name="Test System.Collections.Generic.IEnumerator&lt;Test&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Test&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>53</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">
+      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;Foo&gt;__T get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Baz&gt;__T get_Baz()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-02.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object TestA(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>99</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`1[&lt;s&gt;__T]">
+      <method name="Void .ctor(&lt;s&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;s&gt;__T get_s()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">
+      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;Foo&gt;__T get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Baz&gt;__T get_Baz()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-03.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 get_Baz()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">
+      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;Foo&gt;__T get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Baz&gt;__T get_Baz()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-04.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 get_Baz()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>111</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`4[&lt;Foo&gt;__T,&lt;Baz&gt;__T,&lt;Hello&gt;__T,&lt;Answer&gt;__T]">
+      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T, &lt;Hello&gt;__T, &lt;Answer&gt;__T)">
+        <size>36</size>
+      </method>
+      <method name="&lt;Foo&gt;__T get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Baz&gt;__T get_Baz()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Hello&gt;__T get_Hello()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Answer&gt;__T get_Answer()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>123</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>132</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>258</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-05.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String Null()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>297</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;Name&gt;__T,&lt;Age&gt;__T]">
+      <method name="Void .ctor(&lt;Name&gt;__T, &lt;Age&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;Name&gt;__T get_Name()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Age&gt;__T get_Age()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;Age&gt;__T,&lt;Name&gt;__T]">
+      <method name="Void .ctor(&lt;Age&gt;__T, &lt;Name&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;Age&gt;__T get_Age()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Name&gt;__T get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>15</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>40</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType3`1[&lt;Foo&gt;__T]">
+      <method name="Void .ctor(&lt;Foo&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;Foo&gt;__T get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-06.cs">
+    <type name="CastByExample">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T Cast[T](System.Object, T)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`1[&lt;Foo&gt;__T]">
+      <method name="Void .ctor(&lt;Foo&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;Foo&gt;__T get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-07.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>15</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>40</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-08.cs">
+    <type name="Test">
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;X&gt;__T,&lt;Y&gt;__T]">
+      <method name="Void .ctor(&lt;X&gt;__T, &lt;Y&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;X&gt;__T get_X()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Y&gt;__T get_Y()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-09.cs">
+    <type name="My.System.Test">
+      <method name="Int32 Main()">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`1[&lt;X&gt;__T]">
+      <method name="Void .ctor(&lt;X&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;X&gt;__T get_X()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`1[&lt;Value&gt;__T]">
+      <method name="Void .ctor(&lt;Value&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;Value&gt;__T get_Value()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-10.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_X()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>11</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>33</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`1[&lt;X&gt;__T]">
+      <method name="Void .ctor(&lt;X&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;X&gt;__T get_X()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-anontype-11.cs">
+    <type name="Alpha">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Beta">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>49</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;First&gt;__T,&lt;Second&gt;__T]">
+      <method name="Void .ctor(&lt;First&gt;__T, &lt;Second&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;First&gt;__T get_First()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Second&gt;__T get_Second()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-autoproperty-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+      <method name="System.String get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Foo(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Answer()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Answer(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>97</size>
+      </method>
+    </type>
+    <type name="Test+A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_B()">
+        <size>7</size>
+      </method>
+      <method name="Void set_B(System.String)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-autoproperty-02.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Foo()">
+        <size>6</size>
+      </method>
+      <method name="Void set_Foo(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Answer()">
+        <size>6</size>
+      </method>
+      <method name="Void set_Answer(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>114</size>
+      </method>
+    </type>
+    <type name="Test+A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_B()">
+        <size>6</size>
+      </method>
+      <method name="Void set_B(System.String)">
+        <size>7</size>
+      </method>
+      <method name="System.String get_C()">
+        <size>6</size>
+      </method>
+      <method name="Void set_C(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void DoThings()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-autoproperty-03.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Foo(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>251</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-autoproperty-04.cs">
+    <type name="MonoTests.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String[] get_foo()">
+        <size>7</size>
+      </method>
+      <method name="Void set_foo(System.String[])">
+        <size>8</size>
+      </method>
+      <method name="System.String[] get_bar()">
+        <size>0</size>
+      </method>
+      <method name="Void set_bar(System.String[])">
+        <size>0</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="MonoTests.ChildClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String[] get_foo()">
+        <size>7</size>
+      </method>
+      <method name="Void set_foo(System.String[])">
+        <size>8</size>
+      </method>
+      <method name="System.String[] get_bar()">
+        <size>7</size>
+      </method>
+      <method name="Void set_bar(System.String[])">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-autoproperty-05.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_X()">
+        <size>7</size>
+      </method>
+      <method name="Void set_X(System.String)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-autoproperty-06.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="B I&lt;B&gt;.get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void I&lt;B&gt;.set_Prop(B)">
+        <size>8</size>
+      </method>
+      <method name="A I&lt;A&gt;.get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void I&lt;A&gt;.set_Prop(A)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-collectioninit-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void TestList(System.Collections.Generic.List`1[System.Int32], Int32)">
+        <size>83</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>534</size>
+      </method>
+    </type>
+    <type name="Test+Wrap">
+      <method name="Void .ctor()">
+        <size>31</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>25</size>
+      </method>
+      <method name="System.Collections.ArrayList get_Numbers()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-collectioninit-02.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>73</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-collectioninit-03.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+      <method name="Void R(System.Object ByRef)">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-01.cs">
+    <type name="MyTypeExplicit">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 op_Explicit(MyTypeExplicit)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MemberAccessData">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>16</size>
+      </method>
+      <method name="Void add_EventField(System.Func`1[System.Boolean])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_EventField(System.Func`1[System.Boolean])">
+        <size>24</size>
+      </method>
+      <method name="System.Linq.Expressions.Expression`1[System.Func`1[System.Func`1[System.Boolean]]] GetEvent()">
+        <size>33</size>
+      </method>
+      <method name="Void set_MyTypeProperty(MyType)">
+        <size>8</size>
+      </method>
+      <method name="MyType get_MyTypeProperty()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_StaticProperty()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="NewTest`1[T]">
+      <method name="Void .ctor(T)">
+        <size>27</size>
+      </method>
+      <method name="Void .ctor(T[])">
+        <size>14</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>91</size>
+      </method>
+    </type>
+    <type name="Indexer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="System.String get_Item(System.String[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Assert[T](T, T)">
+        <size>9</size>
+      </method>
+      <method name="Void Assert[T](T, T, System.String)">
+        <size>89</size>
+      </method>
+      <method name="Void Assert[T](T[], T[])">
+        <size>220</size>
+      </method>
+      <method name="T GenericMethod[T](T)">
+        <size>2</size>
+      </method>
+      <method name="Void AssertNodeType(System.Linq.Expressions.LambdaExpression, ExpressionType)">
+        <size>56</size>
+      </method>
+      <method name="Void AddTest()">
+        <size>99</size>
+      </method>
+      <method name="Void AddTest_2()">
+        <size>118</size>
+      </method>
+      <method name="Void AddTest_3()">
+        <size>129</size>
+      </method>
+      <method name="Void AddTest_4()">
+        <size>191</size>
+      </method>
+      <method name="Void AddTest_5()">
+        <size>133</size>
+      </method>
+      <method name="Void AddTest_6()">
+        <size>158</size>
+      </method>
+      <method name="Void AddTest_7()">
+        <size>142</size>
+      </method>
+      <method name="Void AddTest_8()">
+        <size>248</size>
+      </method>
+      <method name="Void AddTest_9()">
+        <size>142</size>
+      </method>
+      <method name="Void AddCheckedTest()">
+        <size>99</size>
+      </method>
+      <method name="Void AddCheckedTest_2()">
+        <size>118</size>
+      </method>
+      <method name="Void AddCheckedTest_3()">
+        <size>129</size>
+      </method>
+      <method name="Void AddStringTest()">
+        <size>128</size>
+      </method>
+      <method name="Void AddStringTest_2()">
+        <size>173</size>
+      </method>
+      <method name="Void AddStringTest_3()">
+        <size>174</size>
+      </method>
+      <method name="Void AddStringTest_4()">
+        <size>174</size>
+      </method>
+      <method name="Void AndTest()">
+        <size>140</size>
+      </method>
+      <method name="Void AndTest_2()">
+        <size>161</size>
+      </method>
+      <method name="Void AndTest_3()">
+        <size>161</size>
+      </method>
+      <method name="Void AndNullableTest()">
+        <size>381</size>
+      </method>
+      <method name="Void AndNullableTest_2()">
+        <size>237</size>
+      </method>
+      <method name="Void AndNullableTest_3()">
+        <size>198</size>
+      </method>
+      <method name="Void AndAlsoTest()">
+        <size>96</size>
+      </method>
+      <method name="Void AndAlsoTest_2()">
+        <size>165</size>
+      </method>
+      <method name="Void AndAlsoTest_3()">
+        <size>108</size>
+      </method>
+      <method name="Void ArrayIndexTest()">
+        <size>145</size>
+      </method>
+      <method name="Void ArrayIndexTest_2()">
+        <size>115</size>
+      </method>
+      <method name="Void ArrayIndexTest_3()">
+        <size>199</size>
+      </method>
+      <method name="Void ArrayIndexTest_4()">
+        <size>243</size>
+      </method>
+      <method name="Void ArrayIndexTest_5()">
+        <size>108</size>
+      </method>
+      <method name="Void ArrayLengthTest()">
+        <size>99</size>
+      </method>
+      <method name="Void ArrayLengthTest_2()">
+        <size>91</size>
+      </method>
+      <method name="Void CallTest()">
+        <size>126</size>
+      </method>
+      <method name="Void CallTest_2()">
+        <size>107</size>
+      </method>
+      <method name="Void CallTest_3()">
+        <size>195</size>
+      </method>
+      <method name="Void CallTest_4()">
+        <size>109</size>
+      </method>
+      <method name="Void CallTest_5()">
+        <size>99</size>
+      </method>
+      <method name="Void CallTest_6()">
+        <size>70</size>
+      </method>
+      <method name="Void CallTest_7()">
+        <size>124</size>
+      </method>
+      <method name="Void CallTest_8()">
+        <size>227</size>
+      </method>
+      <method name="Void CallTest_9()">
+        <size>88</size>
+      </method>
+      <method name="Void CoalesceTest()">
+        <size>120</size>
+      </method>
+      <method name="Void CoalesceTest_2()">
+        <size>171</size>
+      </method>
+      <method name="Void ConditionTest()">
+        <size>170</size>
+      </method>
+      <method name="Void ConditionTest_2()">
+        <size>301</size>
+      </method>
+      <method name="Void ConditionTest_3()">
+        <size>179</size>
+      </method>
+      <method name="Void ConditionTest_4()">
+        <size>183</size>
+      </method>
+      <method name="Void ConstantTest()">
+        <size>59</size>
+      </method>
+      <method name="Void ConstantTest_2()">
+        <size>62</size>
+      </method>
+      <method name="Void ConstantTest_3()">
+        <size>54</size>
+      </method>
+      <method name="Void ConstantTest_4()">
+        <size>44</size>
+      </method>
+      <method name="Void ConstantTest_5()">
+        <size>59</size>
+      </method>
+      <method name="Void ConstantTest_6()">
+        <size>67</size>
+      </method>
+      <method name="Void ConstantTest_7()">
+        <size>62</size>
+      </method>
+      <method name="Void ConstantTest_8()">
+        <size>72</size>
+      </method>
+      <method name="Void ConstantTest_9()">
+        <size>72</size>
+      </method>
+      <method name="Void ConstantTest_10()">
+        <size>72</size>
+      </method>
+      <method name="Void ConstantTest_11()">
+        <size>59</size>
+      </method>
+      <method name="Void ConstantTest_13()">
+        <size>59</size>
+      </method>
+      <method name="Void ConstantTest_14()">
+        <size>72</size>
+      </method>
+      <method name="Void ConstantTest_15()">
+        <size>62</size>
+      </method>
+      <method name="Void ConvertTest()">
+        <size>82</size>
+      </method>
+      <method name="Void ConvertTest_2()">
+        <size>83</size>
+      </method>
+      <method name="Void ConvertTest_3()">
+        <size>93</size>
+      </method>
+      <method name="Void ConvertTest_4()">
+        <size>102</size>
+      </method>
+      <method name="Void ConvertTest_5()">
+        <size>109</size>
+      </method>
+      <method name="Void ConvertTest_6()">
+        <size>240</size>
+      </method>
+      <method name="Void ConvertTest_7()">
+        <size>122</size>
+      </method>
+      <method name="Void ConvertTest_8()">
+        <size>118</size>
+      </method>
+      <method name="Void ConvertTest_9()">
+        <size>97</size>
+      </method>
+      <method name="Void ConvertTest_10()">
+        <size>163</size>
+      </method>
+      <method name="Void ConvertTest_11()">
+        <size>101</size>
+      </method>
+      <method name="Void ConvertTest_12()">
+        <size>141</size>
+      </method>
+      <method name="Void ConvertTest_13()">
+        <size>86</size>
+      </method>
+      <method name="Void ConvertTest_14()">
+        <size>88</size>
+      </method>
+      <method name="Void ConvertTest_15()">
+        <size>132</size>
+      </method>
+      <method name="Void ConvertCheckedTest()">
+        <size>82</size>
+      </method>
+      <method name="Void ConvertCheckedTest_2()">
+        <size>83</size>
+      </method>
+      <method name="Void ConvertCheckedTest_3()">
+        <size>93</size>
+      </method>
+      <method name="Void ConvertCheckedTest_4()">
+        <size>102</size>
+      </method>
+      <method name="Void DivideTest()">
+        <size>99</size>
+      </method>
+      <method name="Void DivideTest_2()">
+        <size>185</size>
+      </method>
+      <method name="Void DivideTest_3()">
+        <size>129</size>
+      </method>
+      <method name="Void DivideTest_4()">
+        <size>192</size>
+      </method>
+      <method name="Void DivideTest_5()">
+        <size>134</size>
+      </method>
+      <method name="Void DivideTest_6()">
+        <size>196</size>
+      </method>
+      <method name="Void EqualTest()">
+        <size>118</size>
+      </method>
+      <method name="Void EqualTest_2()">
+        <size>168</size>
+      </method>
+      <method name="Void EqualTest_3()">
+        <size>125</size>
+      </method>
+      <method name="Void EqualTest_4()">
+        <size>210</size>
+      </method>
+      <method name="Void EqualTest_5()">
+        <size>176</size>
+      </method>
+      <method name="Void EqualTest_6()">
+        <size>119</size>
+      </method>
+      <method name="Void EqualTest_7()">
+        <size>167</size>
+      </method>
+      <method name="Void EqualTest_8()">
+        <size>116</size>
+      </method>
+      <method name="Void EqualTest_9()">
+        <size>146</size>
+      </method>
+      <method name="Void EqualTest_10()">
+        <size>169</size>
+      </method>
+      <method name="Void EqualTest_11()">
+        <size>132</size>
+      </method>
+      <method name="Void EqualTest_12()">
+        <size>127</size>
+      </method>
+      <method name="Void EqualTest_13()">
+        <size>124</size>
+      </method>
+      <method name="Void EqualTestDelegate()">
+        <size>113</size>
+      </method>
+      <method name="Void EqualTestDelegate_2()">
+        <size>312</size>
+      </method>
+      <method name="Void ExclusiveOrTest()">
+        <size>115</size>
+      </method>
+      <method name="Void ExclusiveOrTest_2()">
+        <size>183</size>
+      </method>
+      <method name="Void ExclusiveOrTest_3()">
+        <size>129</size>
+      </method>
+      <method name="Void ExclusiveOrTest_4()">
+        <size>192</size>
+      </method>
+      <method name="Void ExclusiveOrTest_5()">
+        <size>197</size>
+      </method>
+      <method name="Void ExclusiveOrTest_6()">
+        <size>161</size>
+      </method>
+      <method name="Void ExclusiveOrTest_7()">
+        <size>198</size>
+      </method>
+      <method name="Void ExclusiveOrTest_8()">
+        <size>164</size>
+      </method>
+      <method name="Void GreaterThanTest()">
+        <size>99</size>
+      </method>
+      <method name="Void GreaterThanTest_2()">
+        <size>154</size>
+      </method>
+      <method name="Void GreaterThanTest_3()">
+        <size>125</size>
+      </method>
+      <method name="Void GreaterThanTest_4()">
+        <size>210</size>
+      </method>
+      <method name="Void GreaterThanTest_5()">
+        <size>209</size>
+      </method>
+      <method name="Void GreaterThanTest_6()">
+        <size>102</size>
+      </method>
+      <method name="Void GreaterThanTest_7()">
+        <size>146</size>
+      </method>
+      <method name="Void GreaterThanTest_8()">
+        <size>169</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest()">
+        <size>99</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_2()">
+        <size>169</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_3()">
+        <size>130</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_4()">
+        <size>210</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_5()">
+        <size>209</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_6()">
+        <size>102</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_7()">
+        <size>146</size>
+      </method>
+      <method name="Void GreaterThanOrEqualTest_8()">
+        <size>169</size>
+      </method>
+      <method name="Void InvokeTest()">
+        <size>90</size>
+      </method>
+      <method name="Void InvokeTest_2()">
+        <size>138</size>
+      </method>
+      <method name="Void LeftShiftTest()">
+        <size>155</size>
+      </method>
+      <method name="Void LeftShiftTest_2()">
+        <size>162</size>
+      </method>
+      <method name="Void LeftShiftTest_3()">
+        <size>184</size>
+      </method>
+      <method name="Void LeftShiftTest_4()">
+        <size>261</size>
+      </method>
+      <method name="Void LeftShiftTest_5()">
+        <size>110</size>
+      </method>
+      <method name="Void LessThanTest()">
+        <size>99</size>
+      </method>
+      <method name="Void LessThanTest_2()">
+        <size>154</size>
+      </method>
+      <method name="Void LessThanTest_3()">
+        <size>125</size>
+      </method>
+      <method name="Void LessThanTest_4()">
+        <size>210</size>
+      </method>
+      <method name="Void LessThanTest_5()">
+        <size>209</size>
+      </method>
+      <method name="Void LessThanTest_6()">
+        <size>102</size>
+      </method>
+      <method name="Void LessThanTest_7()">
+        <size>146</size>
+      </method>
+      <method name="Void LessThanTest_8()">
+        <size>169</size>
+      </method>
+      <method name="Void LessThanOrEqualTest()">
+        <size>99</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_2()">
+        <size>169</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_3()">
+        <size>125</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_4()">
+        <size>210</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_5()">
+        <size>209</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_6()">
+        <size>102</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_7()">
+        <size>146</size>
+      </method>
+      <method name="Void LessThanOrEqualTest_8()">
+        <size>169</size>
+      </method>
+      <method name="Void ListInitTest()">
+        <size>404</size>
+      </method>
+      <method name="Void ListInitTest_2()">
+        <size>292</size>
+      </method>
+      <method name="Void MemberAccessTest()">
+        <size>132</size>
+      </method>
+      <method name="Void MemberAccessTest_2()">
+        <size>63</size>
+      </method>
+      <method name="Void MemberAccessTest_3()">
+        <size>113</size>
+      </method>
+      <method name="Void MemberAccessTest_4()">
+        <size>91</size>
+      </method>
+      <method name="Void MemberAccessTest_5()">
+        <size>39</size>
+      </method>
+      <method name="Void MemberAccessTest_6()">
+        <size>104</size>
+      </method>
+      <method name="Void MemberAccessTest_7()">
+        <size>109</size>
+      </method>
+      <method name="Void MemberAccessTest_8()">
+        <size>63</size>
+      </method>
+      <method name="Void MemberAccessTest_9()">
+        <size>91</size>
+      </method>
+      <method name="Void MemberInitTest()">
+        <size>302</size>
+      </method>
+      <method name="Void MemberInitTest_2()">
+        <size>250</size>
+      </method>
+      <method name="Void MemberInitTest_3()">
+        <size>124</size>
+      </method>
+      <method name="Void ModuloTest()">
+        <size>100</size>
+      </method>
+      <method name="Void ModuloTest_2()">
+        <size>185</size>
+      </method>
+      <method name="Void ModuloTest_3()">
+        <size>129</size>
+      </method>
+      <method name="Void ModuloTest_4()">
+        <size>192</size>
+      </method>
+      <method name="Void ModuloTest_5()">
+        <size>133</size>
+      </method>
+      <method name="Void ModuloTest_6()">
+        <size>200</size>
+      </method>
+      <method name="Void ModuloTest_7()">
+        <size>110</size>
+      </method>
+      <method name="Void MultiplyTest()">
+        <size>131</size>
+      </method>
+      <method name="Void MultiplyTest_2()">
+        <size>185</size>
+      </method>
+      <method name="Void MultiplyTest_3()">
+        <size>133</size>
+      </method>
+      <method name="Void MultiplyTest_4()">
+        <size>195</size>
+      </method>
+      <method name="Void MultiplyTest_5()">
+        <size>137</size>
+      </method>
+      <method name="Void MultiplyTest_6()">
+        <size>202</size>
+      </method>
+      <method name="Void MultiplyTest_7()">
+        <size>110</size>
+      </method>
+      <method name="Void MultiplyCheckedTest()">
+        <size>122</size>
+      </method>
+      <method name="Void MultiplyCheckedTest_2()">
+        <size>192</size>
+      </method>
+      <method name="Void MultiplyCheckedTest_3()">
+        <size>133</size>
+      </method>
+      <method name="Void MultiplyCheckedTest_4()">
+        <size>121</size>
+      </method>
+      <method name="Void MultiplyCheckedTest_5()">
+        <size>124</size>
+      </method>
+      <method name="Void NegateTest()">
+        <size>72</size>
+      </method>
+      <method name="Void NegateTest_2()">
+        <size>92</size>
+      </method>
+      <method name="Void NegateTest_3()">
+        <size>130</size>
+      </method>
+      <method name="Void NegateTest_4()">
+        <size>97</size>
+      </method>
+      <method name="Void NegateTest_5()">
+        <size>141</size>
+      </method>
+      <method name="Void NegateTest_6()">
+        <size>121</size>
+      </method>
+      <method name="Void NegateTest_7()">
+        <size>132</size>
+      </method>
+      <method name="Void NegateTest_8()">
+        <size>97</size>
+      </method>
+      <method name="Void NegateTest_9()">
+        <size>87</size>
+      </method>
+      <method name="Void NegateTestChecked()">
+        <size>91</size>
+      </method>
+      <method name="Void NegateTestChecked_2()">
+        <size>137</size>
+      </method>
+      <method name="Void NegateTestChecked_3()">
+        <size>97</size>
+      </method>
+      <method name="Void NegateTestChecked_4()">
+        <size>86</size>
+      </method>
+      <method name="Void NewArrayInitTest()">
+        <size>92</size>
+      </method>
+      <method name="Void NewArrayInitTest_2()">
+        <size>64</size>
+      </method>
+      <method name="Void NewArrayInitTest_3()">
+        <size>136</size>
+      </method>
+      <method name="Void NewArrayInitTest_4()">
+        <size>120</size>
+      </method>
+      <method name="Void NewArrayBoundsTest()">
+        <size>123</size>
+      </method>
+      <method name="Void NewArrayBoundsTest_2()">
+        <size>123</size>
+      </method>
+      <method name="Void NewTest()">
+        <size>93</size>
+      </method>
+      <method name="Void NewTest_2()">
+        <size>61</size>
+      </method>
+      <method name="Void NewTest_3()">
+        <size>98</size>
+      </method>
+      <method name="Void NewTest_4()">
+        <size>252</size>
+      </method>
+      <method name="Void NewTest_5()">
+        <size>371</size>
+      </method>
+      <method name="Void NotTest()">
+        <size>70</size>
+      </method>
+      <method name="Void NotTest_2()">
+        <size>113</size>
+      </method>
+      <method name="Void NotTest_3()">
+        <size>71</size>
+      </method>
+      <method name="Void NotTest_4()">
+        <size>105</size>
+      </method>
+      <method name="Void NotTest_5()">
+        <size>73</size>
+      </method>
+      <method name="Void NotTest_6()">
+        <size>104</size>
+      </method>
+      <method name="Void NotNullableTest()">
+        <size>114</size>
+      </method>
+      <method name="Void NotNullableTest_2()">
+        <size>134</size>
+      </method>
+      <method name="Void NotNullableTest_3()">
+        <size>130</size>
+      </method>
+      <method name="Void NotNullableTest_4()">
+        <size>149</size>
+      </method>
+      <method name="Void NotNullableTest_5()">
+        <size>148</size>
+      </method>
+      <method name="Void NotEqualTest()">
+        <size>118</size>
+      </method>
+      <method name="Void NotEqualTest_2()">
+        <size>166</size>
+      </method>
+      <method name="Void NotEqualTest_3()">
+        <size>125</size>
+      </method>
+      <method name="Void NotEqualTest_4()">
+        <size>210</size>
+      </method>
+      <method name="Void NotEqualTest_5()">
+        <size>176</size>
+      </method>
+      <method name="Void NotEqualTest_6()">
+        <size>119</size>
+      </method>
+      <method name="Void NotEqualTest_7()">
+        <size>167</size>
+      </method>
+      <method name="Void NotEqualTest_8()">
+        <size>116</size>
+      </method>
+      <method name="Void NotEqualTest_9()">
+        <size>146</size>
+      </method>
+      <method name="Void NotEqualTest_10()">
+        <size>169</size>
+      </method>
+      <method name="Void NotEqualTest_11()">
+        <size>132</size>
+      </method>
+      <method name="Void OrTest()">
+        <size>141</size>
+      </method>
+      <method name="Void OrTest_2()">
+        <size>129</size>
+      </method>
+      <method name="Void OrTest_3()">
+        <size>161</size>
+      </method>
+      <method name="Void OrNullableTest()">
+        <size>382</size>
+      </method>
+      <method name="Void OrNullableTest_2()">
+        <size>186</size>
+      </method>
+      <method name="Void OrNullableTest_3()">
+        <size>176</size>
+      </method>
+      <method name="Void OrNullableTest_4()">
+        <size>198</size>
+      </method>
+      <method name="Void OrElseTest()">
+        <size>97</size>
+      </method>
+      <method name="Void OrElseTest_2()">
+        <size>167</size>
+      </method>
+      <method name="Void ParameterTest()">
+        <size>73</size>
+      </method>
+      <method name="Void ParameterTest_2()">
+        <size>75</size>
+      </method>
+      <method name="Void ParameterTest_3()">
+        <size>73</size>
+      </method>
+      <method name="Void ParameterTest_4()">
+        <size>100</size>
+      </method>
+      <method name="Void QuoteTest()">
+        <size>85</size>
+      </method>
+      <method name="Void RightShiftTest()">
+        <size>152</size>
+      </method>
+      <method name="Void RightShiftTest_2()">
+        <size>159</size>
+      </method>
+      <method name="Void RightShiftTest_3()">
+        <size>184</size>
+      </method>
+      <method name="Void RightShiftTest_4()">
+        <size>258</size>
+      </method>
+      <method name="Void SubtractTest()">
+        <size>100</size>
+      </method>
+      <method name="Void SubtractTest_2()">
+        <size>119</size>
+      </method>
+      <method name="Void SubtractTest_3()">
+        <size>130</size>
+      </method>
+      <method name="Void SubtractTest_4()">
+        <size>192</size>
+      </method>
+      <method name="Void SubtractTest_5()">
+        <size>134</size>
+      </method>
+      <method name="Void SubtractTest_6()">
+        <size>160</size>
+      </method>
+      <method name="Void SubtractTest_7()">
+        <size>113</size>
+      </method>
+      <method name="Void SubtractTest_8()">
+        <size>146</size>
+      </method>
+      <method name="Void SubtractTest_9()">
+        <size>142</size>
+      </method>
+      <method name="Void SubtractTest_10()">
+        <size>161</size>
+      </method>
+      <method name="Void SubtractTest_11()">
+        <size>157</size>
+      </method>
+      <method name="Void SubtractCheckedTest()">
+        <size>127</size>
+      </method>
+      <method name="Void SubtractCheckedTest_2()">
+        <size>185</size>
+      </method>
+      <method name="Void SubtractCheckedTest_3()">
+        <size>130</size>
+      </method>
+      <method name="Void SubtractCheckedTest_4()">
+        <size>121</size>
+      </method>
+      <method name="Void TypeAsTest()">
+        <size>80</size>
+      </method>
+      <method name="Void TypeAsTest_2()">
+        <size>144</size>
+      </method>
+      <method name="Void TypeAsTest_3()">
+        <size>85</size>
+      </method>
+      <method name="Void TypeIsTest()">
+        <size>103</size>
+      </method>
+      <method name="Void TypeIsTest_2()">
+        <size>103</size>
+      </method>
+      <method name="Void TypeIsTest_3()">
+        <size>85</size>
+      </method>
+      <method name="Void TypeIsTest_5()">
+        <size>74</size>
+      </method>
+      <method name="Void TypeIsTest_6()">
+        <size>111</size>
+      </method>
+      <method name="Void UnaryPlusTest()">
+        <size>67</size>
+      </method>
+      <method name="Void UnaryPlusTest_2()">
+        <size>47</size>
+      </method>
+      <method name="Void UnaryPlusTest_3()">
+        <size>97</size>
+      </method>
+      <method name="Void UnaryPlusTest_4()">
+        <size>141</size>
+      </method>
+      <method name="Void UnaryPlusTest_5()">
+        <size>140</size>
+      </method>
+      <method name="System.String InstanceMethod(System.String)">
+        <size>2</size>
+      </method>
+      <method name="System.Object InstanceParamsMethod(Int32, System.Object[])">
+        <size>30</size>
+      </method>
+      <method name="Int32 TestInt()">
+        <size>3</size>
+      </method>
+      <method name="Void RefMethod(Int32 ByRef)">
+        <size>8</size>
+      </method>
+      <method name="Boolean RunTest(System.Reflection.MethodInfo)">
+        <size>87</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>179</size>
+      </method>
+    </type>
+    <type name="Tester+EmptyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Tester+IntDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;A&gt;__T,&lt;Value&gt;__T]">
+      <method name="Void .ctor(&lt;A&gt;__T, &lt;Value&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;A&gt;__T get_A()">
+        <size>7</size>
+      </method>
+      <method name="&lt;Value&gt;__T get_Value()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__0()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__1()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__2()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__3()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__4()">
+        <size>1</size>
+      </method>
+      <method name="System.String &lt;InvokeTest_2&gt;m__5(Int32)">
+        <size>12</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__6(System.Reflection.MethodInfo)">
+        <size>12</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__7(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__8(System.Reflection.MethodInfo)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__9(Boolean)">
+        <size>5</size>
+      </method>
+      <method name="Void NewArrayInitTest_5()">
+        <size>158</size>
+      </method>
+      <method name="Void ConditionTest_5()">
+        <size>107</size>
+      </method>
+      <method name="Void AndTest_4()">
+        <size>92</size>
+      </method>
+      <method name="Void MemberInitTest_4()">
+        <size>66</size>
+      </method>
+      <method name="Void NewTest_6()">
+        <size>182</size>
+      </method>
+    </type>
+    <type name="InverseLogicalOperator">
+      <method name="Void .ctor(Boolean)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_True(InverseLogicalOperator)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_False(InverseLogicalOperator)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="MyType">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int16 get_ShortProp()">
+        <size>7</size>
+      </method>
+      <method name="Void set_ShortProp(Int16)">
+        <size>8</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>6</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="Int32 op_Implicit(MyType)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_True(MyType)">
+        <size>16</size>
+      </method>
+      <method name="Boolean op_False(MyType)">
+        <size>19</size>
+      </method>
+      <method name="MyType op_Addition(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Subtraction(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Division(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Multiply(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_Modulus(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_BitwiseAnd(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_BitwiseOr(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="MyType op_ExclusiveOr(MyType, MyType)">
+        <size>21</size>
+      </method>
+      <method name="Boolean op_Equality(MyType, MyType)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_Inequality(MyType, MyType)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_GreaterThan(MyType, MyType)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_LessThan(MyType, MyType)">
+        <size>17</size>
+      </method>
+      <method name="Boolean op_GreaterThanOrEqual(MyType, MyType)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_LessThanOrEqual(MyType, MyType)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_LogicalNot(MyType)">
+        <size>11</size>
+      </method>
+      <method name="Int32 op_RightShift(MyType, Int32)">
+        <size>13</size>
+      </method>
+      <method name="Int32 op_LeftShift(MyType, Int32)">
+        <size>13</size>
+      </method>
+      <method name="MyType op_UnaryNegation(MyType)">
+        <size>14</size>
+      </method>
+      <method name="MyType op_UnaryPlus(MyType)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="MyTypeImplicitOnly">
+      <method name="Void .ctor(Int16)">
+        <size>8</size>
+      </method>
+      <method name="Int16 op_Implicit(MyTypeImplicitOnly)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void EqualTest_14()">
+        <size>101</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;ConvertTest_9&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void NewArrayInitTest_6()">
+        <size>103</size>
+      </method>
+      <method name="Void LambdaTest()">
+        <size>89</size>
+      </method>
+      <method name="Void EqualTest_15()">
+        <size>159</size>
+      </method>
+      <method name="Void ArrayIndexTest_6()">
+        <size>122</size>
+      </method>
+      <method name="Void ArrayIndexTest_7()">
+        <size>128</size>
+      </method>
+      <method name="Void NewArrayBoundsTest_3()">
+        <size>85</size>
+      </method>
+      <method name="Void NewArrayBoundsTest_4()">
+        <size>82</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void LeftShiftTest_6()">
+        <size>155</size>
+      </method>
+      <method name="Void RightShiftTest_5()">
+        <size>152</size>
+      </method>
+      <method name="Void QuoteTest_2()">
+        <size>99</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_3&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_4&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_6&gt;c__AnonStorey4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_9&gt;c__AnonStorey5">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void NewTest_7()">
+        <size>53</size>
+      </method>
+      <method name="Void ConvertTest_16()">
+        <size>81</size>
+      </method>
+      <method name="Int32 ReturnNumber()">
+        <size>2</size>
+      </method>
+      <method name="Void EqualTestDelegate_3()">
+        <size>212</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-02.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](System.Linq.Expressions.Expression`1[System.Func`2[T,T]])">
+        <size>1</size>
+      </method>
+      <method name="System.String Param(System.String)">
+        <size>114</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>157</size>
+      </method>
+    </type>
+    <type name="M+&lt;Param&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-03.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="S`1[T]">
+      <method name="Int32 Test()">
+        <size>145</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-04.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>366</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Boolean op_GreaterThan(Foo, Foo)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_LessThan(Foo, Foo)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_Equality(Foo, Foo)">
+        <size>6</size>
+      </method>
+      <method name="Boolean op_Inequality(Foo, Foo)">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-05.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Assert[T](T, T)">
+        <size>46</size>
+      </method>
+      <method name="Void AssertNodeType(System.Linq.Expressions.LambdaExpression, ExpressionType)">
+        <size>56</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>350</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-06.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+      <method name="Int32 Value()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-07.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>14</size>
+      </method>
+      <method name="Int32* Foo()">
+        <size>3</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>519</size>
+      </method>
+    </type>
+    <type name="EmptyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="UnsafeDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32* Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32* EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-08.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 ThisMethod()">
+        <size>3</size>
+      </method>
+      <method name="Int32 Goo(Boolean)">
+        <size>204</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;Goo&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-09.cs">
+    <type name="Mono.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>276</size>
+      </method>
+      <method name="System.Int64[] GetValues()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Mono.C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-10.cs">
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean ContainsAll[U](IEnumerable`1)">
+        <size>191</size>
+      </method>
+      <method name="Boolean Contains(T)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="Foo`1+&lt;ContainsAll&gt;c__AnonStorey0`1[T,U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-11.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Invalid(Int32)">
+        <size>124</size>
+      </method>
+      <method name="Void Other(System.Int32[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Invalid&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-12.cs">
+    <type name="TestCase">
+      <method name="Void .cctor()">
+        <size>68</size>
+      </method>
+      <method name="Boolean StaticMethodTakingAnExpression(System.Linq.Expressions.Expression`1[System.Func`2[System.Object,System.Boolean]])">
+        <size>2</size>
+      </method>
+      <method name="Void DummyToMakeTheStaticsInitialize()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-13.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>55</size>
+      </method>
+      <method name="IEnumerable`1 Test[T](Int32)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Test&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>108</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-14.cs">
+    <type name="Person">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Age()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Age(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Repro">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+      <method name="IEnumerable`1 GetPersons[T](IEnumerable`1, Int32)">
+        <size>44</size>
+      </method>
+      <method name="Boolean Test[T](T, System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Repro+&lt;GetPersons&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>295</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-15.cs">
+    <type name="Foo">
+      <method name="Int32 Helper(System.Linq.Expressions.Expression`1[System.Predicate`1[System.Int32]])">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>190</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-16.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>136</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-17.cs">
+    <type name="CompilerCrashTest.QueryCompiler">
+      <method name="D Compile[D](System.Linq.Expressions.Expression`1[D])">
+        <size>12</size>
+      </method>
+      <method name="System.Delegate Compile(System.Linq.Expressions.LambdaExpression)">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-18.cs">
+    <type name="FooBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>140</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-19.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="T Value[T]()">
+        <size>76</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-20.cs">
+    <type name="S">
+      <method name="Int32 Main()">
+        <size>215</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="A op_Implicit(S)">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-22.cs">
+    <type name="FieldInfoBug.MonoRuntime">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FieldInfoBug.GenericClass`1[T]">
+      <method name="Void .ctor(String)">
+        <size>58</size>
+      </method>
+    </type>
+    <type name="FieldInfoBug.GenericClass`1+&lt;GenericClass&gt;c__AnonStorey0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-23.cs">
+    <type name="Test.OrderBySpecification">
+      <method name="Void .ctor(Expression`1)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.RateOrderById">
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>44</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-etree-24.cs">
+    <type name="NotifyingProperty">
+      <method name="Void CreateDependent[TValue](System.Linq.Expressions.Expression`1[System.Func`1[TValue]], System.Func`1[System.Object], System.Linq.Expressions.Expression`1[System.Func`1[System.Object]][])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="NotifyingPropertyTest">
+      <method name="Void CreateDependent_NotifierNull()">
+        <size>58</size>
+      </method>
+      <method name="Void CreateDependent_DependentsNull()">
+        <size>83</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="System.Object &lt;CreateDependent_DependentsNull&gt;m__0()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NotifyingPropertyTest+&lt;CreateDependent_NotifierNull&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NotifyingPropertyTest+&lt;CreateDependent_DependentsNull&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-01.cs">
+    <type name="SimpleTest">
+      <method name="System.String Prefix(System.String, System.String)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>157</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-02.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="N.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test2()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-03.cs">
+    <type name="A.A">
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo(Int32, System.String)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="B.X">
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo(Int32, Boolean)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="C.F">
+      <method name="Boolean Foo(Byte)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C.D.F">
+      <method name="Int32 Foo(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Void TestX()">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="C.M">
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>61</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-04.cs">
+    <type name="A.Test">
+      <method name="System.String Test_1(Boolean)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="B.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-05.cs">
+    <type name="A.Test_A">
+      <method name="System.String Test_1(System.String)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="A.Test_B">
+      <method name="System.String Test_2(System.String)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="B.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-06.cs">
+    <type name="Gen">
+      <method name="T Test_1[T](T)">
+        <size>10</size>
+      </method>
+      <method name="System.String Test_1[T](System.String)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="B.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-07.cs">
+    <type name="E">
+      <method name="Void ToReadOnly[T](IEnumerable`1)">
+        <size>1</size>
+      </method>
+      <method name="Void To(IA)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Test(IEnumerable`1)">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-08.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-09.cs">
+    <type name="Test">
+      <method name="Void Foo[T](System.String)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-10.cs">
+    <type name="AExtensions">
+      <method name="Int32 Round(Double)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="BExtensions">
+      <method name="T GetBy[T](T[], Double)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-11.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="Lol">
+      <method name="Boolean OneEleven(System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-12.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>63</size>
+      </method>
+    </type>
+    <type name="ChatClient">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Say(System.String, System.String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="ChatExtensions">
+      <method name="Void Say(ChatClient, System.String, System.Collections.Specialized.StringCollection)">
+        <size>64</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-13.cs">
+    <type name="Foo">
+      <method name="IEnumerable`1 Reverse[T](IEnumerable`1)">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-14.cs">
+    <type name="C">
+      <method name="Void Bar[U](IA)">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](IA)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(IA)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-15.cs">
+    <type name="C">
+      <method name="TAttribute GetCustomAttribute[TAttribute](ICustomAttributeProvider)">
+        <size>15</size>
+      </method>
+      <method name="TAttribute[] GetCustomAttributes[TAttribute](ICustomAttributeProvider)">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-16.cs">
+    <type name="Rocks">
+      <method name="Boolean Extension(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Boolean Extension(D)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_e(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_e(D)">
+        <size>24</size>
+      </method>
+      <method name="System.String get_Item(Int32)">
+        <size>6</size>
+      </method>
+      <method name="System.String get_Property()">
+        <size>6</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-17.cs">
+    <type name="MainClass">
+      <method name="Void Main()">
+        <size>45</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-18.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean get_IsBar()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="FooExt">
+      <method name="Boolean IsBar(Foo)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Repro">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-19.cs">
+    <type name="Rocks">
+      <method name="Int32 Test_2[T](IEnumerable`1)">
+        <size>3</size>
+      </method>
+      <method name="System.String Test_1(System.String)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-20.cs">
+    <type name="Outer.Inner.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M(I)">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Outer.ExtensionMethods">
+      <method name="Void AddRange[T](I, IEnumerable`1)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-21.cs">
+    <type name="Outer.Inner.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M(I)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="External.ExtensionMethods">
+      <method name="Void AddRange(I)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-22.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-23.cs">
+    <type name="T">
+      <method name="Void A(System.String, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-24.cs">
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-25.cs">
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-26.cs">
+    <type name="test.TypeExtensions">
+      <method name="Boolean IsNullable(System.Type)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="testmono.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-27.cs">
+    <type name="Foo.Extensions">
+      <method name="System.String AsString(IList`1)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Bar.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>17</size>
+      </method>
+      <method name="System.String Pan(System.Byte[])">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-28.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Extensions">
+      <method name="Boolean IsFoo(Foo)">
+        <size>2</size>
+      </method>
+      <method name="Boolean IsBar(Bar)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-29.cs">
+    <type name="My">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+      <method name="Int32 ContentTransferEncoding[T](My)">
+        <size>2</size>
+      </method>
+      <method name="Int32 ContentTransferEncoding(My)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="My">
+      <method name="Void set_ContentTransferEncoding(Boolean)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-30.cs">
+    <type name="Test">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_First()">
+        <size>2</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Test()">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-31.cs">
+    <type name="N.S">
+      <method name="Void Map[T](Int32, System.Func`2[T,System.String])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="N2.S2">
+      <method name="Void Map(Int32, Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="M.C">
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-32.cs">
+    <type name="A">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G`1[T]">
+      <method name="Void Test()">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Extensions">
+      <method name="Int32 Count(IEnumerable)">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-33.cs">
+    <type name="Prop">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="HelperExtensions">
+      <method name="Void Foo(I, I)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="I get_Prop()">
+        <size>2</size>
+      </method>
+      <method name="System.Int32[] get_Loc()">
+        <size>2</size>
+      </method>
+      <method name="Void Test()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-34.cs">
+    <type name="Program">
+      <method name="Void Foo(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-35.cs">
+    <type name="A">
+      <method name="Void Test(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-36.cs">
+    <type name="S">
+      <method name="System.String get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Int32 Prop(S)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Prop(S2)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>43</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-37.cs">
+    <type name="S">
+      <method name="Void Extension(A, System.String, Boolean)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void Extension(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void TestMethod(System.Action`1[System.Boolean])">
+        <size>1</size>
+      </method>
+      <method name="Int32 TestMethod(System.Action`1[System.String])">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-38.cs">
+    <type name="Repro2.Color">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Repro2.ExtensionMethods">
+      <method name="Color Transparent(Color)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Repro2.MainClass">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-02.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-03.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-04.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-05.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-06.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-07.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-08.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-09.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-10.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-11.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-12.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-13.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+      <method name="Void Test_2()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-friend-14.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-implicitarray-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>296</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-implicitarray-02.cs">
+    <type name="MyString">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String op_Implicit(MyString)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-01.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 get_Answer()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Answer(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-02.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>1243</size>
+      </method>
+    </type>
+    <type name="Test+Point">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+Line">
+      <method name="Void .ctor()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="Test+Rectangle">
+      <method name="Void .ctor()">
+        <size>51</size>
+      </method>
+    </type>
+    <type name="Test+Library">
+      <method name="Void .ctor()">
+        <size>53</size>
+      </method>
+    </type>
+    <type name="Test+Thing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+Box">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-03.cs">
+    <type name="Data">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Prop(Data)">
+        <size>1</size>
+      </method>
+      <method name="System.Object Foo()">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-04.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>34</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-05.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>235</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-06.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>39</size>
+      </method>
+      <method name="Void Foo(Point ByRef)">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-07.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Boolean Matches(System.String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-08.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Z[] get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Prop(Z[])">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor(String)">
+        <size>70</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>70</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-09.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>53</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-10.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_P()">
+        <size>7</size>
+      </method>
+      <method name="Void set_P(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+      <method name="Boolean Do(Foo)">
+        <size>86</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-11.cs">
+    <type name="InlineAssignmentTest.Foo">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="InlineAssignmentTest.MainClass">
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-initialize-12.cs">
+    <type name="C">
+      <method name="Void set_Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void set_Foo(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void set_Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-01.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C+ArrayReadOnlyList`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T get_Item(Int32)">
+        <size>13</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="C+ArrayReadOnlyList`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>136</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-02.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 Test()">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>25</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="KeyValuePair`2 System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-03.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="IEnumerable`1 Annotations[T]()">
+        <size>23</size>
+      </method>
+      <method name="IEnumerable`1 Annotations(System.Type)">
+        <size>37</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Annotations&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>196</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Annotations&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>224</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>57</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Annotations&gt;c__Iterator0`1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Annotations&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-04.cs">
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ToString(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IEnumerable`1 TestEnumerator()">
+        <size>23</size>
+      </method>
+      <method name="Void Test()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestClass+&lt;TestEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>37</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-05.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 TestRoutine[T](IEnumerable`1, Foo`1[T])">
+        <size>44</size>
+      </method>
+      <method name="Void Main()">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CreateItem[G]()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TestRoutine&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>187</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-06.cs">
+    <type name="Mono.Rocks.KeyValuePair">
+      <method name="Nullable`1 Just[TKey,TValue](TKey, TValue)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Mono.Rocks.Sequence">
+      <method name="IEnumerable`1 Unfoldr[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])">
+        <size>8</size>
+      </method>
+      <method name="IEnumerable`1 CreateUnfoldrIterator[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="Mono.Rocks.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>118</size>
+      </method>
+      <method name="Nullable`1 &lt;Main&gt;m__0(Int32)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="Mono.Rocks.Sequence+&lt;CreateUnfoldrIterator&gt;c__Iterator0`2[TSource,TResult]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>184</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="TResult System.Collections.Generic.IEnumerator&lt;TResult&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;TResult&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-07.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void TestFunction(IEnumerable`1)">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="MySystem">
+      <method name="Void .ctor()">
+        <size>34</size>
+      </method>
+      <method name="IEnumerable`1 get_Items()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="MySystem+&lt;&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>187</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>57</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.String System.Collections.Generic.IEnumerator&lt;string&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-08.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable QueryEnumerable[T]()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>123</size>
+      </method>
+    </type>
+    <type name="App+&lt;QueryEnumerable&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>84</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="App">
+      <method name="T TestType[T]()">
+        <size>21</size>
+      </method>
+      <method name="System.Object TestType(System.Type)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="App+&lt;QueryEnumerable&gt;c__Iterator0`1[T]">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-09.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 Create[T](T[,])">
+        <size>30</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>80</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Create&gt;c__Iterator0`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>130</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-10.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 FromTo(Int32, Int32)">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>163</size>
+      </method>
+    </type>
+    <type name="Test+&lt;FromTo&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>103</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-11.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Collection`1[T]">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Void Add(T)">
+        <size>13</size>
+      </method>
+      <method name="IEnumerator`1 GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="BarCollection">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>150</size>
+      </method>
+    </type>
+    <type name="Collection`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>176</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>57</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-12.cs">
+    <type name="H">
+      <method name="Void Main(System.String[])">
+        <size>1</size>
+      </method>
+      <method name="IEnumerable`1 Merge[T](IEnumerator`1)">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="H+&lt;Merge&gt;c__Iterator0`1[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>117</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-13.cs">
+    <type name="C`1[T]">
+      <method name="IEnumerator GetEnumerator()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerable`1 Filter(System.Func`2[T,System.Boolean])">
+        <size>37</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>59</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+&lt;Filter&gt;c__Iterator0[T]">
+      <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>205</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>64</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-14.cs">
+    <type name="A">
+      <method name="Int32 get_BaseM()">
+        <size>2</size>
+      </method>
+      <method name="Void set_BaseM(Int32)">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void set_BaseM(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="IEnumerable`1 GetIt()">
+        <size>28</size>
+      </method>
+      <method name="Int32 &lt;GetHashCode&gt;__BaseCallProxy0()">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void set_BaseM(Int32)">
+        <size>11</size>
+      </method>
+      <method name="IEnumerable`1 GetIt()">
+        <size>23</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>133</size>
+      </method>
+      <method name="Int32 &lt;get_BaseM&gt;__BaseCallProxy0()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;set_BaseM&gt;__BaseCallProxy1(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S+&lt;GetIt&gt;c__Iterator0">
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>75</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator1">
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>86</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-iter-15.cs">
+    <type name="C`1[TFirst]">
+      <method name="IEnumerable`1 GetEnumerable[V](IEnumerable`1)">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+VSlot`1[TFirst,T]">
+      <method name="Void .ctor(T)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>111</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+&lt;GetEnumerable&gt;c__Iterator0`1[TFirst,V]">
+      <method name="V System.Collections.Generic.IEnumerator&lt;V&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;V&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>181</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-01.cs">
+    <type name="X">
+      <method name="Int32 Main()">
+        <size>300</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__3(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="IntFunc">
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="VoidFunc">
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__2(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-02.cs">
+    <type name="X">
+      <method name="Void Foo(funci)">
+        <size>16</size>
+      </method>
+      <method name="Void Foo(funcs)">
+        <size>19</size>
+      </method>
+      <method name="Void Main()">
+        <size>35</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__0(System.String)">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="funcs">
+      <method name="System.String Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="funci">
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-03.cs">
+    <type name="Demo">
+      <method name="Y F[X,Y](Int32, X, Func`2[X,Y])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>54</size>
+      </method>
+      <method name="TimeSpan &lt;Main&gt;m__0(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Func`2[TArg0,TResult]">
+      <method name="TResult Invoke(TArg0)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(TArg0, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TResult EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-04.cs">
+    <type name="Demo">
+      <method name="Z F[X,Y,Z](X, Func`2[X,Y], Func`2[Y,Z])">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>103</size>
+      </method>
+      <method name="TimeSpan &lt;Main&gt;m__0(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Double &lt;Main&gt;m__1(TimeSpan)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Func`2[TArg0,TResult]">
+      <method name="TResult Invoke(TArg0)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(TArg0, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TResult EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-05.cs">
+    <type name="C">
+      <method name="Boolean M(C+db)">
+        <size>8</size>
+      </method>
+      <method name="System.String M(C+ds)">
+        <size>6</size>
+      </method>
+      <method name="Int32 M(C+di)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>125</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__0(System.String)">
+        <size>31</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+di">
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+ds">
+      <method name="System.String Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+db">
+      <method name="Boolean Invoke(Boolean)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Boolean, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="System.String &lt;&gt;m__2(System.String)">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey1">
+      <method name="Int32 &lt;&gt;m__3(Int32)">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-06.cs">
+    <type name="TestClass">
+      <method name="Void P(TestClass+DT)">
+        <size>26</size>
+      </method>
+      <method name="Void P(TestClass+DF)">
+        <size>26</size>
+      </method>
+      <method name="T And(T, T)">
+        <size>10</size>
+      </method>
+      <method name="F And(T, F)">
+        <size>10</size>
+      </method>
+      <method name="F And(F, T)">
+        <size>10</size>
+      </method>
+      <method name="F And(F, F)">
+        <size>10</size>
+      </method>
+      <method name="T Or(T, T)">
+        <size>10</size>
+      </method>
+      <method name="T Or(T, F)">
+        <size>10</size>
+      </method>
+      <method name="T Or(F, T)">
+        <size>10</size>
+      </method>
+      <method name="F Or(F, F)">
+        <size>10</size>
+      </method>
+      <method name="F Not(T)">
+        <size>10</size>
+      </method>
+      <method name="T Not(F)">
+        <size>10</size>
+      </method>
+      <method name="Void StopTrue(T)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0(F)">
+        <size>31</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestClass+DT">
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass+DF">
+      <method name="Void Invoke(F)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(F, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__1(T)">
+        <size>38</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestClass+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__2(F)">
+        <size>77</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-07.cs">
+    <type name="C">
+      <method name="Void Test(D)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(System.Object, D)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(D, D)">
+        <size>1</size>
+      </method>
+      <method name="Void Test2(System.Object, E)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>207</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__1()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__2()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__3()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__4()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__5(Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void Invoke(Boolean)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Boolean, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-08.cs">
+    <type name="C">
+      <method name="Void Test[T,R](System.Func`2[T,R])">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>321</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__1(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__3(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__4(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__5(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__6(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-09.cs">
+    <type name="C">
+      <method name="IEnumerable`1 Test[T](T)">
+        <size>2</size>
+      </method>
+      <method name="IEnumerable`1 Test[T](Func`1[T])">
+        <size>2</size>
+      </method>
+      <method name="IEnumerable`1 Test2[T](Func`2[T,T])">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>113</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__0()">
+        <size>6</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__1()">
+        <size>6</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__2(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Func`1[TD]">
+      <method name="TD Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TD EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Func`2[TA,TR]">
+      <method name="TR Invoke(TA)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(TA, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TR EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-10.cs">
+    <type name="C">
+      <method name="Void Foo[TSource](IEnumerable`1)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[TCollection,TSource](IEnumerable`1, System.Func`2[TSource,System.Collections.Generic.IEnumerable`1[TCollection]])">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[TCollection,TSource](IEnumerable`1, System.Func`3[TSource,TCollection[],System.Collections.Generic.IEnumerable`1[TCollection]])">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[TCollection,TSource](System.Func`2[TCollection[],System.Collections.Generic.IEnumerable`1[TSource]])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>97</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="IEnumerable`1 &lt;&gt;m__0(Int32)">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__1(Int32, System.Int32[])">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__2(System.Int32[])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-11.cs">
+    <type name="Pair`2[T1,T2]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Foo[TInput,TValue,TIntermediate](Group`2[TInput,TValue], System.Func`2[TValue,Group`2[TInput,TIntermediate]])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="E`1[TI]">
+      <method name="Void Rep1[TV](Group`2[TI,TV])">
+        <size>37</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Group`2[T1,T2]">
+      <method name="Pair`2[T1,T2] Invoke(T1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Pair`2[T1,T2] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="E`1+&lt;Rep1&gt;c__AnonStorey0`1[TI,TV]">
+      <method name="Group`2[TI,TV] &lt;&gt;m__0(TV)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-12.cs">
+    <type name="Demo">
+      <method name="Void F[T](T[], T, Func`1[T])">
+        <size>42</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>65</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Func`1[TA]">
+      <method name="Void Invoke(TA)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(TA, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Demo+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-13.cs">
+    <type name="TestUnary">
+      <method name="Void Foo(System.Action`1[System.Int32])">
+        <size>1</size>
+      </method>
+      <method name="Void Bar()">
+        <size>35</size>
+      </method>
+      <method name="Void &lt;Bar&gt;m__0(Int32)">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void Foo(System.Action`1[System.String])">
+        <size>12</size>
+      </method>
+      <method name="T Foo[T](System.Func`2[System.String,T])">
+        <size>12</size>
+      </method>
+      <method name="System.String Bar()">
+        <size>35</size>
+      </method>
+      <method name="Void Main()">
+        <size>76</size>
+      </method>
+      <method name="System.String &lt;Bar&gt;m__1(System.String)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__2(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__3(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-14.cs">
+    <type name="Test">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo[T]()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T &lt;Foo`1&gt;m__0[T](T)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-15.cs">
+    <type name="Enumerable">
+      <method name="Int32 Sum[TSource](IEnumerable`1, System.Func`2[TSource,System.Int32])">
+        <size>32</size>
+      </method>
+      <method name="TR Sum[TA,TR](IEnumerable`1, System.Func`3[TR,TA,TR])">
+        <size>122</size>
+      </method>
+    </type>
+    <type name="Repro">
+      <method name="Int32 Main()">
+        <size>115</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Enumerable+&lt;Sum&gt;c__AnonStorey0`1[TSource]">
+      <method name="Int32 &lt;&gt;m__0(Int32, TSource)">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-16.cs">
+    <type name="Repro">
+      <method name="Void AssertFoo[T](IList`1)">
+        <size>34</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Repro+Runner`1[T]">
+      <method name="Void .ctor(Action`1, T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Repro+&lt;AssertFoo&gt;c__AnonStorey0`1[T]">
+      <method name="Void &lt;&gt;m__0(Int32)">
+        <size>54</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-17.cs">
+    <type name="TestCase">
+      <method name="Void Testing()">
+        <size>75</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void &lt;Testing&gt;m__0()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-18.cs">
+    <type name="Test">
+      <method name="Void Foo[T1,T2,TResult](T1, T2, System.Func`3[T1,T2,TResult])">
+        <size>33</size>
+      </method>
+      <method name="Void Bar[T1,T2,TResult](T1, T2, System.Func`4[T1,T2,System.Int32,TResult])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Foo&gt;c__AnonStorey0`3[T1,T2,TResult]">
+      <method name="TResult &lt;&gt;m__0(T1, T2, Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-19.cs">
+    <type name="Crasher">
+      <method name="Void Crash()">
+        <size>36</size>
+      </method>
+      <method name="Void Do(System.Action)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Crasher+&lt;Crash&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>27</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-20.cs">
+    <type name="Z">
+      <method name="Void &lt;Z&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>37</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Boolean Foo()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestMethod">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-21.cs">
+    <type name="Program">
+      <method name="Void Foo(System.Action`1[System.String])">
+        <size>12</size>
+      </method>
+      <method name="T Foo[T](System.Func`2[System.String,T])">
+        <size>12</size>
+      </method>
+      <method name="System.String Bar()">
+        <size>35</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>95</size>
+      </method>
+      <method name="System.String &lt;Bar&gt;m__0(System.String)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__1(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__2(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-22.cs">
+    <type name="Product">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void Main()">
+        <size>136</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Product)">
+        <size>7</size>
+      </method>
+      <method name="Product &lt;Main&gt;m__1(Product)">
+        <size>2</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] &lt;Main&gt;m__2(IGrouping`2)">
+        <size>48</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;g&gt;__T,&lt;ExpensiveProducts&gt;__T]">
+      <method name="&lt;g&gt;__T get_g()">
+        <size>7</size>
+      </method>
+      <method name="&lt;ExpensiveProducts&gt;__T get_ExpensiveProducts()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+      <method name="Void .ctor(&lt;g&gt;__T, &lt;ExpensiveProducts&gt;__T)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Main&gt;c__AnonStorey0">
+      <method name="Boolean &lt;&gt;m__3(Product)">
+        <size>52</size>
+      </method>
+      <method name="Decimal &lt;&gt;m__4(Product)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-23.cs">
+    <type name="C">
+      <method name="U Test[T,U](T[], System.Func`2[T,U])">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>77</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__0(System.String)">
+        <size>27</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-24.cs">
+    <type name="E">
+      <method name="System.String Test[T](C, T, System.Func`1[T])">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Test[T](T, System.Func`1[System.Boolean])">
+        <size>2</size>
+      </method>
+      <method name="System.String Foo[T](T, System.Action`1[T])">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>42</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0(System.String)">
+        <size>24</size>
+      </method>
+      <method name="Void &lt;&gt;m__1(System.String)">
+        <size>47</size>
+      </method>
+      <method name="System.String &lt;&gt;m__2()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-lambda-25.cs">
+    <type name="MonoBugs.Bar">
+      <method name="Void DoStuff[T](T, System.Action`1[T])">
+        <size>11</size>
+      </method>
+      <method name="Void DoStuff[T](Nullable`1, System.Action`1[T])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="MonoBugs.Program">
+      <method name="Void Main()">
+        <size>59</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0(Foo`1)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-01.cs">
+    <type name="from.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>2205</size>
+      </method>
+      <method name="Void Foo(Int32, Boolean)">
+        <size>11</size>
+      </method>
+      <method name="Void Do(System.String[])">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="from.D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean check(System.Object, System.Object)">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;i&gt;__T,&lt;j&gt;__T]">
+      <method name="Void .ctor(&lt;i&gt;__T, &lt;j&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;i&gt;__T get_i()">
+        <size>7</size>
+      </method>
+      <method name="&lt;j&gt;__T get_j()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;i&gt;__T,&lt;l&gt;__T]">
+      <method name="Void .ctor(&lt;i&gt;__T, &lt;l&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;i&gt;__T get_i()">
+        <size>7</size>
+      </method>
+      <method name="&lt;l&gt;__T get_l()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType3`2[&lt;i9&gt;__T,&lt;i&gt;__T]">
+      <method name="Void .ctor(&lt;i9&gt;__T, &lt;i&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;i9&gt;__T get_i9()">
+        <size>7</size>
+      </method>
+      <method name="&lt;i&gt;__T get_i()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="from.C">
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Nullable`1 &lt;Main&gt;m__2(Nullable`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="from.C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__4(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="from.C">
+      <method name="Int32 &lt;Main&gt;m__5(Int32, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__6(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__7(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__8(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__9(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__A(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__B(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__C(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1B(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1E(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__20(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__21(Int32)">
+        <size>2</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__25(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__39(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType2`2[&lt;&lt;&gt;__TranspIdent2&gt;__T,&lt;l2&gt;__T]">
+      <method name="&lt;&lt;&gt;__TranspIdent2&gt;__T get_&lt;&gt;__TranspIdent2()">
+        <size>7</size>
+      </method>
+      <method name="&lt;l2&gt;__T get_l2()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+      <method name="Void .ctor(&lt;&lt;&gt;__TranspIdent2&gt;__T, &lt;l2&gt;__T)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType4`2[&lt;&lt;&gt;__TranspIdent7&gt;__T,&lt;l2&gt;__T]">
+      <method name="&lt;&lt;&gt;__TranspIdent7&gt;__T get_&lt;&gt;__TranspIdent7()">
+        <size>7</size>
+      </method>
+      <method name="&lt;l2&gt;__T get_l2()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+      <method name="Void .ctor(&lt;&lt;&gt;__TranspIdent7&gt;__T, &lt;l2&gt;__T)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="from.C">
+      <method name="Int32 &lt;Main&gt;m__D(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__E(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__F(ITest)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__10(Int32, ITest)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__11(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__12(ITest)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__13(Int32, ITest)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__14(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__15(ITest)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__16(Int32, ITest)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__17(&lt;&gt;__AnonType0`2[System.Int32,from.ITest])">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__18(ITest)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__19(&lt;&gt;__AnonType0`2[System.Int32,from.ITest], ITest)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1A(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1C(Int32, IEnumerable`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1D(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1F(Int32, IEnumerable`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__22(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__23(Int32)">
+        <size>2</size>
+      </method>
+      <method name="IGrouping`2 &lt;Main&gt;m__24(IGrouping`2)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__26(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__27(Int32)">
+        <size>10</size>
+      </method>
+      <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__28(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])">
+        <size>15</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__29(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])">
+        <size>12</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2A(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2B(Int32)">
+        <size>2</size>
+      </method>
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2D(IGrouping`2, Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2E(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2F(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(IGrouping`2, Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__32(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__33(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__35(IGrouping`2, Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__36(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__37(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="IGrouping`2 &lt;Main&gt;m__38(IGrouping`2)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3A(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3B(Int32)">
+        <size>2</size>
+      </method>
+      <method name="&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32] &lt;Main&gt;m__3D(&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]])">
+        <size>9</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3E(&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="from.C+&lt;Main&gt;c__AnonStorey0">
+      <method name="IEnumerable`1 &lt;&gt;m__2C(IGrouping`2)">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__30(IGrouping`2)">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__34(IGrouping`2)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__3C(Int32)">
+        <size>47</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__3F(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-02.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>509</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3(Int32)">
+        <size>3</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-03.cs">
+    <type name="WhereTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>179</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__0(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__1(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(Int32)">
+        <size>4</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-04.cs">
+    <type name="TestGroupBy">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>561</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGroupBy">
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-05.cs">
+    <type name="OrderByTests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>1254</size>
+      </method>
+    </type>
+    <type name="OrderByTests+Data">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_ID()">
+        <size>7</size>
+      </method>
+      <method name="Void set_ID(Int32)">
+        <size>8</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>8</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="OrderByTests">
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3(Int32)">
+        <size>4</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__4(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__5(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__6(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__7(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__8(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__9(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__A(OrderByTests+Data)">
+        <size>11</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__B(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__C(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__D(OrderByTests+Data)">
+        <size>11</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__E(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__F(OrderByTests+Data)">
+        <size>7</size>
+      </method>
+      <method name="OrderByTests+Data &lt;Main&gt;m__10(OrderByTests+Data)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-06.cs">
+    <type name="Let">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>410</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;i&gt;__T,&lt;u&gt;__T]">
+      <method name="Void .ctor(&lt;i&gt;__T, &lt;u&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;i&gt;__T get_i()">
+        <size>7</size>
+      </method>
+      <method name="&lt;u&gt;__T get_u()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="Let">
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__0(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__2(Int32)">
+        <size>10</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])">
+        <size>15</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__4(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])">
+        <size>18</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__5(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;&lt;&gt;__TranspIdent1&gt;__T,&lt;v&gt;__T]">
+      <method name="Void .ctor(&lt;&lt;&gt;__TranspIdent1&gt;__T, &lt;v&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;&lt;&gt;__TranspIdent1&gt;__T get_&lt;&gt;__TranspIdent1()">
+        <size>7</size>
+      </method>
+      <method name="&lt;v&gt;__T get_v()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-07.cs">
+    <type name="SelectMany">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>754</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;i1&gt;__T,&lt;i2&gt;__T]">
+      <method name="Void .ctor(&lt;i1&gt;__T, &lt;i2&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;i1&gt;__T get_i1()">
+        <size>7</size>
+      </method>
+      <method name="&lt;i2&gt;__T get_i2()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType2`3[&lt;pp&gt;__T,&lt;i1&gt;__T,&lt;i3&gt;__T]">
+      <method name="Void .ctor(&lt;pp&gt;__T, &lt;i1&gt;__T, &lt;i3&gt;__T)">
+        <size>28</size>
+      </method>
+      <method name="&lt;pp&gt;__T get_pp()">
+        <size>7</size>
+      </method>
+      <method name="&lt;i1&gt;__T get_i1()">
+        <size>7</size>
+      </method>
+      <method name="&lt;i3&gt;__T get_i3()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>96</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>109</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>199</size>
+      </method>
+    </type>
+    <type name="SelectMany+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__0(Int32)">
+        <size>12</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__3(Int32)">
+        <size>12</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__5(&lt;&gt;__AnonType0`2[System.Int32,System.String])">
+        <size>12</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__9(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="SelectMany">
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__1(Int32, System.String)">
+        <size>8</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__2(Int32)">
+        <size>5</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__4(Int32, System.String)">
+        <size>8</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32] &lt;Main&gt;m__6(&lt;&gt;__AnonType0`2[System.Int32,System.String], Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__7(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType2`3[System.Int32,System.Int32,System.Int32] &lt;Main&gt;m__8(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])">
+        <size>25</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__A(Int32, System.String)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;&lt;&gt;__TranspIdent0&gt;__T,&lt;i3&gt;__T]">
+      <method name="&lt;&lt;&gt;__TranspIdent0&gt;__T get_&lt;&gt;__TranspIdent0()">
+        <size>7</size>
+      </method>
+      <method name="&lt;i3&gt;__T get_i3()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+      <method name="Void .ctor(&lt;&lt;&gt;__TranspIdent0&gt;__T, &lt;i3&gt;__T)">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-08.cs">
+    <type name="TestA">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="System.String Select[U](System.Func`2[TestA,U])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestB">
+      <method name="TestA Where(TestA, System.Func`2[TestA,System.Boolean])">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="CustomQueryExpressionPattern">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>153</size>
+      </method>
+      <method name="TestA &lt;Main&gt;m__0(TestA)">
+        <size>2</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__1(TestA)">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-09.cs">
+    <type name="Data">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Join">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>912</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`1[&lt;Result&gt;__T]">
+      <method name="Void .ctor(&lt;Result&gt;__T)">
+        <size>14</size>
+      </method>
+      <method name="&lt;Result&gt;__T get_Result()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>63</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>67</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;a&gt;__T,&lt;b&gt;__T]">
+      <method name="Void .ctor(&lt;a&gt;__T, &lt;b&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;a&gt;__T get_a()">
+        <size>7</size>
+      </method>
+      <method name="&lt;b&gt;__T get_b()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="Join">
+      <method name="Int32 &lt;Main&gt;m__0(Data)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Data)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__2(Data, Data)">
+        <size>23</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3(Data)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__4(Data)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__5(Data, Data)">
+        <size>8</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__6(&lt;&gt;__AnonType1`2[Data,Data])">
+        <size>22</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__7(&lt;&gt;__AnonType1`2[Data,Data])">
+        <size>33</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__8(Data)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__9(Data)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__A(Data, Data)">
+        <size>23</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__B(Data)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__C(Data)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__D(Data, Data)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__E(&lt;&gt;__AnonType1`2[Data,Data])">
+        <size>12</size>
+      </method>
+      <method name="Data &lt;Main&gt;m__F(&lt;&gt;__AnonType1`2[Data,Data])">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-10.cs">
+    <type name="DataA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="DataB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="GroupJoin">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>729</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;a&gt;__T,&lt;ab&gt;__T]">
+      <method name="Void .ctor(&lt;a&gt;__T, &lt;ab&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;a&gt;__T get_a()">
+        <size>7</size>
+      </method>
+      <method name="&lt;ab&gt;__T get_ab()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;a&gt;__T,&lt;b&gt;__T]">
+      <method name="Void .ctor(&lt;a&gt;__T, &lt;b&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;a&gt;__T get_a()">
+        <size>7</size>
+      </method>
+      <method name="&lt;b&gt;__T get_b()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="GroupJoin">
+      <method name="Int32 &lt;Main&gt;m__0(DataA)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(DataB)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__2(DataA, IEnumerable`1)">
+        <size>8</size>
+      </method>
+      <method name="IEnumerable`1 &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])">
+        <size>12</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__4(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)">
+        <size>39</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__5(DataA)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__6(DataB)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__7(DataA, IEnumerable`1)">
+        <size>8</size>
+      </method>
+      <method name="IEnumerable`1 &lt;Main&gt;m__8(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])">
+        <size>12</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__9(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)">
+        <size>39</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__A(DataA)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__B(DataB)">
+        <size>7</size>
+      </method>
+      <method name="DataA &lt;Main&gt;m__C(DataA, IEnumerable`1)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-11.cs">
+    <type name="IntoTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>275</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__0(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(Int32)">
+        <size>4</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__3(Int32)">
+        <size>5</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__4(Int32)">
+        <size>4</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-12.cs">
+    <type name="NestedQuery">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void XX()">
+        <size>108</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>472</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;values&gt;__T,&lt;length&gt;__T]">
+      <method name="Void .ctor(&lt;values&gt;__T, &lt;length&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;values&gt;__T get_values()">
+        <size>7</size>
+      </method>
+      <method name="&lt;length&gt;__T get_length()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;type&gt;__T,&lt;x&gt;__T]">
+      <method name="Void .ctor(&lt;type&gt;__T, &lt;x&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;type&gt;__T get_type()">
+        <size>7</size>
+      </method>
+      <method name="&lt;x&gt;__T get_x()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="NestedQuery">
+      <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;XX&gt;m__0(System.String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NestedQuery">
+      <method name="IEnumerable`1 &lt;XX&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Int32])">
+        <size>110</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__2(System.String)">
+        <size>10</size>
+      </method>
+      <method name="IEnumerable`1 &lt;Main&gt;m__3(System.String)">
+        <size>36</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;Main&gt;m__4(System.String)">
+        <size>13</size>
+      </method>
+      <method name="IEnumerable`1 &lt;Main&gt;m__5(&lt;&gt;__AnonType0`2[System.String,System.Int32])">
+        <size>110</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;XX&gt;m__6(Char)">
+        <size>9</size>
+      </method>
+      <method name="Char &lt;XX&gt;m__8(&lt;&gt;__AnonType1`2[System.Char,System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__9(Char)">
+        <size>6</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__A(Char)">
+        <size>9</size>
+      </method>
+      <method name="Char &lt;Main&gt;m__C(&lt;&gt;__AnonType1`2[System.Char,System.Int32])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">
+      <method name="Boolean &lt;&gt;m__7(&lt;&gt;__AnonType1`2[System.Char,System.Int32])">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">
+      <method name="Boolean &lt;&gt;m__B(&lt;&gt;__AnonType1`2[System.Char,System.Int32])">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-13.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(TypeDefinition)">
+        <size>47</size>
+      </method>
+      <method name="MethodDefinition &lt;Foo&gt;m__0(MethodDefinition)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Extension">
+      <method name="IEnumerable`1 Cast[T](IFoo)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="MethodDefinition">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TypeDefinition">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="MethodDefinitionCollection get_Methods()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Methods(MethodDefinitionCollection)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MethodDefinitionCollection">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-14.cs">
+    <type name="Person">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Style get_Style()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Style(Style)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Extensions">
+      <method name="IMarker`1 Cast[T](IObjectContainer)">
+        <size>2</size>
+      </method>
+      <method name="IMarker`1 Where[T](IMarker`1, System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Assert(System.Action)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(IObjectContainer, Style)">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>117</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-15.cs">
+    <type name="NameCollisionTest.Data">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NameCollisionTest.Ex">
+      <method name="IEnumerable`1 Foo[T,TR](IEnumerable`1, System.Func`2[T,TR])">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="NameCollisionTest.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>78</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(NameCollisionTest.Data)">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__1(Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="NameCollisionTest.Ex+&lt;Foo&gt;c__Iterator0`2[T,TR]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>86</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="TR System.Collections.Generic.IEnumerator&lt;TR&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;TR&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-16.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+      <method name="Void Test_1(Int32)">
+        <size>27</size>
+      </method>
+      <method name="Void Test_2()">
+        <size>31</size>
+      </method>
+      <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__1(Int32)">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;a&gt;__T,&lt;b&gt;__T]">
+      <method name="Void .ctor(&lt;a&gt;__T, &lt;b&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;a&gt;__T get_a()">
+        <size>7</size>
+      </method>
+      <method name="&lt;b&gt;__T get_b()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test_1&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__0()">
+        <size>67</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__3(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__4(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test_2&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable`1 &lt;&gt;m__2()">
+        <size>67</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__5(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__6(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-17.cs">
+    <type name="TestGroupBy">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>159</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-18.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test(System.Func`2[System.Int32,System.Boolean])">
+        <size>2</size>
+      </method>
+      <method name="Boolean Test2(System.Func`2[System.Int32,System.Int32])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>648</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Boolean] &lt;Main&gt;m__0(Int32)">
+        <size>42</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Int32,System.Boolean])">
+        <size>11</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Boolean])">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__3(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__4(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__5(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__6(Int32)">
+        <size>31</size>
+      </method>
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__7(Int32)">
+        <size>10</size>
+      </method>
+      <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__8(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])">
+        <size>15</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__9(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__A(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])">
+        <size>15</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__B(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;ck&gt;__T,&lt;xy&gt;__T]">
+      <method name="Void .ctor(&lt;ck&gt;__T, &lt;xy&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;ck&gt;__T get_ck()">
+        <size>7</size>
+      </method>
+      <method name="&lt;xy&gt;__T get_xy()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType1`2[&lt;i&gt;__T,&lt;l&gt;__T]">
+      <method name="Void .ctor(&lt;i&gt;__T, &lt;l&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;i&gt;__T get_i()">
+        <size>7</size>
+      </method>
+      <method name="&lt;l&gt;__T get_l()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey5">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey6">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Boolean &lt;Main&gt;m__C(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__D(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__E(Int32, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__F(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Boolean &lt;Main&gt;m__10(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__11(Int32, IEnumerable`1)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType2`2[&lt;&lt;&gt;__TranspIdent1&gt;__T,&lt;g&gt;__T]">
+      <method name="Void .ctor(&lt;&lt;&gt;__TranspIdent1&gt;__T, &lt;g&gt;__T)">
+        <size>21</size>
+      </method>
+      <method name="&lt;&lt;&gt;__TranspIdent1&gt;__T get_&lt;&gt;__TranspIdent1()">
+        <size>7</size>
+      </method>
+      <method name="&lt;g&gt;__T get_g()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Boolean &lt;&gt;m__12(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey1">
+      <method name="Boolean &lt;&gt;m__13(Int32)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey2">
+      <method name="Boolean &lt;&gt;m__14(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey3">
+      <method name="Boolean &lt;&gt;m__15(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey4">
+      <method name="Int32 &lt;&gt;m__16(Int32)">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey5">
+      <method name="Int32 &lt;&gt;m__17(Int32)">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey6">
+      <method name="Boolean &lt;&gt;m__18(Int32)">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey7">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__19(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey8">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__1A(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey9">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__1B(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStoreyA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__1C(Int32)">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-19.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>45</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Char &lt;E&gt;m__0(Char)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-20.cs">
+    <type name="Maybe`1[T]">
+      <method name="T get_Value()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Value(T)">
+        <size>8</size>
+      </method>
+      <method name="Boolean get_HasValue()">
+        <size>7</size>
+      </method>
+      <method name="Void set_HasValue(Boolean)">
+        <size>8</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>38</size>
+      </method>
+      <method name="Maybe`1[U] SelectMany[U](System.Func`2[T,Maybe`1[U]])">
+        <size>30</size>
+      </method>
+      <method name="Maybe`1[V] SelectMany[U,V](System.Func`2[T,Maybe`1[U]], System.Func`3[T,U,V])">
+        <size>71</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor(T)">
+        <size>21</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="MaybeExtensions">
+      <method name="Maybe`1[T] ToMaybe[T](T)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Main()">
+        <size>138</size>
+      </method>
+      <method name="Maybe`1[System.Int32] &lt;Main&gt;m__0(Int32)">
+        <size>7</size>
+      </method>
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__1(Int32, Int32)">
+        <size>8</size>
+      </method>
+      <method name="Maybe`1[System.Int32] &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32], Int32)">
+        <size>16</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;x&gt;__T,&lt;y&gt;__T]">
+      <method name="&lt;x&gt;__T get_x()">
+        <size>7</size>
+      </method>
+      <method name="&lt;y&gt;__T get_y()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+      <method name="Void .ctor(&lt;x&gt;__T, &lt;y&gt;__T)">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-21.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>90</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Main&gt;c__AnonStorey0">
+      <method name="IEnumerable`1 &lt;&gt;m__0(Int32)">
+        <size>7</size>
+      </method>
+      <method name="System.Action &lt;&gt;m__1(Int32, Int32)">
+        <size>40</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__2()">
+        <size>49</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-22.cs">
+    <type name="Test.MainClass">
+      <method name="Void Main()">
+        <size>47</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;&gt;__AnonType0`2[&lt;item&gt;__T,&lt;parsed&gt;__T]">
+      <method name="&lt;item&gt;__T get_item()">
+        <size>7</size>
+      </method>
+      <method name="&lt;parsed&gt;__T get_parsed()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>69</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>86</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>142</size>
+      </method>
+      <method name="Void .ctor(&lt;item&gt;__T, &lt;parsed&gt;__T)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Test.MainClass+&lt;Main&gt;c__AnonStorey0">
+      <method name="&lt;&gt;__AnonType0`2[System.Char,System.Boolean] &lt;&gt;m__0(Char)">
+        <size>23</size>
+      </method>
+      <method name="DateTime &lt;&gt;m__1(&lt;&gt;__AnonType0`2[System.Char,System.Boolean])">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-23.cs">
+    <type name="OrderByBugExample.Foo">
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Value1()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Value1(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Value2()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Value2(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="OrderByBugExample.Program">
+      <method name="Int32 Main()">
+        <size>351</size>
+      </method>
+      <method name="System.String &lt;Main&gt;m__0(OrderByBugExample.Foo)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__1(OrderByBugExample.Foo)">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__2(OrderByBugExample.Foo)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-linq-24.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="A[] get_Prop()">
+        <size>15</size>
+      </method>
+      <method name="Void Test()">
+        <size>56</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Int32 &lt;Test&gt;m__0(A)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-named-01.cs">
+    <type name="C">
+      <method name="Int32 Test(Int32, Int32, System.String)">
+        <size>6</size>
+      </method>
+      <method name="T Foo[T](T, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void Lambda(System.Func`2[System.Int32,System.Int32])">
+        <size>9</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>173</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-named-02.cs">
+    <type name="D">
+      <method name="Void Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-named-03.cs">
+    <type name="C">
+      <method name="Int32 Foo(Int32, Int32, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-01.cs">
+    <type name="C">
+      <method name="Void TestA(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void TestB(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void TestC(Decimal)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>325</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-02.cs">
+    <type name="C">
+      <method name="Boolean Test2(Nullable`1)">
+        <size>11</size>
+      </method>
+      <method name="Int32 Test(Nullable`1)">
+        <size>27</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>101</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test3(Nullable`1)">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-03.cs">
+    <type name="C">
+      <method name="Int32 Test(Int32, System.String, Boolean, UInt16)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>225</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-04.cs">
+    <type name="C">
+      <method name="Void Foo[T](T, T)">
+        <size>1</size>
+      </method>
+      <method name="Void TestParams(System.Int32[])">
+        <size>6</size>
+      </method>
+      <method name="Void TestParams(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void TestStruct(Nullable`1)">
+        <size>1</size>
+      </method>
+      <method name="System.String get_Item(Int32, System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, System.String, System.String)">
+        <size>4</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>120</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-05.cs">
+    <type name="Blah">
+      <method name="Int32 Foo(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>46</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Blah+MyDelegate">
+      <method name="Int32 Invoke(Int32, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-06.cs">
+    <type name="C">
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-07.cs">
+    <type name="Tests">
+      <method name="Void foo(Foo)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-08.cs">
+    <type name="Tests">
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-09.cs">
+    <type name="Program">
+      <method name="Int32 Test_1(Int32, SByte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_1[T](T)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_1(Int32, Int64)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_2(Int16)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_2(Int32, SByte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_3(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_3(System.String, SByte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_4(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_4(System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_5()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_5(Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_6(System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_6(Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_7(Boolean, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_7(Boolean, Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>118</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-10.cs">
+    <type name="Program">
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program`1[T]">
+      <method name="Void .ctor(Generic`1)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Generic`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-11.cs">
+    <type name="C">
+      <method name="Int32 TestA(Int32)">
+        <size>2</size>
+      </method>
+      <method name="T TestB[T](T, T)">
+        <size>2</size>
+      </method>
+      <method name="System.Object TestC(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>76</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-12.cs">
+    <type name="C">
+      <method name="Int32 M(System.String, Int32, System.Int32[])">
+        <size>4</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-partial-01.cs">
+    <type name="B`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-partial-02.cs">
+    <type name="A`1[T]">
+      <method name="Void Test()">
+        <size>13</size>
+      </method>
+      <method name="T get_CurrentItem()">
+        <size>7</size>
+      </method>
+      <method name="Void set_CurrentItem(T)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-repl-01.cs">
+    <type name="MyTest">
+      <method name="Void Run(System.String, System.String)">
+        <size>23</size>
+      </method>
+      <method name="Void Evaluate(System.String, System.String, System.Object)">
+        <size>80</size>
+      </method>
+      <method name="Void Main()">
+        <size>540</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-var-04.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>231</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-1.cs">
+    <type name="Foo">
+      <method name="System.String get_Bar()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-10.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 I&lt;string&gt;.get_Count()">
+        <size>2</size>
+      </method>
+      <method name="Int32 I&lt;Foo&gt;.get_Count()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-11.cs">
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Contra[T](IContravariant`1, IContravariant`1)">
+        <size>41</size>
+      </method>
+      <method name="Boolean Covariant[T](ICovariant`1, ICovariant`1)">
+        <size>41</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-12.cs">
+    <type name="D">
+      <method name="Void add_field(D`1[System.String])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_field(D`1[System.String])">
+        <size>24</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>72</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D`1[T]">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-13.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](T, IList`1)">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo[T](T, I`1)">
+        <size>1</size>
+      </method>
+      <method name="Void Test[U](U, I`1)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-14.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+D`1[T]">
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+D`2[T,U]">
+      <method name="T Invoke(U)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(U, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-15.cs">
+    <type name="C">
+      <method name="Void M[T](T ByRef, C+D`1[T])">
+        <size>13</size>
+      </method>
+      <method name="Void M2[T](T, C+D`1[T])">
+        <size>8</size>
+      </method>
+      <method name="Void MethodArg(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>53</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+D`1[T]">
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-16.cs">
+    <type name="S">
+      <method name="System.String op_Implicit(S)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="T Foo[T](T, I`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-2.cs">
+    <type name="Foo">
+      <method name="System.String Bar(System.Object)">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>92</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-3.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+      <method name="Int32 Bar(Foo`1[System.Object])">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="T Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Main&gt;c__AnonStorey0">
+      <method name="System.String &lt;&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-4.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>58</size>
+      </method>
+      <method name="Int32 Bar(Foo`1[System.String], System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo`1[T]">
+      <method name="Int32 Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-5.cs">
+    <type name="BothVariants`2[T1,T2]">
+      <method name="T1 get_Foo()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Foo(T1)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Bar(T2)">
+        <size>35</size>
+      </method>
+      <method name="Void .ctor(T1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Invariant`1[T]">
+      <method name="T get_Foo()">
+        <size>36</size>
+      </method>
+      <method name="Int32 Bar(T)">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="System.String get_Fruit()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="System.String get_Fruit()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="System.String get_Fruit()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>110</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-6.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Cov1`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 Invoke(IContravariant`1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Cov2`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 Invoke(IContravariant`1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Cov3`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 Invoke(IContravariant`1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Cov4`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="ICovariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Cov5`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Contra5`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 Invoke(U, ICovariant`1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Contra6`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Contra7`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 Invoke(U, ICovariant`1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Contra8`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 Invoke(U, ICovariant`1)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IContravariant`1 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-7.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Covariant`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="T Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Contra`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="CoContra`2[TR,T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="TR Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="TR EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="None`1[T]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Covariant`1[Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[U]]]]]]]] Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Covariant`1[Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[U]]]]]]]] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test2`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Covariant`1[Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[U]]]]]]]]] Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Covariant`1[Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[U]]]]]]]]] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test3`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Contra`1[Contra`1[U]]]]]]]] Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Contra`1[Contra`1[U]]]]]]]] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test4`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Contra`1[Covariant`1[Covariant`1[Contra`1[Contra`1[Contra`1[Contra`1[U]]]]]]]] Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Contra`1[Covariant`1[Covariant`1[Contra`1[Contra`1[Contra`1[Contra`1[U]]]]]]]] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test5`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Contra`1[Covariant`1[Covariant`1[Contra`1[Contra`1[Contra`1[U]]]]]]] Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Contra`1[Contra`1[Covariant`1[Covariant`1[Contra`1[Contra`1[Contra`1[U]]]]]]] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test6`1[U]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Covariant`1[Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[U]]]]]]]])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Covariant`1[Contra`1[Contra`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[Covariant`1[U]]]]]]]], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Both`2[U,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(CoContra`2[U,V])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(CoContra`2[U,V], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Both2`2[U,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(CoContra`2[U,Contra`1[U]])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(CoContra`2[U,Contra`1[U]], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Both3`2[U,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(CoContra`2[U,Contra`1[System.Int32]])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(CoContra`2[U,Contra`1[System.Int32]], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Both4`2[U,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Both`2[V,U])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Both`2[V,U], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Both5`2[U,V]">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Both`2[V,System.Int32])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Both`2[V,System.Int32], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-8.cs">
+    <type name="A`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>144</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-9.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(IIn`1)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-1.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-10.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void asbyte(Byte, UInt16, UInt32, UInt64, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void bsbyte()">
+        <size>35</size>
+      </method>
+      <method name="Void abyte(SByte, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void bbyte()">
+        <size>22</size>
+      </method>
+      <method name="Void ashort(SByte, Byte, UInt16, UInt32, UInt64, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void bshort()">
+        <size>39</size>
+      </method>
+      <method name="Void aushort(SByte, Byte, Int16, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void bushort()">
+        <size>29</size>
+      </method>
+      <method name="Void aint(SByte, Byte, Int16, UInt16, UInt32, UInt64, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void bint()">
+        <size>42</size>
+      </method>
+      <method name="Void auint(SByte, Byte, Int16, UInt16, Int32, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void buint()">
+        <size>38</size>
+      </method>
+      <method name="Void along(SByte, Byte, Int16, UInt16, Int32, UInt32, UInt64, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void blong()">
+        <size>47</size>
+      </method>
+      <method name="Void aulong(SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, Char)">
+        <size>1</size>
+      </method>
+      <method name="Void bulong()">
+        <size>47</size>
+      </method>
+      <method name="Void achar(SByte, Byte, Int16)">
+        <size>1</size>
+      </method>
+      <method name="Void bchar()">
+        <size>27</size>
+      </method>
+      <method name="Void afloat(SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Char, Decimal)">
+        <size>1</size>
+      </method>
+      <method name="Void bfloat()">
+        <size>67</size>
+      </method>
+      <method name="Void adouble(SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Char, Single, Decimal)">
+        <size>1</size>
+      </method>
+      <method name="Void bdouble()">
+        <size>75</size>
+      </method>
+      <method name="Void TestDecimal(Decimal)">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ExtraTst()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-100.cs">
+    <type name="GLib.Object">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Raw()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Raw(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void GetProperty()">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-101.cs">
+    <type name="Test.MyAttribute">
+      <method name="Void .ctor(String)">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="Test.My2Attribute">
+      <method name="Void .ctor(String, Int32)">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="Test.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>92</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-102.cs">
+    <type name="N1.MineAttribute">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="N1.ReturnAttribute">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="N1.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>250</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-103.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+      <method name="Int32 M()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-104.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-105.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 F(Int32)">
+        <size>33</size>
+      </method>
+      <method name="Void async_callback(IAsyncResult)">
+        <size>22</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>407</size>
+      </method>
+    </type>
+    <type name="Test+SimpleDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-107.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 F(Int32)">
+        <size>27</size>
+      </method>
+      <method name="Void async_callback(IAsyncResult)">
+        <size>100</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>89</size>
+      </method>
+    </type>
+    <type name="Test+SimpleDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-108.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>79</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-109.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-11.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 boxtest()">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-110.cs">
+    <type name="test.test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 test_method(Int32)">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-111.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_obj()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-112.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Int32[] g()">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-113.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void g_object_get(IntPtr, System.String, System.String ByRef, IntPtr)">
+        <size>4</size>
+      </method>
+      <method name="Void GetProperty(System.String, System.String ByRef)">
+        <size>21</size>
+      </method>
+      <method name="Void g_object_get(IntPtr, System.String, Boolean ByRef, IntPtr)">
+        <size>4</size>
+      </method>
+      <method name="Void GetProperty(System.String, Boolean ByRef)">
+        <size>21</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-114.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="MyClass+IsAnything">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Invoke(Char)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Char, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-115.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="X op_Explicit(A)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>47</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-116.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-117.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-118.cs">
+    <type name="Container">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-119.cs">
+    <type name="Value">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Explicit(Value)">
+        <size>2</size>
+      </method>
+      <method name="MyObject op_Explicit(Value)">
+        <size>7</size>
+      </method>
+      <method name="UInt32 op_Explicit(Value)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="MyObject">
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Derived Blah()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-12.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>270</size>
+      </method>
+      <method name="System.String s(System.String, Int32)">
+        <size>13</size>
+      </method>
+      <method name="System.String x(System.String, System.Object)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-120.cs">
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>140</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-121.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 g()">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>81</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-122.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-123.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_non_null()">
+        <size>6</size>
+      </method>
+      <method name="System.Object get_null()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>95</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-124.cs">
+    <type name="t">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void a()">
+        <size>16</size>
+      </method>
+      <method name="Void b()">
+        <size>16</size>
+      </method>
+      <method name="Void c()">
+        <size>24</size>
+      </method>
+      <method name="Void d()">
+        <size>28</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-125.cs">
+    <type name="Fraction">
+      <method name="Void .ctor(Int32, Int32)">
+        <size>31</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>36</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>35</size>
+      </method>
+      <method name="Fraction op_Implicit(Int32)">
+        <size>17</size>
+      </method>
+      <method name="Int32 op_Explicit(Fraction)">
+        <size>24</size>
+      </method>
+      <method name="Boolean op_Equality(Fraction, Fraction)">
+        <size>48</size>
+      </method>
+      <method name="Boolean op_Inequality(Fraction, Fraction)">
+        <size>21</size>
+      </method>
+      <method name="Fraction op_Addition(Fraction, Fraction)">
+        <size>102</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>148</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-126.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Iface.Method()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-127.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-128.cs">
+    <type name="SimpleAttribute">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="MineAttribute">
+      <method name="Void .ctor(Type[])">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 MM()">
+        <size>168</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Value()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Value(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Another()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-129.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-13.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MyMethod()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-130.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>20</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-131.cs">
+    <type name="SimpleAttribute">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-132.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-133.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DecodeOp(UInt16, OpCode ByRef, OpFlags ByRef)">
+        <size>21</size>
+      </method>
+      <method name="Void get_struct(S ByRef)">
+        <size>24</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>75</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-134.cs">
+    <type name="AA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>8</size>
+      </method>
+      <method name="Void B()">
+        <size>8</size>
+      </method>
+      <method name="Void C()">
+        <size>8</size>
+      </method>
+      <method name="Boolean get_OK()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="BB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>18</size>
+      </method>
+      <method name="Void B()">
+        <size>8</size>
+      </method>
+      <method name="Void C()">
+        <size>8</size>
+      </method>
+      <method name="Boolean get_OK()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>1</size>
+      </method>
+      <method name="Void B()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>76</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-135.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void doh()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="A get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>37</size>
+      </method>
+      <method name="IA IB.get_Prop()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-136.cs">
+    <type name="MyCar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IDiagnostic.Stop()">
+        <size>8</size>
+      </method>
+      <method name="Void IAutomobile.Stop()">
+        <size>8</size>
+      </method>
+      <method name="Void Stop()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="TestConflict">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>74</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-137.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X()">
+        <size>15</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>95</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-138.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-139.cs">
+    <type name="T">
+      <method name="Void one()">
+        <size>13</size>
+      </method>
+      <method name="Void two(T)">
+        <size>8</size>
+      </method>
+      <method name="Void three(T ByRef)">
+        <size>13</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-14.cs">
+    <type name="Obj.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 F()">
+        <size>2</size>
+      </method>
+      <method name="Int32 G()">
+        <size>2</size>
+      </method>
+      <method name="Int32 H()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="Obj.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 F()">
+        <size>2</size>
+      </method>
+      <method name="Int32 G()">
+        <size>2</size>
+      </method>
+      <method name="Int32 H()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="Obj.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>182</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-140.cs">
+    <type name="BreakTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void B()">
+        <size>47</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-141.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+      <method name="Boolean Test1()">
+        <size>41</size>
+      </method>
+      <method name="Boolean Test2()">
+        <size>42</size>
+      </method>
+      <method name="Boolean Test3()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-142.cs">
+    <type name="TestClass">
+      <method name="Void .ctor(EventHandler)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="TestBaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Blah(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Blah(System.EventHandler)">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-143.cs">
+    <type name="MonoEnumInfo">
+      <method name="Void stuff()">
+        <size>8</size>
+      </method>
+      <method name="Int32 GetInfo(MonoEnumInfo ByRef)">
+        <size>20</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-144.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-145.cs">
+    <type name="JagArrayTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-146.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>335</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-147.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+      <method name="X Foo()">
+        <size>6</size>
+      </method>
+      <method name="X Bar()">
+        <size>6</size>
+      </method>
+      <method name="X Baz()">
+        <size>6</size>
+      </method>
+      <method name="UInt32 get_Property()">
+        <size>2</size>
+      </method>
+      <method name="UInt32 get_StaticProperty()">
+        <size>3</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>9</size>
+      </method>
+      <method name="Y Foo()">
+        <size>6</size>
+      </method>
+      <method name="Y Bar()">
+        <size>6</size>
+      </method>
+      <method name="Y Baz()">
+        <size>6</size>
+      </method>
+      <method name="UInt32 get_Property()">
+        <size>2</size>
+      </method>
+      <method name="UInt32 get_StaticProperty()">
+        <size>3</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>94</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>252</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-148.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Bar(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int64 get_Bar(Double)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int64 get_Whatever(Double)">
+        <size>3</size>
+      </method>
+      <method name="Single get_Whatever(Int64, Int32)">
+        <size>6</size>
+      </method>
+      <method name="Int32 InstanceTest()">
+        <size>54</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>356</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>94</size>
+      </method>
+    </type>
+    <type name="Z+MyArray">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_Item(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void set_Item(Int32, System.Object)">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Monkey(Int32)">
+        <size>4</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int64 get_Item(Int64, Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>4</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int64 get_Item(Int64, Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_g()">
+        <size>6</size>
+      </method>
+      <method name="Void set_g(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="F">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_g()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="DisposableNotifyList">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ChildList">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Int32 X.get_Foo(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-149.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void add_Foo(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Foo(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void add_TestEvent(MyDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_TestEvent(MyDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>166</size>
+      </method>
+      <method name="Void callback1(System.Object, System.EventArgs)">
+        <size>7</size>
+      </method>
+      <method name="Int64 callback2(Int32)">
+        <size>19</size>
+      </method>
+      <method name="Void callback3(System.Object, System.EventArgs)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_BuildStarted(Z+SomeEventHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_BuildStarted(Z+SomeEventHandler)">
+        <size>22</size>
+      </method>
+      <method name="Int32 a()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>80</size>
+      </method>
+    </type>
+    <type name="Static">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Test(System.EventHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_Test(System.EventHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void Fire()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="Z+SomeEventHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int64 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int64 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void X.add_Foo(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void X.remove_Foo(System.EventHandler)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-15.cs">
+    <type name="Implementor">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 A()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Run">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>53</size>
+      </method>
+    </type>
+    <type name="StructImplementor">
+      <method name="Int32 A()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-150.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-151.cs">
+    <type name="A.Iface">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void bah()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A.my">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void doit(System.Object)">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-152.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>99</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-153.cs">
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test2(System.String, System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Void Test(System.String, System.Object[])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>86</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-154.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+      <method name="Void test1(Single ByRef)">
+        <size>6</size>
+      </method>
+      <method name="Void test2(Int32, Single ByRef)">
+        <size>38</size>
+      </method>
+      <method name="Void test3(System.Int64[], Int32)">
+        <size>21</size>
+      </method>
+      <method name="Int32 test4(Int32, Single ByRef)">
+        <size>33</size>
+      </method>
+      <method name="Int32 test5(Single ByRef, Int64)">
+        <size>75</size>
+      </method>
+      <method name="Int32 test6(Single ByRef)">
+        <size>10</size>
+      </method>
+      <method name="Int64 test7(System.Int32[], Int32)">
+        <size>64</size>
+      </method>
+      <method name="Int64 test8(Int32)">
+        <size>34</size>
+      </method>
+      <method name="Int64 test9(Int32)">
+        <size>28</size>
+      </method>
+      <method name="Void test10(Int32, Single ByRef)">
+        <size>23</size>
+      </method>
+      <method name="Int64 test11(Int32)">
+        <size>44</size>
+      </method>
+      <method name="Void test12(Single ByRef)">
+        <size>25</size>
+      </method>
+      <method name="Void test13(Int32, Single ByRef)">
+        <size>23</size>
+      </method>
+      <method name="Int64 test14(Int32, Single ByRef)">
+        <size>66</size>
+      </method>
+      <method name="Int32 test15(Int32, Single ByRef)">
+        <size>33</size>
+      </method>
+      <method name="Void test16()">
+        <size>54</size>
+      </method>
+      <method name="Void test17()">
+        <size>62</size>
+      </method>
+      <method name="Void test18(Int32, Int32 ByRef)">
+        <size>35</size>
+      </method>
+      <method name="Int32 test19()">
+        <size>49</size>
+      </method>
+      <method name="Int32 test20()">
+        <size>22</size>
+      </method>
+      <method name="Int32 test21()">
+        <size>28</size>
+      </method>
+      <method name="Int32 test22()">
+        <size>27</size>
+      </method>
+      <method name="Int32 test23(System.Object, Int32, Boolean ByRef)">
+        <size>29</size>
+      </method>
+      <method name="Int64 test24(Int32)">
+        <size>67</size>
+      </method>
+      <method name="Int64 test25(Int32)">
+        <size>44</size>
+      </method>
+      <method name="Void test26()">
+        <size>22</size>
+      </method>
+      <method name="Int32 test27()">
+        <size>12</size>
+      </method>
+      <method name="Void test28(System.Object ByRef)">
+        <size>23</size>
+      </method>
+      <method name="Boolean test29(Int32 ByRef)">
+        <size>33</size>
+      </method>
+      <method name="System.String test30(System.String ByRef)">
+        <size>36</size>
+      </method>
+      <method name="System.String test31(Int32)">
+        <size>78</size>
+      </method>
+      <method name="Void test32()">
+        <size>11</size>
+      </method>
+      <method name="Int32 test33()">
+        <size>4</size>
+      </method>
+      <method name="Void test34()">
+        <size>20</size>
+      </method>
+      <method name="Void test35(Int32, Boolean)">
+        <size>28</size>
+      </method>
+      <method name="Void test36()">
+        <size>41</size>
+      </method>
+      <method name="Void test37()">
+        <size>42</size>
+      </method>
+      <method name="Int32 test38()">
+        <size>2</size>
+      </method>
+      <method name="Int32 test40(Int32)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-155.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="Test+TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String test(System.String)">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-156.cs">
+    <type name="Internal">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Public">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X+NestedPublic">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+NestedAssembly">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+NestedFamilyAndAssembly">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+NestedFamily">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+NestedPrivate">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="F">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(YI)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Y+YA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YD">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YE">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YF">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YG">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+YH">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Z+P">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WD">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WE">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WCA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WCB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WCB+WCD">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="W+WCB+WCD+WCE">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(X)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="G+I">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G+I+J">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Foo)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="H">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(System.Int32[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-157.cs">
+    <type name="Test.MyAttribute">
+      <method name="Void .ctor(String)">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="Test.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>197</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-158.cs">
+    <type name="My">
+      <method name="Void .ctor(Object)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="My+Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>87</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-159.cs">
+    <type name="A.Iface">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void bah()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A.my">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void doit(System.Object)">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-16.cs">
+    <type name="Mine.Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Addition(Mine.Blah, Mine.Blah)">
+        <size>12</size>
+      </method>
+      <method name="Int32 op_Implicit(Mine.Blah)">
+        <size>12</size>
+      </method>
+      <method name="Byte op_Implicit(Mine.Blah)">
+        <size>12</size>
+      </method>
+      <method name="Int16 op_Implicit(Mine.Blah)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Mine.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>118</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-160.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 blah(System.Object)">
+        <size>62</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-161.cs">
+    <type name="ZipEntry">
+      <method name="Void .ctor(String)">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor(ZipEntry)">
+        <size>18</size>
+      </method>
+      <method name="DateTime get_DateTime()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-162.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void test_output(A)">
+        <size>1</size>
+      </method>
+      <method name="Void test_output(B)">
+        <size>1</size>
+      </method>
+      <method name="Void test_output(E)">
+        <size>1</size>
+      </method>
+      <method name="Void test_output(F)">
+        <size>1</size>
+      </method>
+      <method name="Void test1()">
+        <size>21</size>
+      </method>
+      <method name="Void test2()">
+        <size>32</size>
+      </method>
+      <method name="Void test3()">
+        <size>21</size>
+      </method>
+      <method name="Void test4(A)">
+        <size>9</size>
+      </method>
+      <method name="Void test5(A ByRef)">
+        <size>9</size>
+      </method>
+      <method name="Void test6(B ByRef)">
+        <size>8</size>
+      </method>
+      <method name="Void test7()">
+        <size>28</size>
+      </method>
+      <method name="Void test8()">
+        <size>50</size>
+      </method>
+      <method name="Void test9()">
+        <size>26</size>
+      </method>
+      <method name="Void test10()">
+        <size>82</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Int32)">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor(Int64)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor(Int32)">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-163.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-164.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>26</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Hello()">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="X+FooDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-165.cs">
+    <type name="Testing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 TestEnumInit(Fruit)">
+        <size>21</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>62</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-166.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_TargetIntegerSize()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Hello(IInferior)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>61</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 ITest.get_Item(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-167.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(X+Foo[])">
+        <size>23</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>44</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-168.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="System.String op_Implicit(X)">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-169.cs">
+    <type name="basec">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="der">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Thingy()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Thingy(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_BaseThingy()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Thingy(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>97</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-17.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>39</size>
+      </method>
+      <method name="Byte op_Implicit(Blah)">
+        <size>12</size>
+      </method>
+      <method name="Int16 op_Implicit(Blah)">
+        <size>12</size>
+      </method>
+      <method name="Int32 op_Implicit(Blah)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-170.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_prop(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void set_AAA(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Int32 get_prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_prop(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 A()">
+        <size>38</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-171.cs">
+    <type name="IntPtr_Conv.Class1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-172.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>31</size>
+      </method>
+      <method name="Boolean ff()">
+        <size>14</size>
+      </method>
+      <method name="Boolean tt()">
+        <size>14</size>
+      </method>
+      <method name="Int32 test_if()">
+        <size>599</size>
+      </method>
+      <method name="Int32 test_while()">
+        <size>437</size>
+      </method>
+      <method name="Int32 test_inline()">
+        <size>29</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>109</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-173.cs">
+    <type name="Base">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 get_Value()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Int32)">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor(UInt32)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor(Int64)">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor(UInt64)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor(Int16)">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor(UInt16)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(SByte)">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor(Byte)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor(Int64)">
+        <size>19</size>
+      </method>
+      <method name="Void .ctor(E)">
+        <size>19</size>
+      </method>
+      <method name="E op_Implicit(Int64)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="F">
+      <method name="Void .ctor(Int32)">
+        <size>19</size>
+      </method>
+      <method name="Void .ctor(F)">
+        <size>19</size>
+      </method>
+      <method name="F op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>231</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-174.cs">
+    <type name="ProtectedAccessToPropertyOnChild">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="TestAccessToPrivateMemberInParentClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Double[][] get_Array()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestAccessToPrivateMemberInParentClass+CholeskyDecomposition">
+      <method name="Void .ctor(TestAccessToPrivateMemberInParentClass)">
+        <size>37</size>
+      </method>
+    </type>
+    <type name="TestAccessToProtectedOnChildInstanceFromParent">
+      <method name="Void .ctor()">
+        <size>29</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="TestAccessToProtectedOnChildInstanceFromParent+Parent">
+      <method name="Void .ctor()">
+        <size>26</size>
+      </method>
+      <method name="Int32 TestAccessToProtected(TestAccessToProtectedOnChildInstanceFromParent+Child)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="TestAccessToProtectedOnChildInstanceFromParent+Child">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-175.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+    </type>
+    <type name="RVA">
+      <method name="Void .ctor(UInt32)">
+        <size>8</size>
+      </method>
+      <method name="RVA op_Implicit(UInt32)">
+        <size>7</size>
+      </method>
+      <method name="UInt32 op_Implicit(RVA)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-176.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-177.cs">
+    <type name="MethodAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ReturnAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-178.cs">
+    <type name="BrowsableClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>54</size>
+      </method>
+      <method name="BrowsableClass op_Increment(BrowsableClass)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-179.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Double, Double)">
+        <size>15</size>
+      </method>
+      <method name="Double get_Item(Double)">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Double, Double)">
+        <size>15</size>
+      </method>
+      <method name="Double get_Item(Double)">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(System.String, System.String)">
+        <size>15</size>
+      </method>
+      <method name="System.String get_Item(System.String)">
+        <size>30</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>15</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="EntryPoint">
+      <method name="Int32 Main(System.String[])">
+        <size>150</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-18.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void m()">
+        <size>60</size>
+      </method>
+      <method name="Int32 ret(Int32)">
+        <size>40</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>62</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-180.cs">
+    <type name="Testing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-181.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void test()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>43</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-182.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="TS">
+      <method name="Int64 get_Ticks()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="DT">
+      <method name="Int64 get_Ticks()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-183.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 M(Int32, Int32 ByRef)">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>67</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32, Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32 ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(Int32 ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-184.cs">
+    <type name="User">
+      <method name="Void .ctor(Interface)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>55</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Struct">
+      <method name="Void .ctor(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_X()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-185.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>36</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-186.cs">
+    <type name="TestBUG.myAttribute">
+      <method name="Void .ctor(String, String, String, Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestBUG.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-187.cs">
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Container get_Item(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(System.String, Container)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Container">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Container op_Addition(Container, System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A(System.Collections.Specialized.NameValueCollection, MyClass, System.Object)">
+        <size>65</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-188.cs">
+    <type name="Enumerator">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>21</size>
+      </method>
+      <method name="Char get_Current()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="RealEnumerator">
+      <method name="Void .ctor(Coll)">
+        <size>14</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Coll">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Enumerator GetEnumerator()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>80</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-189.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>63</size>
+      </method>
+      <method name="Int32 m(Int32, Double)">
+        <size>2</size>
+      </method>
+      <method name="Int32 m(Int32, System.Int32[])">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="MonoTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 method1(System.String, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Void testmethod()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="MonoTest2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 method1(System.String, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Void testmethod2()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-19.cs">
+    <type name="I">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>18</size>
+      </method>
+      <method name="System.String fn(System.String)">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Thread_func()">
+        <size>11</size>
+      </method>
+      <method name="Int32 Func(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Void Bar()">
+        <size>44</size>
+      </method>
+      <method name="Boolean MyFilter(System.Reflection.MemberInfo, System.Object)">
+        <size>18</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>303</size>
+      </method>
+      <method name="Int32 multiply_by_three(Int32)">
+        <size>4</size>
+      </method>
+    </type>
+    <type name="TestNamespace.TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="I+GetTextFn">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestNamespace.TestClass+NotWorkingDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Single Invoke(Single, System.Object[])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Single, System.Object[], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Single EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="NameSpace.TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-190.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="A+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(A)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-191.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+D+P">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+Op">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="R">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-192.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-193.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>88</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-194.cs">
+    <type name="TestParams">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>38</size>
+      </method>
+      <method name="Int32 Params(System.Object[])">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-195.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 C()">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-196.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bug1()">
+        <size>15</size>
+      </method>
+      <method name="Void Bug2()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-197.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-198.cs">
+    <type name="N1.N3.N4.Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.N2.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N5.N6.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N5.N7.N8.Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FirstOuter.FirstInner.First">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_MyIdentity()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="FirstOuter.Second">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FirstOuter.SecondInner.Third">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FirstOuter.FirstInner.Fourth">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Fifth">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M1.M2.M3.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="P1.P2.Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-199.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="N1.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.Foo+Foo2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.Bar2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Talk()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="N2.Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.Bar+Bar2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Talk()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-2.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-20.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X()">
+        <size>8</size>
+      </method>
+      <method name="Void TestB()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Ax">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>8</size>
+      </method>
+      <method name="Void B()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Bx">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>8</size>
+      </method>
+      <method name="Void B()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>100</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-200.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>104</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-201.cs">
+    <type name="Parent">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Child">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Child+Nested">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Collide">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-202.cs">
+    <type name="X.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.B.C.D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-203.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Modifiers get_Modifiers()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-204.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>22</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>153</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>24</size>
+      </method>
+      <method name="X op_BitwiseAnd(X, X)">
+        <size>19</size>
+      </method>
+      <method name="X op_BitwiseOr(X, X)">
+        <size>19</size>
+      </method>
+      <method name="Boolean op_True(X)">
+        <size>15</size>
+      </method>
+      <method name="Boolean op_False(X)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-205.cs">
+    <type name="A">
+      <method name="Void .ctor(Object)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-206.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="System.Int32[] get_Item(System.Int32[])">
+        <size>39</size>
+      </method>
+      <method name="Void Main()">
+        <size>91</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-207.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void hello(Int32)">
+        <size>13</size>
+      </method>
+      <method name="Void world(Int32)">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>138</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-208.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Item(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-209.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 get_Foo()">
+        <size>9</size>
+      </method>
+      <method name="Void set_Foo(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void set_Item(System.String, System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Bar(System.String)">
+        <size>7</size>
+      </method>
+      <method name="A get_A()">
+        <size>7</size>
+      </method>
+      <method name="Void set_A(A)">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>75</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-21.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>47</size>
+      </method>
+    </type>
+    <type name="Blah+Foo">
+      <method name="Void .ctor()">
+        <size>17</size>
+      </method>
+      <method name="Int32 Bar(Int32, Int32)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-210.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void foo()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="FooHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-211.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="X op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor(X)">
+        <size>14</size>
+      </method>
+      <method name="Y op_Implicit(X)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor(Y)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>27</size>
+      </method>
+      <method name="Z op_Implicit(Y)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-212.cs">
+    <type name="Problem">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Multi(Int32, Problem[])">
+        <size>4</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>76</size>
+      </method>
+      <method name="Problem op_Implicit(Int32)">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-213.cs">
+    <type name="MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void Print()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-214.cs">
+    <type name="N2.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N1.C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-215.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="N1.C1 get_C1()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="N1.C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-216.cs">
+    <type name="cls">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_OnWhatever(OnWhateverDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_OnWhatever(OnWhateverDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void CallMyDel(System.String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="cls+nestedcls">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CallParentDel(cls, System.String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="MonoEmbed">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>36</size>
+      </method>
+      <method name="Void Whatever(System.String)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="OnWhateverDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-217.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>174</size>
+      </method>
+      <method name="System.Object compare_gte(Int32, Int32)">
+        <size>13</size>
+      </method>
+      <method name="System.Object compare_lte(Int32, Int32)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-218.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>27</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void compareQueryQuery1(System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="T+foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-219.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor(Type)">
+        <size>14</size>
+      </method>
+      <method name="System.Type get_Type()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>75</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-22.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>63</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="T GetT()">
+        <size>7</size>
+      </method>
+      <method name="Void Init()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-220.cs">
+    <type name="MonoBUG.Bug">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>140</size>
+      </method>
+    </type>
+    <type name="MonoBUG.Foo">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoBUG.FooList">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void Add(MonoBUG.Foo)">
+        <size>19</size>
+      </method>
+      <method name="MonoBUG.FooList+FooEnumerator GetEnumerator()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoBUG.FooList+FooEnumerator">
+      <method name="Void .ctor(FooList)">
+        <size>31</size>
+      </method>
+      <method name="Boolean System.Collections.IEnumerator.MoveNext()">
+        <size>12</size>
+      </method>
+      <method name="Void System.Collections.IEnumerator.Reset()">
+        <size>12</size>
+      </method>
+      <method name="MonoBUG.Foo get_Current()">
+        <size>46</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>12</size>
+      </method>
+      <method name="Void Reset()">
+        <size>12</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-221.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Blah()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Blah(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Blah()">
+        <size>2</size>
+      </method>
+      <method name="Boolean Test()">
+        <size>54</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Blah()">
+        <size>0</size>
+      </method>
+      <method name="Void set_Blah(Int32)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Blah()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Blah(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Blah()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test()">
+        <size>54</size>
+      </method>
+    </type>
+    <type name="F">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Blah()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Blah(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Boolean Test()">
+        <size>110</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="F">
+      <method name="Int32 IBlah.get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void IBlah.set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 IBlah.get_Blah()">
+        <size>2</size>
+      </method>
+      <method name="Void IBlah.set_Blah(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-222.cs">
+    <type name="Class_1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UIntPtr Valid()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-223.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>65</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-224.cs">
+    <type name="XmlMemberArrayAttribute">
+      <method name="Void .ctor(String)">
+        <size>38</size>
+      </method>
+      <method name="System.Char[] get_Separator()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Separator(System.Char[])">
+        <size>8</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Boolean get_IsRequired()">
+        <size>7</size>
+      </method>
+      <method name="Void set_IsRequired(Boolean)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="t">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-225.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 foo()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-226.cs">
+    <type name="Test226">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>35</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-227.cs">
+    <type name="A.T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>3</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-228.cs">
+    <type name="BadRefTest.CtorInc">
+      <method name="Void .ctor()">
+        <size>30</size>
+      </method>
+      <method name="Int32 IncByRef(Int32 ByRef)">
+        <size>10</size>
+      </method>
+      <method name="Boolean Results(Int32)">
+        <size>98</size>
+      </method>
+    </type>
+    <type name="BadRefTest.Runner">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>43</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-229.cs">
+    <type name="List">
+      <method name="Void .ctor(Int32)">
+        <size>19</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>12</size>
+      </method>
+      <method name="Void Add(Int32)">
+        <size>26</size>
+      </method>
+      <method name="MyEnumerator GetEnumerator()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="UberList">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>38</size>
+      </method>
+      <method name="Boolean One()">
+        <size>62</size>
+      </method>
+      <method name="Boolean Two()">
+        <size>62</size>
+      </method>
+      <method name="Boolean Three()">
+        <size>62</size>
+      </method>
+    </type>
+    <type name="List+MyEnumerator">
+      <method name="Void .ctor(List)">
+        <size>15</size>
+      </method>
+      <method name="System.Object get_Current()">
+        <size>24</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>31</size>
+      </method>
+      <method name="Void Reset()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-23.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Value()">
+        <size>6</size>
+      </method>
+      <method name="Void set_Value(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>170</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="System.String get_Value()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Value(System.String)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_IVal()">
+        <size>6</size>
+      </method>
+      <method name="Void set_IVal(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_XVal()">
+        <size>7</size>
+      </method>
+      <method name="Void set_XVal(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-230.cs">
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-231.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>44</size>
+      </method>
+      <method name="Void Foo()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-232.cs">
+    <type name="CtorInfoTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>977</size>
+      </method>
+      <method name="Void Assert(System.Object, System.Object)">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-233.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+      <method name="Int32 test_0_beq()">
+        <size>29</size>
+      </method>
+      <method name="Int32 test_0_bne_un()">
+        <size>29</size>
+      </method>
+      <method name="Int32 test_0_conv_r8()">
+        <size>29</size>
+      </method>
+      <method name="Int32 test_0_conv_i()">
+        <size>76</size>
+      </method>
+      <method name="Int32 test_5_conv_r4()">
+        <size>8</size>
+      </method>
+      <method name="Int32 test_5_double_conv_r4()">
+        <size>16</size>
+      </method>
+      <method name="Int32 test_5_float_conv_r8()">
+        <size>12</size>
+      </method>
+      <method name="Int32 test_5_conv_r8()">
+        <size>8</size>
+      </method>
+      <method name="Int32 test_5_add()">
+        <size>25</size>
+      </method>
+      <method name="Int32 test_5_sub()">
+        <size>25</size>
+      </method>
+      <method name="Int32 test_24_mul()">
+        <size>25</size>
+      </method>
+      <method name="Int32 test_4_div()">
+        <size>25</size>
+      </method>
+      <method name="Int32 test_2_rem()">
+        <size>25</size>
+      </method>
+      <method name="Int32 test_2_neg()">
+        <size>14</size>
+      </method>
+      <method name="Int32 test_46_float_add_spill()">
+        <size>129</size>
+      </method>
+      <method name="Int32 test_362880_float_mul_spill()">
+        <size>129</size>
+      </method>
+      <method name="Int32 test_4_long_cast()">
+        <size>29</size>
+      </method>
+      <method name="Int32 test_16_float_cmp()">
+        <size>317</size>
+      </method>
+      <method name="Int32 test_15_float_cmp_un()">
+        <size>297</size>
+      </method>
+      <method name="Int32 test_15_float_branch()">
+        <size>219</size>
+      </method>
+      <method name="Int32 test_15_float_branch_un()">
+        <size>219</size>
+      </method>
+    </type>
+    <type name="TestDriver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 RunTests(System.Type, System.String[])">
+        <size>571</size>
+      </method>
+      <method name="Int32 RunTests(System.Type)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-234.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>701</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-235.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(T, T)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-236.cs">
+    <type name="Tests.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>42</size>
+      </method>
+      <method name="System.Object Tests.IIndexer.get_Item(Int32)">
+        <size>9</size>
+      </method>
+      <method name="Void Tests.IIndexer.set_Item(Int32, System.Object)">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-237.cs">
+    <type name="Params">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>96</size>
+      </method>
+      <method name="Void foo(System.String, System.Object[])">
+        <size>132</size>
+      </method>
+      <method name="Void Main()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="Params+FOO">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String, System.Object[])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.Object[], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-238.cs">
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ConditionalMethod()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-239.cs">
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ConditionalMethod()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ConditionalMethod()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-24.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_S()">
+        <size>6</size>
+      </method>
+      <method name="Void set_S(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>92</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-240.cs">
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ConditionalMethod()">
+        <size>17</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-241.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_SomeProperty()">
+        <size>3</size>
+      </method>
+      <method name="Int32 M()">
+        <size>3</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo+FooPrivate">
+      <method name="Void .ctor(Foo)">
+        <size>14</size>
+      </method>
+      <method name="Int32 get_SomeProperty()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-242.cs">
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Location()">
+        <size>3</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-243.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Resolve(System.String)">
+        <size>2</size>
+      </method>
+      <method name="System.String Test()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-244.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>136</size>
+      </method>
+      <method name="MyBool get_t()">
+        <size>29</size>
+      </method>
+      <method name="MyBool get_f()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="MyBool">
+      <method name="Void .ctor(Boolean)">
+        <size>8</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>12</size>
+      </method>
+      <method name="MyBool op_BitwiseAnd(MyBool, MyBool)">
+        <size>21</size>
+      </method>
+      <method name="MyBool op_BitwiseOr(MyBool, MyBool)">
+        <size>21</size>
+      </method>
+      <method name="Boolean op_True(MyBool)">
+        <size>8</size>
+      </method>
+      <method name="Boolean op_False(MyBool)">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-245.cs">
+    <type name="Class2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_def_kind()">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-246.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void Dispose()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-247.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>71</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-248.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Foo GetFoo()">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-249.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-25.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>214</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-250.cs">
+    <type name="Test.foo3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-251.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-252.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Bar(Foo)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Bar(Foo)">
+        <size>24</size>
+      </method>
+      <method name="Void m1()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>93</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-253.cs">
+    <type name="AccessibleAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>66</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-254.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test_1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test_2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Test()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Test(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void set_Test2(Boolean)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test_3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_e_1(test_delegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_e_1(test_delegate)">
+        <size>24</size>
+      </method>
+      <method name="Void add_e_2(test_delegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_e_2(test_delegate)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Test_4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_e_1(test_delegate)">
+        <size>1</size>
+      </method>
+      <method name="Void remove_e_1(test_delegate)">
+        <size>1</size>
+      </method>
+      <method name="Void add_e_2(test_delegate)">
+        <size>1</size>
+      </method>
+      <method name="Void remove_e_2(test_delegate)">
+        <size>1</size>
+      </method>
+      <method name="Void add_e_3(test_delegate)">
+        <size>1</size>
+      </method>
+      <method name="Void remove_e_3(test_delegate)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ClassMain">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void Assert(System.Object[], Boolean, Int32)">
+        <size>65</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>1159</size>
+      </method>
+    </type>
+    <type name="test_delegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Delegate Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Delegate EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-255.cs">
+    <type name="TestAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-256.cs">
+    <type name="TableColumn">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_MagicValue()">
+        <size>2</size>
+      </method>
+      <method name="Void set_MagicValue(System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bug">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_TInt()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-257.cs">
+    <type name="X">
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void call(Int32 ByRef)">
+        <size>25</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-258.cs">
+    <type name="MyTest.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyTest.Test2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MyTest.Test.Inner.Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-259.cs">
+    <type name="Testing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-26.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 Test1()">
+        <size>114</size>
+      </method>
+      <method name="Int32 Adder(System.Int32[])">
+        <size>34</size>
+      </method>
+      <method name="Int32 Test2()">
+        <size>46</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="Blah+MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Blah+List">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(System.Int32[])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Int32[], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-260.cs">
+    <type name="x.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="y.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="b.a">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-261.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="T get_Me()">
+        <size>16</size>
+      </method>
+      <method name="T GetMe()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Test(T)">
+        <size>106</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-262.cs">
+    <type name="n1.Attribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="n3.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Attribute()">
+        <size>1</size>
+      </method>
+      <method name="Void X()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-263.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String GetString(System.Byte[])">
+        <size>19</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-264.cs">
+    <type name="Proef">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_OnDoSomething(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_OnDoSomething(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void Temp(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-265.cs">
+    <type name="ClassFormatError">
+      <method name="Void .ctor(String, Object[])">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="UnsupportedClassVersionError">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-266.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-267.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String Text()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-268.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="X+Nested">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="MyEnum D()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-269.cs">
+    <type name="Class1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>361</size>
+      </method>
+      <method name="Int32 AddABunchOfInts(...)">
+        <size>63</size>
+      </method>
+      <method name="Int32 AddASecondBunchOfInts(Int32, ...)">
+        <size>63</size>
+      </method>
+      <method name="Result VtAddABunchOfInts(...)">
+        <size>68</size>
+      </method>
+      <method name="Result VtAddASecondBunchOfInts(Int32, ...)">
+        <size>68</size>
+      </method>
+      <method name="Int32 InstAddABunchOfInts(...)">
+        <size>63</size>
+      </method>
+      <method name="Int32 InstAddASecondBunchOfInts(Int32, ...)">
+        <size>63</size>
+      </method>
+      <method name="Result InstVtAddABunchOfInts(...)">
+        <size>68</size>
+      </method>
+      <method name="Result InstVtAddASecondBunchOfInts(Int32, ...)">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="Result">
+      <method name="Void .ctor(Int32)">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-27.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MyMethod(Int32)">
+        <size>12</size>
+      </method>
+      <method name="Int32 AnotherMethod(Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar(Int32, Int32)">
+        <size>9</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>139</size>
+      </method>
+    </type>
+    <type name="Blah+MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-270.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(System.String, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>75</size>
+      </method>
+      <method name="Int32 Test(System.String, ...)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-271.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="C X()">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>63</size>
+      </method>
+    </type>
+    <type name="T+C">
+      <method name="IEnumerator GetEnumerator()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-272.cs">
+    <type name="BazAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Foo)">
+        <size>7</size>
+      </method>
+      <method name="Void set_foo3(Foo)">
+        <size>1</size>
+      </method>
+      <method name="Foo get_foo3()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void f0()">
+        <size>1</size>
+      </method>
+      <method name="Void f1()">
+        <size>1</size>
+      </method>
+      <method name="Void f2()">
+        <size>1</size>
+      </method>
+      <method name="Void f3()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-273.cs">
+    <type name="FooAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-274.cs">
+    <type name="MyClass">
+      <method name="Void .ctor(String[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ChildClass">
+      <method name="Void .ctor()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-275.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_MyEvent(DelType)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MyEvent(DelType)">
+        <size>24</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>176</size>
+      </method>
+    </type>
+    <type name="DelType">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void add_MyEvent(DelType)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MyEvent(DelType)">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-276.cs">
+    <type name="EventTestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Elapsed(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Elapsed(System.EventHandler)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="EntryPoint">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean test(System.Type)">
+        <size>17</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>48</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-277.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+      <method name="Int32 X(Byte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 X(Int16)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-278.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>73</size>
+      </method>
+    </type>
+    <type name="Rect">
+      <method name="Int32 get_X()">
+        <size>7</size>
+      </method>
+      <method name="Void set_X(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-279.cs">
+    <type name="FlagsAttributeDemo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-28.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EmulateIndexer(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 M()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>20</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>26</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>122</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-280.cs">
+    <type name="AppFramework.Util.Logic">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Boolean EnumInSet(System.Enum, System.Enum[])">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-281.cs">
+    <type name="Foo.Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar.Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test.Test1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 World()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test.Test2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 World()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-282.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Add(integer, System.Object)">
+        <size>70</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="integer">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="integer op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Double op_Implicit(integer)">
+        <size>13</size>
+      </method>
+      <method name="integer op_Addition(integer, integer)">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-283.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Y+D GetIt()">
+        <size>13</size>
+      </method>
+      <method name="Y+D GetIt2()">
+        <size>13</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="Y+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-284.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-285.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-286.cs">
+    <type name="MethodWrapper">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void SetDeclaredExceptions(MapXml.Throws[])">
+        <size>57</size>
+      </method>
+    </type>
+    <type name="MapXml.Throws">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-287.cs">
+    <type name="StaticClass">
+      <method name="System.String Name()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>83</size>
+      </method>
+    </type>
+    <type name="StaticClass+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Object Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-288.cs">
+    <type name="Test.BookAboutMovie">
+      <method name="Void .ctor(String)">
+        <size>25</size>
+      </method>
+      <method name="System.String GetItem(Int32)">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Item(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>57</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-289.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void set_Value(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void set_Value()">
+        <size>1</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32, Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Boolean get_Item(Boolean)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-29.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Add(Int32)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Add(Double)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Demo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>51</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-290.cs">
+    <type name="EntryPoint">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_FooEvent(EntryPoint+EventHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_FooEvent(EntryPoint+EventHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void bar_f(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="EntryPoint+EventHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-291.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-292.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-293.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Warning()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Warning()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-294.cs">
+    <type name="ObsoleteClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor(String, Boolean)">
+        <size>14</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="DerivedTest">
+      <method name="Void .ctor(String)">
+        <size>16</size>
+      </method>
+      <method name="System.String Method()">
+        <size>7</size>
+      </method>
+      <method name="Void T2()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ObsoleteClass2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ObsoleteClass3">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="ObsoleteClass4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void T()">
+        <size>59</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-295.cs">
+    <type name="MyAttribute">
+      <method name="Void .ctor(Object)">
+        <size>14</size>
+      </method>
+      <method name="System.Object get_my()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyConstructorBuilder">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>116</size>
+      </method>
+      <method name="System.Type MyCreateCallee(System.AppDomain)">
+        <size>329</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-296.cs">
+    <type name="GetElementTypeTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-297.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>326</size>
+      </method>
+      <method name="Void Login(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="My">
+      <method name="Void .ctor(Object)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-299.cs">
+    <type name="SampleClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SuperClass op_Increment(SampleClass)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="SuperClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-3.cs">
+    <type name="TestIntOps">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SByte sbyte_add(SByte, SByte)">
+        <size>7</size>
+      </method>
+      <method name="Int16 short_add(Int16, Int16)">
+        <size>5</size>
+      </method>
+      <method name="Double double_add(Double, Double)">
+        <size>4</size>
+      </method>
+      <method name="Int32 int_add(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 int_sub(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 int_mul(Int32, Int32)">
+        <size>4</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>215</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-30.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IA.Draw()">
+        <size>8</size>
+      </method>
+      <method name="Void IB.Draw()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>192</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-300.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>500</size>
+      </method>
+    </type>
+    <type name="A+B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-301.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>226</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-302.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="A+B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-303.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void System.IDisposable.Dispose()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="A+B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void System.IDisposable.Dispose()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-304.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>500</size>
+      </method>
+    </type>
+    <type name="A+B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-305.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>226</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-306.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="A+B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-307.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void System.IDisposable.Dispose()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="A+B">
+      <method name="Void .ctor()">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="A+B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void System.IDisposable.Dispose()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-308.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-309.cs">
+    <type name="MonoBASIC.Parser">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="MonoBASIC.Parser+StateMachine">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void HandleToken(Token)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-31.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-310.cs">
+    <type name="test.Impl">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String GetType(Int32)">
+        <size>6</size>
+      </method>
+      <method name="Boolean IsDone()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="test.myclass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-311.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>38</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+      <method name="Void set_Message(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Boolean DenyMethod()">
+        <size>2</size>
+      </method>
+      <method name="Void Test2()">
+        <size>1</size>
+      </method>
+      <method name="Void Test3()">
+        <size>1</size>
+      </method>
+      <method name="Void Test4()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>175</size>
+      </method>
+    </type>
+    <type name="Test2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-312.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Boolean Method(PointF)">
+        <size>72</size>
+      </method>
+      <method name="Boolean Call_constructor_and_implicit()">
+        <size>29</size>
+      </method>
+      <method name="Boolean Init_with_implicit_conv()">
+        <size>52</size>
+      </method>
+      <method name="Boolean Init_ValueType()">
+        <size>26</size>
+      </method>
+      <method name="Boolean InstanceAssignTest()">
+        <size>75</size>
+      </method>
+      <method name="Int32 T()">
+        <size>54</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="PointF">
+      <method name="Void .ctor(Single, Single)">
+        <size>47</size>
+      </method>
+    </type>
+    <type name="Point">
+      <method name="Void .ctor(Int32, Int32)">
+        <size>37</size>
+      </method>
+      <method name="PointF op_Implicit(Point)">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-313.cs">
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A.B.METHOD()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>140</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-314.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>28</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-315.cs">
+    <type name="GuardedCollectionValue">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IDirectedEnumerable IDirectedEnumerable.Backwards()">
+        <size>2</size>
+      </method>
+      <method name="IDirectedCollectionValue Backwards()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="GuardedSequenced">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IDirectedCollectionValue Test()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-316.cs">
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 IA.Add(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 IB.Add(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 IA.Add(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 IB.Add(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void doom()">
+        <size>1</size>
+      </method>
+      <method name="System.Object Clone()">
+        <size>2</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(IC)">
+        <size>49</size>
+      </method>
+      <method name="Void Test2(IE)">
+        <size>20</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-317.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-318.cs">
+    <type name="Ev">
+      <method name="Void .ctor()">
+        <size>29</size>
+      </method>
+      <method name="Void add_Disposed(System.EventHandler)">
+        <size>19</size>
+      </method>
+      <method name="Void remove_Disposed(System.EventHandler)">
+        <size>19</size>
+      </method>
+      <method name="Void OnClick(System.EventArgs)">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void my_from_fixed(Int32 ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void month_from_fixed(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 CreateFromString(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void EventInterface.add_Event(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void EventInterface.remove_Event(System.EventHandler)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Double* GetValue(Double)">
+        <size>5</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-319.cs">
+    <type name="ConstFields">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>137</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>324</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-32.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-320.cs">
+    <type name="X">
+      <method name="Void .ctor(SByte*, Int32, Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-321.cs">
+    <type name="X">
+      <method name="Void Dispose()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-322.cs">
+    <type name="Y">
+      <method name="Void .ctor(Byte)">
+        <size>14</size>
+      </method>
+      <method name="Int32 op_Implicit(Y)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-323.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-324.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DoStuff()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Boolean get_Val()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-325.cs">
+    <type name="RequestAttribute">
+      <method name="Void .ctor(String, String, String[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 SomeRequest()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-326.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="Mapper">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Double Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Double EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Double &lt;Main&gt;m__0(Int32)">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-327.cs">
+    <type name="X2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.B.Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-328.cs">
+    <type name="A.B.Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-329.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Object)">
+        <size>21</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>74</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-33.cs">
+    <type name="FirstOuter.FirstInner.First">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_MyIdentity()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="FirstOuter.Second">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FirstOuter.SecondInner.Third">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FirstOuter.FirstInner.Fourth">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Fifth">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Application">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>139</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-330.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-331.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Byte* get_Ptr()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Ptr(Byte*)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-332.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-333.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Something()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Something()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-334.cs">
+    <type name="Test.Foo.Index.CompoundFileReader">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test.Foo.Store.Directory">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-335.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void C(Int32 ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void Main()">
+        <size>70</size>
+      </method>
+    </type>
+    <type name="X+B">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32 ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(Int32 ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-336.cs">
+    <type name="X">
+      <method name="Void .ctor(Foo)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Bar)">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-337.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-338.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Y+Z fz()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y+Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-339.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>17</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>86</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-34.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Int32 ByRef, Int32 ByRef)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Bar(Int32, System.Int32[])">
+        <size>61</size>
+      </method>
+      <method name="Void Foo(Int32, Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void In(Int32 ByRef)">
+        <size>7</size>
+      </method>
+      <method name="Void Out(Int32 ByRef)">
+        <size>7</size>
+      </method>
+      <method name="Int32 AddArray(System.Int32[])">
+        <size>30</size>
+      </method>
+      <method name="Int32 AddFancy(FancyInt[])">
+        <size>39</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>269</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FancyInt">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-340.cs">
+    <type name="FLMID.Bugs.BoolOne.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Add(Boolean, Boolean, UInt32, Boolean)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="FLMID.Bugs.BoolOne.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FLMID.Bugs.BoolOne.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>34</size>
+      </method>
+    </type>
+    <type name="FLMID.Bugs.BoolOne.B">
+      <method name="Void FLMID.Bugs.BoolOne.IB.Add(Boolean, Boolean, UInt32, Boolean)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-341.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Libs">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-342.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(Double)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Double)">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Boolean get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Boolean get_Item(Double)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Boolean get_Item(Double)">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-343.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Concat(System.String, System.String, System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void Concat(System.String[])">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-344.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_y(Y)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_y(Y)">
+        <size>24</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>13</size>
+      </method>
+      <method name="Void Foo()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Foo&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-345.cs">
+    <type name="EntryPoint">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-346.cs">
+    <type name="TestMethods.Class1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>91</size>
+      </method>
+    </type>
+    <type name="TestMethods.ParamClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestMethods.TestParam">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestMethods.BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 AddItem(TestMethods.ParamClass)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestMethods.TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 AddItem(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 AddItem(TestMethods.ParamClass)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-347.cs">
+    <type name="Whatever.Core.Project">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Whatever.Core.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Whatever.Core.Project get_Project()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="SomethingElse.Core.Project">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Whatever.App.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String Execute()">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-348.cs">
+    <type name="BoundAttribute">
+      <method name="Void .ctor(Double, Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-349.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Ev1(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Ev1(D)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void add_Ev1(D)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_Ev1(D)">
+        <size>22</size>
+      </method>
+      <method name="Void add_Ev2(D)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_Ev2(D)">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="X2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>19</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>63</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-35.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+      <method name="Void a()">
+        <size>17</size>
+      </method>
+      <method name="Void w(Int32)">
+        <size>22</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>298</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-350.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+BAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-351.cs">
+    <type name="Test.Testee">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar(System.String, System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>242</size>
+      </method>
+    </type>
+    <type name="Test.Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String, System.Object[])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.Object[], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-352.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-353.cs">
+    <type name="Three">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="One">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Two">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-354.cs">
+    <type name="MYAttr">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-355.cs">
+    <type name="Level1.Level1.Level2.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-356.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-357.cs">
+    <type name="SD.Sd">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void F(Boolean)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Foo.Bar">
+      <method name="Void .ctor()">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="Foo.Bar+f_t">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Boolean)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Boolean, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-358.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-359.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-36.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>278</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="IEnumerator GetEnumerator()">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-360.cs">
+    <type name="Application">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-361.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-362.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>17</size>
+      </method>
+      <method name="Void Test()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-363.cs">
+    <type name="Location">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Element">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Location get_Location()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Location(Location)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-364.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+      <method name="Int32 t1(Int32)">
+        <size>33</size>
+      </method>
+      <method name="Int32 t2(Int32)">
+        <size>47</size>
+      </method>
+      <method name="Void Main2(System.String[])">
+        <size>72</size>
+      </method>
+    </type>
+    <type name="Delegable">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_MyDelegate(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MyDelegate(System.EventHandler)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="X+Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;t1&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;t2&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main2&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__2(System.Object, System.EventArgs)">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-365.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>19</size>
+      </method>
+      <method name="Void set_LiteralType(LiteralType)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-366.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-367.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-368.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-369.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>47</size>
+      </method>
+      <method name="Boolean op_Equality(Test, Test)">
+        <size>14</size>
+      </method>
+      <method name="Boolean op_Inequality(Test, Test)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-37.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void m(System.Int32[])">
+        <size>9</size>
+      </method>
+      <method name="Int32 test_int_single_dim()">
+        <size>88</size>
+      </method>
+      <method name="Int32 simple_test_double_dim()">
+        <size>78</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-370.cs">
+    <type name="Test.Application">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 ParseType(System.String)">
+        <size>168</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>54</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-371.cs">
+    <type name="X">
+      <method name="Void .ctor(Boolean&amp;)">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor(Boolean&amp;)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-372.cs">
+    <type name="GenericNode">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetStat()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="GenericFileNode">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 NotUsed()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="WorkingTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetStat()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="FailingTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetStat()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="TestWrapper">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test(Node, System.String)">
+        <size>39</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>44</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-373.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-374.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Rest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-375.cs">
+    <type name="a">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="a+b">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="c">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="c+d">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-376.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>72</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-377.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void test()">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-378.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-379.cs">
+    <type name="DeadCode">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+      <method name="System.String SomeFunc(System.String)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-38.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>20</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>26</size>
+      </method>
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_Bar()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Bar(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 get_Item(UInt32)">
+        <size>20</size>
+      </method>
+      <method name="Void set_Item(UInt32, UInt32)">
+        <size>26</size>
+      </method>
+      <method name="UInt32 Foo()">
+        <size>2</size>
+      </method>
+      <method name="UInt32 get_Bar()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Bar(UInt32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>288</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-380.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-381.cs">
+    <type name="Application">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-382.cs">
+    <type name="Dec">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>16</size>
+      </method>
+      <method name="Void Main()">
+        <size>108</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-383.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>37</size>
+      </method>
+      <method name="X testme(Int32 ByRef)">
+        <size>5</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-384.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+      <method name="Void Test()">
+        <size>40</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-385.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-386.cs">
+    <type name="SuperDecimal">
+      <method name="Void .ctor(Decimal)">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+      <method name="SuperDecimal op_Implicit(Decimal)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-387.cs">
+    <type name="ObjectID">
+      <method name="Void .ctor(Int64)">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+      <method name="Int64 op_Implicit(ObjectID)">
+        <size>8</size>
+      </method>
+      <method name="ObjectID op_Implicit(Int64)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-388.cs">
+    <type name="Schemas.basefieldtype">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Schemas.fieldtype">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Schemas.compoundfield">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Schemas.field">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Schemas.formdata">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Schemas.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-389.cs">
+    <type name="Schemas.basefieldtype">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Schemas.fieldtype">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Schemas.compoundfield">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Schemas.field">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Schemas.formdata">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object Instantiate()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Schemas.M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-39.cs">
+    <type name="SimpleAttribute">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="System.String get_AnotherArg()">
+        <size>7</size>
+      </method>
+      <method name="Void set_AnotherArg(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int64 get_LongValue()">
+        <size>3</size>
+      </method>
+      <method name="Void set_LongValue(Int64)">
+        <size>1</size>
+      </method>
+      <method name="System.Int64[] get_ArrayValue()">
+        <size>7</size>
+      </method>
+      <method name="Void set_ArrayValue(System.Int64[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Blah2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Blah3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>181</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-390.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C+O">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C+N">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C+M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-391.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(Int32 ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void Bar(Boolean ByRef)">
+        <size>4</size>
+      </method>
+      <method name="Void Bar(Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-392.cs">
+    <type name="C">
+      <method name="Int32 Test()">
+        <size>80</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="C+S">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-393.cs">
+    <type name="A">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="A MethodSampleA(System.String)">
+        <size>7</size>
+      </method>
+      <method name="B MethodSampleB(System.String)">
+        <size>7</size>
+      </method>
+      <method name="C MethodSampleC(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>113</size>
+      </method>
+    </type>
+    <type name="Tester+MethodHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="A Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="A EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-394.cs">
+    <type name="A">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor(String, String)">
+        <size>31</size>
+      </method>
+      <method name="System.String get_Value()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String MethodSampleA(A)">
+        <size>7</size>
+      </method>
+      <method name="System.String MethodSampleB(B)">
+        <size>7</size>
+      </method>
+      <method name="System.String MethodSampleC(C)">
+        <size>23</size>
+      </method>
+      <method name="Void Main()">
+        <size>128</size>
+      </method>
+    </type>
+    <type name="Tester+MethodHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke(C)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(C, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-395.cs">
+    <type name="A">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor(String)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor(String, String)">
+        <size>31</size>
+      </method>
+      <method name="System.String get_Value()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MethodSample(B, A, C)">
+        <size>55</size>
+      </method>
+      <method name="Void Main()">
+        <size>71</size>
+      </method>
+    </type>
+    <type name="Tester+MethodHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(C, C, C)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(C, C, C, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-396.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-397.cs">
+    <type name="TypeCheckAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="PropertyCheckAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AccessorCheckAttribute">
+      <method name="Void .ctor(MethodAttributes)">
+        <size>14</size>
+      </method>
+      <method name="MethodAttributes get_Attributes()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>132</size>
+      </method>
+      <method name="Void CheckFlags(System.Reflection.PropertyInfo, System.Reflection.MethodInfo)">
+        <size>153</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Value1()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value1(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Value2()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value2(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Value3()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value3(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Value4()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value4(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Value5()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value5(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-398.cs">
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>118</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Count(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void set_Count(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void SetCount(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>8</size>
+      </method>
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+      <method name="Void set_Message(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-399.cs">
+    <type name="TestVararg">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>345</size>
+      </method>
+      <method name="Void F(RuntimeArgumentHandle)">
+        <size>1</size>
+      </method>
+      <method name="Void G(...)">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-4.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void test(SByte)">
+        <size>8</size>
+      </method>
+      <method name="Void test(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>102</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-40.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>203</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-400.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>52</size>
+      </method>
+      <method name="Int32 TestDereference()">
+        <size>89</size>
+      </method>
+      <method name="Int32 TestPtrAdd()">
+        <size>86</size>
+      </method>
+      <method name="Int32 TestPtrAssign()">
+        <size>198</size>
+      </method>
+      <method name="Int32 TestPtrArithmetic()">
+        <size>226</size>
+      </method>
+      <method name="Int32 TestMultiple()">
+        <size>93</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>82</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-401.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>170</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-402.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-403.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>91</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-404.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>48</size>
+      </method>
+      <method name="Int32* get_v()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-405.cs">
+    <type name="testapp.LibTestAPI">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Create()">
+        <size>17</size>
+      </method>
+    </type>
+    <type name="testapp.TestApp">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-406.cs">
+    <type name="TestCase.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>180</size>
+      </method>
+      <method name="UInt32 DoOp(UInt32*)">
+        <size>11</size>
+      </method>
+      <method name="UInt32 DoOp2(UInt32*)">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-407.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-408.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>44</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-409.cs">
+    <type name="X">
+      <method name="Int32 Main()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-41.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A(Int32 ByRef, UInt32 ByRef, SByte ByRef, Byte ByRef, Int64 ByRef, UInt64 ByRef, Int16 ByRef, UInt16 ByRef, Char ByRef, X ByRef, Single ByRef, Double ByRef)">
+        <size>188</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>228</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-410.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-411.cs">
+    <type name="QtSamples.QtClass">
+      <method name="Void .ctor()">
+        <size>24</size>
+      </method>
+      <method name="Void pressEvent()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="QtSamples.Testing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-412.cs">
+    <type name="Foo.Baz">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-413.cs">
+    <type name="Driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-414.cs">
+    <type name="BB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Data()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-415.cs">
+    <type name="MyTestExtended">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String GetName()">
+        <size>6</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-417.cs">
+    <type name="blah2.MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_DoSomething(blah.MyFunnyDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_DoSomething(blah.MyFunnyDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void DoSomethingFunny()">
+        <size>46</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-419.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-42.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>15</size>
+      </method>
+      <method name="Int32 get_P()">
+        <size>7</size>
+      </method>
+      <method name="Void set_P(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Z get_P()">
+        <size>2</size>
+      </method>
+      <method name="Void set_P(Z)">
+        <size>1</size>
+      </method>
+      <method name="Z op_Increment(Z)">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 p_pre_increment(X)">
+        <size>18</size>
+      </method>
+      <method name="Int32 p_post_increment(X)">
+        <size>18</size>
+      </method>
+      <method name="Int32 i_pre_increment(X)">
+        <size>27</size>
+      </method>
+      <method name="Int32 i_post_increment(X)">
+        <size>27</size>
+      </method>
+      <method name="Z overload_increment(Z)">
+        <size>10</size>
+      </method>
+      <method name="Z overload_pre_increment(Z)">
+        <size>10</size>
+      </method>
+      <method name="Z ugly(Z)">
+        <size>21</size>
+      </method>
+      <method name="Int32 simple(Int32)">
+        <size>62</size>
+      </method>
+      <method name="Int32 arrays()">
+        <size>234</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>161</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-420.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-421.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void SetObject(System.String)">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void SetObject(System.String)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-422.cs">
+    <type name="HelloWorld.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>17</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>1</size>
+      </method>
+      <method name="Boolean CheckTrueThat()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-423.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Func(Int32 ByRef)">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>10</size>
+      </method>
+      <method name="Void lowLevelCall(Int32*)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-424.cs">
+    <type name="XX">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Metodo(System.Exception)">
+        <size>37</size>
+      </method>
+      <method name="IEnumerable X()">
+        <size>16</size>
+      </method>
+      <method name="Void Main()">
+        <size>65</size>
+      </method>
+    </type>
+    <type name="XX+&lt;X&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>105</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-425.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="AAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-426.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-427.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-428.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="X+A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-429.cs">
+    <type name="Foo.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-43.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 test_single(System.Int32[])">
+        <size>34</size>
+      </method>
+      <method name="Int32 test_continue(System.Int32[])">
+        <size>57</size>
+      </method>
+      <method name="Boolean test_double(System.Double[])">
+        <size>61</size>
+      </method>
+      <method name="Int32 test_break(System.Int32[])">
+        <size>57</size>
+      </method>
+      <method name="Boolean test_multi(System.Int32[,])">
+        <size>84</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>284</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-430.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="X+A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-431.cs">
+    <type name="Foo.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-432.cs">
+    <type name="Foo.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-433.cs">
+    <type name="Foo.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-434.cs">
+    <type name="Foo.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-435.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-436.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-437.cs">
+    <type name="T2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>65</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-438.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-439.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="LayerMask">
+      <method name="Int32 op_Implicit(LayerMask)">
+        <size>8</size>
+      </method>
+      <method name="LayerMask op_Implicit(Int32)">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-44.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 dob(System.Int32[,])">
+        <size>80</size>
+      </method>
+      <method name="Int32 count(System.Object)">
+        <size>39</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>133</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-440.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>26</size>
+      </method>
+      <method name="Double op_Implicit(A)">
+        <size>10</size>
+      </method>
+      <method name="Int32 op_Implicit(A)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-441.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-442.cs">
+    <type name="ConsoleApplication1.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>70</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-443.cs">
+    <type name="C">
+      <method name="Void .ctor(ITopic)">
+        <size>31</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-444.cs">
+    <type name="쯠쯡쯢">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-445.cs">
+    <type name="ConvFromInt">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>16</size>
+      </method>
+      <method name="ConvFromInt op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>45</size>
+      </method>
+      <method name="Void Main()">
+        <size>111</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-446.cs">
+    <type name="FooTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void Foo(UInt64)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-447.cs">
+    <type name="System.MonoTODOAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="System.Web.HttpBrowserCapabilities">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Version get_A()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-448.cs">
+    <type name="MonoDivideProblem">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>17</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-449.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Z()">
+        <size>19</size>
+      </method>
+      <method name="Void &lt;Z&gt;m__0(System.Object)">
+        <size>25</size>
+      </method>
+      <method name="Void &lt;Z&gt;m__1(System.Object)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-45.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>97</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>755</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-451.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-452.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-453.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-455.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Int32 GetHashCode()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-456.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void foo()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-457.cs">
+    <type name="Number">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IDouble.Add(Double)">
+        <size>11</size>
+      </method>
+      <method name="Void IInteger.Add(Int32)">
+        <size>11</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-458.cs">
+    <type name="MyAttr">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Type)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(String)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassD">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Top">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-459.cs">
+    <type name="CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="CC+IfElseStateMachine">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void HandleToken(Token)">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-46.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 cast_int(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="UInt32 cast_uint(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Int16 cast_short(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Char cast_char(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="UInt16 cast_ushort(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Byte cast_byte(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="SByte cast_sbyte(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Int64 cast_long(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="UInt64 cast_ulong(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Single cast_float(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Double cast_double(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Boolean cast_bool(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>1126</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-460.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-461.cs">
+    <type name="Valtest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>50</size>
+      </method>
+    </type>
+    <type name="Value">
+      <method name="Void .ctor(Object)">
+        <size>1</size>
+      </method>
+      <method name="System.Object get_Val()">
+        <size>7</size>
+      </method>
+      <method name="System.Enum get_Val2()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-462.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method(X)">
+        <size>1</size>
+      </method>
+      <method name="Void Method(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-463.cs">
+    <type name="PropertySorter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="PathItemBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="PathItemBase+TypeConverter">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-464.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>85</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-465.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>85</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-467.cs">
+    <type name="ExceptionWithAnonMethod">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>96</size>
+      </method>
+      <method name="Void AnonHandler(ExceptionWithAnonMethod+EmptyCallback)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="ExceptionWithAnonMethod+EmptyCallback">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="ExceptionWithAnonMethod+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-468.cs">
+    <type name="CorMetaDataDispenserExClass">
+      <method name="Void .ctor()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void XXX()">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-469.cs">
+    <type name="Lambda">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void f(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Del[] Make2(Int32)">
+        <size>50</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="Del">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Lambda+&lt;Make2&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(Int32)">
+        <size>23</size>
+      </method>
+      <method name="Void &lt;&gt;m__1(Int32)">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-47.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Boolean f()">
+        <size>24</size>
+      </method>
+      <method name="Boolean t()">
+        <size>24</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>404</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-470.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_ASTNodeTypeName()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Demo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-471.cs">
+    <type name="AAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Demo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-472.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Prop(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>79</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-473.cs">
+    <type name="UnixMarshal">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>24</size>
+      </method>
+      <method name="Void Default(Int32)">
+        <size>1</size>
+      </method>
+      <method name="System.String GetDescription(Error)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="UnixMarshal2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String GetDescription(Error)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Stdlib">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestConst">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="XX">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Syscall">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 poll(Pollfd[], UInt32, Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="EnumWrapper">
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="SignalHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="PS">
+      <method name="Void GetDescription(Error)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Value">
+      <method name="EnumWrapper op_Explicit(Value)">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-474.cs">
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+      <method name="Void TestPreinc(Int32)">
+        <size>57</size>
+      </method>
+      <method name="Void TestPostinc(Int32)">
+        <size>57</size>
+      </method>
+      <method name="Void Assert(Int32, Int32)">
+        <size>67</size>
+      </method>
+    </type>
+    <type name="Z+X">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Z+&lt;TestPreinc&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Z+&lt;TestPostinc&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-475.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>24</size>
+      </method>
+      <method name="Void add_e(MyDelegate)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_e(MyDelegate)">
+        <size>22</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>17</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-476.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-477.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Int32 ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-478.cs">
+    <type name="Test.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test.TestAttribute">
+      <method name="Void .ctor(TestEnum2)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Test2Attribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-479.cs">
+    <type name="Test.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-48.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+      <method name="Void Test_1()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-480.cs">
+    <type name="Space">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Void Leak(Boolean, Int32)">
+        <size>85</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Space+DoCopy">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Space+&lt;Leak&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>18</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="Space+&lt;Leak&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-481.cs">
+    <type name="TestClass">
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32 ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(Int32 ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void &lt;Main&gt;m__0(Int32 ByRef)">
+        <size>4</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-482.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M4(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void M4(Int32, ...)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-483.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-484.cs">
+    <type name="Test.TestBit">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-485.cs">
+    <type name="MonoBUG">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>44</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-486.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>119</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-487.cs">
+    <type name="X">
+      <method name="Void .ctor(Object)">
+        <size>72</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-488.cs">
+    <type name="P">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable foo()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>169</size>
+      </method>
+    </type>
+    <type name="Q">
+      <method name="Void .ctor(P)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-489.cs">
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-49.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 s(Byte)">
+        <size>2182</size>
+      </method>
+      <method name="Int32 test(Int32)">
+        <size>70</size>
+      </method>
+      <method name="Int32 tests(System.String)">
+        <size>152</size>
+      </method>
+      <method name="Int32 testn(System.String)">
+        <size>76</size>
+      </method>
+      <method name="Int32 testm(System.String)">
+        <size>77</size>
+      </method>
+      <method name="Int32 testo(System.String)">
+        <size>79</size>
+      </method>
+      <method name="Int32 testp(System.String)">
+        <size>109</size>
+      </method>
+      <method name="Int32 test_def(System.String)">
+        <size>119</size>
+      </method>
+      <method name="Int32 test_coverage(Int32)">
+        <size>18</size>
+      </method>
+      <method name="Int32 test_goto(Int32)">
+        <size>39</size>
+      </method>
+      <method name="Int32 test_memberaccess(System.String)">
+        <size>76</size>
+      </method>
+      <method name="Int32 test_string_multiple_targets(System.String)">
+        <size>128</size>
+      </method>
+      <method name="Int32 test_casts(Int32)">
+        <size>17</size>
+      </method>
+      <method name="Int32 testSwitchEnumLong(TestEnum)">
+        <size>56</size>
+      </method>
+      <method name="Int32 test_long_enum_switch()">
+        <size>66</size>
+      </method>
+      <method name="Int32 tests_default(System.String)">
+        <size>107</size>
+      </method>
+      <method name="Int32 tests_default_2(System.String)">
+        <size>124</size>
+      </method>
+      <method name="Void test_76590(System.String)">
+        <size>107</size>
+      </method>
+      <method name="Void test_77964()">
+        <size>37</size>
+      </method>
+      <method name="Boolean bug_78860()">
+        <size>114</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>1037</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-490.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>39</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-491.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="AttrA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AttrB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-492.cs">
+    <type name="Test.My1Attribute">
+      <method name="Void .ctor(Object)">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="Test.My2Attribute">
+      <method name="Void .ctor(String[])">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Test.My3Attribute">
+      <method name="Void .ctor(Byte)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="Test.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>60</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-493.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_f()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 bar()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-494.cs">
+    <type name="Agresso.Foundation.Function">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Agresso.Foundation.Translate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Agresso.Foundation.Function, System.Text.StringBuilder ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Agresso.Foundation.Function, System.Text.StringBuilder ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(System.Text.StringBuilder ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-495.cs">
+    <type name="plj.aClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="plj.aClass op_Implicit(plj.fromClass)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="plj.realClass1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="plj.realClass1 op_Implicit(plj.fromClass)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="plj.fromClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-496.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>15</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void Run()">
+        <size>180</size>
+      </method>
+    </type>
+    <type name="Test+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>129</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-497.cs">
+    <type name="PlotMenuItem">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(EventHandler)">
+        <size>54</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>50</size>
+      </method>
+      <method name="Void MenuItem_Click(System.Object, System.EventArgs)">
+        <size>11</size>
+      </method>
+      <method name="System.EventHandler get_Callback()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Callback(System.EventHandler)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-498.cs">
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>81</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Single)">
+        <size>0</size>
+      </method>
+      <method name="Int32 get_Foo()">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-499.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-5.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-500.cs">
+    <type name="SomeCustomAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>117</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-501.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DumpException(Tests+FilterStackFrame)">
+        <size>1</size>
+      </method>
+      <method name="Void foo(Boolean ByRef)">
+        <size>49</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Tests+FilterStackFrame">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Boolean &lt;foo&gt;m__0(System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-502.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Property()">
+        <size>3</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Property()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Value()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="DerivedClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Value()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="ErrorClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Value()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Value(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-503.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-504.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 f()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-505.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 f()">
+        <size>19</size>
+      </method>
+      <method name="Void Main()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-506.cs">
+    <type name="ProtectedSetter.BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>0</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="ProtectedSetter.DerivedClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Name()">
+        <size>2</size>
+      </method>
+      <method name="Void set_Name(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-507.cs">
+    <type name="NewslotVirtualFinal.NewslotVirtualFinal">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void SomeMethod()">
+        <size>1</size>
+      </method>
+      <method name="Void SomeMethod2()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="NewslotVirtualFinal.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>83</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-508.cs">
+    <type name="OutputParam">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>14</size>
+      </method>
+      <method name="Void Method(Int32 ByRef)">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-509.cs">
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_OnEvent(DelegateHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_OnEvent(DelegateHandler)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="ExtendingClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void EventInterface.add_OnEvent(DelegateHandler)">
+        <size>8</size>
+      </method>
+      <method name="Void EventInterface.remove_OnEvent(DelegateHandler)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="DelegateHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-51.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>25</size>
+      </method>
+      <method name="Int32 get_b_int_property()">
+        <size>7</size>
+      </method>
+      <method name="Void set_b_int_property(Int32)">
+        <size>8</size>
+      </method>
+      <method name="System.String b_get_id()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>26</size>
+      </method>
+      <method name="Int32 get_b_int_property()">
+        <size>7</size>
+      </method>
+      <method name="Void set_b_int_property(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>138</size>
+      </method>
+    </type>
+    <type name="boot">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-510.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void test39(Int32 ByRef)">
+        <size>36</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-511.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>17</size>
+      </method>
+      <method name="Void f()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-512.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>17</size>
+      </method>
+      <method name="Void f()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-513.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>246</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-514.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void HandleConflict(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-515.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>35</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-516.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>35</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-517.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-518.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-519.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+      <method name="Void f()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-52.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>28</size>
+      </method>
+      <method name="System.Object get_Current()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>36</size>
+      </method>
+      <method name="Y GetEnumerator()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>504</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-520.cs">
+    <type name="FakeInt">
+      <method name="Void .ctor(Int64)">
+        <size>14</size>
+      </method>
+      <method name="Int64 op_Implicit(FakeInt)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-521.cs">
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CallWithContextN(System.Object, System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Tests+CallTargetWithContextN">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object, System.Object[])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.Object[], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-522.cs">
+    <type name="Const">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-523.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 stuff()">
+        <size>20</size>
+      </method>
+      <method name="Int32 stuff2()">
+        <size>44</size>
+      </method>
+      <method name="Int32 stuff3()">
+        <size>44</size>
+      </method>
+      <method name="Void stuff4()">
+        <size>20</size>
+      </method>
+      <method name="Void stuff_finally()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-524.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-525.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Finalize()">
+        <size>23</size>
+      </method>
+      <method name="Int32 Test1()">
+        <size>33</size>
+      </method>
+      <method name="Void Test2()">
+        <size>66</size>
+      </method>
+      <method name="Void Main()">
+        <size>39</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-526.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo(IListCounter)">
+        <size>8</size>
+      </method>
+      <method name="Void Foo2(IC)">
+        <size>8</size>
+      </method>
+      <method name="Void Foo3(ICC)">
+        <size>8</size>
+      </method>
+      <method name="Void Foo4(IM2)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-527.cs">
+    <type name="Repro">
+      <method name="Void .ctor()">
+        <size>19</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>48</size>
+      </method>
+      <method name="Void foo()">
+        <size>61</size>
+      </method>
+      <method name="Int32 bar()">
+        <size>3</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-528.cs">
+    <type name="MicroFocus.MONO.Bugs.Odd">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-529.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-53.cs">
+    <type name="MyDispose">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>257</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-530.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void e(System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-531.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-532.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>47</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-533.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void True(Boolean)">
+        <size>10</size>
+      </method>
+      <method name="Void False(Boolean)">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-535.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>77</size>
+      </method>
+      <method name="Void Compile()">
+        <size>19</size>
+      </method>
+      <method name="Void M(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void M(UInt64)">
+        <size>1</size>
+      </method>
+      <method name="Void M(System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-536.cs">
+    <type name="Test">
+      <method name="Void add_Foo(FooHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_Foo(FooHandler)">
+        <size>22</size>
+      </method>
+      <method name="Void OnFooTest()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>31</size>
+      </method>
+    </type>
+    <type name="FooHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-537.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_H()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+Derived+Nested">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void G()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Derived+Nested">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void G()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-538.cs">
+    <type name="concrete">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="concrete getConcrete(IInterface)">
+        <size>6</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="testDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IInterface Invoke(concrete)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(concrete, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IInterface EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-54.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean v()">
+        <size>26</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-540.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Byte op_Implicit(A)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="Constraint">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>93</size>
+      </method>
+      <method name="Constraint op_LogicalNot(Constraint)">
+        <size>2</size>
+      </method>
+      <method name="Constraint op_UnaryPlus(Constraint)">
+        <size>2</size>
+      </method>
+      <method name="Constraint op_OnesComplement(Constraint)">
+        <size>2</size>
+      </method>
+      <method name="Constraint op_UnaryNegation(Constraint)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-541.cs">
+    <type name="A">
+      <method name="Void .ctor(TestFunc)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>46</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="TestFunc">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void &lt;a&gt;m__0(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-542.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ARec">
+      <method name="Void .ctor(Decimal)">
+        <size>14</size>
+      </method>
+      <method name="Decimal Round(Int32)">
+        <size>13</size>
+      </method>
+      <method name="Decimal Round(Decimal, Int32)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-543.cs">
+    <type name="BetterMethod">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(System.Boolean[])">
+        <size>2</size>
+      </method>
+      <method name="System.String get_Item(Boolean, System.Object)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Item(Int32, System.String[])">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, System.String[], Int32)">
+        <size>40</size>
+      </method>
+      <method name="System.Object get_Item(Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, System.Object[], System.Object)">
+        <size>40</size>
+      </method>
+      <method name="Boolean get_Item(Int32, Boolean, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, Boolean, System.Object[], Boolean)">
+        <size>40</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>258</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-544.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-545.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Dingus">
+      <method name="Void .ctor(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-546.cs">
+    <type name="NameSpace.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-547.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-548.cs">
+    <type name="Bugs.Bug0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="Bugs.Bug0+MyBoolean">
+      <method name="Void .ctor(Boolean)">
+        <size>8</size>
+      </method>
+      <method name="MyBoolean op_Implicit(Boolean)">
+        <size>7</size>
+      </method>
+      <method name="Boolean op_Implicit(MyBoolean)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-549.cs">
+    <type name="Do">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Register(Get)">
+        <size>1</size>
+      </method>
+      <method name="Void Register(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="System.Object MyGet(Do)">
+        <size>2</size>
+      </method>
+      <method name="Void X()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="User">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Get">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Object Invoke(Do)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Do, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-55.cs">
+    <type name="A.B.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hola()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="X.Y.Z.W">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Ahoj()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Foo.System">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-550.cs">
+    <type name="Bla.Blub.Fo‿o">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-551.cs">
+    <type name="System.Int32">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-552.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(C)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-553.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Add(System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Add(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-554.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>145</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-555.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>351</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-556.cs">
+    <type name="S">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Frobnikator()">
+        <size>1</size>
+      </method>
+      <method name="Void CharToX()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>35</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-557.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-558.cs">
+    <type name="TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+      <method name="Void TestMethod(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestClass+OneDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-559.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_TestEvent(B+TestDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_TestEvent(B+TestDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-56.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_P()">
+        <size>7</size>
+      </method>
+      <method name="Void set_P(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Q()">
+        <size>0</size>
+      </method>
+      <method name="Void set_Q(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Int32 get_R()">
+        <size>7</size>
+      </method>
+      <method name="Void set_R(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_P()">
+        <size>7</size>
+      </method>
+      <method name="Void set_P(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_Q()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Q(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Q()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Q(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Int32 get_R()">
+        <size>7</size>
+      </method>
+      <method name="Void set_R(Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>221</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-560.cs">
+    <type name="Bugs.Bug2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>81</size>
+      </method>
+    </type>
+    <type name="Bugs.Bug2+MyByte">
+      <method name="Void .ctor(Byte)">
+        <size>8</size>
+      </method>
+      <method name="MyByte op_Implicit(Byte)">
+        <size>7</size>
+      </method>
+      <method name="Byte op_Implicit(MyByte)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Bugs.Bug2+MyInt">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="MyInt op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Implicit(MyInt)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-561.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void I.M()">
+        <size>1</size>
+      </method>
+      <method name="Void M()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-562.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-563.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object TestMethod(TestCollection)">
+        <size>66</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-564.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-565.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-566.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Spec()">
+        <size>12</size>
+      </method>
+      <method name="Void Foo(C)">
+        <size>7</size>
+      </method>
+      <method name="Void Foo2(CC)">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Spec(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Spec(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-567.cs">
+    <type name="preservesig_test.Class1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>143</size>
+      </method>
+    </type>
+    <type name="preservesig_test.TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_e(preservesig_test.TestClass+D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_e(preservesig_test.TestClass+D)">
+        <size>24</size>
+      </method>
+      <method name="Int32 DoFoo()">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_Foo()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="preservesig_test.TestClass+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-568.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-569.cs">
+    <type name="MyAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="SubAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void method()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-57.cs">
+    <type name="Button">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Click(EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Click(EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void OnClick(Int32, Int32)">
+        <size>36</size>
+      </method>
+      <method name="Void Reset()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Void Connect()">
+        <size>59</size>
+      </method>
+      <method name="Void Button1_Click(Int32, Int32)">
+        <size>34</size>
+      </method>
+      <method name="Void Foo_Click(Int32, Int32)">
+        <size>34</size>
+      </method>
+      <method name="Void Disconnect()">
+        <size>34</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="EventHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32, Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-570.cs">
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>47</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-571.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-572.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Color get_Color()">
+        <size>10</size>
+      </method>
+      <method name="Void ResetCustomColors()">
+        <size>16</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Color">
+      <method name="Color From(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Int32 ToArgb()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-573.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-574.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-575.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-576.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-578.cs">
+    <type name="Test1.TestItem1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_OnUpdate(Test1.TestDelegate1)">
+        <size>34</size>
+      </method>
+      <method name="Void remove_OnUpdate(Test1.TestDelegate1)">
+        <size>34</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test1.TestItem2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_OnUpdate(Test1.TestDelegate1)">
+        <size>18</size>
+      </method>
+      <method name="Void remove_OnUpdate(Test1.TestDelegate1)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Test1.CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+    </type>
+    <type name="Test1.TestDelegate1">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test1.CC">
+      <method name="Int32 &lt;Main&gt;m__0()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-579.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>35</size>
+      </method>
+      <method name="Void DoCall(X+test)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X+test">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Object Invoke(System.Reflection.MethodInfo)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Reflection.MethodInfo, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="System.Object &lt;Main&gt;m__0(System.Reflection.MethodInfo)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-58.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-580.cs">
+    <type name="Bla">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void BuildNode(System.String ByRef)">
+        <size>43</size>
+      </method>
+      <method name="Void BuildNode(System.String[] ByRef)">
+        <size>56</size>
+      </method>
+      <method name="Void BuildNode_B(System.Object ByRef)">
+        <size>18</size>
+      </method>
+      <method name="System.String BuildNode_C(System.String ByRef)">
+        <size>76</size>
+      </method>
+      <method name="System.String BuildNode_D()">
+        <size>157</size>
+      </method>
+      <method name="Void BuildNode_E(System.String[,] ByRef)">
+        <size>68</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>265</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-581.cs">
+    <type name="TestParams">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_Item(System.String[])">
+        <size>4</size>
+      </method>
+      <method name="Void set_Item(System.String[], System.Object)">
+        <size>40</size>
+      </method>
+      <method name="Void TestMethod()">
+        <size>179</size>
+      </method>
+    </type>
+    <type name="TestNonParams">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_Item(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(System.String, System.Object)">
+        <size>40</size>
+      </method>
+      <method name="Void TestMethod()">
+        <size>71</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-582.cs">
+    <type name="TrueClass">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-583.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="ObjectContainerBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-584.cs">
+    <type name="Style">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Style get_CurrentStyle()">
+        <size>2</size>
+      </method>
+      <method name="Void set_CurrentStyle(Style)">
+        <size>1</size>
+      </method>
+      <method name="Boolean LoadCurrentStyle()">
+        <size>20</size>
+      </method>
+      <method name="Style Load()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-585.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-586.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>99</size>
+      </method>
+    </type>
+    <type name="Program+MyColor">
+      <method name="Void .ctor(Single)">
+        <size>8</size>
+      </method>
+      <method name="Single get_Value()">
+        <size>7</size>
+      </method>
+      <method name="MyColor op_Addition(MyColor, MyColor)">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-587.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-588.cs">
+    <type name="TestNamespace.TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void HelloWorld()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="SuperClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="TestNamespace.TestClass get_TestClass()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="SubClass">
+      <method name="Void .ctor()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-589.cs">
+    <type name="TestNamespace.TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void HelloWorld()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="SuperClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="TestNamespace.TestClass get_TestClass()">
+        <size>7</size>
+      </method>
+      <method name="Void set_TestClass(TestNamespace.TestClass)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="SubClass">
+      <method name="Void .ctor()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-59.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 test_explicit()">
+        <size>224</size>
+      </method>
+      <method name="Int32 test_implicit()">
+        <size>102</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-590.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+      <method name="System.String Foo()">
+        <size>6</size>
+      </method>
+      <method name="System.String get_Prop()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Prop(System.String)">
+        <size>8</size>
+      </method>
+      <method name="System.String get_Item(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, System.String)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Do(System.String, System.String, System.String)">
+        <size>334</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-591.cs">
+    <type name="C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(System.String)">
+        <size>49</size>
+      </method>
+    </type>
+    <type name="C2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-592.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 fib(Int32)">
+        <size>53</size>
+      </method>
+      <method name="Int32 xx(Int32)">
+        <size>33</size>
+      </method>
+      <method name="Void foo(Int32)">
+        <size>38</size>
+      </method>
+      <method name="Void XXXA()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-593.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(I)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-594.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-595.cs">
+    <type name="AttributesCollection">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object get_Item(SymbolId)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(SymbolId, System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object SetDictionaryValue(System.Object, SymbolId, System.Object)">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-596.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-597.cs">
+    <type name="TestNS.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestNS.XElement">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="TestNS.Bar get_Document()">
+        <size>2</size>
+      </method>
+      <method name="System.Object get_CrashHere()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="TestNS.Element">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="TestNS.Foo get_Document()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="TestNS.Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IHoge get_Root()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="TestNS.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-598.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>35</size>
+      </method>
+      <method name="V get_v()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="V">
+      <method name="Void set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-599.cs">
+    <type name="Test.String">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Test.String op_Implicit(System.String)">
+        <size>15</size>
+      </method>
+      <method name="System.String op_Implicit(Test.String)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="TestCompiler.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>80</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-6.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-60.cs">
+    <type name="ns5.Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Run()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-600.cs">
+    <type name="Test.Regression">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>90</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-601.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="C+MarkerUpdatedVMDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(IntPtr, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(IntPtr, IntPtr, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-602.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>95</size>
+      </method>
+      <method name="Int32 Error(System.String, System.Object[])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Format(System.String, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Format(System.String, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Format(System.String, System.Object, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_A(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_A(System.String, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_C(System.Type, System.Int32[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_C(System.Type, System.Int32[], System.Int32[])">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-603.cs">
+    <type name="ConsoleApplication1.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-604.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>83</size>
+      </method>
+    </type>
+    <type name="Program+ImplementingExplicitInterfacesMembers">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Program.Iface1.IfaceMethod1()">
+        <size>1</size>
+      </method>
+      <method name="Void Program.Iface2.IfaceMethod2()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-605.cs">
+    <type name="TestA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Method()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="TestB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Method()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-606.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>157</size>
+      </method>
+    </type>
+    <type name="Info">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean System.Collections.IEnumerator.MoveNext()">
+        <size>2</size>
+      </method>
+      <method name="Void System.Collections.IEnumerator.Reset()">
+        <size>1</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>2</size>
+      </method>
+      <method name="System.Object Mono.Test.ITest.get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void Mono.Test.ITest.set_Item(Int32, System.Object)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-607.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>120</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-608.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>60</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-609.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-61.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_XX(X+MyEvent)">
+        <size>3</size>
+      </method>
+      <method name="Void remove_XX(X+MyEvent)">
+        <size>3</size>
+      </method>
+      <method name="Int32 get_Property()">
+        <size>4</size>
+      </method>
+      <method name="Void set_Property(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Int32 get_P2()">
+        <size>2</size>
+      </method>
+      <method name="Void set_P3(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X+MyEvent">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-610.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+C+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.B+C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.B+C+E">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.B+A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.B+A+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-611.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T+Protected">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D+Private">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Stuff(T+Protected)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="D2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D2+P">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D2+P+Private">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Stuff(T+Protected)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-612.cs">
+    <type name="Abcdefghijklmnopqrstuvwxyz">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="OO">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void D()">
+        <size>5293</size>
+      </method>
+    </type>
+    <type name="Zyxwvutsrqp">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="XXX">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean IsAltered()">
+        <size>859</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-613.cs">
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean g()">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>62</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-614.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void And()">
+        <size>73</size>
+      </method>
+      <method name="Void Or()">
+        <size>129</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>70</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-615.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-617.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X.add_Foo(MyDelegate)">
+        <size>1</size>
+      </method>
+      <method name="Void X.remove_Foo(MyDelegate)">
+        <size>1</size>
+      </method>
+      <method name="Void add_Foo(MyDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Foo(MyDelegate)">
+        <size>24</size>
+      </method>
+      <method name="Int32 X.get_Prop()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>86</size>
+      </method>
+    </type>
+    <type name="MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int64 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int64 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-618.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void ZeroBasedReductions()">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-619.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-62.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="X[] GetX()">
+        <size>2</size>
+      </method>
+      <method name="System.Int32[] getInt()">
+        <size>2</size>
+      </method>
+      <method name="System.Int32[,,] getMoreInt()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-620.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A(Int32 ByRef)">
+        <size>7</size>
+      </method>
+      <method name="Void B(Int32 ByRef)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-621.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>129</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-622.cs">
+    <type name="A">
+      <method name="Void .ctor(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(A ByRef)">
+        <size>8</size>
+      </method>
+      <method name="Void Foo(System.Object ByRef)">
+        <size>9</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>16</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-623.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void a()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void a()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-624.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Type()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>3</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-625.cs">
+    <type name="Location">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Null()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-626.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>37</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-627.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X.B()">
+        <size>1</size>
+      </method>
+      <method name="Void A.B()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void N(System.Object)">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-628.cs">
+    <type name="N1.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-629.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable foo()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>67</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;foo&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>39</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-63.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>96</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-630.cs">
+    <type name="MyEx">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Ex">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 test(Int32)">
+        <size>37</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>70</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-631.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SByte op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="Byte op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="Int16 op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="UInt16 op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="Int32 op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="UInt32 op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="Int64 op_Implicit(A)">
+        <size>3</size>
+      </method>
+      <method name="UInt64 op_Implicit(A)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="A2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SByte op_Implicit(A2)">
+        <size>2</size>
+      </method>
+      <method name="Byte op_Implicit(A2)">
+        <size>2</size>
+      </method>
+      <method name="Int16 op_Implicit(A2)">
+        <size>2</size>
+      </method>
+      <method name="UInt32 op_Implicit(A2)">
+        <size>2</size>
+      </method>
+      <method name="Int64 op_Implicit(A2)">
+        <size>3</size>
+      </method>
+      <method name="UInt64 op_Implicit(A2)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="A3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SByte op_Implicit(A3)">
+        <size>2</size>
+      </method>
+      <method name="UInt32 op_Implicit(A3)">
+        <size>2</size>
+      </method>
+      <method name="Int64 op_Implicit(A3)">
+        <size>3</size>
+      </method>
+      <method name="UInt64 op_Implicit(A3)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="A4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 op_Implicit(A4)">
+        <size>2</size>
+      </method>
+      <method name="Int64 op_Implicit(A4)">
+        <size>3</size>
+      </method>
+      <method name="UInt64 op_Implicit(A4)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="A5">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 op_Implicit(A5)">
+        <size>2</size>
+      </method>
+      <method name="Int32 op_Implicit(A5)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="A6">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Byte op_Implicit(A6)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="MyDecimal">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Decimal op_Implicit(MyDecimal)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Constraint">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>293</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-632.cs">
+    <type name="Bug379822">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Assert(Boolean, Boolean)">
+        <size>19</size>
+      </method>
+      <method name="Void TestAnd(Boolean)">
+        <size>79</size>
+      </method>
+      <method name="Void TestOr(Boolean)">
+        <size>88</size>
+      </method>
+      <method name="Void Test(Boolean)">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-633.cs">
+    <type name="Test.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-634.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void TestFunc()">
+        <size>2</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-635.cs">
+    <type name="ShortCircuitFold">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean get_False()">
+        <size>14</size>
+      </method>
+      <method name="Boolean get_True()">
+        <size>14</size>
+      </method>
+      <method name="Void a(Boolean, Boolean)">
+        <size>19</size>
+      </method>
+      <method name="Void c(Int32)">
+        <size>67</size>
+      </method>
+      <method name="Boolean f()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>167</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-636.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean get_False()">
+        <size>14</size>
+      </method>
+      <method name="Void ping()">
+        <size>13</size>
+      </method>
+      <method name="Int32 test_while(Int32)">
+        <size>53</size>
+      </method>
+      <method name="Int32 test_do_while(Int32)">
+        <size>53</size>
+      </method>
+      <method name="Int32 test_for(Int32)">
+        <size>64</size>
+      </method>
+      <method name="Void test_for_empty()">
+        <size>35</size>
+      </method>
+      <method name="Void Main()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-638.cs">
+    <type name="Fail">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>110</size>
+      </method>
+    </type>
+    <type name="Fail+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-639.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_s()">
+        <size>13</size>
+      </method>
+      <method name="Void set_s(System.String)">
+        <size>34</size>
+      </method>
+      <method name="Void Main()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-64.cs">
+    <type name="Operator">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Blah">
+      <method name="Void .ctor(Operator)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-640.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>100</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-641.cs">
+    <type name="Identifier">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>55</size>
+      </method>
+      <method name="Boolean op_Equality(Identifier, Identifier)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Inequality(Identifier, Identifier)">
+        <size>2</size>
+      </method>
+      <method name="Identifier op_Implicit(System.String)">
+        <size>2</size>
+      </method>
+      <method name="System.String op_Implicit(Identifier)">
+        <size>2</size>
+      </method>
+      <method name="Decimal op_Implicit(Identifier)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-642.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-643.cs">
+    <type name="PointerArithmeticTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>130</size>
+      </method>
+      <method name="Int32* Conversions(Int64)">
+        <size>3</size>
+      </method>
+      <method name="Int32 CheckAdd(Byte*, Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 CheckSub(Int16*, Int32)">
+        <size>16</size>
+      </method>
+      <method name="Int32 CheckSub2(Int16*, Int32)">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-644.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object M(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void Test_1()">
+        <size>59</size>
+      </method>
+      <method name="Boolean Test_2()">
+        <size>24</size>
+      </method>
+      <method name="Boolean Test_3()">
+        <size>24</size>
+      </method>
+      <method name="Boolean Test_4(Program+D)">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>75</size>
+      </method>
+    </type>
+    <type name="Program+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Object Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-645.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable get_Empty()">
+        <size>16</size>
+      </method>
+      <method name="Void Main()">
+        <size>61</size>
+      </method>
+    </type>
+    <type name="Program+&lt;&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>158</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-646.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int64 CastUIntPtrToInt64(UIntPtr)">
+        <size>7</size>
+      </method>
+      <method name="UInt32 CastIntPtrToUInt32(IntPtr)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>113</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-647.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-648.cs">
+    <type name="ParamMismatch.TestCase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Culprit(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void remove_Culprit(System.EventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Finalize()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-649.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>609</size>
+      </method>
+    </type>
+    <type name="MainClass+Decimal2">
+      <method name="Void .ctor(Double)">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor(Decimal)">
+        <size>8</size>
+      </method>
+      <method name="Decimal2 op_Explicit(Decimal)">
+        <size>7</size>
+      </method>
+      <method name="Decimal2 op_Explicit(Double)">
+        <size>7</size>
+      </method>
+      <method name="Decimal op_Implicit(Decimal2)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-65.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void receiver(S)">
+        <size>7</size>
+      </method>
+      <method name="System.Object BoxS()">
+        <size>21</size>
+      </method>
+      <method name="S Plain()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>98</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-650.cs">
+    <type name="App">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-651.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Open(IList)">
+        <size>1</size>
+      </method>
+      <method name="Void Open(System.Collections.ArrayList ByRef)">
+        <size>20</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-652.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-653.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>50</size>
+      </method>
+      <method name="Void Test2()">
+        <size>32</size>
+      </method>
+      <method name="Void Test2(SByte, Int16, Int32, Int64, UInt64)">
+        <size>39</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-654.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Int32 Test(SByte*)">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-655.cs">
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Byte get_Item(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, Byte)">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>77</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-656.cs">
+    <type name="Goo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-657.cs">
+    <type name="TestDebug.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TestDebug.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Excluded()">
+        <size>11</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-658.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Thread()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Thread">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-659.cs">
+    <type name="MySubClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+      <method name="Void set_BB(Int32, Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Void Iface.set_AA(Int32, Boolean)">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-66.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>53</size>
+      </method>
+      <method name="Void FillOne()">
+        <size>18</size>
+      </method>
+      <method name="Void FillSingle()">
+        <size>39</size>
+      </method>
+      <method name="Void FillDouble()">
+        <size>59</size>
+      </method>
+      <method name="Void FillObject()">
+        <size>52</size>
+      </method>
+      <method name="Void FillDoubleObject()">
+        <size>81</size>
+      </method>
+      <method name="Int32 TestSingle()">
+        <size>47</size>
+      </method>
+      <method name="Int32 TestDouble()">
+        <size>67</size>
+      </method>
+      <method name="Int32 TestObjectSingle()">
+        <size>48</size>
+      </method>
+      <method name="Int32 TestObjectDouble()">
+        <size>72</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>80</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-660.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="Status">
+      <method name="Void .ctor(Code)">
+        <size>8</size>
+      </method>
+      <method name="Status op_Implicit(Code)">
+        <size>7</size>
+      </method>
+      <method name="Code op_Implicit(Status)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-661.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void TestMethod()">
+        <size>15</size>
+      </method>
+      <method name="SummaryInfo GetSummary()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-662.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-663.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Implicit(A)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-664.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test(System.String)">
+        <size>148</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>49</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-665.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+      <method name="Int32 Method(System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-666.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-667.cs">
+    <type name="CA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IA.M()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-668.cs">
+    <type name="Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-669.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>3</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-670.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-671.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>19</size>
+      </method>
+      <method name="Boolean Bar(System.Object)">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-672.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="S* get_Foo2()">
+        <size>3</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Int32* get_Foo()">
+        <size>3</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-673.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>85</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-674.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+      <method name="Int32 &lt;Main&gt;m__0(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-675.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>2</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Equality(B, B)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_Inequality(B, B)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-676.cs">
+    <type name="N.Item">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="N.Item get_Item(N.Test)">
+        <size>2</size>
+      </method>
+      <method name="Void Foo(ItemSlot)">
+        <size>27</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-677.cs">
+    <type name="InvokeWindow">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_E(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_E(D)">
+        <size>24</size>
+      </method>
+      <method name="Void Run()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+      <method name="Void OnDeleteEvent()">
+        <size>1</size>
+      </method>
+      <method name="Void OnDeleteEvent(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-678.cs">
+    <type name="NaNTest">
+      <method name="Void .ctor(Double, Double)">
+        <size>171</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-679.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-68.cs">
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>147</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-680.cs">
+    <type name="AsStringProblem.MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>94</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-681.cs">
+    <type name="Bug">
+      <method name="Void .ctor()">
+        <size>20</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="BugClass">
+      <method name="Void .cctor()">
+        <size>18</size>
+      </method>
+      <method name="Void FooImplementation(System.Void*)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="BugClass+Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Void*)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Void*, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-683.cs">
+    <type name="broken_cast">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-684.cs">
+    <type name="mono_bug.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>71</size>
+      </method>
+      <method name="System.Double[][,] ReturnArray()">
+        <size>62</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-685.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-686.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>51</size>
+      </method>
+      <method name="Void Foo()">
+        <size>145</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-687.cs">
+    <type name="XUnit">
+      <method name="Void .ctor(Double)">
+        <size>8</size>
+      </method>
+      <method name="XUnit op_Implicit(Double)">
+        <size>10</size>
+      </method>
+      <method name="Double op_Implicit(XUnit)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Unit">
+      <method name="Void .ctor(Double)">
+        <size>8</size>
+      </method>
+      <method name="Unit op_Implicit(Double)">
+        <size>10</size>
+      </method>
+      <method name="Double op_Implicit(Unit)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-688.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>46</size>
+      </method>
+      <method name="Byte* GetFoo()">
+        <size>7</size>
+      </method>
+      <method name="Byte* GetFoo2()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-689.cs">
+    <type name="Sample">
+      <method name="Void Main()">
+        <size>3</size>
+      </method>
+      <method name="Void Foo(Byte*, Byte*)">
+        <size>42</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-69.cs">
+    <type name="Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Start_internal(IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-690.cs">
+    <type name="Test.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-691.cs">
+    <type name="ConsoleApplication6.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>23</size>
+      </method>
+      <method name="Void Main()">
+        <size>127</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-692.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void test1(DateTime ByRef)">
+        <size>10</size>
+      </method>
+      <method name="Void test2(DateTime ByRef)">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>141</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-693.cs">
+    <type name="ConstTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-694.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-695.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>53</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>680</size>
+      </method>
+      <method name="System.String get_BaseDirectory()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-696.cs">
+    <type name="S">
+      <method name="Void f(S)">
+        <size>1</size>
+      </method>
+      <method name="S op_Implicit(C)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-697.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-698.cs">
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-699.cs">
+    <type name="D">
+      <method name="Void .ctor(String)">
+        <size>25</size>
+      </method>
+      <method name="System.String get_message()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-7.cs">
+    <type name="Mine.MyBoolean">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean op_Implicit(Mine.MyBoolean)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Mine.MyTrueFalse">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean op_True(Mine.MyTrueFalse)">
+        <size>2</size>
+      </method>
+      <method name="Boolean op_False(Mine.MyTrueFalse)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Mine.Blah">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>408</size>
+      </method>
+      <method name="Mine.Blah op_Addition(Mine.Blah, Mine.Blah)">
+        <size>31</size>
+      </method>
+      <method name="Mine.Blah op_UnaryPlus(Mine.Blah)">
+        <size>22</size>
+      </method>
+      <method name="Mine.Blah op_UnaryNegation(Mine.Blah)">
+        <size>23</size>
+      </method>
+      <method name="Mine.Blah op_Subtraction(Mine.Blah, Mine.Blah)">
+        <size>31</size>
+      </method>
+      <method name="Int32 op_Multiply(Mine.Blah, Mine.Blah)">
+        <size>24</size>
+      </method>
+      <method name="Int32 op_Division(Mine.Blah, Mine.Blah)">
+        <size>24</size>
+      </method>
+      <method name="Int32 op_Modulus(Mine.Blah, Mine.Blah)">
+        <size>24</size>
+      </method>
+      <method name="Mine.Blah op_OnesComplement(Mine.Blah)">
+        <size>23</size>
+      </method>
+      <method name="Boolean op_LogicalNot(Mine.Blah)">
+        <size>20</size>
+      </method>
+      <method name="Mine.Blah op_Increment(Mine.Blah)">
+        <size>26</size>
+      </method>
+      <method name="Mine.Blah op_Decrement(Mine.Blah)">
+        <size>26</size>
+      </method>
+      <method name="Boolean op_True(Mine.Blah)">
+        <size>20</size>
+      </method>
+      <method name="Boolean op_False(Mine.Blah)">
+        <size>23</size>
+      </method>
+      <method name="Int32 op_Implicit(Mine.Blah)">
+        <size>17</size>
+      </method>
+      <method name="Double op_Explicit(Mine.Blah)">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-70.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_A()">
+        <size>2</size>
+      </method>
+      <method name="Int32 B()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_A()">
+        <size>9</size>
+      </method>
+      <method name="Int32 B()">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>70</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-700.cs">
+    <type name="FooAttribute">
+      <method name="Void .ctor(String)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-701.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt16 ToUint16()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-703.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Finished(System.EventHandler)">
+        <size>0</size>
+      </method>
+      <method name="Void remove_Finished(System.EventHandler)">
+        <size>0</size>
+      </method>
+      <method name="Void test(A)">
+        <size>19</size>
+      </method>
+      <method name="Void TestA(System.Object, System.EventArgs)">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>65</size>
+      </method>
+      <method name="Void add_Finished(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Finished(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void TestB(System.Object, System.EventArgs)">
+        <size>25</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-705.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Nested GetEnumerator()">
+        <size>10</size>
+      </method>
+    </type>
+    <type name="Test+Nested">
+      <method name="Void System.IDisposable.Dispose()">
+        <size>13</size>
+      </method>
+      <method name="Int32 get_Current()">
+        <size>2</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>2</size>
+      </method>
+      <method name="Void Reset()">
+        <size>1</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>72</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-706.cs">
+    <type name="Test.CustomParentAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DoSomething()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test.MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test.MyClass+CustomChildAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void DoSomething()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-707.cs">
+    <type name="Tzap">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tzap+Baz">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Gazonk()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Tzap+Bar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-708.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="A+ADelegate Delegate2(Boolean)">
+        <size>25</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="A+ADelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="A+ADelegate Invoke(Boolean)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Boolean, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="A+ADelegate EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-709.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void CopyTo(Int32, System.Char[], Int32, Int32)">
+        <size>68</size>
+      </method>
+      <method name="Void CharCopy(Char*, Char*, Int32)">
+        <size>33</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>58</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-71.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>37</size>
+      </method>
+    </type>
+    <type name="MethodSignature">
+      <method name="Void .ctor(String, Type, Type[])">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-710.cs">
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-711.cs">
+    <type name="N.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-712.cs">
+    <type name="Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-713.cs">
+    <type name="DispBar">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IDisposable GetBar()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Boolean TryThing()">
+        <size>46</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-714.cs">
+    <type name="Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void IBar.Test()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-716.cs">
+    <type name="SS">
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="SSS">
+      <method name="Void .cctor()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="CCC">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>192</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-717.cs">
+    <type name="AA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(Byte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Foo(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void Foo(System.String)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="System.String ToString()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>67</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-718.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Int32, Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void Foo(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-719.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-72.cs">
+    <type name="outer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="outer+inner">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void meth(System.Object)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-720.cs">
+    <type name="N.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="N.Parent">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Example(N.Parent+ExampleHandler)">
+        <size>0</size>
+      </method>
+      <method name="Void remove_Example(N.Parent+ExampleHandler)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="N.Child">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Example(N.Parent+ExampleHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Example(N.Parent+ExampleHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void OnExample()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="N.Parent+ExampleHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-721.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="Control">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Foo(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-723.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Count()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Maine">
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-724.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 DoTest(System.String, System.String, System.String, Int32)">
+        <size>29</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>110</size>
+      </method>
+    </type>
+    <type name="Concrete">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String A.get_Spec()">
+        <size>6</size>
+      </method>
+      <method name="System.String B.get_Spec()">
+        <size>6</size>
+      </method>
+      <method name="System.String get_Spec()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-726.cs">
+    <type name="CS0102">
+      <method name="System.Object IFoo.Clone()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CS0102+Clone">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-727.cs">
+    <type name="IDisposableTest.MainClass">
+      <method name="Int32 Main()">
+        <size>113</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="IDisposableTest.Foo">
+      <method name="Void Dispose()">
+        <size>32</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>57</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-728.cs">
+    <type name="Tests">
+      <method name="Int32 Main()">
+        <size>25</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-729.cs">
+    <type name="Primes.MainClass">
+      <method name="Int32 Main()">
+        <size>141</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-73.cs">
+    <type name="Abstract">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 A()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Concrete">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 A()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-730.cs">
+    <type name="Demo">
+      <method name="Void Test(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 GetPhones()">
+        <size>22</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Demo+D">
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-731.cs">
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-733.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>88</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-734.cs">
+    <type name="M">
+      <method name="Void Run()">
+        <size>23</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>72</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-735.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+C+X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-736.cs">
+    <type name="TestGeneric`1[T]">
+      <method name="Void add_Event(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Event(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void Raise()">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGeneric2`1[T]">
+      <method name="Void add_Event(TestGeneric2`1+GenericHandler[T])">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Event(TestGeneric2`1+GenericHandler[T])">
+        <size>24</size>
+      </method>
+      <method name="Void Raise()">
+        <size>21</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void add_Event(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Event(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void Raise()">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestGeneric2`1+GenericHandler[T]">
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-737.cs">
+    <type name="Breaks">
+      <method name="Double get_Item(Int32, Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32, Double)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(Double)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Int32 Main()">
+        <size>80</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-738.cs">
+    <type name="TestNamespace.ResumableInputStream">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-739.cs">
+    <type name="X">
+      <method name="Void Finalize()">
+        <size>19</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>89</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-74.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>168</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-740.cs">
+    <type name="FixedTest">
+      <method name="Int32 Main()">
+        <size>336</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FixedTest+TValue">
+      <method name="System.String ToString()">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor(Int64)">
+        <size>28</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-741.cs">
+    <type name="Test">
+      <method name="Void test()">
+        <size>18</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-742.cs">
+    <type name="Test">
+      <method name="Test Set(C)">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Driver">
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-743.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void Test()">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-744.cs">
+    <type name="M">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M+Nested">
+      <method name="Void Extra()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void AMethod()">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void BMethod()">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void AMethod()">
+        <size>1</size>
+      </method>
+      <method name="Void BMethod()">
+        <size>1</size>
+      </method>
+      <method name="Void Extra()">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-745.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-746.cs">
+    <type name="Test">
+      <method name="Void Foo(IListCounter)">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-747.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B+BNested">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="AA+ANested">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-748.cs">
+    <type name="M">
+      <method name="RealTest.Foo Test()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test.Local.M">
+      <method name="RealTest.Foo Test()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="RealTest.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-749.cs">
+    <type name="M">
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-75.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="X op_Addition(X, X)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="driver">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-750.cs">
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-751.cs">
+    <type name="LocalNS.Compiler">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="System.Local.M">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-752.cs">
+    <type name="M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-753.cs">
+    <type name="AI2">
+      <method name="System.String IA.get_val()">
+        <size>6</size>
+      </method>
+      <method name="Void IA.set_val(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_val()">
+        <size>3</size>
+      </method>
+      <method name="Void set_val(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void stuff(IAI2)">
+        <size>13</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-754.cs">
+    <type name="Bug.D">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Bug.A">
+      <method name="Void add_E(Bug.D)">
+        <size>0</size>
+      </method>
+      <method name="Void remove_E(Bug.D)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bug.B">
+      <method name="Void add_E(Bug.D)">
+        <size>1</size>
+      </method>
+      <method name="Void remove_E(Bug.D)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bug.M">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-755.cs">
+    <type name="Item">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Item+Builder">
+      <method name="Int32 get_Foo()">
+        <size>6</size>
+      </method>
+      <method name="System.Object get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="System.Object get_Item(Int32, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-756.cs">
+    <type name="UnsafeTest">
+      <method name="Void Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-757.cs">
+    <type name="TestClass1">
+      <method name="Void Test()">
+        <size>34</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-758.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void Finalize()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-76.cs">
+    <type name="foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String strcat(System.String[])">
+        <size>47</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>142</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-760.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-761.cs">
+    <type name="C">
+      <method name="Int32 get_I()">
+        <size>7</size>
+      </method>
+      <method name="Void set_I(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-762.cs">
+    <type name="N1.Derived.Dummy">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N2.Derived.Dummy">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="DerivedAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-763.cs">
+    <type name="StaticDelegateWithSameNameAsInstance">
+      <method name="Void set_MyProvider(StaticDelegateWithSameNameAsInstance+Provider)">
+        <size>35</size>
+      </method>
+      <method name="Void StaticCallback()">
+        <size>31</size>
+      </method>
+      <method name="Void StaticCallback(System.String)">
+        <size>35</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="StaticDelegateWithSameNameAsInstance+Provider">
+      <method name="Void Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-764.cs">
+    <type name="Item">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="Caller">
+      <method name="System.String get_Item(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void Foo()">
+        <size>12</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-765.cs">
+    <type name="B">
+      <method name="Void Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void Foo(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-766.cs">
+    <type name="A.Color">
+      <method name="Color get_Base()">
+        <size>6</size>
+      </method>
+      <method name="Color get_NewBase()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B.Color">
+      <method name="Color From(Int32)">
+        <size>10</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-767.cs">
+    <type name="Test">
+      <method name="Int32 Foo()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Test get_Test()">
+        <size>6</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-768.cs">
+    <type name="A.N.Wrong">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="N.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X.TestClass">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-769.cs">
+    <type name="C">
+      <method name="Void I.Clear()">
+        <size>1</size>
+      </method>
+      <method name="Void Clear()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>114</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-77.cs">
+    <type name="XX">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>220</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-770.cs">
+    <type name="MyClass">
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass+A">
+      <method name="Void add_MouseClick(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MouseClick(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass+B">
+      <method name="Void add_MouseClick(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MouseClick(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass+C">
+      <method name="Void MouseClick()">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-771.cs">
+    <type name="InternalAccess.Base">
+      <method name="System.String get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="InternalAccess.DerivedInternalExample">
+      <method name="System.String get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="InternalAccess.DerivedProtectedExample">
+      <method name="System.String get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="InternalAccess.MainClass">
+      <method name="Int32 Main()">
+        <size>60</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-772.cs">
+    <type name="Test">
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object)">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor(String, Object[])">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-773.cs">
+    <type name="Foo">
+      <method name="Int32 get_Item(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Int32 IFoo.get_Bar(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Int32 get_Baz(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Babar">
+      <method name="Int32 get_Baz(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-774.cs">
+    <type name="C">
+      <method name="Int32 I.get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void I.set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-775.cs">
+    <type name="C">
+      <method name="Void A.add_Member(System.EventHandler)">
+        <size>34</size>
+      </method>
+      <method name="Void A.remove_Member(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void add_Member(System.EventHandler)">
+        <size>34</size>
+      </method>
+      <method name="Void remove_Member(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>11</size>
+      </method>
+      <method name="Int32 TestMe()">
+        <size>155</size>
+      </method>
+      <method name="Void f(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-776.cs">
+    <type name="First">
+      <method name="System.Object get_Item(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Void set_Item(System.String, System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Second">
+      <method name="System.Object get_Item(System.String)">
+        <size>6</size>
+      </method>
+      <method name="Void set_Item(System.String, System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Third">
+      <method name="System.Object get_Item(System.String)">
+        <size>8</size>
+      </method>
+      <method name="Void set_Item(System.String, System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="a">
+      <method name="Int32 Main(System.String[])">
+        <size>31</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-777.cs">
+    <type name="MediaStore">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MediaStore+Thing">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-778.cs">
+    <type name="A">
+      <method name="Int32 Test()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Int32 Test()">
+        <size>12</size>
+      </method>
+      <method name="Void Test(System.Object[])">
+        <size>1</size>
+      </method>
+      <method name="Void Test(System.Object[], System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void Test(System.Object[], System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Int32 Test()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Int32 Main()">
+        <size>22</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-779.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Boolean test1(Int64, Int64)">
+        <size>14</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-78.cs">
+    <type name="N1.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean ShortCasting()">
+        <size>19</size>
+      </method>
+      <method name="Boolean IntCasting()">
+        <size>18</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-780.cs">
+    <type name="MonoVirtuals.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoVirtuals.Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoVirtuals.A">
+      <method name="Int32 f(MonoVirtuals.X)">
+        <size>12</size>
+      </method>
+      <method name="Int32 f(MonoVirtuals.Y)">
+        <size>13</size>
+      </method>
+      <method name="Int32 get_Item(MonoVirtuals.X)">
+        <size>12</size>
+      </method>
+      <method name="Int32 get_Item(MonoVirtuals.Y)">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoVirtuals.B">
+      <method name="Int32 f(MonoVirtuals.X)">
+        <size>19</size>
+      </method>
+      <method name="Int32 get_Item(MonoVirtuals.X)">
+        <size>19</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoVirtuals.C">
+      <method name="Int32 f(MonoVirtuals.X)">
+        <size>18</size>
+      </method>
+      <method name="Int32 f(MonoVirtuals.Y)">
+        <size>18</size>
+      </method>
+      <method name="Int32 get_Item(MonoVirtuals.X)">
+        <size>18</size>
+      </method>
+      <method name="Int32 get_Item(MonoVirtuals.Y)">
+        <size>18</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MonoVirtuals.MainClass">
+      <method name="Int32 Main()">
+        <size>46</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-781.cs">
+    <type name="D">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void add_temp(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_temp(D)">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="E get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Void Test()">
+        <size>41</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+      <method name="Void &lt;Test&gt;m__0()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-782.cs">
+    <type name="Test">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-783.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>25</size>
+      </method>
+      <method name="Void M(E)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-784.cs">
+    <type name="A">
+      <method name="Int32 get_Item(Int32)">
+        <size>6</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Int32 get_Item(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 get_Item(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>9</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>53</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-785.cs">
+    <type name="Base">
+      <method name="Int32 get_Prop()">
+        <size>0</size>
+      </method>
+      <method name="Void set_Prop(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Void TestVoid()">
+        <size>0</size>
+      </method>
+      <method name="Void TestInt(Int32)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="DeriveVTable">
+      <method name="Int32 get_Prop()">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void TestVoid()">
+        <size>1</size>
+      </method>
+      <method name="Void TestInt(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NewVTable">
+      <method name="Int32 get_Prop()">
+        <size>0</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>2</size>
+      </method>
+      <method name="Void TestVoid()">
+        <size>1</size>
+      </method>
+      <method name="Void TestInt(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Overload()">
+        <size>1</size>
+      </method>
+      <method name="Void Overload(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-786.cs">
+    <type name="A">
+      <method name="System.String op_Implicit(A)">
+        <size>18</size>
+      </method>
+      <method name="System.Delegate op_Implicit(A)">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="System.String op_Implicit(B)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="System.Delegate op_Implicit(D)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Boolean op_Implicit(E)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>372</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-787.cs">
+    <type name="A">
+      <method name="Void set_Prop(System.String)">
+        <size>1</size>
+      </method>
+      <method name="System.String get_Prop()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Field()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void set_Prop(System.String)">
+        <size>1</size>
+      </method>
+      <method name="System.String get_Prop()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-788.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>31</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="System.String get_Message()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-789.cs">
+    <type name="Program">
+      <method name="Void Main()">
+        <size>50</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-79.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-790.cs">
+    <type name="S">
+      <method name="Void .ctor(Double)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Verify_1(Test ByRef, Test ByRef)">
+        <size>20</size>
+      </method>
+      <method name="Void Verify_2(S ByRef, S ByRef)">
+        <size>28</size>
+      </method>
+      <method name="Void Verify_3(E ByRef, E ByRef)">
+        <size>9</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-791.cs">
+    <type name="testApp.TestApp">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+      <method name="Boolean GetEnumerator()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-792.cs">
+    <type name="Program">
+      <method name="Void Test()">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-793.cs">
+    <type name="MonoPointerBugTest.Program">
+      <method name="Int32 Main()">
+        <size>43</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-794.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void TestCallOnly()">
+        <size>65</size>
+      </method>
+      <method name="Void SomeMethod()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-795.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>112</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-796.cs">
+    <type name="Program">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FooAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-797.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-798.cs">
+    <type name="A">
+      <method name="Void Foo(Int32 ByRef)">
+        <size>5</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void Foo(Int32 ByRef)">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-8.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>115</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-80.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Add(Int32, Int32)">
+        <size>4</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+      <method name="Int32 A.Add(Int32, Int32)">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-81.cs">
+    <type name="N1.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Bar()">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>71</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-82.cs">
+    <type name="N1.N2.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method(A ByRef)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="N1.N3.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method(A ByRef)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-83.cs">
+    <type name="PersonArrivedArgs">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Greeter">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Void HandlePersonArrived(System.Object, PersonArrivedArgs)">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Room">
+      <method name="Void .ctor()">
+        <size>14</size>
+      </method>
+      <method name="Void add_PersonArrived(PersonArrivedHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_PersonArrived(PersonArrivedHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void AddPerson(System.String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="DelegateTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="PersonArrivedHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object, PersonArrivedArgs)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, PersonArrivedArgs, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-84.cs">
+    <type name="Ghost">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-85.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-86.cs">
+    <type name="T.T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 method1(System.Type, Int32)">
+        <size>23</size>
+      </method>
+      <method name="Int32 method1(System.Type, System.Type[])">
+        <size>12</size>
+      </method>
+      <method name="Int32 method2(System.Type, Int32)">
+        <size>23</size>
+      </method>
+      <method name="Int32 method2(System.Type, System.Type[])">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>36</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-87.cs">
+    <type name="Top">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>58</size>
+      </method>
+    </type>
+    <type name="Top+X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Top+Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Top+XA">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_one()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Top+XB">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_one()">
+        <size>2</size>
+      </method>
+      <method name="Int32 get_two()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Other">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void X()">
+        <size>5</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-88.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void f(System.String)">
+        <size>19</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>63</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-89.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="X F(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>99</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-9.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>104</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-90.cs">
+    <type name="N1.Blah">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-91.cs">
+    <type name="Abstract">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Plain">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void MyProtectedInternal()">
+        <size>1</size>
+      </method>
+      <method name="Void MyInternal()">
+        <size>1</size>
+      </method>
+      <method name="Void MyPublic()">
+        <size>1</size>
+      </method>
+      <method name="Void MyPrivate()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>242</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-92.cs">
+    <type name="Outer">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Outer+Inner">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="InnerBase">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-93.cs">
+    <type name="N1.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void method(B ByRef)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-94.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 IVehicle.Start()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Stop()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Turn()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Derived1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Turn()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Derived2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 IVehicle.Start()">
+        <size>2</size>
+      </method>
+      <method name="Int32 IVehicle.Turn()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Stop()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Turn()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>88</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-95.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-96.cs">
+    <type name="N1.A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="N1.C">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object, N1.A)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, N1.A, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-97.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-98.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void b()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-99.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>104</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-01.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-02.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>151</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>113</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-03.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>59</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-04.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>59</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-05.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>207</size>
+      </method>
+      <method name="Boolean t(Int32, Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>76</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-06.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>112</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-07.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>120</size>
+      </method>
+      <method name="Boolean t(Int32, Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>18</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-08.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-09.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+    </type>
+    <type name="X+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>49</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-10.cs">
+    <type name="S">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>105</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="S+T">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="S+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="S+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__0()">
+        <size>76</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-11.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>122</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="E">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32 ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32 ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(Int32 ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="F">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Int32[])">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Int32[], System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;Main&gt;m__0(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__1(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__2(System.Int32[])">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__3(System.Int32[])">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-12.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>259</size>
+      </method>
+      <method name="System.Collections.ArrayList Find(predicate, System.Collections.ArrayList)">
+        <size>83</size>
+      </method>
+    </type>
+    <type name="predicate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Boolean &lt;Main&gt;m__0(System.Object)">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-13.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>42</size>
+      </method>
+      <method name="D T()">
+        <size>15</size>
+      </method>
+      <method name="System.String CALL()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;T&gt;m__0()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-14.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Click(X+T)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_Click(X+T)">
+        <size>22</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="X+T">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-15.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>43</size>
+      </method>
+    </type>
+    <type name="Foo+Inner">
+      <method name="Void .ctor(String)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo+foo_fn">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Foo+Inner Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Foo+Inner EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Foo+Inner &lt;Main&gt;m__0(System.String)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-16.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>42</size>
+      </method>
+      <method name="D T()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;T&gt;m__0()">
+        <size>27</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-17.cs">
+    <type name="Button">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Clicked(ClickEvent)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Clicked(ClickEvent)">
+        <size>24</size>
+      </method>
+      <method name="Void DoClick()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>61</size>
+      </method>
+    </type>
+    <type name="ClickEvent">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-18.cs">
+    <type name="DelegateTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>83</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="DelegateTest+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>17</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-19.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>223</size>
+      </method>
+      <method name="Boolean t(Int32, Int32)">
+        <size>5</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>93</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-20.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>33</size>
+      </method>
+      <method name="D MainHost()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;MainHost&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>52</size>
+      </method>
+    </type>
+    <type name="X+&lt;MainHost&gt;c__AnonStorey0+&lt;MainHost&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-21.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+      <method name="Void M()">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;M&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>48</size>
+      </method>
+    </type>
+    <type name="X+&lt;M&gt;c__AnonStorey0+&lt;M&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>81</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-22.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>33</size>
+      </method>
+      <method name="D T()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;T&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>52</size>
+      </method>
+    </type>
+    <type name="X+&lt;T&gt;c__AnonStorey0+&lt;T&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-23.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+      <method name="Void M()">
+        <size>34</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;M&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="X+&lt;M&gt;c__AnonStorey0+&lt;M&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-24.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>29</size>
+      </method>
+      <method name="D T(Int32)">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;T&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-25.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>48</size>
+      </method>
+      <method name="D T(Int32)">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;T&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0(Int32)">
+        <size>9</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-27.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>138</size>
+      </method>
+      <method name="Void M(Int32)">
+        <size>59</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;M&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="X+&lt;M&gt;c__AnonStorey0+&lt;M&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>50</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-28.cs">
+    <type name="Delegable">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_MyDelegate(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_MyDelegate(System.EventHandler)">
+        <size>24</size>
+      </method>
+    </type>
+    <type name="DelegateTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>58</size>
+      </method>
+    </type>
+    <type name="DelegateTest+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-29.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>108</size>
+      </method>
+      <method name="System.String Hello()">
+        <size>20</size>
+      </method>
+      <method name="Void Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="X+Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+Bar">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;Hello&gt;m__1(System.String)">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;Hello&gt;m__0()">
+        <size>201</size>
+      </method>
+      <method name="Void &lt;Hello&gt;m__2(System.String)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-30.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Void add_E(Program+D)">
+        <size>22</size>
+      </method>
+      <method name="Void remove_E(Program+D)">
+        <size>22</size>
+      </method>
+      <method name="Void Main()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Program+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(X)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(X, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(X)">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-31.cs">
+    <type name="test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable testen(Int32)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="reflect">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>122</size>
+      </method>
+    </type>
+    <type name="test+&lt;testen&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>195</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-32.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>37</size>
+      </method>
+      <method name="Void SimpleCallback(MainClass, System.String)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="StringSender">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="VoidDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>25</size>
+      </method>
+      <method name="Void &lt;&gt;m__1(System.String)">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-33.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void doit(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>162</size>
+      </method>
+    </type>
+    <type name="Do">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="T+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="T+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-34.cs">
+    <type name="Delegates.Space">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Leak(Boolean, Int32)">
+        <size>92</size>
+      </method>
+    </type>
+    <type name="Delegates.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void SpaceLeak()">
+        <size>37</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Delegates.Space+DoCopy">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Delegates.Space+&lt;Leak&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="Delegates.Space+&lt;Leak&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-35.cs">
+    <type name="CustomDict">
+      <method name="Void .ctor()">
+        <size>68</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Tests">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CustomDict+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>86</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-36.cs">
+    <type name="Test">
+      <method name="Void .ctor(TestMethod)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(TestMethod2)">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="TestMethod">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestMethod2">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-37.cs">
+    <type name="DelegateInit">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>35</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="DelegateInit+FooDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="DelegateInit">
+      <method name="Void &lt;_print&gt;m__0()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-38.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64, Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>67</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>64</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>34</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-39.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>65</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>30</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-40.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>65</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>30</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-41.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>65</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>35</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-42.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>51</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Simple &lt;Test&gt;m__0()">
+        <size>37</size>
+      </method>
+      <method name="Void &lt;Test&gt;m__1()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-43.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64, Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>54</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>64</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>34</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-44.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>68</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Simple">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Simple Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Simple EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Simple &lt;&gt;m__1()">
+        <size>33</size>
+      </method>
+      <method name="Simple &lt;&gt;m__0()">
+        <size>51</size>
+      </method>
+      <method name="Void &lt;&gt;m__3()">
+        <size>21</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-45.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>66</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>77</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-46.cs">
+    <type name="World">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>50</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-47.cs">
+    <type name="World">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>158</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-48.cs">
+    <type name="World">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello(Int64)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(Int32)">
+        <size>197</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="World+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>63</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-49.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>66</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>187</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>64</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-50.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable Foo(Int32)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>196</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Foo&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>118</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-51.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>35</size>
+      </method>
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="FooDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void &lt;Print&gt;m__0()">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-52.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator GetIt(System.Int32[])">
+        <size>22</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="X+A">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>201</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>22</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-53.cs">
+    <type name="Test">
+      <method name="Void .ctor(Int32)">
+        <size>39</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>33</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-54.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>22</size>
+      </method>
+    </type>
+    <type name="Hello">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>25</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void Test(Foo)">
+        <size>45</size>
+      </method>
+      <method name="Void Hello(Int32)">
+        <size>19</size>
+      </method>
+      <method name="System.String ToString()">
+        <size>22</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-55.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(Foo+Hello)">
+        <size>7</size>
+      </method>
+      <method name="Void Private()">
+        <size>11</size>
+      </method>
+      <method name="Void Test()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="Foo+Hello">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void &lt;Test&gt;m__0()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-56.cs">
+    <type name="Observable">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>50</size>
+      </method>
+    </type>
+    <type name="QueueHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Observable)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Observable, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Observable">
+      <method name="Void &lt;Main&gt;m__0(Observable)">
+        <size>11</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-57.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>257</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="X+TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>89</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-58.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>344</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="X+TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>162</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-59.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>515</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="X+TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>224</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-60.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test(Int32)">
+        <size>567</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>46</size>
+      </method>
+    </type>
+    <type name="X+TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void &lt;&gt;m__0()">
+        <size>347</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>124</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-61.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>333</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>59</size>
+      </method>
+    </type>
+    <type name="X+TestDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>157</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-62.cs">
+    <type name="X">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor(Z)">
+        <size>56</size>
+      </method>
+    </type>
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Hello()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="FooHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Y+&lt;Y&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-63.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator GetIt(System.Int32[])">
+        <size>22</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="X+A">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>195</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>44</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-64.cs">
+    <type name="Source">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_ChildSourceAdded(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_ChildSourceAdded(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void add_ChildSourceRemoved(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_ChildSourceRemoved(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Source FindSource(Source)">
+        <size>2</size>
+      </method>
+      <method name="Void AddSource(Source, Int32, System.Object)">
+        <size>132</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Source+&lt;AddSource&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="Source">
+      <method name="Void &lt;AddSource&gt;m__1(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-65.cs">
+    <type name="BaseClass">
+      <method name="Void .ctor(SomeDelegate)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="TestClass">
+      <method name="Void .ctor(Int32)">
+        <size>32</size>
+      </method>
+      <method name="Int32 Main(System.String[])">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="BaseClass+SomeDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="TestClass+&lt;TestClass&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-66.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_testEvent(Test+TestEventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_testEvent(Test+TestEventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void add_TestEvent(Test+TestEventHandler)">
+        <size>33</size>
+      </method>
+      <method name="Void remove_TestEvent(Test+TestEventHandler)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+TestEventHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-67.cs">
+    <type name="ClassOne">
+      <method name="Void .ctor(ReturnStringDelegate)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(String)">
+        <size>32</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ClassOne+ReturnStringDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="ClassOne+&lt;ClassOne&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String &lt;&gt;m__0()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-68.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void T(D1)">
+        <size>1</size>
+      </method>
+      <method name="Void T(D2)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>69</size>
+      </method>
+    </type>
+    <type name="D1">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="D2">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(System.String ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void &lt;Main&gt;m__0(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__1(System.String ByRef)">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-69.cs">
+    <type name="SingleSteppingEngine">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object SendCommand(TargetAccessDelegate)">
+        <size>8</size>
+      </method>
+      <method name="Void Detach()">
+        <size>20</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="TargetAccessDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Object Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="SingleSteppingEngine">
+      <method name="System.Object &lt;Detach&gt;m__0(System.Object)">
+        <size>19</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-70.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(C+D)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>98</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="UnsafeClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void UnsafeTests()">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="C+&lt;UnsafeTests&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C+&lt;Main&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>38</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>32</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void &lt;Main&gt;m__3()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="UnsafeClass">
+      <method name="Int32* GetUnsafeValue()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-71.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Errno ProcessFile(System.String, Program+FdCb)">
+        <size>2</size>
+      </method>
+      <method name="Errno OnReadHandle(System.String, System.Byte[], Int64)">
+        <size>34</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Program+FdCb">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Program+&lt;OnReadHandle&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__0(Int32)">
+        <size>46</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-72.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddOperator(Test+UnaryOperator)">
+        <size>1</size>
+      </method>
+      <method name="Boolean TryGetValue(System.Object, System.Object ByRef)">
+        <size>5</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="Test+UnaryOperator">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Invoke(System.Object, System.Object ByRef)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.Object ByRef, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(System.Object ByRef, IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Boolean &lt;Foo&gt;m__0(System.Object, System.Object ByRef)">
+        <size>31</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-73.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>31</size>
+      </method>
+      <method name="Void Test_1()">
+        <size>36</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.Object)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.Object, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="T">
+      <method name="Void &lt;Main&gt;m__0(System.Object)">
+        <size>15</size>
+      </method>
+      <method name="Void &lt;Test_1&gt;m__1(System.Object)">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-74.cs">
+    <type name="Foo">
+      <method name="Void Baz(Foo+SimpleDelegate)">
+        <size>8</size>
+      </method>
+      <method name="Void Main(System.String[])">
+        <size>35</size>
+      </method>
+    </type>
+    <type name="Foo+SimpleDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.String[,] Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.String[,] EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="System.String[,] &lt;Main&gt;m__0()">
+        <size>34</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-75.cs">
+    <type name="Data">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Int32, D)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void TestMe()">
+        <size>154</size>
+      </method>
+      <method name="Boolean &lt;TestMe&gt;m__0()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Boolean Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Boolean EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TestMe&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean &lt;&gt;m__2()">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TestMe&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;TestMe&gt;c__AnonStorey0">
+      <method name="Boolean &lt;&gt;m__1()">
+        <size>54</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-76.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(System.String, FactoryDelegate)">
+        <size>8</size>
+      </method>
+      <method name="FactoryDelegate get_Item(System.String)">
+        <size>7</size>
+      </method>
+      <method name="Void X()">
+        <size>24</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>70</size>
+      </method>
+    </type>
+    <type name="FactoryDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="System.Object Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="System.Object EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="System.Object &lt;X&gt;m__0()">
+        <size>30</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-77.cs">
+    <type name="y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean get_Item(Int32)">
+        <size>28</size>
+      </method>
+      <method name="Void set_Item(Int32, Boolean)">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="y+&lt;&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-78.cs">
+    <type name="DelegateTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+      <method name="Void Foo(D1)">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(D2)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>50</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="D1">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="D2">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-79.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_E(Test+D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_E(Test+D)">
+        <size>24</size>
+      </method>
+      <method name="Void add_Changed(Test+D)">
+        <size>30</size>
+      </method>
+      <method name="Void remove_Changed(Test+D)">
+        <size>1</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void &lt;add_Changed&gt;m__0()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-80.cs">
+    <type name="MonoBug.MyTest">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>167</size>
+      </method>
+    </type>
+    <type name="MonoBug.MyTest+EventHandlers">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="System.EventHandler get_DoNothingEventHandler()">
+        <size>30</size>
+      </method>
+      <method name="System.EventHandler get_DoSomethingEventHandler()">
+        <size>13</size>
+      </method>
+      <method name="System.EventHandler get_Handler()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Handler(System.EventHandler)">
+        <size>8</size>
+      </method>
+      <method name="Void &lt;get_DoNothingEventHandler&gt;m__0(System.Object, System.EventArgs)">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;get_DoSomethingEventHandler&gt;m__1(System.Object, System.EventArgs)">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-81.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Int32 Test()">
+        <size>27</size>
+      </method>
+      <method name="Int32 Foo2(C+Cmd2)">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(C+Cmd)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+Cmd">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+Cmd2">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 &lt;Test&gt;m__0()">
+        <size>45</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>44</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey1+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-82.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>87</size>
+      </method>
+      <method name="Void Test2(Int32)">
+        <size>31</size>
+      </method>
+      <method name="Void Test3(Int32)">
+        <size>57</size>
+      </method>
+      <method name="Void Test4()">
+        <size>31</size>
+      </method>
+      <method name="Void Test5(Int32)">
+        <size>27</size>
+      </method>
+      <method name="Void SimpleCallback(MainClass, System.String)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="StringSender">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke(System.String)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.String, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="VoidDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test2&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test3&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test4&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test5&gt;c__AnonStorey4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void &lt;Test2&gt;m__1(System.String)">
+        <size>27</size>
+      </method>
+      <method name="Void &lt;Test3&gt;m__3()">
+        <size>1</size>
+      </method>
+      <method name="Void &lt;Test4&gt;m__4()">
+        <size>31</size>
+      </method>
+      <method name="Void &lt;Test4&gt;m__7()">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>25</size>
+      </method>
+      <method name="Void &lt;&gt;m__9(System.String)">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test3&gt;c__AnonStorey2">
+      <method name="Void &lt;&gt;m__2()">
+        <size>9</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test5&gt;c__AnonStorey4">
+      <method name="Int32 &lt;&gt;m__5(Int32)">
+        <size>46</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__A(Int32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test2&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__6()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test4&gt;c__AnonStorey3">
+      <method name="Void &lt;&gt;m__8()">
+        <size>14</size>
+      </method>
+      <method name="Void &lt;&gt;m__B()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-84.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>42</size>
+      </method>
+      <method name="Void .ctor(D)">
+        <size>42</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="C Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="C EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="C &lt;field&gt;m__0(Int32)">
+        <size>4</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-85.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="X+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="X+&lt;Main&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-86.cs">
+    <type name="Bug.A">
+      <method name="Void .ctor()">
+        <size>50</size>
+      </method>
+      <method name="Void Test()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Bug.B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 get_Prop()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Bug.EventHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Bug.A+&lt;A&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-87.cs">
+    <type name="Bug.AA">
+      <method name="Void .ctor(BB)">
+        <size>51</size>
+      </method>
+      <method name="Void TestMe()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>18</size>
+      </method>
+    </type>
+    <type name="Bug.BB">
+      <method name="Void .ctor(String)">
+        <size>18</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Bug.D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Bug.AA+&lt;AA&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-88.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void Test()">
+        <size>102</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>69</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>8</size>
+      </method>
+      <method name="Void &lt;&gt;m__4()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__3()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-89.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="System.Object get_GdkWindow()">
+        <size>2</size>
+      </method>
+      <method name="Void set_GdkWindow(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Invoke(C+D)">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>69</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>108</size>
+      </method>
+      <method name="Void &lt;&gt;m__3()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>49</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-90.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void Foo()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Foo&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="C+&lt;Foo&gt;c__AnonStorey0+&lt;Foo&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Foo&gt;c__AnonStorey0+&lt;Foo&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-91.cs">
+    <type name="A">
+      <method name="Void .ctor(Int32)">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void SelectCommand(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>109</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>23</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-92.cs">
+    <type name="MainClass">
+      <method name="Void Test(IEnumerable)">
+        <size>33</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>21</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MainClass+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>72</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-93.cs">
+    <type name="BaseTest.MainClass">
+      <method name="Void add_MyEvent(System.EventHandler)">
+        <size>55</size>
+      </method>
+      <method name="Void remove_MyEvent(System.EventHandler)">
+        <size>55</size>
+      </method>
+      <method name="Void RaiseMyEvent(System.Object, System.EventArgs)">
+        <size>14</size>
+      </method>
+      <method name="Void Main()">
+        <size>50</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__2(System.Object, System.EventArgs)">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseTest.MainClass+&lt;&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="BaseTest.MainClass+&lt;&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__1(System.Object, System.EventArgs)">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-94.cs">
+    <type name="Program">
+      <method name="Int32 Main()">
+        <size>57</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+BaseClass">
+      <method name="Void Print()">
+        <size>19</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+Derived">
+      <method name="Void Print()">
+        <size>20</size>
+      </method>
+      <method name="Void &lt;Print&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;Print&gt;__BaseCallProxy0()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program+DerivedLibrary">
+      <method name="Void Print(Int32)">
+        <size>20</size>
+      </method>
+      <method name="Void &lt;Print&gt;__BaseCallProxy0(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void &lt;Print&gt;m__1()">
+        <size>9</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-95.cs">
+    <type name="D">
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void add_Event(D)">
+        <size>0</size>
+      </method>
+      <method name="Void remove_Event(D)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void add_Event(D)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Event(D)">
+        <size>24</size>
+      </method>
+      <method name="Int32 Run()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Test(Int32)">
+        <size>46</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+      <method name="Void &lt;add_Event&gt;__BaseCallProxy0(D)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void &lt;&gt;m__0()">
+        <size>24</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-96.cs">
+    <type name="P">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Extra()">
+        <size>3</size>
+      </method>
+      <method name="Program+D Get(Int32)">
+        <size>115</size>
+      </method>
+      <method name="Int32 Run(Int32)">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>77</size>
+      </method>
+    </type>
+    <type name="Program+D">
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Get&gt;c__AnonStorey0">
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>19</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1()">
+        <size>19</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__2()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-00.cs">
+    <type name="CLSCLass_6">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Void add_Disposed(Delegate)">
+        <size>19</size>
+      </method>
+      <method name="Void remove_Disposed(Delegate)">
+        <size>19</size>
+      </method>
+    </type>
+    <type name="CLSDelegate">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSClass_5">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 Test()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="CLSClass_4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 Test()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="CLSClass_3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 Test_3()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="CLSClass_2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SByte get_XX()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="CLSClass_1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt32 Valid()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt64 Valid()">
+        <size>3</size>
+      </method>
+      <method name="Byte get_XX()">
+        <size>2</size>
+      </method>
+      <method name="UInt32 FooInternal()">
+        <size>2</size>
+      </method>
+      <method name="UInt64 Foo()">
+        <size>3</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CLSClass+C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int64 Foo2()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="CLSClass+C1+C11">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="UInt64 Foo3()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="CLSClass+CLSClass_2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="SByte get_XX()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Delegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="CLSDelegate Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="CLSDelegate EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-01.cs">
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Byte get_XX()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Big">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Big op_Implicit(UInt32)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void method(UInt32)">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-02.cs">
+    <type name="CLSClass">
+      <method name="Void .ctor(UInt64)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(UInt32)">
+        <size>7</size>
+      </method>
+      <method name="Void set_X_0(UInt64)">
+        <size>1</size>
+      </method>
+      <method name="Void set_Item(UInt64, UInt64)">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="InnerTypeClasss">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Struct Method()">
+        <size>10</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-03.cs">
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="I1 Foo()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-05.cs">
+    <type name="X1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void bb(Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Void BB()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void method(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void method(Boolean)">
+        <size>1</size>
+      </method>
+      <method name="Boolean method()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="BaseClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Method(Boolean)">
+        <size>2</size>
+      </method>
+      <method name="Void methoD()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="CLSClass op_Implicit(Boolean)">
+        <size>7</size>
+      </method>
+      <method name="CLSClass op_Implicit(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="oBject">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A.C1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B.c1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="c1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSClass_2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Method()">
+        <size>1</size>
+      </method>
+      <method name="Void method()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="System.sByte">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="System.Web.HttpBrowserCapabilities">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-06.cs">
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CLSClass_2">
+      <method name="Void .ctor(Int32[,,])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32[,])">
+        <size>7</size>
+      </method>
+      <method name="Void Test(System.Int32[,], Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Test(System.Int32[,,], Boolean)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M2(Int32)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void M2(Int32 ByRef)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CLSClass+MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="UInt32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="UInt32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MyDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="UInt32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="UInt32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-07.cs">
+    <type name="aa.I1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-10.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-11.cs">
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(IComparable)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="CLSCLass_2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="CLSClass_3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-12.cs">
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-14.cs">
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Error(Boolean)">
+        <size>1</size>
+      </method>
+      <method name="CLSClass op_Implicit(Byte)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-15.cs">
+    <type name="CLSAttribute_1">
+      <method name="Void .ctor(Int32[])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSAttribute_2">
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSAttribute_3">
+      <method name="Void .ctor(Int32[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="CLSAttribute_4">
+      <method name="Void .ctor(Int32[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassMain">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-16.cs">
+    <type name="CLSAttribute">
+      <method name="Void .ctor(Boolean[])">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ClassMain">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-17.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-18.cs">
+    <type name="Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(System.Int32[])">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="CLSClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test(System.Int32[])">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-cls-19.cs">
+    <type name="A">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A+PartialClass">
+      <method name="Void Method1(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Void Method2(UInt32)">
+        <size>1</size>
+      </method>
+      <method name="Void Method3(UInt32)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-02.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-03.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-04.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>64</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-05.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-06.cs">
+    <type name="MyAssembly01.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyAssembly01.Namespace1.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyAssembly02.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyAssembly02.Namespace1.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-07.cs">
+    <type name="NS.MyClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 GetInt()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-08.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>54</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-externalias-09.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-01.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator GetIt()">
+        <size>8</size>
+      </method>
+      <method name="IEnumerable GetIt2()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>173</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>126</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt2&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>126</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt2&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-02.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator GetRange()">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>88</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetRange&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>173</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-03.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable GetIt(System.Int32[])">
+        <size>30</size>
+      </method>
+      <method name="IEnumerable GetMulti(System.Int32[,])">
+        <size>30</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>248</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>151</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetMulti&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>238</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetMulti&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-04.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable GetRange(Int32, Int32)">
+        <size>44</size>
+      </method>
+      <method name="Void Main()">
+        <size>100</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetRange&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>123</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-05.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable GetIt()">
+        <size>16</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>106</size>
+      </method>
+    </type>
+    <type name="List">
+      <method name="Void .ctor(Int32)">
+        <size>19</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>12</size>
+      </method>
+      <method name="Void Add(Int32)">
+        <size>26</size>
+      </method>
+      <method name="MyEnumerator GetEnumerator()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>183</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="List+MyEnumerator">
+      <method name="Void .ctor(List)">
+        <size>15</size>
+      </method>
+      <method name="System.Object get_Current()">
+        <size>24</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>31</size>
+      </method>
+      <method name="Void Reset()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetIt&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-06.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable Get(Int32)">
+        <size>30</size>
+      </method>
+      <method name="IEnumerable GetS(Int32)">
+        <size>30</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>407</size>
+      </method>
+    </type>
+    <type name="S+&lt;Get&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>183</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="S+&lt;GetS&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>136</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;Get&gt;c__Iterator2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>131</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetS&gt;c__Iterator3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>136</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="S">
+      <method name="IEnumerable Get(Int32)">
+        <size>42</size>
+      </method>
+      <method name="IEnumerable GetS(Int32)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="S+&lt;Get&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+    <type name="S+&lt;GetS&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="X+&lt;Get&gt;c__Iterator2">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+    <type name="X+&lt;GetS&gt;c__Iterator3">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-07.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable Foo(Int32)">
+        <size>30</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>374</size>
+      </method>
+    </type>
+    <type name="Test+&lt;Foo&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>253</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>112</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-08.cs">
+    <type name="Foo">
+      <method name="Void .ctor(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable Test(Int32, Int32)">
+        <size>44</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>169</size>
+      </method>
+    </type>
+    <type name="X+&lt;Test&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>360</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>102</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-09.cs">
+    <type name="Tester">
+      <method name="Void .ctor()">
+        <size>153</size>
+      </method>
+      <method name="IEnumerator GetEnumerator()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>270</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;GetEnumerator&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>625</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>84</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-10.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator get_GetIt()">
+        <size>8</size>
+      </method>
+      <method name="Void set_GetIt(IEnumerator)">
+        <size>1</size>
+      </method>
+      <method name="IEnumerable get_Item(Int32)">
+        <size>30</size>
+      </method>
+      <method name="Void set_Item(Int32, IEnumerable)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>186</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>126</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>145</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X+&lt;&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-11.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_Hook(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_Hook(System.EventHandler)">
+        <size>24</size>
+      </method>
+      <method name="IEnumerator Pipeline()">
+        <size>15</size>
+      </method>
+      <method name="Void M(System.Object, System.EventArgs)">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>55</size>
+      </method>
+    </type>
+    <type name="X+&lt;Pipeline&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>124</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-12.cs">
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable a()">
+        <size>23</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X+&lt;a&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>165</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>55</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-iter-13.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="IEnumerable syntax_error(System.Object, System.Object)">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Test+Yp">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable fail()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test+&lt;syntax_error&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>27</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-named-01.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor(Object)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>12</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="XAttribute">
+      <method name="Void .ctor(Int32)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo(Int32)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>48</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-named-02.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)">
+        <size>29</size>
+      </method>
+      <method name="Int32 get_Item(Int32)">
+        <size>28</size>
+      </method>
+    </type>
+    <type name="MyPoint">
+      <method name="Void .ctor(Int32, Int32)">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Decimal Foo(Decimal, Decimal)">
+        <size>2</size>
+      </method>
+      <method name="System.String Bar(Int32, System.String, Char)">
+        <size>20</size>
+      </method>
+      <method name="Int32 Test(Int32, Int32)">
+        <size>30</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>279</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-named-03.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 TestInt(Int32)">
+        <size>3</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>23</size>
+      </method>
+    </type>
+    <type name="C+IntDelegate">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Int32 Invoke(Int32)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-named-04.cs">
+    <type name="Program">
+      <method name="Void Foo2(Int32, Int32 ByRef)">
+        <size>40</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>239</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-01.cs">
+    <type name="Foo.Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar.Hello">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="X.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 FooWorld()">
+        <size>6</size>
+      </method>
+      <method name="Int32 BarWorld()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Y">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-02.cs">
+    <type name="Test1.Base">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test1.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test2.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="ReflectedType">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-03.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+      <method name="Int32 TestFoo()">
+        <size>13</size>
+      </method>
+      <method name="Int32 TestIFoo(IFoo)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Test+Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Test.IFoo.Hello(Test)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Hello(Test)">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>42</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-04.cs">
+    <type name="B.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void A.IFoo.Hello(IFoo)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-05.cs">
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-06.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Finalize()">
+        <size>13</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-07.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test2Attribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>62</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-08.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Id()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="PartialAbstractCompilationError">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>54</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-09.cs">
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.String get_Id()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bar">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="PartialAbstractCompilationError">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>21</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-10.cs">
+    <type name="Test2.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>15</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+    </type>
+    <type name="Test3.Foo">
+      <method name="Void .cctor()">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-11.cs">
+    <type name="StaticClass">
+      <method name="System.String Name()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="MainClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean IsStatic(System.Type)">
+        <size>73</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>56</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-12.cs">
+    <type name="Test1.Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerable E()">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>104</size>
+      </method>
+    </type>
+    <type name="Test1.Foo+&lt;E&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>69</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-13.cs">
+    <type name="Test.Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Equals(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 GetHashCode()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-14.cs">
+    <type name="T">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="partial">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void partial(partial)">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-15.cs">
+    <type name="Foo.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="IEnumerable Attempts2()">
+        <size>16</size>
+      </method>
+      <method name="IEnumerable get_Attempts()">
+        <size>16</size>
+      </method>
+      <method name="IEnumerable get_Item(Int32)">
+        <size>16</size>
+      </method>
+    </type>
+    <type name="Foo.X+&lt;Attempts2&gt;c__Iterator0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>36</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Foo.X+&lt;&gt;c__Iterator1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>36</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Foo.X+&lt;&gt;c__Iterator2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>36</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>8</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Foo.X+&lt;Attempts2&gt;c__Iterator0">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Foo.X+&lt;&gt;c__Iterator1">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+    <type name="Foo.X+&lt;&gt;c__Iterator2">
+      <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()">
+        <size>26</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-16.cs">
+    <type name="A.C">
+      <method name="Void .ctor()">
+        <size>23</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="B.C2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Test()">
+        <size>2</size>
+      </method>
+      <method name="System.Object Test_I()">
+        <size>2</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-17.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Boolean Check(System.String, System.String[])">
+        <size>42</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-18.cs">
+    <type name="N.Foo">
+      <method name="Void .ctor()">
+        <size>17</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-19.cs">
+    <type name="Bug.GL">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Bug.GL+Core">
+      <method name="Boolean A()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-20.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-21.cs">
+    <type name="Mono.Sms.Main">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Test()">
+        <size>42</size>
+      </method>
+    </type>
+    <type name="Mono.Sms.Contacts">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void add_ContactsEventHandler(Mono.Sms.Contacts+ContactsHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void remove_ContactsEventHandler(Mono.Sms.Contacts+ContactsHandler)">
+        <size>24</size>
+      </method>
+      <method name="Void Test()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Mono.Sms.Core.Agenda">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void AddContact()">
+        <size>1</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Mono.Sms.Contacts+ContactsHandler">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Mono.Sms.Main">
+      <method name="Void &lt;Test&gt;m__0()">
+        <size>6</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-22.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-23.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Partial_A()">
+        <size>15</size>
+      </method>
+      <method name="Void Partial_B()">
+        <size>15</size>
+      </method>
+      <method name="Void Partial_S()">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>52</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-24.cs">
+    <type name="N.C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-25.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Partial(Int32)">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-26.cs">
+    <type name="ConsoleApplication1.X">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="ConsoleApplication1.Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>98</size>
+      </method>
+    </type>
+    <type name="ConsoleApplication1.Y">
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-27.cs">
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-28.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TestCase">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-partial-29.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-01.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>47</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-02.cs">
+    <type name="Class1">
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+      <method name="Boolean Method()">
+        <size>2</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>126</size>
+      </method>
+    </type>
+    <type name="Test+Class2">
+      <method name="Void .ctor()">
+        <size>15</size>
+      </method>
+      <method name="Boolean Method()">
+        <size>2</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-03.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>177</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-05.cs">
+    <type name="MyClass">
+      <method name="Void .ctor(String)">
+        <size>14</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>66</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-06.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>55</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-07.cs">
+    <type name="Test">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void var()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="var">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-var-08.cs">
+    <type name="X">
+      <method name="Void .ctor(Int32, Int32)">
+        <size>10</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-xml-042.cs">
+    <type name="TestNamespace.TestClass">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void FunctionWithParameter(Int32 ByRef, Int32 ByRef)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+</tests>
\ No newline at end of file
index 2d668d1432902dedc7d56cac6b20878f08201c6c..d5568e845f49653df3430b77e4ab47d628ec1f96 100644 (file)
         <size>7</size>
       </method>
       <method name="Void Test(T)">
-        <size>8</size>
+        <size>13</size>
       </method>
     </type>
   </test>
       </method>
     </type>
   </test>
+  <test name="gtest-316.cs">
+    <type name="X">
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Base">
+      <method name="Void Method[R]()">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Void Method[S]()">
+        <size>7</size>
+      </method>
+      <method name="Void Method2[T]()">
+        <size>23</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-317.cs">
     <type name="Foo`1[K]">
       <method name="Void .ctor()">
       </method>
     </type>
   </test>
+  <test name="gtest-527.cs">
+    <type name="CoalescingWithGenericsBug">
+      <method name="T Provide[T]()">
+        <size>23</size>
+      </method>
+      <method name="T FindExisting[T]()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+    </type>
+    <type name="CoalescingWithGenericsBug+Service">
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-528.cs">
+    <type name="GenericType`1[U]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Base">
+      <method name="T Test[T](GenericType`1[T])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Override">
+      <method name="T Test[T](GenericType`1[T])">
+        <size>8</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-529.cs">
+    <type name="GenericType`2[U,V]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Base`1[V]">
+      <method name="T Test[T](GenericType`2[T,V])">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Override`1[W]">
+      <method name="T Test[T](GenericType`2[T,W])">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Int32 Main()">
+        <size>20</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-530.cs">
+    <type name="B">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-531.cs">
+    <type name="ATop`1[T]">
+      <method name="T[] IB&lt;T&gt;.ToArray(T[])">
+        <size>2</size>
+      </method>
+      <method name="Void IC.ToArray()">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>37</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="M">
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-532.cs">
+    <type name="DictionaryServicesContainer">
+      <method name="Void Register[I,T]()">
+        <size>6</size>
+      </method>
+      <method name="Void Register[I](System.Object)">
+        <size>6</size>
+      </method>
+      <method name="I Resolve[I]()">
+        <size>6</size>
+      </method>
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-533.cs">
+    <type name="List`1[X]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="List`1+Comp`1[X,Y]">
+      <method name="List`1+Comp`1[Y,X] flip(Y, X)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="List`1+Flip`1[X,Z]">
+      <method name="Void .ctor(Comp`1)">
+        <size>14</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>15</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-534.cs">
+    <type name="A">
+      <method name="Void Method(IG`1)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-535.cs">
+    <type name="G`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Int32 Foo[T](T, G`1[T])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Foo[T](T, System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>34</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-anon-1.cs">
     <type name="X">
       <method name="Void .ctor()">
       </method>
     </type>
   </test>
+  <test name="gtest-exmethod-37.cs">
+    <type name="S">
+      <method name="Void Extension(A, System.String, Boolean)">
+        <size>11</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="Void Extension(System.String)">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void TestMethod(System.Action`1[System.Boolean])">
+        <size>1</size>
+      </method>
+      <method name="Int32 TestMethod(System.Action`1[System.String])">
+        <size>13</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>33</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-exmethod-38.cs">
+    <type name="Repro2.Color">
+      <method name="Void .ctor(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void .cctor()">
+        <size>38</size>
+      </method>
+    </type>
+    <type name="Repro2.ExtensionMethods">
+      <method name="Color Transparent(Color)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="Repro2.MainClass">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-friend-01.cs">
     <type name="Test">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
       <method name="Int32 Main()">
-        <size>280</size>
+        <size>296</size>
       </method>
     </type>
     <type name="&lt;PrivateImplementationDetails&gt;">
       </method>
     </type>
   </test>
+  <test name="gtest-iter-15.cs">
+    <type name="C`1[TFirst]">
+      <method name="IEnumerable`1 GetEnumerable[V](IEnumerable`1)">
+        <size>30</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+VSlot`1[TFirst,T]">
+      <method name="Void .ctor(T)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>111</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C`1+&lt;GetEnumerable&gt;c__Iterator0`1[TFirst,V]">
+      <method name="V System.Collections.Generic.IEnumerator&lt;V&gt;.get_Current()">
+        <size>7</size>
+      </method>
+      <method name="System.Object System.Collections.IEnumerator.get_Current()">
+        <size>12</size>
+      </method>
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>7</size>
+      </method>
+      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;V&gt;.GetEnumerator()">
+        <size>40</size>
+      </method>
+      <method name="Boolean MoveNext()">
+        <size>181</size>
+      </method>
+      <method name="Void Dispose()">
+        <size>62</size>
+      </method>
+      <method name="Void Reset()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-lambda-01.cs">
     <type name="X">
       <method name="Int32 Main()">
       </method>
     </type>
   </test>
+  <test name="gtest-named-03.cs">
+    <type name="C">
+      <method name="Int32 Foo(Int32, Int32, Int32)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>38</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-optional-01.cs">
     <type name="C">
       <method name="Void TestA(Int32)">
       </method>
     </type>
   </test>
+  <test name="gtest-optional-09.cs">
+    <type name="Program">
+      <method name="Int32 Test_1(Int32, SByte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_1[T](T)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_1(Int32, Int64)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_2(Int16)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_2(Int32, SByte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_3(System.String)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_3(System.String, SByte)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_4(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_4(System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_5()">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_5(Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_6(System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_6(Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_7(Boolean, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Test_7(Boolean, Int32, System.Object[])">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>118</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-10.cs">
+    <type name="Program">
+      <method name="Void Main()">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program`1[T]">
+      <method name="Void .ctor(Generic`1)">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Generic`1[T]">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-11.cs">
+    <type name="C">
+      <method name="Int32 TestA(Int32)">
+        <size>2</size>
+      </method>
+      <method name="T TestB[T](T, T)">
+        <size>2</size>
+      </method>
+      <method name="System.Object TestC(System.Object)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>76</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-optional-12.cs">
+    <type name="C">
+      <method name="Int32 M(System.String, Int32, System.Int32[])">
+        <size>4</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>41</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="&lt;PrivateImplementationDetails&gt;">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-partial-01.cs">
     <type name="B`1[U]">
       <method name="Void .ctor()">
         <size>80</size>
       </method>
       <method name="Void Main()">
-        <size>540</size>
+        <size>561</size>
       </method>
       <method name="Void .ctor()">
         <size>7</size>
       </method>
     </type>
   </test>
+  <test name="gtest-variance-14.cs">
+    <type name="A">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>28</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+D`1[T]">
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+D`2[T,U]">
+      <method name="T Invoke(U)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(U, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="T EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-15.cs">
+    <type name="C">
+      <method name="Void M[T](T ByRef, C+D`1[T])">
+        <size>13</size>
+      </method>
+      <method name="Void M2[T](T, C+D`1[T])">
+        <size>8</size>
+      </method>
+      <method name="Void MethodArg(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>53</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0(System.Object)">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+D`1[T]">
+      <method name="Void Invoke(T)">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-variance-16.cs">
+    <type name="S">
+      <method name="System.String op_Implicit(S)">
+        <size>6</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="T Foo[T](T, I`1)">
+        <size>2</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>45</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-variance-2.cs">
     <type name="Foo">
       <method name="System.String Bar(System.Object)">
       </method>
     </type>
   </test>
-  <test name="test-106.cs">
-    <type name="Test">
-      <method name="Int32 F(Int32)">
-        <size>27</size>
-      </method>
-      <method name="Void async_callback(IAsyncResult)">
-        <size>33</size>
-      </method>
-      <method name="Int32 Main()">
-        <size>135</size>
-      </method>
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-      <method name="Void .cctor()">
-        <size>1</size>
-      </method>
-    </type>
-    <type name="Test+SimpleDelegate">
-      <method name="Int32 Invoke(Int32)">
-        <size>0</size>
-      </method>
-      <method name="IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)">
-        <size>0</size>
-      </method>
-      <method name="Int32 EndInvoke(IAsyncResult)">
-        <size>0</size>
-      </method>
-      <method name="Void .ctor(Object, IntPtr)">
-        <size>0</size>
-      </method>
-    </type>
-  </test>
   <test name="test-107.cs">
     <type name="Test">
       <method name="Void .ctor()">
       </method>
     </type>
   </test>
+  <test name="test-789.cs">
+    <type name="Program">
+      <method name="Void Main()">
+        <size>50</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__0()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-79.cs">
     <type name="X">
       <method name="Void .ctor()">
       </method>
     </type>
   </test>
+  <test name="test-790.cs">
+    <type name="S">
+      <method name="Void .ctor(Double)">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="Test">
+      <method name="Void Verify_1(Test ByRef, Test ByRef)">
+        <size>20</size>
+      </method>
+      <method name="Void Verify_2(S ByRef, S ByRef)">
+        <size>28</size>
+      </method>
+      <method name="Void Verify_3(E ByRef, E ByRef)">
+        <size>9</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>29</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-791.cs">
+    <type name="testApp.TestApp">
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>68</size>
+      </method>
+      <method name="Boolean GetEnumerator()">
+        <size>6</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-792.cs">
+    <type name="Program">
+      <method name="Void Test()">
+        <size>24</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-793.cs">
+    <type name="MonoPointerBugTest.Program">
+      <method name="Int32 Main()">
+        <size>43</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-794.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>11</size>
+      </method>
+      <method name="Void TestCallOnly()">
+        <size>65</size>
+      </method>
+      <method name="Void SomeMethod()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-795.cs">
+    <type name="Test">
+      <method name="Int32 Main()">
+        <size>112</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>25</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-796.cs">
+    <type name="Program">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="FooAttribute">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-797.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-798.cs">
+    <type name="A">
+      <method name="Void Foo(Int32 ByRef)">
+        <size>5</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="Void Foo(Int32 ByRef)">
+        <size>11</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="Int32 Main()">
+        <size>24</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-799.cs">
+    <type name="Test2">
+      <method name="Int32 Main()">
+        <size>13</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test2+Foo">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test2+Bar">
+      <method name="Void .ctor(Foo)">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-8.cs">
     <type name="X">
       <method name="Void .ctor()">
       </method>
     </type>
   </test>
+  <test name="test-800.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>7</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-81.cs">
     <type name="N1.A">
       <method name="Void .ctor()">
   <test name="test-anon-94.cs">
     <type name="Program">
       <method name="Int32 Main()">
-        <size>29</size>
+        <size>57</size>
       </method>
       <method name="Void .ctor()">
         <size>7</size>
         <size>7</size>
       </method>
     </type>
+    <type name="Program+DerivedLibrary">
+      <method name="Void Print(Int32)">
+        <size>20</size>
+      </method>
+      <method name="Void &lt;Print&gt;__BaseCallProxy0(Int32)">
+        <size>8</size>
+      </method>
+      <method name="Void &lt;Print&gt;m__1()">
+        <size>9</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
   </test>
   <test name="test-anon-95.cs">
     <type name="D">
       </method>
     </type>
   </test>
+  <test name="test-anon-96.cs">
+    <type name="P">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Program">
+      <method name="Int32 Extra()">
+        <size>3</size>
+      </method>
+      <method name="Program+D Get(Int32)">
+        <size>115</size>
+      </method>
+      <method name="Int32 Run(Int32)">
+        <size>12</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>77</size>
+      </method>
+    </type>
+    <type name="Program+D">
+      <method name="Int32 Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Int32 EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="Program+&lt;Get&gt;c__AnonStorey0">
+      <method name="Int32 &lt;&gt;m__0()">
+        <size>19</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__1()">
+        <size>19</size>
+      </method>
+      <method name="Int32 &lt;&gt;m__2()">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-cls-00.cs">
     <type name="CLSCLass_6">
       <method name="Void .ctor()">
       </method>
     </type>
   </test>
+  <test name="test-partial-29.cs">
+    <type name="C">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+  </test>
   <test name="test-var-01.cs">
     <type name="Test">
       <method name="Void .ctor()">
index 970ac6d2e1a49fe4380c998da72b604345421969..9547cad26621d07469b63f3938049bd72187de08 100644 (file)
@@ -41,7 +41,8 @@ net_4_0_dirs := \
        mod             \
        installvst      \
        lc              \
-       mono-configuration-crypto
+       mono-configuration-crypto \
+       ccrewrite
 
 net_2_0_dirs := \
        $(per_profile_dirs) \
diff --git a/mcs/tools/ccrewrite/Makefile b/mcs/tools/ccrewrite/Makefile
new file mode 100644 (file)
index 0000000..f38de6e
--- /dev/null
@@ -0,0 +1,9 @@
+thisdir = tools/ccrewrite
+SUBDIRS = 
+include ../../build/rules.make
+
+PROGRAM = ccrewrite.exe
+
+LOCAL_MCS_FLAGS = -r:Mono.CodeContracts.dll
+
+include ../../build/executable.make
diff --git a/mcs/tools/ccrewrite/Program.cs b/mcs/tools/ccrewrite/Program.cs
new file mode 100644 (file)
index 0000000..be23dcd
--- /dev/null
@@ -0,0 +1,74 @@
+#define CONTRACTS_FULL
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.Contracts;
+using System.Linq;
+using System.Text;
+using System.IO;
+using Mono.CodeContracts.Rewrite;
+using Mono.Options;
+
+namespace ccrewrite {
+
+       class Program {
+
+               static void Main (string [] args)
+               {
+                       RewriterOptions options = new RewriterOptions ();
+
+                       bool showOptions = false;
+                       string showMsg = null;
+
+                       var optionSet = new OptionSet {
+                               { "help", "Show this help.", v => showOptions = v != null },
+                               { "debug", "Use MDB or PDB debug information (default=true).", v => options.Debug = v != null },
+                               { "level=", "Instrumentation level, 0 - 4 (default=4).", (int var) => options.Level = var},
+                               { "writePDBFile", "Write MDB or PDB file (default=true).", v => options.WritePdbFile = v != null },
+                               { "rewrite", "Rewrite the assembly (default=true).", v => options.Rewrite = v != null },
+                               { "assembly=", "Assembly to rewrite.", v => options.Assembly = v },
+                               { "breakIntoDebugger|break", "Break into debugger on contract failure.", v => options.BreakIntoDebugger = v != null },
+                               { "throwOnFailure|throw", "Throw ContractException on contract failure.", v => options.ThrowOnFailure = v != null },
+                               { "output|out=", "Output filename of rewritten file.", v => options.OutputFile = v },
+                       };
+
+                       try {
+                               optionSet.Parse (args);
+                       } catch (OptionException e) {
+                               showOptions = true;
+                               showMsg = e.Message;
+                       }
+
+                       if (showOptions) {
+                               Console.WriteLine ("ccrewrite");
+                               Console.WriteLine ();
+                               Console.WriteLine ("Options:");
+                               optionSet.WriteOptionDescriptions (Console.Out);
+                               Console.WriteLine ();
+                               if (showMsg != null) {
+                                       Console.WriteLine (showMsg);
+                                       Console.WriteLine ();
+                               }
+                               return;
+                       }
+
+                       var results = Rewriter.Rewrite (options);
+
+                       if (results.AnyErrors) {
+                               foreach (var error in results.Errors) {
+                                       Console.WriteLine ("Error: " + error);
+                               }
+                       }
+                       if (results.AnyWarnings) {
+                               foreach (var warning in results.Warnings) {
+                                       Console.WriteLine ("Warning: " + warning);
+                               }
+                       }
+
+                       Console.WriteLine ();
+                       Console.WriteLine ("*** done ***");
+                       //Console.ReadKey ();
+               }
+
+       }
+}
diff --git a/mcs/tools/ccrewrite/ccrewrite.exe.sources b/mcs/tools/ccrewrite/ccrewrite.exe.sources
new file mode 100644 (file)
index 0000000..7324142
--- /dev/null
@@ -0,0 +1,3 @@
+../../build/common/Consts.cs
+../../class/Mono.Options/Mono.Options/Options.cs
+Program.cs
index 1d83160d2b7f9f1ed844decfb1300de2c78c9d3b..020d5b737bb0743068bc949ecabeba98af74c2d0 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-05  Andrés G. Aragoneses  <andres@lindenlab.com>
+
+       * mono-api-info.cs: Implemented new mode to show ABI.
+       * Makefile: added mono-abi-info autofoo.
+
 2010-04-16  C.J. Adams-Collier <cjac@colliertech.org>
 
        * mono-api-diff.cs: revived from the mono-2-2 branch and applied
index 203875b15ccf4701050a53f44fd36d1bffcf94f3..c488c0d0fd0df239dcee74c4984a758f42b8d2bc 100644 (file)
@@ -29,10 +29,15 @@ namespace CorCompare
                        if (args.Length == 0)
                                return 1;
 
+                       AbiMode = false;
+
                        AssemblyCollection acoll = new AssemblyCollection ();
 
-                       foreach (string fullName in args) {
-                               acoll.Add (fullName);
+                       foreach (string arg in args) {
+                               if (arg == "--abi")
+                                       AbiMode = true;
+                               else
+                                       acoll.Add (arg);
                        }
 
                        XmlDocument doc = new XmlDocument ();
@@ -45,6 +50,8 @@ namespace CorCompare
                        doc.WriteTo (writer);
                        return 0;
                }
+
+               internal static bool AbiMode { get; private set; }
        }
 
        public class Utils {
@@ -211,7 +218,7 @@ namespace CorCompare
                                if (string.IsNullOrEmpty (t.Namespace))
                                        continue;
 
-                               if ((t.Attributes & TypeAttributes.VisibilityMask) != TypeAttributes.Public)
+                               if (!Driver.AbiMode && ((t.Attributes & TypeAttributes.VisibilityMask) != TypeAttributes.Public))
                                        continue;
 
                                if (t.DeclaringType != null)
@@ -409,28 +416,31 @@ namespace CorCompare
                                AddAttribute (nclass, "enumtype", Utils.CleanupTypeName (value_type.FieldType));
                        }
 
-                       MethodDefinition [] ctors = GetConstructors (type);
-                       if (ctors.Length > 0) {
-                               Array.Sort (ctors, MemberReferenceComparer.Default);
-                               members.Add (new ConstructorData (document, nclass, ctors));
-                       }
+                       if (!Driver.AbiMode) {
 
-                       PropertyDefinition[] properties = GetProperties (type);
-                       if (properties.Length > 0) {
-                               Array.Sort (properties, MemberReferenceComparer.Default);
-                               members.Add (new PropertyData (document, nclass, properties));
-                       }
+                               MethodDefinition [] ctors = GetConstructors (type);
+                               if (ctors.Length > 0) {
+                                       Array.Sort (ctors, MemberReferenceComparer.Default);
+                                       members.Add (new ConstructorData (document, nclass, ctors));
+                               }
 
-                       EventDefinition [] events = GetEvents (type);
-                       if (events.Length > 0) {
-                               Array.Sort (events, MemberReferenceComparer.Default);
-                               members.Add (new EventData (document, nclass, events));
-                       }
+                               PropertyDefinition[] properties = GetProperties (type);
+                               if (properties.Length > 0) {
+                                       Array.Sort (properties, MemberReferenceComparer.Default);
+                                       members.Add (new PropertyData (document, nclass, properties));
+                               }
+
+                               EventDefinition [] events = GetEvents (type);
+                               if (events.Length > 0) {
+                                       Array.Sort (events, MemberReferenceComparer.Default);
+                                       members.Add (new EventData (document, nclass, events));
+                               }
 
-                       MethodDefinition [] methods = GetMethods (type);
-                       if (methods.Length > 0) {
-                               Array.Sort (methods, MemberReferenceComparer.Default);
-                               members.Add (new MethodData (document, nclass, methods));
+                               MethodDefinition [] methods = GetMethods (type);
+                               if (methods.Length > 0) {
+                                       Array.Sort (methods, MemberReferenceComparer.Default);
+                                       members.Add (new MethodData (document, nclass, methods));
+                               }
                        }
 
                        foreach (MemberData md in members)
@@ -542,12 +552,19 @@ namespace CorCompare
                                if (field.IsSpecialName)
                                        continue;
 
+                               if (Driver.AbiMode && field.IsStatic)
+                                       continue;
+
                                // we're only interested in public or protected members
                                FieldAttributes maskedVisibility = (field.Attributes & FieldAttributes.FieldAccessMask);
-                               if (maskedVisibility == FieldAttributes.Public
-                                       || maskedVisibility == FieldAttributes.Family
-                                       || maskedVisibility == FieldAttributes.FamORAssem) {
+                               if (Driver.AbiMode && !field.IsNotSerialized) {
                                        list.Add (field);
+                               } else {
+                                       if (maskedVisibility == FieldAttributes.Public
+                                               || maskedVisibility == FieldAttributes.Family
+                                               || maskedVisibility == FieldAttributes.FamORAssem) {
+                                               list.Add (field);
+                                       }
                                }
                        }
 
index 7e77baae75ffebc3250b3f02c691d879fa94ac3b..5f46eef6826cec7e0f3610f6d9f90627bab448ad 100644 (file)
@@ -9,6 +9,7 @@ MDOC_COMMON_FLAGS = \
        /resource:../monodoc/Resources/mono-ecma-css.xsl,mono-ecma-css.xsl          \
        /resource:Resources/defaulttemplate.xsl,defaulttemplate.xsl                 \
        /resource:Resources/monodoc-ecma.xsd,monodoc-ecma.xsd                       \
+       /resource:Resources/msitomsx.xsl,msitomsx.xsl                               \
        /resource:Resources/overview.xsl,overview.xsl                               \
        /resource:Resources/stylesheet.xsl,stylesheet.xsl                           \
        /r:System.Web.dll                                                           \
@@ -41,6 +42,7 @@ MONODOC_RESOURCES = \
 MDOC_RESOURCES = \
        Resources/defaulttemplate.xsl     \
        Resources/monodoc-ecma.xsd        \
+       Resources/msitomsx.xsl            \
        Resources/overview.xsl            \
        Resources/stylesheet.xsl
 
diff --git a/mcs/tools/mdoc/Mono.Documentation/MdocFile.cs b/mcs/tools/mdoc/Mono.Documentation/MdocFile.cs
new file mode 100644 (file)
index 0000000..f1d0a93
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// MdocFile.cs: File utility methods
+//
+// Author:
+//   Jonathan Pryor  <jpryor@novell.com>
+//
+// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+
+namespace Mono.Documentation {
+
+       static class MdocFile {
+
+               public static void UpdateFile (string file, Action<string> creator)
+               {
+                       if (!File.Exists (file) || file == "-") {
+                               creator (file);
+                               return;
+                       }
+
+                       string temp = Path.GetTempFileName ();
+                       bool move = true;
+                       try {
+                               creator (temp);
+
+                               using (var a = File.OpenRead (file))
+                               using (var b = File.OpenRead (temp)) {
+                                       if (a.Length == b.Length)
+                                               move = !FileContentsIdentical (a, b);
+                               }
+
+                               if (move) {
+                                       File.Delete (file);
+                                       File.Move (temp, file);
+                               }
+                       }
+                       finally {
+                               if (!move && File.Exists (temp))
+                                       File.Delete (temp);
+                       }
+               }
+
+               static bool FileContentsIdentical (Stream a, Stream b)
+               {
+                       byte[] ba = new byte[4096];
+                       byte[] bb = new byte[4096];
+                       int ra, rb;
+
+                       while ((ra = a.Read (ba, 0, ba.Length)) > 0 &&
+                                       (rb = b.Read (bb, 0, bb.Length)) > 0) {
+                               if (ra != rb)
+                                       return false;
+                               for (int i = 0; i < ra; ++i) {
+                                       if (ba [i] != bb [i])
+                                               return false;
+                               }
+                       }
+                       return true;
+               }
+       }
+}
diff --git a/mcs/tools/mdoc/Mono.Documentation/ecmadoc.cs b/mcs/tools/mdoc/Mono.Documentation/ecmadoc.cs
new file mode 100644 (file)
index 0000000..e8c0a5c
--- /dev/null
@@ -0,0 +1,331 @@
+//
+// ecmadoc.cs
+//
+// Author:
+//   Jonathan Pryor  <jpryor@novell.com>
+//
+// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+
+using Monodoc;
+using Mono.Documentation;
+
+using Mono.Options;
+using Mono.Rocks;
+
+namespace Mono.Documentation
+{
+       public class MDocUpdateEcmaXml : MDocCommand
+       {
+               string file = "CLILibraryTypes.xml";
+               List<string> directories;
+               Dictionary<string, HashSet<string>> libraries = new Dictionary<string, HashSet<string>>();
+
+               public override void Run (IEnumerable<string> args)
+               {
+                       string current_library = "";
+
+                       var options = new OptionSet () {
+                               { "o|out=", 
+                                       "{FILE} to generate/update documentation within.\n" + 
+                                       "If not specified, will process " + file + ".\n" +
+                                       "Set to '-' to skip updates and write to standard output.",
+                                       v => file = v },
+                               { "library=",
+                                       "The {LIBRARY} that the following --type=TYPE types should be a part of.",
+                                       v => current_library = v },
+                               { "type=",
+                                       "The full {TYPE} name of a type to copy into the output file.",
+                                       v => AddTypeToLibrary (current_library, v) },
+                       };
+                       directories = Parse (options, args, "export-ecma-xml", 
+                                       "[OPTIONS]+ DIRECTORIES",
+                                       "Export mdoc documentation within DIRECTORIES into ECMA-format XML.\n\n" +
+                                       "DIRECTORIES are mdoc(5) directories as produced by 'mdoc update'.");
+                       if (directories == null || directories.Count == 0)
+                               return;
+
+                       Update ();
+               }
+
+               void AddTypeToLibrary (string library, string type)
+               {
+                       HashSet<string> types;
+                       if (!libraries.TryGetValue (library, out types))
+                               libraries.Add (library, types = new HashSet<string> ());
+                       types.Add (type.Replace ('/', '.').Replace ('+', '.'));
+               }
+
+               void Update ()
+               {
+                       Action<string> creator = file => {
+                               XDocument docs = LoadFile (this.file);
+
+                               var seenLibraries = new HashSet<string> ();
+
+                               UpdateExistingLibraries (docs, seenLibraries);
+                               GenerateMissingLibraries (docs, seenLibraries);
+
+                               SortLibraries (docs.Root);
+                               SortTypes (docs.Root);
+
+                               using (var output = CreateWriter (file)) {
+                                       foreach (var node in docs.Nodes ()) {
+                                               if (node.NodeType == XmlNodeType.Element || node.NodeType == XmlNodeType.Text)
+                                                       continue;
+                                               node.WriteTo (output);
+                                       }
+                                       docs.Root.WriteTo (output);
+                                       output.WriteWhitespace ("\r\n");
+                               }
+                       };
+                       MdocFile.UpdateFile (this.file, creator);
+               }
+
+               static XDocument LoadFile (string file)
+               {
+                       if (file == "-" || !File.Exists (file))
+                               return CreateDefaultDocument ();
+
+                       var settings = new XmlReaderSettings {
+                               ProhibitDtd = false,
+                       };
+                       using (var reader = XmlReader.Create (file, settings))
+                               return XDocument.Load (reader);
+               }
+
+               static XDocument CreateDefaultDocument ()
+               {
+                       return new XDocument (
+                                       new XComment (" ====================================================================== "),
+                                       new XComment (" This XML is a description of the Common Language Infrastructure (CLI) library. "),
+                                       new XComment (" This file is a normative part of Partition IV of the following standards: ISO/IEC 23271 and ECMA 335 "),
+                                       new XComment (" ====================================================================== "),
+                                       new XDocumentType ("Libraries", null, "CLILibraryTypes.dtd", null),
+                                       new XElement ("Libraries"));
+               }
+
+               static XmlWriter CreateWriter (string file)
+               {
+                       var settings = new XmlWriterSettings {
+                               Indent              = true,
+                               IndentChars         = "\t",
+                               NewLineChars        = "\r\n",
+                               OmitXmlDeclaration  = true,
+                       };
+
+                       if (file == "-")
+                               return XmlWriter.Create (Console.Out, settings);
+
+                       settings.Encoding = new UTF8Encoding (false);
+                       return XmlWriter.Create (file, settings);
+               }
+
+               void UpdateExistingLibraries (XDocument docs, HashSet<string> seenLibraries)
+               {
+                       foreach (XElement types in docs.Root.Elements ("Types")) {
+                               XAttribute library = types.Attribute ("Library");
+                               HashSet<string> libraryTypes;
+                               if (library == null || !libraries.TryGetValue (library.Value, out libraryTypes)) {
+                                       continue;
+                               }
+                               seenLibraries.Add (library.Value);
+                               var seenTypes = new HashSet<string> ();
+                               foreach (XElement type in types.Elements ("Type").ToList ()) {
+                                       XAttribute fullName = type.Attribute ("FullName");
+                                       string typeName = fullName == null
+                                               ? null
+                                               : XmlDocUtils.ToEscapedTypeName (fullName.Value);
+                                       if (typeName == null || !libraryTypes.Contains (typeName)) {
+                                               continue;
+                                       }
+                                       type.Remove ();
+                                       seenTypes.Add (typeName);
+                                       types.Add (LoadType (typeName, library.Value));
+                               }
+                               foreach (string typeName in libraryTypes.Except (seenTypes))
+                                       types.Add (LoadType (typeName, library.Value));
+                       }
+               }
+
+               void GenerateMissingLibraries (XDocument docs, HashSet<string> seenLibraries)
+               {
+                       foreach (KeyValuePair<string, HashSet<string>> lib in libraries) {
+                               if (seenLibraries.Contains (lib.Key))
+                                       continue;
+                               seenLibraries.Add (lib.Key);
+                               docs.Root.Add (new XElement ("Types", new XAttribute ("Library", lib.Key),
+                                                       lib.Value.Select (type => LoadType (type, lib.Key))));
+                       }
+               }
+
+               XElement LoadType (string type, string library)
+               {
+                       foreach (KeyValuePair<string, string> permutation in GetTypeDirectoryFilePermutations (type)) {
+                               foreach (string root in directories) {
+                                       string path = Path.Combine (root, Path.Combine (permutation.Key, permutation.Value + ".xml"));
+                                       if (File.Exists (path))
+                                               return FixupType (path, library);
+                               }
+                       }
+                       throw new FileNotFoundException ("Unable to find documentation file for type: " + type + ".");
+               }
+
+               // type has been "normalized", which (alas) means we have ~no clue which
+               // part is the namespace and which is the type name, particularly
+               // problematic as types may be nested to any level.
+               // Try ~all permutations. :-)
+               static IEnumerable<KeyValuePair<string, string>> GetTypeDirectoryFilePermutations (string type)
+               {
+                       int end = type.Length;
+                       int dot;
+                       while ((dot = type.LastIndexOf ('.', end-1)) >= 0) {
+                               yield return new KeyValuePair<string, string> (
+                                               type.Substring (0, dot), 
+                                               type.Substring (dot+1).Replace ('.', '+'));
+                               end = dot;
+                       }
+                       yield return new KeyValuePair<string, string> ("", type.Replace ('.', '+'));
+               }
+
+               static XElement FixupType (string path, string library)
+               {
+                       var type = XElement.Load (path);
+
+                       XAttribute fullName   = type.Attribute ("FullName");
+                       XAttribute fullNameSp = type.Attribute ("FullNameSP");
+                       if (fullNameSp == null && fullName != null) {
+                               type.Add (new XAttribute ("FullNameSP", fullName.Value.Replace ('.', '_')));
+                       }
+                       if (type.Element ("TypeExcluded") == null)
+                               type.Add (new XElement ("TypeExcluded", "0"));
+                       if (type.Element ("MemberOfLibrary") == null) {
+                               XElement member = new XElement ("MemberOfLibrary", library);
+                               XElement assemblyInfo = type.Element ("AssemblyInfo");
+                               if (assemblyInfo != null)
+                                       assemblyInfo.AddBeforeSelf (member);
+                               else
+                                       type.Add (member);
+                       }
+
+                       XElement ai = type.Element ("AssemblyInfo");
+
+                       XElement assembly = 
+                               XElement.Load (
+                                               Path.Combine (
+                                                       Path.Combine (Path.GetDirectoryName (path), ".."), 
+                                                       "index.xml"))
+                               .Element ("Assemblies")
+                               .Elements ("Assembly")
+                               .FirstOrDefault (a => a.Attribute ("Name").Value == ai.Element ("AssemblyName").Value &&
+                                               a.Attribute ("Version").Value == ai.Element ("AssemblyVersion").Value);
+                       if (assembly == null)
+                               return type;
+
+                       if (assembly.Element ("AssemblyPublicKey") != null)
+                               ai.Add (assembly.Element ("AssemblyPublicKey"));
+
+                       if (assembly.Element ("AssemblyCulture") != null)
+                               ai.Add (assembly.Element ("AssemblyCulture"));
+                       else
+                               ai.Add (new XElement ("AssemblyCulture", "neutral"));
+
+                       // TODO: assembly attributes?
+                       // The problem is that .NET mscorlib.dll v4.0 has ~26 attributes, and
+                       // importing these for every time seems like some serious bloat...
+                       var clsDefAttr = assembly.Elements ("Attributes").Elements ("Attribute")
+                               .FirstOrDefault (a => a.Element ("AttributeName").Value.StartsWith ("System.CLSCompliant"));
+                       if (clsDefAttr != null &&
+                                       ai.Elements ("Attributes").Elements ("Attribute")
+                                       .FirstOrDefault (a => a.Element ("AttributeName").Value.StartsWith ("System.CLSCompliant")) == null) {
+                               var dest = ai.Element ("Attributes");
+                               if (dest == null)
+                                       ai.Add (dest = new XElement ("Attributes"));
+                               dest.Add (clsDefAttr);
+                       }
+
+                       return type;
+               }
+
+               static void SortLibraries (XContainer libraries)
+               {
+                       SortElements (libraries, (x, y) => x.Attribute ("Library").Value.CompareTo (y.Attribute ("Library").Value));
+               }
+
+               static void SortElements (XContainer container, Comparison<XElement> comparison)
+               {
+                       var items = new List<XElement> ();
+                       foreach (var e in container.Elements ())
+                               items.Add (e);
+                       items.Sort (comparison);
+                       for (int i = items.Count - 1; i > 0; --i) {
+                               items [i-1].Remove ();
+                               items [i].AddBeforeSelf (items [i-1]);
+                       }
+               }
+
+               static void SortTypes (XContainer libraries)
+               {
+                       foreach (var types in libraries.Elements ("Types")) {
+                               SortElements (types, (x, y) => {
+                                               string xName, yName;
+                                               int xCount, yCount;
+
+                                               GetTypeSortName (x, out xName, out xCount);
+                                               GetTypeSortName (y, out yName, out yCount);
+
+                                               int c = xName.CompareTo (yName);
+                                               if (c != 0)
+                                                       return c;
+                                               if (xCount < yCount)
+                                                       return -1;
+                                               if (yCount < xCount)
+                                                       return 1;
+                                               return 0;
+                               });
+                       }
+               }
+
+               static void GetTypeSortName (XElement element, out string name, out int typeParamCount)
+               {
+                       typeParamCount = 0;
+                       name = element.Attribute ("Name").Value;
+
+                       int lt = name.IndexOf ('<');
+                       if (lt >= 0) {
+                               int gt = name.IndexOf ('>', lt);
+                               if (gt >= 0) {
+                                       typeParamCount = name.Substring (lt, gt-lt).Count (c => c == ',') + 1;
+                               }
+                               name = name.Substring (0, lt);
+                       }
+               }
+       }
+}
index 99bb9247f1bc247f6b7a8b9348dbeb0b8a6f56ca..a67178e20462665c4109f0f2a5dfb5dc039a50a4 100644 (file)
@@ -2,7 +2,9 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.IO;
 using System.Linq;
+using System.Text;
 using Mono.Options;
 
 namespace Mono.Documentation {
@@ -43,19 +45,27 @@ namespace Mono.Documentation {
                                { "export-msxdoc",    new MDocToMSXDocConverter () },
                                { "help",             new MDocHelpCommand (this) },
                                { "update",           new MDocUpdater () },
+                               { "update-ecma-xml",  new MDocUpdateEcmaXml () },
                                { "validate",         new MDocValidator () },
                        };
 
                        bool showVersion = false;
                        bool showHelp    = false;
+                       var extra = new List<string> ();
                        var p = new OptionSet () {
                                { "version",  v => showVersion = v != null },
                                { "v:",       (int? v) => verbosity = v.HasValue ? v.Value : verbosity+1 },
                                { "debug",    v => debug = v != null },
                                { "h|?|help", v => showHelp = v != null },
+                               { "<>",       v => { 
+                                               if (v.Length > 0 && v [0] == '@')
+                                                       extra.AddRange (ReadResponseFile (v.Substring (1)));
+                                               else
+                                                       extra.Add (v);
+                               } },
                        };
 
-                       List<string> extra = p.Parse (args);
+                       p.Parse (args);
 
                        if (showVersion) {
                                Console.WriteLine ("mdoc {0}", Consts.MonoVersion);
@@ -68,7 +78,60 @@ namespace Mono.Documentation {
                        if (showHelp) {
                                extra.Add ("--help");
                        }
-                       GetCommand (extra [0]).Run (extra);
+                       switch (extra [0]) {
+                               case "x-msitomsx":
+                                       new MsidocToMsxdocConverter ().Run (extra);
+                                       break;
+                               default: 
+                                       GetCommand (extra [0]).Run (extra);
+                                       break;
+                       }
+               }
+
+               // Cribbed from mcs/driver.cs:LoadArgs(string)
+               static IEnumerable<string> ReadResponseFile (string file)
+               {
+                       StreamReader response;
+                       try {
+                               response = File.OpenText (file);
+                       } catch {
+                               yield break;
+                       }
+
+                       using (response) {
+                               StringBuilder arg = new StringBuilder ();
+
+                               string line;
+                               while ((line = response.ReadLine ()) != null) {
+                                       int t = line.Length;
+
+                                       for (int i = 0; i < t; i++) {
+                                               char c = line [i];
+                                               
+                                               if (c == '"' || c == '\'') {
+                                                       char end = c;
+                                                       
+                                                       for (i++; i < t; i++){
+                                                               c = line [i];
+
+                                                               if (c == end)
+                                                                       break;
+                                                               arg.Append (c);
+                                                       }
+                                               } else if (c == ' ') {
+                                                       if (arg.Length > 0) {
+                                                               yield return arg.ToString ();
+                                                               arg.Length = 0;
+                                                       }
+                                               } else
+                                                       arg.Append (c);
+                                       }
+                                       if (arg.Length > 0) {
+                                               yield return arg.ToString ();
+                                               arg.Length = 0;
+                                       }
+                               }
+                       }
                }
 
                internal MDocCommand GetCommand (string command)
index 19500268532166244763555575588841db023830..89a8cbb1b69609b36fb65bcff37b71d61635587a 100644 (file)
@@ -31,22 +31,32 @@ class MDocUpdater : MDocCommand
        
        bool delete;
        bool show_exceptions;
-       bool no_assembly_versions;
+       bool no_assembly_versions, ignore_missing_types;
        ExceptionLocations? exceptions;
        
-       int additions = 0, deletions = 0;
+       internal int additions = 0, deletions = 0;
 
-       static XmlDocument slashdocs;
-       XmlReader ecmadocs;
+       List<DocumentationImporter> importers = new List<DocumentationImporter> ();
+
+       DocumentationEnumerator docEnum;
 
        string since;
 
-       static readonly MemberFormatter csharpFullFormatter  = new CSharpFullMemberFormatter ();
-       static readonly MemberFormatter csharpFormatter      = new CSharpMemberFormatter ();
        static readonly MemberFormatter docTypeFormatter     = new DocTypeMemberFormatter ();
-       static readonly MemberFormatter slashdocFormatter    = new SlashDocMemberFormatter ();
        static readonly MemberFormatter filenameFormatter    = new FileNameMemberFormatter ();
 
+       static MemberFormatter[] typeFormatters = new MemberFormatter[]{
+               new CSharpMemberFormatter (),
+               new ILMemberFormatter (),
+       };
+
+       static MemberFormatter[] memberFormatters = new MemberFormatter[]{
+               new CSharpFullMemberFormatter (),
+               new ILFullMemberFormatter (),
+       };
+
+       internal static readonly MemberFormatter slashdocFormatter    = new SlashDocMemberFormatter ();
+
        MyXmlNodeList extensionMethods = new MyXmlNodeList ();
 
        public override void Run (IEnumerable<string> args)
@@ -64,6 +74,8 @@ class MDocUpdater : MDocCommand
                                "  asm      Method calls in same assembly\n" +
                                "  depasm   Method calls in dependent assemblies\n" +
                                "  all      Record all possible exceptions\n" +
+                               "  added    Modifier; only create <exception/>s\n" +
+                               "             for NEW types/members\n" +
                                "If nothing is specified, then only exceptions from the member will " +
                                "be listed.",
                                v => exceptions = ParseExceptionLocations (v) },
@@ -71,6 +83,9 @@ class MDocUpdater : MDocCommand
                                "Specify a {FLAG} to alter behavior.  See later -f* options for available flags.",
                                v => {
                                        switch (v) {
+                                               case "ignore-missing-types":
+                                                       ignore_missing_types = true;
+                                                       break;
                                                case "no-assembly-versions":
                                                        no_assembly_versions = true;
                                                        break;
@@ -78,15 +93,21 @@ class MDocUpdater : MDocCommand
                                                        throw new Exception ("Unsupported flag `" + v + "'.");
                                        }
                                } },
+                       { "fignore-missing-types",
+                               "Do not report an error if a --type=TYPE type\nwas not found.",
+                               v => ignore_missing_types = v != null },
                        { "fno-assembly-versions",
                                "Do not generate //AssemblyVersion elements.",
                                v => no_assembly_versions = v != null },
                        { "i|import=", 
                                "Import documentation from {FILE}.",
-                               v => import = v },
+                               v => AddImporter (v) },
                        { "L|lib=",
                                "Check for assembly references in {DIRECTORY}.",
                                v => assemblyResolver.AddSearchDirectory (v) },
+                       { "library=",
+                               "Ignored for compatibility with update-ecma-xml.",
+                               v => {} },
                        { "o|out=",
                                "Root {DIRECTORY} to generate/update documentation.",
                                v => srcPath = v },
@@ -121,38 +142,14 @@ class MDocUpdater : MDocCommand
                
                this.assemblies = assemblies.Select (a => LoadAssembly (a)).ToList ();
 
-               if (import != null && ecmadocs == null && slashdocs == null) {
-                       try {
-                               XmlReader r = new XmlTextReader (import);
-                               if (r.Read ()) {
-                                       while (r.NodeType != XmlNodeType.Element) {
-                                               if (!r.Read ())
-                                                       Error ("Unable to read XML file: {0}.", import);
-                                       }
-                                       if (r.LocalName == "doc") {
-                                               var xml = File.ReadAllText (import);
-                                               // Ensure Unix line endings
-                                               xml = xml.Replace ("\r", "");
-                                               slashdocs = new XmlDocument();
-                                               slashdocs.LoadXml (xml);
-                                       }
-                                       else if (r.LocalName == "Libraries") {
-                                               ecmadocs = new XmlTextReader (import);
-                                       }
-                                       else
-                                               Error ("Unsupported XML format within {0}.", import);
-                               }
-                               r.Close ();
-                       } catch (Exception e) {
-                               Environment.ExitCode = 1;
-                               Error ("Could not load XML file: {0}.", e.Message);
-                       }
-               }
+               docEnum = docEnum ?? new DocumentationEnumerator ();
                
                // PERFORM THE UPDATES
                
-               if (types.Count > 0)
+               if (types.Count > 0) {
+                       types.Sort ();
                        DoUpdateTypes (srcPath, types, srcPath);
+               }
 #if false
                else if (opts.@namespace != null)
                        DoUpdateNS (opts.@namespace, Path.Combine (opts.path, opts.@namespace),
@@ -164,6 +161,33 @@ class MDocUpdater : MDocCommand
                Console.WriteLine("Members Added: {0}, Members Deleted: {1}", additions, deletions);
        }
 
+       void AddImporter (string path)
+       {
+               try {
+                       XmlReader r = new XmlTextReader (path);
+                       if (r.Read ()) {
+                               while (r.NodeType != XmlNodeType.Element) {
+                                       if (!r.Read ())
+                                               Error ("Unable to read XML file: {0}.", path);
+                               }
+                               if (r.LocalName == "doc") {
+                                       importers.Add (new MsxdocDocumentationImporter (path));
+                               }
+                               else if (r.LocalName == "Libraries") {
+                                       var ecmadocs = new XmlTextReader (path);
+                                       docEnum = new EcmaDocumentationEnumerator (this, ecmadocs);
+                                       importers.Add (new EcmaDocumentationImporter (ecmadocs));
+                               }
+                               else
+                                       Error ("Unsupported XML format within {0}.", path);
+                       }
+                       r.Close ();
+               } catch (Exception e) {
+                       Environment.ExitCode = 1;
+                       Error ("Could not load XML file: {0}.", e.Message);
+               }
+       }
+
        static ExceptionLocations ParseExceptionLocations (string s)
        {
                ExceptionLocations loc = ExceptionLocations.Member;
@@ -181,7 +205,7 @@ class MDocUpdater : MDocCommand
                return loc;
        }
 
-       private void Warning (string format, params object[] args)
+       internal void Warning (string format, params object[] args)
        {
                Message (TraceLevel.Warning, "mdoc: " + format, args);
        }
@@ -212,52 +236,12 @@ class MDocUpdater : MDocCommand
 
        private static void WriteFile (string filename, FileMode mode, Action<TextWriter> action)
        {
-               if (!File.Exists (filename)) {
-                       using (var writer = OpenWrite (filename, mode))
-                               action (writer);
-                       return;
-               }
-
-               string tmpFile = filename + ".tmp";
-               bool move = true;
-
-               try {
-                       using (var writer = OpenWrite (tmpFile, mode))
+               Action<string> creator = file => {
+                       using (var writer = OpenWrite (file, mode))
                                action (writer);
+               };
 
-                       using (var a = File.OpenRead (filename))
-                       using (var b = File.OpenRead (tmpFile)) {
-                               if (a.Length == b.Length)
-                                       move = !FileContentsIdentical (a, b);
-                       }
-
-                       if (move) {
-                               File.Delete (filename);
-                               File.Move (tmpFile, filename);
-                       }
-               }
-               finally {
-                       if (!move && File.Exists (tmpFile))
-                               File.Delete (tmpFile);
-               }
-       }
-
-       static bool FileContentsIdentical (Stream a, Stream b)
-       {
-               byte[] ba = new byte[4096];
-               byte[] bb = new byte[4096];
-               int ra, rb;
-
-               while ((ra = a.Read (ba, 0, ba.Length)) > 0 &&
-                               (rb = b.Read (bb, 0, bb.Length)) > 0) {
-                       if (ra != rb)
-                               return false;
-                       for (int i = 0; i < ra; ++i) {
-                               if (ba [i] != bb [i])
-                                       return false;
-                       }
-               }
-               return true;
+               MdocFile.UpdateFile (filename, creator);
        }
 
        private static void OrderTypeAttributes (XmlElement e)
@@ -353,20 +337,85 @@ class MDocUpdater : MDocCommand
 
        public void DoUpdateTypes (string basepath, List<string> typenames, string dest)
        {
+               var index = CreateIndexForTypes (dest);
+
                var found = new HashSet<string> ();
                foreach (AssemblyDefinition assembly in assemblies) {
-                       foreach (DocsTypeInfo docsTypeInfo in GetTypes (assembly, typenames)) {
-                               string relpath = DoUpdateType (docsTypeInfo.Type, basepath, dest, docsTypeInfo.EcmaDocs);
-                               if (relpath != null)
-                                       found.Add (docsTypeInfo.Type.FullName);
+                       foreach (TypeDefinition type in docEnum.GetDocumentationTypes (assembly, typenames)) {
+                               string relpath = DoUpdateType (type, basepath, dest);
+                               if (relpath == null)
+                                       continue;
+
+                               found.Add (type.FullName);
+
+                               if (index == null)
+                                       continue;
+
+                               index.Add (assembly);
+                               index.Add (type);
                        }
                }
+
+               if (index != null)
+                       index.Write ();
+               
+               if (ignore_missing_types)
+                       return;
+
                var notFound = from n in typenames where !found.Contains (n) select n;
                if (notFound.Any ())
                        throw new InvalidOperationException("Type(s) not found: " + string.Join (", ", notFound.ToArray ()));
        }
 
-       public string DoUpdateType (TypeDefinition type, string basepath, string dest, XmlReader ecmaDocsType)
+       class IndexForTypes {
+
+               MDocUpdater app;
+               string indexFile;
+
+               XmlDocument index;
+               XmlElement index_types;
+               XmlElement index_assemblies;
+
+               public IndexForTypes (MDocUpdater app, string indexFile, XmlDocument index)
+               {
+                       this.app        = app;
+                       this.indexFile  = indexFile;
+                       this.index      = index;
+
+                       index_types = WriteElement (index.DocumentElement, "Types");
+                       index_assemblies = WriteElement (index.DocumentElement, "Assemblies");
+               }
+
+               public void Add (AssemblyDefinition assembly)
+               {
+                       if (index_assemblies.SelectSingleNode ("Assembly[@Name='" + assembly.Name.Name + "']") != null)
+                               return;
+
+                       app.AddIndexAssembly (assembly, index_assemblies);
+               }
+
+               public void Add (TypeDefinition type)
+               {
+                       app.AddIndexType (type, index_types);
+               }
+
+               public void Write ()
+               {
+                       SortIndexEntries (index_types);
+                       WriteFile (indexFile, FileMode.Create, 
+                                       writer => WriteXml (index.DocumentElement, writer));
+               }
+       }
+
+       IndexForTypes CreateIndexForTypes (string dest)
+       {
+               string indexFile = Path.Combine (dest, "index.xml");
+               if (File.Exists (indexFile))
+                       return null;
+               return new IndexForTypes (this, indexFile, CreateIndexStub ());
+       }
+
+       public string DoUpdateType (TypeDefinition type, string basepath, string dest)
        {
                if (type.Namespace == null)
                        Warning ("warning: The type `{0}' is in the root namespace.  This may cause problems with display within monodoc.",
@@ -399,10 +448,10 @@ class MDocUpdater : MDocCommand
                                throw new InvalidOperationException("Error loading " + typefile + ": " + e.Message, e);
                        }
                        
-                       DoUpdateType2("Updating", basefile, type, output, false, ecmaDocsType);
+                       DoUpdateType2("Updating", basefile, type, output, false);
                } else {
                        // Stub
-                       XmlElement td = StubType(type, output, ecmaDocsType);
+                       XmlElement td = StubType(type, output);
                        if (td == null)
                                return null;
                        
@@ -438,16 +487,15 @@ class MDocUpdater : MDocCommand
                        }                       
 
                        seenTypes[type] = seenTypes;
-                       DoUpdateType2("Updating", basefile, type, Path.Combine(outpath, file.Name), false, null);
+                       DoUpdateType2("Updating", basefile, type, Path.Combine(outpath, file.Name), false);
                }
                
                // Stub types not in the directory
-               foreach (DocsTypeInfo docsTypeInfo in GetTypes (assembly, null)) {
-                       TypeDefinition type = docsTypeInfo.Type;
+               foreach (TypeDefinition type in docEnum.GetDocumentationTypes (assembly, null)) {
                        if (type.Namespace != ns || seenTypes.ContainsKey(type))
                                continue;
 
-                       XmlElement td = StubType(type, Path.Combine(outpath, GetTypeFileName(type) + ".xml"), docsTypeInfo.EcmaDocs);
+                       XmlElement td = StubType(type, Path.Combine(outpath, GetTypeFileName(type) + ".xml"));
                        if (td == null) continue;
                }
        }
@@ -496,10 +544,56 @@ class MDocUpdater : MDocCommand
                XmlElement index_assembly = parent.OwnerDocument.CreateElement("Assembly");
                index_assembly.SetAttribute ("Name", assembly.Name.Name);
                index_assembly.SetAttribute ("Version", assembly.Name.Version.ToString());
-               MakeAttributes (index_assembly, assembly.CustomAttributes, 0);
+
+               AssemblyNameDefinition name = assembly.Name;
+               if (name.HasPublicKey) {
+                       XmlElement pubkey = parent.OwnerDocument.CreateElement ("AssemblyPublicKey");
+                       var key = new StringBuilder (name.PublicKey.Length*3 + 2);
+                       key.Append ("[");
+                       foreach (byte b in name.PublicKey)
+                               key.AppendFormat ("{0,2:x2} ", b);
+                       key.Append ("]");
+                       pubkey.InnerText = key.ToString ();
+                       index_assembly.AppendChild (pubkey);
+               }
+
+               if (!string.IsNullOrEmpty (name.Culture)) {
+                       XmlElement culture = parent.OwnerDocument.CreateElement ("AssemblyCulture");
+                       culture.InnerText = name.Culture;
+                       index_assembly.AppendChild (culture);
+               }
+
+               MakeAttributes (index_assembly, GetCustomAttributes (assembly.CustomAttributes, ""));
                parent.AppendChild(index_assembly);
        }
 
+       private void AddIndexType (TypeDefinition type, XmlElement index_types)
+       {
+               string typename = GetTypeFileName(type);
+
+               // Add namespace and type nodes into the index file as needed
+               string ns = DocUtils.GetNamespace (type);
+               XmlElement nsnode = (XmlElement) index_types.SelectSingleNode ("Namespace[@Name='" + ns + "']");
+               if (nsnode == null) {
+                       nsnode = index_types.OwnerDocument.CreateElement("Namespace");
+                       nsnode.SetAttribute ("Name", ns);
+                       index_types.AppendChild (nsnode);
+               }
+               string doc_typename = GetDocTypeName (type);
+               XmlElement typenode = (XmlElement) nsnode.SelectSingleNode ("Type[@Name='" + typename + "']");
+               if (typenode == null) {
+                       typenode = index_types.OwnerDocument.CreateElement ("Type");
+                       typenode.SetAttribute ("Name", typename);
+                       nsnode.AppendChild (typenode);
+               }
+               if (typename != doc_typename)
+                       typenode.SetAttribute("DisplayName", doc_typename);
+               else
+                       typenode.RemoveAttribute("DisplayName");
+
+               typenode.SetAttribute ("Kind", GetTypeKind (type));
+       }
+
        private void DoUpdateAssemblies (string source, string dest) 
        {
                string indexfile = dest + "/index.xml";
@@ -546,36 +640,17 @@ class MDocUpdater : MDocCommand
 
        private void DoUpdateAssembly (AssemblyDefinition assembly, XmlElement index_types, string source, string dest, HashSet<string> goodfiles) 
        {
-               foreach (DocsTypeInfo docTypeInfo in GetTypes (assembly, null)) {
-                       TypeDefinition type = docTypeInfo.Type;
+               foreach (TypeDefinition type in docEnum.GetDocumentationTypes (assembly, null)) {
                        string typename = GetTypeFileName(type);
                        if (!IsPublic (type) || typename.IndexOfAny (InvalidFilenameChars) >= 0)
                                continue;
 
-                       string reltypepath = DoUpdateType (type, source, dest, docTypeInfo.EcmaDocs);
+                       string reltypepath = DoUpdateType (type, source, dest);
                        if (reltypepath == null)
                                continue;
                        
                        // Add namespace and type nodes into the index file as needed
-                       string ns = DocUtils.GetNamespace (type);
-                       XmlElement nsnode = (XmlElement) index_types.SelectSingleNode("Namespace[@Name='" + ns + "']");
-                       if (nsnode == null) {
-                               nsnode = index_types.OwnerDocument.CreateElement("Namespace");
-                               nsnode.SetAttribute ("Name", ns);
-                               index_types.AppendChild(nsnode);
-                       }
-                       string doc_typename = GetDocTypeName (type);
-                       XmlElement typenode = (XmlElement)nsnode.SelectSingleNode("Type[@Name='" + typename + "']");
-                       if (typenode == null) {
-                               typenode = index_types.OwnerDocument.CreateElement("Type");
-                               typenode.SetAttribute("Name", typename);
-                               nsnode.AppendChild(typenode);
-                       }
-                       if (typename != doc_typename)
-                               typenode.SetAttribute("DisplayName", doc_typename);
-                       else
-                               typenode.RemoveAttribute("DisplayName");
-                       typenode.SetAttribute ("Kind", GetTypeKind (type));
+                       AddIndexType (type, index_types);
                                
                        // Ensure the namespace index file exists
                        string onsdoc = DocUtils.PathCombine (dest, type.Namespace + ".xml");
@@ -593,68 +668,6 @@ class MDocUpdater : MDocCommand
                }
        }
 
-       class DocsTypeInfo {
-               public TypeDefinition Type;
-               public XmlReader EcmaDocs;
-
-               public DocsTypeInfo (TypeDefinition type, XmlReader docs)
-               {
-                       this.Type = type;
-                       this.EcmaDocs = docs;
-               }
-       }
-
-       IEnumerable<Mono.Documentation.MDocUpdater.DocsTypeInfo> GetTypes (AssemblyDefinition assembly, List<string> forTypes)
-       {
-               HashSet<string> seen = null;
-               if (forTypes != null)
-                       forTypes.Sort ();
-               if (ecmadocs != null) {
-                       seen = new HashSet<string> ();
-                       int typeDepth = -1;
-                       while (ecmadocs.Read ()) {
-                               switch (ecmadocs.Name) {
-                                       case "Type": {
-                                               if (typeDepth == -1)
-                                                       typeDepth = ecmadocs.Depth;
-                                               if (ecmadocs.NodeType != XmlNodeType.Element)
-                                                       continue;
-                                               if (typeDepth != ecmadocs.Depth) // nested <TypeDefinition/> element?
-                                                       continue;
-                                               string typename = ecmadocs.GetAttribute ("FullName");
-                                               string typename2 = GetTypeFileName (typename);
-                                               if (forTypes != null && 
-                                                               forTypes.BinarySearch (typename) < 0 &&
-                                                               typename != typename2 &&
-                                                               forTypes.BinarySearch (typename2) < 0)
-                                                       continue;
-                                               TypeDefinition t;
-                                               if ((t = assembly.GetType (typename)) == null && 
-                                                               (t = assembly.GetType (typename2)) == null)
-                                                       continue;
-                                               seen.Add (typename);
-                                               if (typename != typename2)
-                                                       seen.Add (typename2);
-                                               Console.WriteLine ("  Import: {0}", t.FullName);
-                                               yield return new DocsTypeInfo (t, ecmadocs);
-                                               break;
-                                       }
-                                       default:
-                                               break;
-                               }
-                       }
-               }
-               foreach (TypeDefinition type in assembly.GetTypes()) {
-                       if (forTypes != null && forTypes.BinarySearch (type.FullName) < 0)
-                               continue;
-                       if (seen != null && seen.Contains (type.FullName))
-                               continue;
-                       yield return new DocsTypeInfo (type, null);
-                       foreach (TypeDefinition nested in type.NestedTypes)
-                               yield return new DocsTypeInfo (nested, null);
-               }
-       }
-
        private static void SortIndexEntries (XmlElement indexTypes)
        {
                XmlNodeList namespaces = indexTypes.SelectNodes ("Namespace");
@@ -845,31 +858,23 @@ class MDocUpdater : MDocCommand
 
        static readonly XmlNodeComparer DefaultExtensionMethodComparer = new ExtensionMethodComparer ();
                
-       public void DoUpdateType2 (string message, XmlDocument basefile, TypeDefinition type, string output, bool insertSince, XmlReader ecmaDocsType)
+       public void DoUpdateType2 (string message, XmlDocument basefile, TypeDefinition type, string output, bool insertSince)
        {
                Console.WriteLine(message + ": " + type.FullName);
                
                StringToXmlNodeMap seenmembers = new StringToXmlNodeMap ();
 
                // Update type metadata
-               UpdateType(basefile.DocumentElement, type, ecmaDocsType);
-
-               if (ecmaDocsType != null) {
-                       while (ecmaDocsType.Name != "Members" && ecmaDocsType.Read ()) {
-                               // do nothing
-                       }
-                       if (ecmaDocsType.IsEmptyElement)
-                               ecmaDocsType = null;
-               }
+               UpdateType(basefile.DocumentElement, type);
 
                // Update existing members.  Delete member nodes that no longer should be there,
                // and remember what members are already documented so we don't add them again.
                if (true) {
                        MyXmlNodeList todelete = new MyXmlNodeList ();
-                       foreach (DocsNodeInfo info in GetDocumentationMembers (basefile, type, ecmaDocsType)) {
+                       foreach (DocsNodeInfo info in docEnum.GetDocumentationMembers (basefile, type)) {
                                XmlElement oldmember  = info.Node;
                                IMemberReference oldmember2 = info.Member;
-                               string sig = oldmember2 != null ? MakeMemberSignature(oldmember2) : null;
+                               string sig = oldmember2 != null ? memberFormatters [0].GetDeclaration (oldmember2) : null;
 
                                // Interface implementations and overrides are deleted from the docs
                                // unless the overrides option is given.
@@ -910,7 +915,7 @@ class MDocUpdater : MDocCommand
                        foreach (IMemberReference m in type.GetMembers()) {
                                if (m is TypeDefinition) continue;
                                
-                               string sig = MakeMemberSignature(m);
+                               string sig = memberFormatters [0].GetDeclaration (m);
                                if (sig == null) continue;
                                if (seenmembers.ContainsKey(sig)) continue;
                                
@@ -1004,86 +1009,6 @@ class MDocUpdater : MDocCommand
                return null;
        }
 
-       private IEnumerable<DocsNodeInfo> GetDocumentationMembers (XmlDocument basefile, TypeDefinition type, XmlReader ecmaDocsMembers)
-       {
-               if (ecmaDocsMembers != null) {
-                       int membersDepth = ecmaDocsMembers.Depth;
-                       bool go = true;
-                       while (go && ecmaDocsMembers.Read ()) {
-                               switch (ecmaDocsMembers.Name) {
-                                       case "Member": {
-                                               if (membersDepth != ecmaDocsMembers.Depth - 1 || ecmaDocsMembers.NodeType != XmlNodeType.Element)
-                                                       continue;
-                                               DocumentationMember dm = new DocumentationMember (ecmaDocsMembers);
-                                               string xp = GetXPathForMember (dm);
-                                               XmlElement oldmember = (XmlElement) basefile.SelectSingleNode (xp);
-                                               IMemberReference m;
-                                               if (oldmember == null) {
-                                                       m = GetMember (type, dm);
-                                                       if (m == null) {
-                                                               Warning ("Could not import ECMA docs for `{0}'s `{1}': Member not found.",
-                                                                               type.FullName, dm.MemberSignatures ["C#"]);
-                                                                               // SelectSingleNode (ecmaDocsMember, "MemberSignature[@Language=\"C#\"]/@Value").Value);
-                                                               continue;
-                                                       }
-                                                       // oldmember lookup may have failed due to type parameter renames.
-                                                       // Try again.
-                                                       oldmember = (XmlElement) basefile.SelectSingleNode (GetXPathForMember (m));
-                                                       if (oldmember == null) {
-                                                               XmlElement members = WriteElement(basefile.DocumentElement, "Members");
-                                                               oldmember = basefile.CreateElement ("Member");
-                                                               oldmember.SetAttribute ("MemberName", dm.MemberName);
-                                                               members.AppendChild (oldmember);
-                                                               foreach (string key in Sort (dm.MemberSignatures.Keys)) {
-                                                                       XmlElement ms = basefile.CreateElement ("MemberSignature");
-                                                                       ms.SetAttribute ("Language", key);
-                                                                       ms.SetAttribute ("Value", (string) dm.MemberSignatures [key]);
-                                                                       oldmember.AppendChild (ms);
-                                                               }
-                                                               oldmember.SetAttribute ("__monodocer-seen__", "true");
-                                                               Console.WriteLine ("Member Added: {0}", MakeMemberSignature (m));
-                                                               additions++;
-                                                       }
-                                               }
-                                               else {
-                                                       m = GetMember (type, new DocumentationMember (oldmember));
-                                                       if (m == null) {
-                                                               Warning ("Could not import ECMA docs for `{0}'s `{1}': Member not found.",
-                                                                               type.FullName, dm.MemberSignatures ["C#"]);
-                                                               continue;
-                                                       }
-                                                       oldmember.SetAttribute ("__monodocer-seen__", "true");
-                                               }
-                                               DocsNodeInfo node = new DocsNodeInfo (oldmember, m);
-                                               if (ecmaDocsMembers.Name != "Docs")
-                                                       throw new InvalidOperationException ("Found " + ecmaDocsMembers.Name + "; expected <Docs/>!");
-                                               node.EcmaDocs = ecmaDocsMembers;
-                                               yield return node;
-                                               break;
-                                       }
-                                       case "Members":
-                                               if (membersDepth == ecmaDocsMembers.Depth && ecmaDocsMembers.NodeType == XmlNodeType.EndElement) {
-                                                       go = false;
-                                               }
-                                               break;
-                               }
-                       }
-               }
-               foreach (XmlElement oldmember in basefile.SelectNodes("Type/Members/Member")) {
-                       if (oldmember.GetAttribute ("__monodocer-seen__") == "true") {
-                               oldmember.RemoveAttribute ("__monodocer-seen__");
-                               continue;
-                       }
-                       IMemberReference m = GetMember (type, new DocumentationMember (oldmember));
-                       if (m == null) {
-                               yield return new DocsNodeInfo (oldmember);
-                       }
-                       else {
-                               yield return new DocsNodeInfo (oldmember, m);
-                       }
-               }
-       }
-
        void DeleteMember (string reason, string output, XmlNode member, MyXmlNodeList todelete)
        {
                string format = output != null
@@ -1192,274 +1117,99 @@ class MDocUpdater : MDocCommand
        }
        
        // UPDATE HELPER FUNCTIONS
+       
+       // CREATE A STUB DOCUMENTATION FILE     
 
-       private static IMemberReference GetMember (TypeDefinition type, DocumentationMember member)
+       public XmlElement StubType (TypeDefinition type, string output)
        {
-               string membertype = member.MemberType;
+               string typesig = typeFormatters [0].GetDeclaration (type);
+               if (typesig == null) return null; // not publicly visible
                
-               string returntype = member.ReturnType;
+               XmlDocument doc = new XmlDocument();
+               XmlElement root = doc.CreateElement("Type");
+               doc.AppendChild (root);
+
+               DoUpdateType2 ("New Type", doc, type, output, true);
                
-               string docName = member.MemberName;
-               string[] docTypeParams = GetTypeParameters (docName);
+               return root;
+       }
 
-               // Loop through all members in this type with the same name
-               foreach (IMemberReference mi in GetReflectionMembers (type, docName)) {
-                       if (mi is TypeDefinition) continue;
-                       if (GetMemberType(mi) != membertype) continue;
+       private XmlElement CreateSinceNode (XmlDocument doc)
+       {
+               XmlElement s = doc.CreateElement ("since");
+               s.SetAttribute ("version", since);
+               return s;
+       }
+       
+       // STUBBING/UPDATING FUNCTIONS
+       
+       public void UpdateType (XmlElement root, TypeDefinition type)
+       {
+               root.SetAttribute("Name", GetDocTypeName (type));
+               root.SetAttribute("FullName", GetDocTypeFullName (type));
 
-                       string sig = MakeMemberSignature(mi);
-                       if (sig == null) continue; // not publicly visible
+               foreach (MemberFormatter f in typeFormatters) {
+                       string element = "TypeSignature[@Language='" + f.Language + "']";
+                       WriteElementAttribute (root, element, "Language", f.Language);
+                       WriteElementAttribute (root, element, "Value", f.GetDeclaration (type));
+               }
+               
+               XmlElement ass = WriteElement(root, "AssemblyInfo");
+               WriteElementText(ass, "AssemblyName", type.Module.Assembly.Name.Name);
+               if (!no_assembly_versions) {
+                       UpdateAssemblyVersions (root, type, true);
+               }
+               else {
+                       var versions = ass.SelectNodes ("AssemblyVersion").Cast<XmlNode> ().ToList ();
+                       foreach (var version in versions)
+                               ass.RemoveChild (version);
+               }
+               if (!string.IsNullOrEmpty (type.Module.Assembly.Name.Culture))
+                       WriteElementText(ass, "AssemblyCulture", type.Module.Assembly.Name.Culture);
+               else
+                       ClearElement(ass, "AssemblyCulture");
+               
+               // Why-oh-why do we put assembly attributes in each type file?
+               // Neither monodoc nor monodocs2html use them, so I'm deleting them
+               // since they're outdated in current docs, and a waste of space.
+               //MakeAttributes(ass, type.Assembly, true);
+               XmlNode assattrs = ass.SelectSingleNode("Attributes");
+               if (assattrs != null)
+                       ass.RemoveChild(assattrs);
+               
+               NormalizeWhitespace(ass);
+               
+               if (type.IsGenericType ()) {
+                       MakeTypeParameters (root, type.GenericParameters);
+               } else {
+                       ClearElement(root, "TypeParameters");
+               }
+               
+               if (type.BaseType != null) {
+                       XmlElement basenode = WriteElement(root, "Base");
+                       
+                       string basetypename = GetDocTypeFullName (type.BaseType);
+                       if (basetypename == "System.MulticastDelegate") basetypename = "System.Delegate";
+                       WriteElementText(root, "Base/BaseTypeName", basetypename);
+                       
+                       // Document how this type instantiates the generic parameters of its base type
+                       TypeReference origBase = type.BaseType.GetOriginalType ();
+                       if (origBase.IsGenericType ()) {
+                               ClearElement(basenode, "BaseTypeArguments");
+                               GenericInstanceType baseInst             = type.BaseType as GenericInstanceType;
+                               GenericArgumentCollection baseGenArgs    = baseInst == null ? null : baseInst.GenericArguments;
+                               GenericParameterCollection baseGenParams = origBase.GenericParameters;
+                               if (baseGenArgs.Count != baseGenParams.Count)
+                                       throw new InvalidOperationException ("internal error: number of generic arguments doesn't match number of generic parameters.");
+                               for (int i = 0; baseGenArgs != null && i < baseGenArgs.Count; i++) {
+                                       GenericParameter param = baseGenParams [i];
+                                       TypeReference    value = baseGenArgs [i];
 
-                       ParameterDefinitionCollection pis = null;
-                       string[] typeParams = null;
-                       if (mi is MethodDefinition) {
-                               MethodDefinition mb = (MethodDefinition) mi;
-                               pis = mb.Parameters;
-                               if (docTypeParams != null && mb.IsGenericMethod ()) {
-                                       GenericParameterCollection args = mb.GenericParameters;
-                                       if (args.Count == docTypeParams.Length) {
-                                               typeParams = args.Cast<GenericParameter> ().Select (p => p.Name).ToArray ();
-                                       }
-                               }
-                       }
-                       else if (mi is PropertyDefinition)
-                               pis = ((PropertyDefinition)mi).Parameters;
-                       
-                       int mcount = member.Parameters == null ? 0 : member.Parameters.Count;
-                       int pcount = pis == null ? 0 : pis.Count;
-                       if (mcount != pcount)
-                               continue;
-
-                       MethodDefinition mDef = mi as MethodDefinition;
-                       if (mDef != null && !mDef.IsConstructor) {
-                               // Casting operators can overload based on return type.
-                               if (returntype != GetReplacedString (
-                                                       GetDocTypeFullName (((MethodDefinition)mi).ReturnType.ReturnType), 
-                                                       typeParams, docTypeParams)) {
-                                       continue;
-                               }
-                       }
-
-                       if (pcount == 0)
-                               return mi;
-                       bool good = true;
-                       for (int i = 0; i < pis.Count; i++) {
-                               string paramType = GetReplacedString (
-                                       GetDocParameterType (pis [i].ParameterType),
-                                       typeParams, docTypeParams);
-                               if (paramType != (string) member.Parameters [i]) {
-                                       good = false;
-                                       break;
-                               }
-                       }
-                       if (!good) continue;
-
-                       return mi;
-               }
-               
-               return null;
-       }
-
-       private static IEnumerable<IMemberReference> GetReflectionMembers (TypeDefinition type, string docName)
-       {
-               // need to worry about 4 forms of //@MemberName values:
-               //  1. "Normal" (non-generic) member names: GetEnumerator
-               //    - Lookup as-is.
-               //  2. Explicitly-implemented interface member names: System.Collections.IEnumerable.Current
-               //    - try as-is, and try type.member (due to "kludge" for property
-               //      support.
-               //  3. "Normal" Generic member names: Sort<T> (CSC)
-               //    - need to remove generic parameters --> "Sort"
-               //  4. Explicitly-implemented interface members for generic interfaces: 
-               //    -- System.Collections.Generic.IEnumerable<T>.Current
-               //    - Try as-is, and try type.member, *keeping* the generic parameters.
-               //     --> System.Collections.Generic.IEnumerable<T>.Current, IEnumerable<T>.Current
-               //  5. As of 2008-01-02, gmcs will do e.g. 'IFoo`1[A].Method' instead of
-               //    'IFoo<A>.Method' for explicitly implemented methods; don't interpret
-               //    this as (1) or (2).
-               if (docName.IndexOf ('<') == -1 && docName.IndexOf ('[') == -1) {
-                       // Cases 1 & 2
-                       foreach (IMemberReference mi in type.GetMembers (docName))
-                               yield return mi;
-                       if (CountChars (docName, '.') > 0)
-                               // might be a property; try only type.member instead of
-                               // namespace.type.member.
-                               foreach (IMemberReference mi in 
-                                               type.GetMembers (DocUtils.GetTypeDotMember (docName)))
-                                       yield return mi;
-                       yield break;
-               }
-               // cases 3 & 4
-               int numLt = 0;
-               int numDot = 0;
-               int startLt, startType, startMethod;
-               startLt = startType = startMethod = -1;
-               for (int i = 0; i < docName.Length; ++i) {
-                       switch (docName [i]) {
-                               case '<':
-                                       if (numLt == 0) {
-                                               startLt = i;
-                                       }
-                                       ++numLt;
-                                       break;
-                               case '>':
-                                       --numLt;
-                                       if (numLt == 0 && (i + 1) < docName.Length)
-                                               // there's another character in docName, so this <...> sequence is
-                                               // probably part of a generic type -- case 4.
-                                               startLt = -1;
-                                       break;
-                               case '.':
-                                       startType = startMethod;
-                                       startMethod = i;
-                                       ++numDot;
-                                       break;
-                       }
-               }
-               string refName = startLt == -1 ? docName : docName.Substring (0, startLt);
-               // case 3
-               foreach (IMemberReference mi in type.GetMembers (refName))
-                       yield return mi;
-
-               // case 4
-               foreach (IMemberReference mi in type.GetMembers (refName.Substring (startType + 1)))
-                       yield return mi;
-
-               // If we _still_ haven't found it, we've hit another generic naming issue:
-               // post Mono 1.1.18, gmcs generates [[FQTN]] instead of <TypeName> for
-               // explicitly-implemented METHOD names (not properties), e.g. 
-               // "System.Collections.Generic.IEnumerable`1[[Foo, test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].GetEnumerator"
-               // instead of "System.Collections.Generic.IEnumerable<Foo>.GetEnumerator",
-               // which the XML docs will contain.
-               //
-               // Alas, we can't derive the Mono name from docName, so we need to iterate
-               // over all member names, convert them into CSC format, and compare... :-(
-               if (numDot == 0)
-                       yield break;
-               foreach (IMemberReference mi in type.GetMembers ()) {
-                       if (GetMemberName (mi) == docName)
-                               yield return mi;
-               }
-       }
-
-       static string[] GetTypeParameters (string docName)
-       {
-               if (docName [docName.Length-1] != '>')
-                       return null;
-               StringList types = new StringList ();
-               int endToken = docName.Length-2;
-               int i = docName.Length-2;
-               do {
-                       if (docName [i] == ',' || docName [i] == '<') {
-                               types.Add (docName.Substring (i + 1, endToken - i));
-                               endToken = i-1;
-                       }
-                       if (docName [i] == '<')
-                               break;
-               } while (--i >= 0);
-
-               types.Reverse ();
-               return types.ToArray ();
-       }
-
-       static string GetReplacedString (string typeName, string[] from, string[] to)
-       {
-               if (from == null)
-                       return typeName;
-               for (int i = 0; i < from.Length; ++i)
-                       typeName = typeName.Replace (from [i], to [i]);
-               return typeName;
-       }
-       
-       // CREATE A STUB DOCUMENTATION FILE     
-
-       public XmlElement StubType (TypeDefinition type, string output, XmlReader ecmaDocsType)
-       {
-               string typesig = MakeTypeSignature(type);
-               if (typesig == null) return null; // not publicly visible
-               
-               XmlDocument doc = new XmlDocument();
-               XmlElement root = doc.CreateElement("Type");
-               doc.AppendChild (root);
-
-               DoUpdateType2 ("New Type", doc, type, output, true, ecmaDocsType);
-               
-               return root;
-       }
-
-       private XmlElement CreateSinceNode (XmlDocument doc)
-       {
-               XmlElement s = doc.CreateElement ("since");
-               s.SetAttribute ("version", since);
-               return s;
-       }
-       
-       // STUBBING/UPDATING FUNCTIONS
-       
-       public void UpdateType (XmlElement root, TypeDefinition type, XmlReader ecmaDocsType)
-       {
-               root.SetAttribute("Name", GetDocTypeName (type));
-               root.SetAttribute("FullName", GetDocTypeFullName (type));
-
-               WriteElementAttribute(root, "TypeSignature[@Language='C#']", "Language", "C#");
-               WriteElementAttribute(root, "TypeSignature[@Language='C#']", "Value", MakeTypeSignature(type));
-               
-               XmlElement ass = WriteElement(root, "AssemblyInfo");
-               WriteElementText(ass, "AssemblyName", type.Module.Assembly.Name.Name);
-               if (!no_assembly_versions) {
-                       UpdateAssemblyVersions (root, type, true);
-               }
-               else {
-                       var versions = ass.SelectNodes ("AssemblyVersion").Cast<XmlNode> ().ToList ();
-                       foreach (var version in versions)
-                               ass.RemoveChild (version);
-               }
-               if (!string.IsNullOrEmpty (type.Module.Assembly.Name.Culture))
-                       WriteElementText(ass, "AssemblyCulture", type.Module.Assembly.Name.Culture);
-               else
-                       ClearElement(ass, "AssemblyCulture");
-               
-               // Why-oh-why do we put assembly attributes in each type file?
-               // Neither monodoc nor monodocs2html use them, so I'm deleting them
-               // since they're outdated in current docs, and a waste of space.
-               //MakeAttributes(ass, type.Assembly, true);
-               XmlNode assattrs = ass.SelectSingleNode("Attributes");
-               if (assattrs != null)
-                       ass.RemoveChild(assattrs);
-               
-               NormalizeWhitespace(ass);
-               
-               if (type.IsGenericType ()) {
-                       MakeTypeParameters (root, type.GenericParameters);
-               } else {
-                       ClearElement(root, "TypeParameters");
-               }
-               
-               if (type.BaseType != null) {
-                       XmlElement basenode = WriteElement(root, "Base");
-                       
-                       string basetypename = GetDocTypeFullName (type.BaseType);
-                       if (basetypename == "System.MulticastDelegate") basetypename = "System.Delegate";
-                       WriteElementText(root, "Base/BaseTypeName", basetypename);
-                       
-                       // Document how this type instantiates the generic parameters of its base type
-                       TypeReference origBase = type.BaseType.GetOriginalType ();
-                       if (origBase.IsGenericType ()) {
-                               ClearElement(basenode, "BaseTypeArguments");
-                               GenericInstanceType baseInst             = type.BaseType as GenericInstanceType;
-                               GenericArgumentCollection baseGenArgs    = baseInst == null ? null : baseInst.GenericArguments;
-                               GenericParameterCollection baseGenParams = origBase.GenericParameters;
-                               if (baseGenArgs.Count != baseGenParams.Count)
-                                       throw new InvalidOperationException ("internal error: number of generic arguments doesn't match number of generic parameters.");
-                               for (int i = 0; baseGenArgs != null && i < baseGenArgs.Count; i++) {
-                                       GenericParameter param = baseGenParams [i];
-                                       TypeReference    value = baseGenArgs [i];
-
-                                       XmlElement bta = WriteElement(basenode, "BaseTypeArguments");
-                                       XmlElement arg = bta.OwnerDocument.CreateElement("BaseTypeArgument");
-                                       bta.AppendChild(arg);
-                                       arg.SetAttribute ("TypeParamName", param.Name);
-                                       arg.InnerText = GetDocTypeFullName (value);
+                                       XmlElement bta = WriteElement(basenode, "BaseTypeArguments");
+                                       XmlElement arg = bta.OwnerDocument.CreateElement("BaseTypeArgument");
+                                       bta.AppendChild(arg);
+                                       arg.SetAttribute ("TypeParamName", param.Name);
+                                       arg.InnerText = GetDocTypeFullName (value);
                                }
                        }
                } else {
@@ -1484,7 +1234,7 @@ class MDocUpdater : MDocCommand
                        ClearElement(root, "Interfaces");
                }
 
-               MakeAttributes (root, type.CustomAttributes, 0);
+               MakeAttributes (root, GetCustomAttributes (type));
                
                if (DocUtils.IsDelegate (type)) {
                        MakeTypeParameters (root, type.GenericParameters);
@@ -1493,18 +1243,6 @@ class MDocUpdater : MDocCommand
                }
                
                DocsNodeInfo typeInfo = new DocsNodeInfo (WriteElement(root, "Docs"), type);
-               if (ecmaDocsType != null) {
-                       if (ecmaDocsType.Name != "Docs") {
-                               int depth = ecmaDocsType.Depth;
-                               while (ecmaDocsType.Read ()) {
-                                       if (ecmaDocsType.Name == "Docs" && ecmaDocsType.Depth == depth + 1)
-                                               break;
-                               }
-                       }
-                       if (!ecmaDocsType.IsStartElement ("Docs"))
-                               throw new InvalidOperationException ("Found " + ecmaDocsType.Name + "; expecting <Docs/>!");
-                       typeInfo.EcmaDocs = ecmaDocsType;
-               }
                MakeDocNode (typeInfo);
                
                if (!DocUtils.IsDelegate (type))
@@ -1513,7 +1251,7 @@ class MDocUpdater : MDocCommand
                NormalizeWhitespace(root);
        }
 
-       static IEnumerable<T> Sort<T> (IEnumerable<T> list)
+       internal static IEnumerable<T> Sort<T> (IEnumerable<T> list)
        {
                List<T> l = new List<T> (list);
                l.Sort ();
@@ -1524,8 +1262,12 @@ class MDocUpdater : MDocCommand
        {
                XmlElement me = (XmlElement) info.Node;
                IMemberReference mi = info.Member;
-               WriteElementAttribute(me, "MemberSignature[@Language='C#']", "Language", "C#");
-               WriteElementAttribute(me, "MemberSignature[@Language='C#']", "Value", MakeMemberSignature(mi));
+
+               foreach (MemberFormatter f in memberFormatters) {
+                       string element = "MemberSignature[@Language='" + f.Language + "']";
+                       WriteElementAttribute (me, element, "Language", f.Language);
+                       WriteElementAttribute (me, element, "Value", f.GetDeclaration (mi));
+               }
 
                WriteElementText(me, "MemberType", GetMemberType(mi));
                
@@ -1536,26 +1278,7 @@ class MDocUpdater : MDocCommand
                        ClearElement (me, "AssemblyInfo");
                }
 
-               ICustomAttributeProvider p = mi as ICustomAttributeProvider;
-               if (p != null)
-                       MakeAttributes (me, p.CustomAttributes, 0);
-
-               PropertyReference pr = mi as PropertyReference;
-               if (pr != null) {
-                       PropertyDefinition pd = pr.Resolve ();
-                       if (pd.GetMethod != null)
-                               MakeAttributes (me, pd.GetMethod.CustomAttributes, AttributeFlags.KeepExistingAttributes, "get: ");
-                       if (pd.SetMethod != null)
-                               MakeAttributes (me, pd.SetMethod.CustomAttributes, AttributeFlags.KeepExistingAttributes, "set: ");
-               }
-               EventReference er = mi as EventReference;
-               if (er != null) {
-                       EventDefinition ed = er.Resolve ();
-                       if (ed.AddMethod != null)
-                               MakeAttributes (me, ed.AddMethod.CustomAttributes, AttributeFlags.KeepExistingAttributes, "add: ");
-                       if (ed.RemoveMethod != null)
-                               MakeAttributes (me, ed.RemoveMethod.CustomAttributes, AttributeFlags.KeepExistingAttributes, "remove: ");
-               }
+               MakeAttributes (me, GetCustomAttributes (mi));
 
                MakeReturnValue(me, mi);
                if (mi is MethodReference) {
@@ -1574,12 +1297,87 @@ class MDocUpdater : MDocCommand
                UpdateExtensionMethods (me, info);
        }
 
-       static readonly string[] ValidExtensionMembers = {
-               "Docs",
-               "MemberSignature",
-               "MemberType",
-               "Parameters",
-               "ReturnValue",
+       IEnumerable<string> GetCustomAttributes (IMemberReference mi)
+       {
+               IEnumerable<string> attrs = Enumerable.Empty<string>();
+
+               ICustomAttributeProvider p = mi as ICustomAttributeProvider;
+               if (p != null)
+                       attrs = attrs.Concat (GetCustomAttributes (p.CustomAttributes, ""));
+
+               PropertyReference pr = mi as PropertyReference;
+               if (pr != null) {
+                       PropertyDefinition pd = pr.Resolve ();
+                       if (pd.GetMethod != null)
+                               attrs = attrs.Concat (GetCustomAttributes (pd.GetMethod.CustomAttributes, "get: "));
+                       if (pd.SetMethod != null)
+                               attrs = attrs.Concat (GetCustomAttributes (pd.SetMethod.CustomAttributes, "set: "));
+               }
+
+               EventReference er = mi as EventReference;
+               if (er != null) {
+                       EventDefinition ed = er.Resolve ();
+                       if (ed.AddMethod != null)
+                               attrs = attrs.Concat (GetCustomAttributes (ed.AddMethod.CustomAttributes, "add: "));
+                       if (ed.RemoveMethod != null)
+                               attrs = attrs.Concat (GetCustomAttributes (ed.RemoveMethod.CustomAttributes, "remove: "));
+               }
+
+               return attrs;
+       }
+
+       IEnumerable<string> GetCustomAttributes (CustomAttributeCollection attributes, string prefix)
+       {
+               foreach (CustomAttribute attribute in attributes.Cast<CustomAttribute> ()
+                               .OrderBy (ca => ca.Constructor.DeclaringType.FullName)) {
+                       if (!attribute.Resolve ()) {
+                               // skip?
+                               Warning ("warning: could not resolve type {0}.",
+                                               attribute.Constructor.DeclaringType.FullName);
+                       }
+                       TypeDefinition attrType = attribute.Constructor.DeclaringType as TypeDefinition;
+                       if (attrType != null && !IsPublic (attrType))
+                               continue;
+                       if (slashdocFormatter.GetName (attribute.Constructor.DeclaringType) == null)
+                               continue;
+                       
+                       if (Array.IndexOf (IgnorableAttributes, attribute.Constructor.DeclaringType.FullName) >= 0)
+                               continue;
+                       
+                       StringList fields = new StringList ();
+
+                       ParameterDefinitionCollection parameters = attribute.Constructor.Parameters;
+                       for (int i = 0; i < attribute.ConstructorParameters.Count; ++i) {
+                               fields.Add (MakeAttributesValueString (
+                                               attribute.ConstructorParameters [i],
+                                               parameters [i].ParameterType));
+                       }
+                       var namedArgs =
+                               (from de in attribute.Fields.Cast<DictionaryEntry> ()
+                                select new { Type=attribute.GetFieldType (de.Key.ToString ()), Name=de.Key, Value=de.Value })
+                               .Concat (
+                                               (from de in attribute.Properties.Cast<DictionaryEntry> ()
+                                                select new { Type=attribute.GetPropertyType (de.Key.ToString ()), Name=de.Key, Value=de.Value }))
+                               .OrderBy (v => v.Name);
+                       foreach (var d in namedArgs)
+                               fields.Add (string.Format ("{0}={1}", d.Name, 
+                                               MakeAttributesValueString (d.Value, d.Type)));
+
+                       string a2 = String.Join(", ", fields.ToArray ());
+                       if (a2 != "") a2 = "(" + a2 + ")";
+
+                       string name = attribute.Constructor.DeclaringType.FullName;
+                       if (name.EndsWith("Attribute")) name = name.Substring(0, name.Length-"Attribute".Length);
+                       yield return prefix + name + a2;
+               }
+       }
+
+       static readonly string[] ValidExtensionMembers = {
+               "Docs",
+               "MemberSignature",
+               "MemberType",
+               "Parameters",
+               "ReturnValue",
                "TypeParameters",
        };
 
@@ -1677,7 +1475,7 @@ class MDocUpdater : MDocCommand
        
        // XML HELPER FUNCTIONS
        
-       private static XmlElement WriteElement(XmlNode parent, string element) {
+       internal static XmlElement WriteElement(XmlNode parent, string element) {
                XmlElement ret = (XmlElement)parent.SelectSingleNode(element);
                if (ret == null) {
                        string[] path = element.Split('/');
@@ -1718,7 +1516,7 @@ class MDocUpdater : MDocCommand
                return n;
        }
 
-       private static XmlNode CopyNode (XmlNode source, XmlNode dest)
+       internal static XmlNode CopyNode (XmlNode source, XmlNode dest)
        {
                XmlNode copy = dest.OwnerDocument.ImportNode (source, true);
                dest.AppendChild (copy);
@@ -1737,7 +1535,7 @@ class MDocUpdater : MDocCommand
                if (node.GetAttribute(attribute) == value) return;
                node.SetAttribute(attribute, value);
        }
-       private static void ClearElement(XmlElement parent, string name) {
+       internal static void ClearElement(XmlElement parent, string name) {
                XmlElement node = (XmlElement)parent.SelectSingleNode(name);
                if (node != null)
                        parent.RemoveChild(node);
@@ -1772,7 +1570,7 @@ class MDocUpdater : MDocCommand
 
                string retnodename = null;
                if (returntype != null && returntype.FullName != "System.Void") { // FIXME
-                       retnodename = returnisreturn ? "returns" : "value";
+                       info.ReturnNodeName = retnodename = returnisreturn ? "returns" : "value";
                        string retnodename_other = !returnisreturn ? "returns" : "value";
                        
                        // If it has a returns node instead of a value node, change its name.
@@ -1798,143 +1596,8 @@ class MDocUpdater : MDocCommand
                        UpdateExceptions (e, info.Member);
                }
 
-               if (info.EcmaDocs != null) {
-                       XmlReader r = info.EcmaDocs;
-                       int depth = r.Depth;
-                       r.ReadStartElement ("Docs");
-                       while (r.Read ()) {
-                               if (r.Name == "Docs") {
-                                       if (r.Depth == depth && r.NodeType == XmlNodeType.EndElement)
-                                               break;
-                                       else
-                                               throw new InvalidOperationException ("Skipped past current <Docs/> element!");
-                               }
-                               if (!r.IsStartElement ())
-                                       continue;
-                               switch (r.Name) {
-                                       case "param":
-                                       case "typeparam": {
-                                               string name = r.GetAttribute ("name");
-                                               if (name == null)
-                                                       break;
-                                               XmlNode doc = e.SelectSingleNode (
-                                                               r.Name + "[@name='" + name + "']");
-                                               string value = r.ReadInnerXml ();
-                                               if (doc != null)
-                                                       doc.InnerXml = value.Replace ("\r", "");
-                                               break;
-                                       }
-                                       case "altmember":
-                                       case "exception":
-                                       case "permission":
-                                       case "seealso": {
-                                               string name = r.Name;
-                                               string cref = r.GetAttribute ("cref");
-                                               if (cref == null)
-                                                       break;
-                                               XmlNode doc = e.SelectSingleNode (
-                                                               r.Name + "[@cref='" + cref + "']");
-                                               string value = r.ReadInnerXml ().Replace ("\r", "");
-                                               if (doc != null)
-                                                       doc.InnerXml = value;
-                                               else {
-                                                       XmlElement n = e.OwnerDocument.CreateElement (name);
-                                                       n.SetAttribute ("cref", cref);
-                                                       n.InnerXml = value;
-                                                       e.AppendChild (n);
-                                               }
-                                               break;
-                                       }
-                                       default: {
-                                               string name = r.Name;
-                                               string xpath = r.Name;
-                                               StringList attributes = new StringList (r.AttributeCount);
-                                               if (r.MoveToFirstAttribute ()) {
-                                                       do {
-                                                               attributes.Add ("@" + r.Name + "=\"" + r.Value + "\"");
-                                                       } while (r.MoveToNextAttribute ());
-                                                       r.MoveToContent ();
-                                               }
-                                               if (attributes.Count > 0) {
-                                                       xpath += "[" + string.Join (" and ", attributes.ToArray ()) + "]";
-                                               }
-                                               XmlNode doc = e.SelectSingleNode (xpath);
-                                               string value = r.ReadInnerXml ().Replace ("\r", "");
-                                               if (doc != null) {
-                                                       doc.InnerXml = value;
-                                               }
-                                               else {
-                                                       XmlElement n = e.OwnerDocument.CreateElement (name);
-                                                       n.InnerXml = value;
-                                                       foreach (string a in attributes) {
-                                                               int eq = a.IndexOf ('=');
-                                                               n.SetAttribute (a.Substring (1, eq-1), a.Substring (eq+2, a.Length-eq-3));
-                                                       }
-                                                       e.AppendChild (n);
-                                               }
-                                               break;
-                                       }
-                               }
-                       }
-               }
-               if (info.SlashDocs != null) {
-                       XmlNode elem = info.SlashDocs;
-                       if (elem != null) {
-                               if (elem.SelectSingleNode("summary") != null)
-                                       ClearElement(e, "summary");
-                               if (elem.SelectSingleNode("remarks") != null)
-                                       ClearElement(e, "remarks");
-                               if (elem.SelectSingleNode("value") != null)
-                                       ClearElement(e, "value");
-                               if (retnodename != null && elem.SelectSingleNode(retnodename) != null)
-                                       ClearElement(e, retnodename);
-
-                               foreach (XmlNode child in elem.ChildNodes) {
-                                       switch (child.Name) {
-                                               case "param":
-                                               case "typeparam": {
-                                                       XmlAttribute name = child.Attributes ["name"];
-                                                       if (name == null)
-                                                               break;
-                                                       XmlElement p2 = (XmlElement) e.SelectSingleNode (child.Name + "[@name='" + name.Value + "']");
-                                                       if (p2 != null)
-                                                               p2.InnerXml = child.InnerXml;
-                                                       break;
-                                               }
-                                               case "altmember":
-                                               case "exception":
-                                               case "permission": {
-                                                       XmlAttribute cref = child.Attributes ["cref"] ?? child.Attributes ["name"];
-                                                       if (cref == null)
-                                                               break;
-                                                       XmlElement a = (XmlElement) e.SelectSingleNode (child.Name + "[@cref='" + cref.Value + "']");
-                                                       if (a == null) {
-                                                               a = e.OwnerDocument.CreateElement (child.Name);
-                                                               a.SetAttribute ("cref", child.Attributes ["cref"].Value);
-                                                               e.AppendChild (a);
-                                                       }
-                                                       a.InnerXml = child.InnerXml;
-                                                       break;
-                                               }
-                                               case "seealso": {
-                                                       XmlAttribute cref = child.Attributes ["cref"];
-                                                       if (cref == null)
-                                                               break;
-                                                       XmlElement a = (XmlElement) e.SelectSingleNode ("altmember[@cref='" + cref.Value + "']");
-                                                       if (a == null) {
-                                                               a = e.OwnerDocument.CreateElement ("altmember");
-                                                               a.SetAttribute ("cref", child.Attributes ["cref"].Value);
-                                                               e.AppendChild (a);
-                                                       }
-                                                       break;
-                                               }
-                                               default:
-                                                       CopyNode (child, e);
-                                                       break;
-                                       }
-                               }
-                       }
-               }
+               foreach (DocumentationImporter importer in importers)
+                       importer.ImportDocumentation (info);
                
                OrderDocsNodes (e, e.ChildNodes);
                NormalizeWhitespace(e);
@@ -2189,86 +1852,29 @@ class MDocUpdater : MDocCommand
                "System.Runtime.CompilerServices.ExtensionAttribute",
        };
 
-       [Flags]
-       enum AttributeFlags {
-               None,
-               KeepExistingAttributes = 0x1,
-       }
-
-       private void MakeAttributes (XmlElement root, CustomAttributeCollection attributes, AttributeFlags flags)
-       {
-               MakeAttributes (root, attributes, flags, null);
-       }
-
-       private void MakeAttributes (XmlElement root, CustomAttributeCollection attributes, AttributeFlags flags, string prefix)
+       private void MakeAttributes (XmlElement root, IEnumerable<string> attributes)
        {
-               bool keepExisting = (flags & AttributeFlags.KeepExistingAttributes) != 0;
-               if (attributes.Count == 0) {
-                       if (!keepExisting)
-                               ClearElement(root, "Attributes");
+               if (!attributes.Any ()) {
+                       ClearElement (root, "Attributes");
                        return;
                }
 
-               bool b = false;
                XmlElement e = (XmlElement)root.SelectSingleNode("Attributes");
-               if (e != null && !keepExisting)
+               if (e != null)
                        e.RemoveAll();
                else if (e == null)
                        e = root.OwnerDocument.CreateElement("Attributes");
                
-               foreach (CustomAttribute attribute in attributes.Cast<CustomAttribute> ()
-                               .OrderBy (ca => ca.Constructor.DeclaringType.FullName)) {
-                       if (!attribute.Resolve ()) {
-                               // skip?
-                               Warning ("warning: could not resolve type {0}.",
-                                               attribute.Constructor.DeclaringType.FullName);
-                       }
-                       TypeDefinition attrType = attribute.Constructor.DeclaringType as TypeDefinition;
-                       if (attrType != null && !IsPublic (attrType))
-                               continue;
-                       if (slashdocFormatter.GetName (attribute.Constructor.DeclaringType) == null)
-                               continue;
-                       
-                       if (Array.IndexOf (IgnorableAttributes, attribute.Constructor.DeclaringType.FullName) >= 0)
-                               continue;
-                       
-                       b = true;
-                       
-                       StringList fields = new StringList ();
-
-                       ParameterDefinitionCollection parameters = attribute.Constructor.Parameters;
-                       for (int i = 0; i < attribute.ConstructorParameters.Count; ++i) {
-                               fields.Add (MakeAttributesValueString (
-                                               attribute.ConstructorParameters [i],
-                                               parameters [i].ParameterType));
-                       }
-                       var namedArgs =
-                               (from de in attribute.Fields.Cast<DictionaryEntry> ()
-                                select new { Type=attribute.GetFieldType (de.Key.ToString ()), Name=de.Key, Value=de.Value })
-                               .Concat (
-                                               (from de in attribute.Properties.Cast<DictionaryEntry> ()
-                                                select new { Type=attribute.GetPropertyType (de.Key.ToString ()), Name=de.Key, Value=de.Value }))
-                               .OrderBy (v => v.Name);
-                       foreach (var d in namedArgs)
-                               fields.Add (string.Format ("{0}={1}", d.Name, 
-                                               MakeAttributesValueString (d.Value, d.Type)));
-
-                       string a2 = String.Join(", ", fields.ToArray ());
-                       if (a2 != "") a2 = "(" + a2 + ")";
-                       
+               foreach (string attribute in attributes) {
                        XmlElement ae = root.OwnerDocument.CreateElement("Attribute");
                        e.AppendChild(ae);
                        
-                       string name = attribute.Constructor.DeclaringType.FullName;
-                       if (name.EndsWith("Attribute")) name = name.Substring(0, name.Length-"Attribute".Length);
-                       WriteElementText(ae, "AttributeName", prefix + name + a2);
+                       WriteElementText(ae, "AttributeName", attribute);
                }
                
-               if (b && e.ParentNode == null)
+               if (e.ParentNode == null)
                        root.AppendChild(e);
-               else if (!b)
-                       ClearElement(root, "Attributes");
-               
+
                NormalizeWhitespace(e);
        }
 
@@ -2333,7 +1939,7 @@ class MDocUpdater : MDocCommand
                                if (p.IsOut) pe.SetAttribute("RefType", "out");
                                else pe.SetAttribute("RefType", "ref");
                        }
-                       MakeAttributes (pe, p.CustomAttributes, 0);
+                       MakeAttributes (pe, GetCustomAttributes (p.CustomAttributes, ""));
                }
        }
        
@@ -2351,7 +1957,7 @@ class MDocUpdater : MDocCommand
                        XmlElement pe = root.OwnerDocument.CreateElement("TypeParameter");
                        e.AppendChild(pe);
                        pe.SetAttribute("Name", t.Name);
-                       MakeAttributes (pe, t.CustomAttributes, 0);
+                       MakeAttributes (pe, GetCustomAttributes (t.CustomAttributes, ""));
                        XmlElement ce = (XmlElement) e.SelectSingleNode ("Constraints");
                        ConstraintCollection constraints = t.Constraints;
                        GenericParameterAttributes attrs = t.Attributes;
@@ -2410,7 +2016,7 @@ class MDocUpdater : MDocCommand
                else throw new ArgumentException();
        }
 
-       private static string GetDocParameterType (TypeReference type)
+       internal static string GetDocParameterType (TypeReference type)
        {
                return GetDocTypeFullName (type).Replace ("@", "&");
        }
@@ -2421,7 +2027,7 @@ class MDocUpdater : MDocCommand
                e.RemoveAll();
                WriteElementText(e, "ReturnType", GetDocTypeFullName (type));
                if (attributes != null)
-                       MakeAttributes(e, attributes, 0);
+                       MakeAttributes(e, GetCustomAttributes (attributes, ""));
        }
        
        private void MakeReturnValue (XmlElement root, IMemberReference mi)
@@ -2445,7 +2051,7 @@ class MDocUpdater : MDocCommand
                IMemberReference mi = info.Member;
                if (mi is TypeDefinition) return null;
 
-               string sigs = MakeMemberSignature(mi);
+               string sigs = memberFormatters [0].GetDeclaration (mi);
                if (sigs == null) return null; // not publicly visible
                
                // no documentation for property/event accessors.  Is there a better way of doing this?
@@ -2472,7 +2078,7 @@ class MDocUpdater : MDocCommand
                return me;
        }
 
-       private static string GetMemberName (IMemberReference mi)
+       internal static string GetMemberName (IMemberReference mi)
        {
                MethodDefinition mb = mi as MethodDefinition;
                if (mb == null) {
@@ -2504,30 +2110,14 @@ class MDocUpdater : MDocCommand
                }
                return sb.ToString ();
        }
-
-       private static int CountChars (string s, char c)
-       {
-               int count = 0;
-               for (int i = 0; i < s.Length; ++i) {
-                       if (s [i] == c)
-                               ++count;
-               }
-               return count;
-       }
        
        /// SIGNATURE GENERATION FUNCTIONS
-       
-       static string MakeTypeSignature (TypeReference type)
-       {
-               return csharpFormatter.GetDeclaration (type);
-       }
-
-       static string MakeMemberSignature (IMemberReference mi)
+       internal static bool IsPrivate (IMemberReference mi)
        {
-               return csharpFullFormatter.GetDeclaration (mi);
+               return memberFormatters [0].GetDeclaration (mi) == null;
        }
 
-       static string GetMemberType (IMemberReference mi)
+       internal static string GetMemberType (IMemberReference mi)
        {
                if (mi is MethodDefinition && ((MethodDefinition) mi).IsConstructor)
                        return "Constructor";
@@ -2547,104 +2137,12 @@ class MDocUpdater : MDocCommand
                return docTypeFormatter.GetName (type);
        }
 
-       private static string GetDocTypeFullName (TypeReference type)
+       internal static string GetDocTypeFullName (TypeReference type)
        {
                return DocTypeFullMemberFormatter.Default.GetName (type);
        }
 
-       class DocsNodeInfo {
-               public DocsNodeInfo (XmlElement node)
-               {
-                       this.Node = node;
-               }
-
-               public DocsNodeInfo (XmlElement node, TypeDefinition type)
-                       : this (node)
-               {
-                       SetType (type);
-               }
-
-               public DocsNodeInfo (XmlElement node, IMemberReference member)
-                       : this (node)
-               {
-                       SetMemberInfo (member);
-               }
-
-               void SetType (TypeDefinition type)
-               {
-                       if (type == null)
-                               throw new ArgumentNullException ("type");
-                       GenericParameters = new List<GenericParameter> (type.GenericParameters.Cast<GenericParameter> ());
-                       List<TypeReference> declTypes = DocUtils.GetDeclaringTypes (type);
-                       int maxGenArgs = DocUtils.GetGenericArgumentCount (type);
-                       for (int i = 0; i < declTypes.Count - 1; ++i) {
-                               int remove = System.Math.Min (maxGenArgs, 
-                                               DocUtils.GetGenericArgumentCount (declTypes [i]));
-                               maxGenArgs -= remove;
-                               while (remove-- > 0)
-                                       GenericParameters.RemoveAt (0);
-                       }
-                       if (DocUtils.IsDelegate (type)) {
-                               Parameters = type.GetMethod("Invoke").Parameters;
-                               ReturnType = type.GetMethod("Invoke").ReturnType.ReturnType;
-                       }
-                       SetSlashDocs (type);
-               }
-
-               void SetMemberInfo (IMemberReference member)
-               {
-                       if (member == null)
-                               throw new ArgumentNullException ("member");
-                       ReturnIsReturn = true;
-                       AddRemarks = true;
-                       Member = member;
-                       
-                       if (member is MethodReference ) {
-                               MethodReference mr = (MethodReference) member;
-                               Parameters = mr.Parameters;
-                               if (mr.IsGenericMethod ()) {
-                                       GenericParameters = new List<GenericParameter> (mr.GenericParameters.Cast<GenericParameter> ());
-                               }
-                       }
-                       else if (member is PropertyDefinition) {
-                               Parameters = ((PropertyDefinition) member).Parameters;
-                       }
-                               
-                       if (member is MethodDefinition) {
-                               ReturnType = ((MethodDefinition) member).ReturnType.ReturnType;
-                       } else if (member is PropertyDefinition) {
-                               ReturnType = ((PropertyDefinition) member).PropertyType;
-                               ReturnIsReturn = false;
-                       }
-
-                       // no remarks section for enum members
-                       if (member.DeclaringType != null && ((TypeDefinition) member.DeclaringType).IsEnum)
-                               AddRemarks = false;
-                       SetSlashDocs (member);
-               }
-
-               private void SetSlashDocs (IMemberReference member)
-               {
-                       if (slashdocs == null)
-                               return;
-
-                       string slashdocsig = slashdocFormatter.GetDeclaration (member);
-                       if (slashdocsig != null)
-                               SlashDocs = slashdocs.SelectSingleNode ("doc/members/member[@name='" + slashdocsig + "']");
-               }
-
-               public TypeReference ReturnType;
-               public List<GenericParameter> GenericParameters;
-               public ParameterDefinitionCollection Parameters;
-               public bool ReturnIsReturn;
-               public XmlElement Node;
-               public bool AddRemarks = true;
-               public XmlNode SlashDocs;
-               public XmlReader EcmaDocs;
-               public IMemberReference Member;
-       }
-
-       static string GetXPathForMember (DocumentationMember member)
+       internal static string GetXPathForMember (DocumentationMember member)
        {
                StringBuilder xpath = new StringBuilder ();
                xpath.Append ("//Members/Member[@MemberName=\"")
@@ -2817,6 +2315,13 @@ static class CecilExtensions {
                        return tr.Resolve ();
                throw new NotSupportedException ("Cannot find definition for " + member.ToString ());
        }
+
+       public static TypeReference GetUnderlyingType (this TypeDefinition type)
+       {
+               if (!type.IsEnum)
+                       return type;
+               return type.Fields.Cast<FieldDefinition>().First (f => f.Name == "value__").FieldType;
+       }
 }
 
 static class DocUtils {
@@ -2981,57 +2486,708 @@ static class DocUtils {
        }
 }
 
-class DocumentationMember {
-       public StringToStringMap MemberSignatures = new StringToStringMap ();
-       public string ReturnType;
-       public StringList Parameters;
-       public string MemberName;
-       public string MemberType;
+class DocsNodeInfo {
+       public DocsNodeInfo (XmlElement node)
+       {
+               this.Node = node;
+       }
 
-       public DocumentationMember (XmlReader reader)
+       public DocsNodeInfo (XmlElement node, TypeDefinition type)
+               : this (node)
        {
-               MemberName = reader.GetAttribute ("MemberName");
-               int depth = reader.Depth;
-               bool go = true;
-               StringList p = new StringList ();
-               do {
-                       if (reader.NodeType != XmlNodeType.Element)
-                               continue;
-                       switch (reader.Name) {
-                               case "MemberSignature":
-                                       MemberSignatures [reader.GetAttribute ("Language")] = reader.GetAttribute ("Value");
-                                       break;
-                               case "MemberType":
-                                       MemberType = reader.ReadElementString ();
-                                       break;
-                               case "ReturnType":
-                                       if (reader.Depth == depth + 2)
-                                               ReturnType = reader.ReadElementString ();
-                                       break;
-                               case "Parameter":
-                                       if (reader.Depth == depth + 2)
-                                               p.Add (reader.GetAttribute ("Type"));
-                                       break;
-                               case "Docs":
-                                       if (reader.Depth == depth + 1)
-                                               go = false;
-                                       break;
-                       }
-               } while (go && reader.Read () && reader.Depth >= depth);
-               if (p.Count > 0) {
-                       Parameters = p;
-               }
+               SetType (type);
        }
 
-       public DocumentationMember (XmlNode node)
+       public DocsNodeInfo (XmlElement node, IMemberReference member)
+               : this (node)
        {
-               MemberName = node.Attributes ["MemberName"].Value;
-               foreach (XmlNode n in node.SelectNodes ("MemberSignature")) {
-                       XmlAttribute l = n.Attributes ["Language"];
-                       XmlAttribute v = n.Attributes ["Value"];
-                       if (l != null && v != null)
-                               MemberSignatures [l.Value] = v.Value;
-               }
+               SetMemberInfo (member);
+       }
+
+       void SetType (TypeDefinition type)
+       {
+               if (type == null)
+                       throw new ArgumentNullException ("type");
+               Type = type;
+               GenericParameters = new List<GenericParameter> (type.GenericParameters.Cast<GenericParameter> ());
+               List<TypeReference> declTypes = DocUtils.GetDeclaringTypes (type);
+               int maxGenArgs = DocUtils.GetGenericArgumentCount (type);
+               for (int i = 0; i < declTypes.Count - 1; ++i) {
+                       int remove = System.Math.Min (maxGenArgs, 
+                                       DocUtils.GetGenericArgumentCount (declTypes [i]));
+                       maxGenArgs -= remove;
+                       while (remove-- > 0)
+                               GenericParameters.RemoveAt (0);
+               }
+               if (DocUtils.IsDelegate (type)) {
+                       Parameters = type.GetMethod("Invoke").Parameters;
+                       ReturnType = type.GetMethod("Invoke").ReturnType.ReturnType;
+               }
+       }
+
+       void SetMemberInfo (IMemberReference member)
+       {
+               if (member == null)
+                       throw new ArgumentNullException ("member");
+               ReturnIsReturn = true;
+               AddRemarks = true;
+               Member = member;
+               
+               if (member is MethodReference ) {
+                       MethodReference mr = (MethodReference) member;
+                       Parameters = mr.Parameters;
+                       if (mr.IsGenericMethod ()) {
+                               GenericParameters = new List<GenericParameter> (mr.GenericParameters.Cast<GenericParameter> ());
+                       }
+               }
+               else if (member is PropertyDefinition) {
+                       Parameters = ((PropertyDefinition) member).Parameters;
+               }
+                       
+               if (member is MethodDefinition) {
+                       ReturnType = ((MethodDefinition) member).ReturnType.ReturnType;
+               } else if (member is PropertyDefinition) {
+                       ReturnType = ((PropertyDefinition) member).PropertyType;
+                       ReturnIsReturn = false;
+               }
+
+               // no remarks section for enum members
+               if (member.DeclaringType != null && ((TypeDefinition) member.DeclaringType).IsEnum)
+                       AddRemarks = false;
+       }
+
+       public TypeReference ReturnType;
+       public List<GenericParameter> GenericParameters;
+       public ParameterDefinitionCollection Parameters;
+       public bool ReturnIsReturn;
+       public XmlElement Node;
+       public bool AddRemarks = true;
+       public IMemberReference Member;
+       public TypeDefinition Type;
+       public string ReturnNodeName;
+}
+
+class DocumentationEnumerator {
+
+       public virtual IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes)
+       {
+               return GetDocumentationTypes (assembly, forTypes, null);
+       }
+
+       protected IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes, HashSet<string> seen)
+       {
+               foreach (TypeDefinition type in assembly.GetTypes()) {
+                       if (forTypes != null && forTypes.BinarySearch (type.FullName) < 0)
+                               continue;
+                       if (seen != null && seen.Contains (type.FullName))
+                               continue;
+                       yield return type;
+                       foreach (TypeDefinition nested in type.NestedTypes)
+                               yield return nested;
+               }
+       }
+
+       public virtual IEnumerable<DocsNodeInfo> GetDocumentationMembers (XmlDocument basefile, TypeDefinition type)
+       {
+               foreach (XmlElement oldmember in basefile.SelectNodes("Type/Members/Member")) {
+                       if (oldmember.GetAttribute ("__monodocer-seen__") == "true") {
+                               oldmember.RemoveAttribute ("__monodocer-seen__");
+                               continue;
+                       }
+                       IMemberReference m = GetMember (type, new DocumentationMember (oldmember));
+                       if (m == null) {
+                               yield return new DocsNodeInfo (oldmember);
+                       }
+                       else {
+                               yield return new DocsNodeInfo (oldmember, m);
+                       }
+               }
+       }
+
+       protected static IMemberReference GetMember (TypeDefinition type, DocumentationMember member)
+       {
+               string membertype = member.MemberType;
+               
+               string returntype = member.ReturnType;
+               
+               string docName = member.MemberName;
+               string[] docTypeParams = GetTypeParameters (docName);
+
+               // Loop through all members in this type with the same name
+               foreach (IMemberReference mi in GetReflectionMembers (type, docName)) {
+                       if (mi is TypeDefinition) continue;
+                       if (MDocUpdater.GetMemberType(mi) != membertype) continue;
+
+                       if (MDocUpdater.IsPrivate (mi))
+                               continue;
+
+                       ParameterDefinitionCollection pis = null;
+                       string[] typeParams = null;
+                       if (mi is MethodDefinition) {
+                               MethodDefinition mb = (MethodDefinition) mi;
+                               pis = mb.Parameters;
+                               if (docTypeParams != null && mb.IsGenericMethod ()) {
+                                       GenericParameterCollection args = mb.GenericParameters;
+                                       if (args.Count == docTypeParams.Length) {
+                                               typeParams = args.Cast<GenericParameter> ().Select (p => p.Name).ToArray ();
+                                       }
+                               }
+                       }
+                       else if (mi is PropertyDefinition)
+                               pis = ((PropertyDefinition)mi).Parameters;
+                       
+                       int mcount = member.Parameters == null ? 0 : member.Parameters.Count;
+                       int pcount = pis == null ? 0 : pis.Count;
+                       if (mcount != pcount)
+                               continue;
+
+                       MethodDefinition mDef = mi as MethodDefinition;
+                       if (mDef != null && !mDef.IsConstructor) {
+                               // Casting operators can overload based on return type.
+                               if (returntype != GetReplacedString (
+                                                       MDocUpdater.GetDocTypeFullName (((MethodDefinition)mi).ReturnType.ReturnType), 
+                                                       typeParams, docTypeParams)) {
+                                       continue;
+                               }
+                       }
+
+                       if (pcount == 0)
+                               return mi;
+                       bool good = true;
+                       for (int i = 0; i < pis.Count; i++) {
+                               string paramType = GetReplacedString (
+                                       MDocUpdater.GetDocParameterType (pis [i].ParameterType),
+                                       typeParams, docTypeParams);
+                               if (paramType != (string) member.Parameters [i]) {
+                                       good = false;
+                                       break;
+                               }
+                       }
+                       if (!good) continue;
+
+                       return mi;
+               }
+               
+               return null;
+       }
+
+       static string[] GetTypeParameters (string docName)
+       {
+               if (docName [docName.Length-1] != '>')
+                       return null;
+               StringList types = new StringList ();
+               int endToken = docName.Length-2;
+               int i = docName.Length-2;
+               do {
+                       if (docName [i] == ',' || docName [i] == '<') {
+                               types.Add (docName.Substring (i + 1, endToken - i));
+                               endToken = i-1;
+                       }
+                       if (docName [i] == '<')
+                               break;
+               } while (--i >= 0);
+
+               types.Reverse ();
+               return types.ToArray ();
+       }
+
+       protected static IEnumerable<IMemberReference> GetReflectionMembers (TypeDefinition type, string docName)
+       {
+               // need to worry about 4 forms of //@MemberName values:
+               //  1. "Normal" (non-generic) member names: GetEnumerator
+               //    - Lookup as-is.
+               //  2. Explicitly-implemented interface member names: System.Collections.IEnumerable.Current
+               //    - try as-is, and try type.member (due to "kludge" for property
+               //      support.
+               //  3. "Normal" Generic member names: Sort<T> (CSC)
+               //    - need to remove generic parameters --> "Sort"
+               //  4. Explicitly-implemented interface members for generic interfaces: 
+               //    -- System.Collections.Generic.IEnumerable<T>.Current
+               //    - Try as-is, and try type.member, *keeping* the generic parameters.
+               //     --> System.Collections.Generic.IEnumerable<T>.Current, IEnumerable<T>.Current
+               //  5. As of 2008-01-02, gmcs will do e.g. 'IFoo`1[A].Method' instead of
+               //    'IFoo<A>.Method' for explicitly implemented methods; don't interpret
+               //    this as (1) or (2).
+               if (docName.IndexOf ('<') == -1 && docName.IndexOf ('[') == -1) {
+                       // Cases 1 & 2
+                       foreach (IMemberReference mi in type.GetMembers (docName))
+                               yield return mi;
+                       if (CountChars (docName, '.') > 0)
+                               // might be a property; try only type.member instead of
+                               // namespace.type.member.
+                               foreach (IMemberReference mi in 
+                                               type.GetMembers (DocUtils.GetTypeDotMember (docName)))
+                                       yield return mi;
+                       yield break;
+               }
+               // cases 3 & 4
+               int numLt = 0;
+               int numDot = 0;
+               int startLt, startType, startMethod;
+               startLt = startType = startMethod = -1;
+               for (int i = 0; i < docName.Length; ++i) {
+                       switch (docName [i]) {
+                               case '<':
+                                       if (numLt == 0) {
+                                               startLt = i;
+                                       }
+                                       ++numLt;
+                                       break;
+                               case '>':
+                                       --numLt;
+                                       if (numLt == 0 && (i + 1) < docName.Length)
+                                               // there's another character in docName, so this <...> sequence is
+                                               // probably part of a generic type -- case 4.
+                                               startLt = -1;
+                                       break;
+                               case '.':
+                                       startType = startMethod;
+                                       startMethod = i;
+                                       ++numDot;
+                                       break;
+                       }
+               }
+               string refName = startLt == -1 ? docName : docName.Substring (0, startLt);
+               // case 3
+               foreach (IMemberReference mi in type.GetMembers (refName))
+                       yield return mi;
+
+               // case 4
+               foreach (IMemberReference mi in type.GetMembers (refName.Substring (startType + 1)))
+                       yield return mi;
+
+               // If we _still_ haven't found it, we've hit another generic naming issue:
+               // post Mono 1.1.18, gmcs generates [[FQTN]] instead of <TypeName> for
+               // explicitly-implemented METHOD names (not properties), e.g. 
+               // "System.Collections.Generic.IEnumerable`1[[Foo, test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].GetEnumerator"
+               // instead of "System.Collections.Generic.IEnumerable<Foo>.GetEnumerator",
+               // which the XML docs will contain.
+               //
+               // Alas, we can't derive the Mono name from docName, so we need to iterate
+               // over all member names, convert them into CSC format, and compare... :-(
+               if (numDot == 0)
+                       yield break;
+               foreach (IMemberReference mi in type.GetMembers ()) {
+                       if (MDocUpdater.GetMemberName (mi) == docName)
+                               yield return mi;
+               }
+       }
+
+       static string GetReplacedString (string typeName, string[] from, string[] to)
+       {
+               if (from == null)
+                       return typeName;
+               for (int i = 0; i < from.Length; ++i)
+                       typeName = typeName.Replace (from [i], to [i]);
+               return typeName;
+       }
+
+       private static int CountChars (string s, char c)
+       {
+               int count = 0;
+               for (int i = 0; i < s.Length; ++i) {
+                       if (s [i] == c)
+                               ++count;
+               }
+               return count;
+       }
+}
+
+class EcmaDocumentationEnumerator : DocumentationEnumerator {
+
+       XmlReader ecmadocs;
+       MDocUpdater app;
+
+       public EcmaDocumentationEnumerator (MDocUpdater app, XmlReader ecmaDocs)
+       {
+               this.app      = app;
+               this.ecmadocs = ecmaDocs;
+       }
+
+       public override IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes)
+       {
+               HashSet<string> seen = new HashSet<string> ();
+               return GetDocumentationTypes (assembly, forTypes, seen)
+                       .Concat (base.GetDocumentationTypes (assembly, forTypes, seen));
+       }
+
+       IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes, HashSet<string> seen)
+       {
+               int typeDepth = -1;
+               while (ecmadocs.Read ()) {
+                       switch (ecmadocs.Name) {
+                               case "Type": {
+                                       if (typeDepth == -1)
+                                               typeDepth = ecmadocs.Depth;
+                                       if (ecmadocs.NodeType != XmlNodeType.Element)
+                                               continue;
+                                       if (typeDepth != ecmadocs.Depth) // nested <TypeDefinition/> element?
+                                               continue;
+                                       string typename = ecmadocs.GetAttribute ("FullName");
+                                       string typename2 = MDocUpdater.GetTypeFileName (typename);
+                                       if (forTypes != null && 
+                                                       forTypes.BinarySearch (typename) < 0 &&
+                                                       typename != typename2 &&
+                                                       forTypes.BinarySearch (typename2) < 0)
+                                               continue;
+                                       TypeDefinition t;
+                                       if ((t = assembly.GetType (typename)) == null && 
+                                                       (t = assembly.GetType (typename2)) == null)
+                                               continue;
+                                       seen.Add (typename);
+                                       if (typename != typename2)
+                                               seen.Add (typename2);
+                                       Console.WriteLine ("  Import: {0}", t.FullName);
+                                       if (ecmadocs.Name != "Docs") {
+                                               int depth = ecmadocs.Depth;
+                                               while (ecmadocs.Read ()) {
+                                                       if (ecmadocs.Name == "Docs" && ecmadocs.Depth == depth + 1)
+                                                               break;
+                                               }
+                                       }
+                                       if (!ecmadocs.IsStartElement ("Docs"))
+                                               throw new InvalidOperationException ("Found " + ecmadocs.Name + "; expecting <Docs/>!");
+                                       yield return t;
+                                       break;
+                               }
+                               default:
+                                       break;
+                       }
+               }
+       }
+
+       public override IEnumerable<DocsNodeInfo> GetDocumentationMembers (XmlDocument basefile, TypeDefinition type)
+       {
+               return GetMembers (basefile, type)
+                       .Concat (base.GetDocumentationMembers (basefile, type));
+       }
+
+       private IEnumerable<DocsNodeInfo> GetMembers (XmlDocument basefile, TypeDefinition type)
+       {
+               while (ecmadocs.Name != "Members" && ecmadocs.Read ()) {
+                       // do nothing
+               }
+               if (ecmadocs.IsEmptyElement)
+                       yield break;
+
+               int membersDepth = ecmadocs.Depth;
+               bool go = true;
+               while (go && ecmadocs.Read ()) {
+                       switch (ecmadocs.Name) {
+                               case "Member": {
+                                       if (membersDepth != ecmadocs.Depth - 1 || ecmadocs.NodeType != XmlNodeType.Element)
+                                               continue;
+                                       DocumentationMember dm = new DocumentationMember (ecmadocs);
+                                       string xp = MDocUpdater.GetXPathForMember (dm);
+                                       XmlElement oldmember = (XmlElement) basefile.SelectSingleNode (xp);
+                                       IMemberReference m;
+                                       if (oldmember == null) {
+                                               m = GetMember (type, dm);
+                                               if (m == null) {
+                                                       app.Warning ("Could not import ECMA docs for `{0}'s `{1}': Member not found.",
+                                                                       type.FullName, dm.MemberSignatures ["C#"]);
+                                                                       // SelectSingleNode (ecmaDocsMember, "MemberSignature[@Language=\"C#\"]/@Value").Value);
+                                                       continue;
+                                               }
+                                               // oldmember lookup may have failed due to type parameter renames.
+                                               // Try again.
+                                               oldmember = (XmlElement) basefile.SelectSingleNode (MDocUpdater.GetXPathForMember (m));
+                                               if (oldmember == null) {
+                                                       XmlElement members = MDocUpdater.WriteElement (basefile.DocumentElement, "Members");
+                                                       oldmember = basefile.CreateElement ("Member");
+                                                       oldmember.SetAttribute ("MemberName", dm.MemberName);
+                                                       members.AppendChild (oldmember);
+                                                       foreach (string key in MDocUpdater.Sort (dm.MemberSignatures.Keys)) {
+                                                               XmlElement ms = basefile.CreateElement ("MemberSignature");
+                                                               ms.SetAttribute ("Language", key);
+                                                               ms.SetAttribute ("Value", (string) dm.MemberSignatures [key]);
+                                                               oldmember.AppendChild (ms);
+                                                       }
+                                                       oldmember.SetAttribute ("__monodocer-seen__", "true");
+                                                       Console.WriteLine ("Member Added: {0}", oldmember.SelectSingleNode("MemberSignature[@Language='C#']/@Value").InnerText);
+                                                       app.additions++;
+                                               }
+                                       }
+                                       else {
+                                               m = GetMember (type, new DocumentationMember (oldmember));
+                                               if (m == null) {
+                                                       app.Warning ("Could not import ECMA docs for `{0}'s `{1}': Member not found.",
+                                                                       type.FullName, dm.MemberSignatures ["C#"]);
+                                                       continue;
+                                               }
+                                               oldmember.SetAttribute ("__monodocer-seen__", "true");
+                                       }
+                                       DocsNodeInfo node = new DocsNodeInfo (oldmember, m);
+                                       if (ecmadocs.Name != "Docs")
+                                               throw new InvalidOperationException ("Found " + ecmadocs.Name + "; expected <Docs/>!");
+                                       yield return node;
+                                       break;
+                               }
+                               case "Members":
+                                       if (membersDepth == ecmadocs.Depth && ecmadocs.NodeType == XmlNodeType.EndElement) {
+                                               go = false;
+                                       }
+                                       break;
+                       }
+               }
+       }
+}
+
+abstract class DocumentationImporter {
+
+       public abstract void ImportDocumentation (DocsNodeInfo info);
+}
+
+class MsxdocDocumentationImporter : DocumentationImporter {
+
+       XmlDocument slashdocs;
+
+       public MsxdocDocumentationImporter (string file)
+       {
+               var xml = File.ReadAllText (file);
+
+               // Ensure Unix line endings
+               xml = xml.Replace ("\r", "");
+
+               slashdocs = new XmlDocument();
+               slashdocs.LoadXml (xml);
+       }
+
+       public override void ImportDocumentation (DocsNodeInfo info)
+       {
+               XmlNode elem = GetDocs (info.Member ?? info.Type);
+
+               if (elem == null)
+                       return;
+
+               XmlElement e = info.Node;
+
+               if (elem.SelectSingleNode("summary") != null)
+                       MDocUpdater.ClearElement(e, "summary");
+               if (elem.SelectSingleNode("remarks") != null)
+                       MDocUpdater.ClearElement(e, "remarks");
+               if (elem.SelectSingleNode ("value") != null || elem.SelectSingleNode ("returns") != null) {
+                       MDocUpdater.ClearElement(e, "value");
+                       MDocUpdater.ClearElement(e, "returns");
+               }
+
+               foreach (XmlNode child in elem.ChildNodes) {
+                       switch (child.Name) {
+                               case "param":
+                               case "typeparam": {
+                                       XmlAttribute name = child.Attributes ["name"];
+                                       if (name == null)
+                                               break;
+                                       XmlElement p2 = (XmlElement) e.SelectSingleNode (child.Name + "[@name='" + name.Value + "']");
+                                       if (p2 != null)
+                                               p2.InnerXml = child.InnerXml;
+                                       break;
+                               }
+                               // Occasionally XML documentation will use <returns/> on
+                               // properties, so let's try to normalize things.
+                               case "value":
+                               case "returns": {
+                                       XmlElement v = e.OwnerDocument.CreateElement (info.ReturnNodeName ?? child.Name);
+                                       v.InnerXml = child.InnerXml;
+                                       e.AppendChild (v);
+                                       break;
+                               }
+                               case "altmember":
+                               case "exception":
+                               case "permission": {
+                                       XmlAttribute cref = child.Attributes ["cref"] ?? child.Attributes ["name"];
+                                       if (cref == null)
+                                               break;
+                                       XmlElement a = (XmlElement) e.SelectSingleNode (child.Name + "[@cref='" + cref.Value + "']");
+                                       if (a == null) {
+                                               a = e.OwnerDocument.CreateElement (child.Name);
+                                               a.SetAttribute ("cref", child.Attributes ["cref"].Value);
+                                               e.AppendChild (a);
+                                       }
+                                       a.InnerXml = child.InnerXml;
+                                       break;
+                               }
+                               case "seealso": {
+                                       XmlAttribute cref = child.Attributes ["cref"];
+                                       if (cref == null)
+                                               break;
+                                       XmlElement a = (XmlElement) e.SelectSingleNode ("altmember[@cref='" + cref.Value + "']");
+                                       if (a == null) {
+                                               a = e.OwnerDocument.CreateElement ("altmember");
+                                               a.SetAttribute ("cref", child.Attributes ["cref"].Value);
+                                               e.AppendChild (a);
+                                       }
+                                       break;
+                               }
+                               default: {
+                                       bool add = true;
+                                       if (child.NodeType == XmlNodeType.Element && 
+                                                       e.SelectNodes (child.Name).Cast<XmlElement>().Any (n => n.OuterXml == child.OuterXml))
+                                               add = false;
+                                       if (add)
+                                               MDocUpdater.CopyNode (child, e);
+                                       break;
+                               }
+                       }
+               }
+       }
+
+       private XmlNode GetDocs (IMemberReference member)
+       {
+               string slashdocsig = MDocUpdater.slashdocFormatter.GetDeclaration (member);
+               if (slashdocsig != null)
+                       return slashdocs.SelectSingleNode ("doc/members/member[@name='" + slashdocsig + "']");
+               return null;
+       }
+}
+
+class EcmaDocumentationImporter : DocumentationImporter {
+
+       XmlReader ecmadocs;
+
+       public EcmaDocumentationImporter (XmlReader ecmaDocs)
+       {
+               this.ecmadocs = ecmaDocs;
+       }
+
+       public override void ImportDocumentation (DocsNodeInfo info)
+       {
+               if (!ecmadocs.IsStartElement ("Docs")) {
+                       return;
+               }
+
+               XmlElement e = info.Node;
+
+               int depth = ecmadocs.Depth;
+               ecmadocs.ReadStartElement ("Docs");
+               while (ecmadocs.Read ()) {
+                       if (ecmadocs.Name == "Docs") {
+                               if (ecmadocs.Depth == depth && ecmadocs.NodeType == XmlNodeType.EndElement)
+                                       break;
+                               else
+                                       throw new InvalidOperationException ("Skipped past current <Docs/> element!");
+                       }
+                       if (!ecmadocs.IsStartElement ())
+                               continue;
+                       switch (ecmadocs.Name) {
+                               case "param":
+                               case "typeparam": {
+                                       string name = ecmadocs.GetAttribute ("name");
+                                       if (name == null)
+                                               break;
+                                       XmlNode doc = e.SelectSingleNode (
+                                                       ecmadocs.Name + "[@name='" + name + "']");
+                                       string value = ecmadocs.ReadInnerXml ();
+                                       if (doc != null)
+                                               doc.InnerXml = value.Replace ("\r", "");
+                                       break;
+                               }
+                               case "altmember":
+                               case "exception":
+                               case "permission":
+                               case "seealso": {
+                                       string name = ecmadocs.Name;
+                                       string cref = ecmadocs.GetAttribute ("cref");
+                                       if (cref == null)
+                                               break;
+                                       XmlNode doc = e.SelectSingleNode (
+                                                       ecmadocs.Name + "[@cref='" + cref + "']");
+                                       string value = ecmadocs.ReadInnerXml ().Replace ("\r", "");
+                                       if (doc != null)
+                                               doc.InnerXml = value;
+                                       else {
+                                               XmlElement n = e.OwnerDocument.CreateElement (name);
+                                               n.SetAttribute ("cref", cref);
+                                               n.InnerXml = value;
+                                               e.AppendChild (n);
+                                       }
+                                       break;
+                               }
+                               default: {
+                                       string name = ecmadocs.Name;
+                                       string xpath = ecmadocs.Name;
+                                       StringList attributes = new StringList (ecmadocs.AttributeCount);
+                                       if (ecmadocs.MoveToFirstAttribute ()) {
+                                               do {
+                                                       attributes.Add ("@" + ecmadocs.Name + "=\"" + ecmadocs.Value + "\"");
+                                               } while (ecmadocs.MoveToNextAttribute ());
+                                               ecmadocs.MoveToContent ();
+                                       }
+                                       if (attributes.Count > 0) {
+                                               xpath += "[" + string.Join (" and ", attributes.ToArray ()) + "]";
+                                       }
+                                       XmlNode doc = e.SelectSingleNode (xpath);
+                                       string value = ecmadocs.ReadInnerXml ().Replace ("\r", "");
+                                       if (doc != null) {
+                                               doc.InnerXml = value;
+                                       }
+                                       else {
+                                               XmlElement n = e.OwnerDocument.CreateElement (name);
+                                               n.InnerXml = value;
+                                               foreach (string a in attributes) {
+                                                       int eq = a.IndexOf ('=');
+                                                       n.SetAttribute (a.Substring (1, eq-1), a.Substring (eq+2, a.Length-eq-3));
+                                               }
+                                               e.AppendChild (n);
+                                       }
+                                       break;
+                               }
+                       }
+               }
+       }
+}
+
+class DocumentationMember {
+       public StringToStringMap MemberSignatures = new StringToStringMap ();
+       public string ReturnType;
+       public StringList Parameters;
+       public string MemberName;
+       public string MemberType;
+
+       public DocumentationMember (XmlReader reader)
+       {
+               MemberName = reader.GetAttribute ("MemberName");
+               int depth = reader.Depth;
+               bool go = true;
+               StringList p = new StringList ();
+               do {
+                       if (reader.NodeType != XmlNodeType.Element)
+                               continue;
+                       switch (reader.Name) {
+                               case "MemberSignature":
+                                       MemberSignatures [reader.GetAttribute ("Language")] = reader.GetAttribute ("Value");
+                                       break;
+                               case "MemberType":
+                                       MemberType = reader.ReadElementString ();
+                                       break;
+                               case "ReturnType":
+                                       if (reader.Depth == depth + 2)
+                                               ReturnType = reader.ReadElementString ();
+                                       break;
+                               case "Parameter":
+                                       if (reader.Depth == depth + 2)
+                                               p.Add (reader.GetAttribute ("Type"));
+                                       break;
+                               case "Docs":
+                                       if (reader.Depth == depth + 1)
+                                               go = false;
+                                       break;
+                       }
+               } while (go && reader.Read () && reader.Depth >= depth);
+               if (p.Count > 0) {
+                       Parameters = p;
+               }
+       }
+
+       public DocumentationMember (XmlNode node)
+       {
+               MemberName = node.Attributes ["MemberName"].Value;
+               foreach (XmlNode n in node.SelectNodes ("MemberSignature")) {
+                       XmlAttribute l = n.Attributes ["Language"];
+                       XmlAttribute v = n.Attributes ["Value"];
+                       if (l != null && v != null)
+                               MemberSignatures [l.Value] = v.Value;
+               }
                MemberType = node.SelectSingleNode ("MemberType").InnerText;
                XmlNode rt = node.SelectSingleNode ("ReturnValue/ReturnType");
                if (rt != null)
@@ -3048,10 +3204,15 @@ class DocumentationMember {
 public enum MemberFormatterState {
        None,
        WithinArray,
-       WithinGenericTypeContainer,
+       WithinGenericTypeParameters,
 }
 
 public abstract class MemberFormatter {
+
+       public virtual string Language {
+               get {return "";}
+       }
+
        public virtual string GetName (IMemberReference member)
        {
                TypeReference type = member as TypeReference;
@@ -3129,7 +3290,7 @@ public abstract class MemberFormatter {
                return buf;
        }
 
-       private StringBuilder AppendFullTypeName (StringBuilder buf, TypeReference type)
+       protected virtual StringBuilder AppendFullTypeName (StringBuilder buf, TypeReference type)
        {
                if (type.DeclaringType != null)
                        AppendFullTypeName (buf, type.DeclaringType).Append (NestedTypeSeparator);
@@ -3200,7 +3361,7 @@ public abstract class MemberFormatter {
                        if (c > 0) {
                                buf.Append (GenericTypeContainer [0]);
                                var origState = MemberFormatterState;
-                               MemberFormatterState = MemberFormatterState.WithinGenericTypeContainer;
+                               MemberFormatterState = MemberFormatterState.WithinGenericTypeParameters;
                                _AppendTypeName (buf, genArgs [argIdx++]);
                                for (int i = 1; i < c; ++i)
                                        _AppendTypeName (buf.Append (","), genArgs [argIdx++]);
@@ -3211,165 +3372,692 @@ public abstract class MemberFormatter {
                return buf;
        }
 
-       private List<TypeReference> GetGenericArguments (TypeReference type)
+       protected List<TypeReference> GetGenericArguments (TypeReference type)
+       {
+               var args = new List<TypeReference> ();
+               GenericInstanceType inst = type as GenericInstanceType;
+               if (inst != null)
+                       args.AddRange (inst.GenericArguments.Cast<TypeReference> ());
+               else
+                       args.AddRange (type.GenericParameters.Cast<TypeReference> ());
+               return args;
+       }
+
+       protected virtual StringBuilder AppendGenericTypeConstraints (StringBuilder buf, TypeReference type)
+       {
+               return buf;
+       }
+
+       protected virtual string GetConstructorName (MethodReference constructor)
+       {
+               return constructor.Name;
+       }
+
+       protected virtual string GetMethodName (MethodReference method)
+       {
+               return method.Name;
+       }
+
+       protected virtual string GetPropertyName (PropertyReference property)
+       {
+               return property.Name;
+       }
+
+       protected virtual string GetFieldName (FieldReference field)
+       {
+               return field.Name;
+       }
+
+       protected virtual string GetEventName (EventReference e)
+       {
+               return e.Name;
+       }
+
+       public virtual string GetDeclaration (IMemberReference member)
+       {
+               if (member == null)
+                       throw new ArgumentNullException ("member");
+               TypeDefinition type = member as TypeDefinition;
+               if (type != null)
+                       return GetTypeDeclaration (type);
+               MethodDefinition method = member as MethodDefinition;
+               if (method != null && method.IsConstructor)
+                       return GetConstructorDeclaration (method);
+               if (method != null)
+                       return GetMethodDeclaration (method);
+               PropertyDefinition prop = member as PropertyDefinition;
+               if (prop != null)
+                       return GetPropertyDeclaration (prop);
+               FieldDefinition field = member as FieldDefinition;
+               if (field != null)
+                       return GetFieldDeclaration (field);
+               EventDefinition e = member as EventDefinition;
+               if (e != null)
+                       return GetEventDeclaration (e);
+               throw new NotSupportedException ("Can't handle: " + member.GetType().ToString());
+       }
+
+       protected virtual string GetTypeDeclaration (TypeDefinition type)
+       {
+               if (type == null)
+                       throw new ArgumentNullException ("type");
+               StringBuilder buf = new StringBuilder (type.Name.Length);
+               _AppendTypeName (buf, type);
+               AppendGenericTypeConstraints (buf, type);
+               return buf.ToString ();
+       }
+
+       protected virtual string GetConstructorDeclaration (MethodDefinition constructor)
+       {
+               return GetConstructorName (constructor);
+       }
+
+       protected virtual string GetMethodDeclaration (MethodDefinition method)
+       {
+               // Special signature for destructors.
+               if (method.Name == "Finalize" && method.Parameters.Count == 0)
+                       return GetFinalizerName (method);
+
+               StringBuilder buf = new StringBuilder ();
+
+               AppendVisibility (buf, method);
+               if (buf.Length == 0 && 
+                               !(DocUtils.IsExplicitlyImplemented (method) && !method.IsSpecialName))
+                       return null;
+
+               AppendModifiers (buf, method);
+
+               if (buf.Length != 0)
+                       buf.Append (" ");
+               buf.Append (GetName (method.ReturnType.ReturnType)).Append (" ");
+
+               AppendMethodName (buf, method);
+               AppendGenericMethod (buf, method).Append (" ");
+               AppendParameters (buf, method, method.Parameters);
+               AppendGenericMethodConstraints (buf, method);
+               return buf.ToString ();
+       }
+
+       protected virtual StringBuilder AppendMethodName (StringBuilder buf, MethodDefinition method)
+       {
+               return buf.Append (method.Name);
+       }
+
+       protected virtual string GetFinalizerName (MethodDefinition method)
+       {
+               return "Finalize";
+       }
+
+       protected virtual StringBuilder AppendVisibility (StringBuilder buf, MethodDefinition method)
+       {
+               return buf;
+       }
+
+       protected virtual StringBuilder AppendModifiers (StringBuilder buf, MethodDefinition method)
+       {
+               return buf;
+       }
+
+       protected virtual StringBuilder AppendGenericMethod (StringBuilder buf, MethodDefinition method)
+       {
+               return buf;
+       }
+
+       protected virtual StringBuilder AppendParameters (StringBuilder buf, MethodDefinition method, ParameterDefinitionCollection parameters)
+       {
+               return buf;
+       }
+
+       protected virtual StringBuilder AppendGenericMethodConstraints (StringBuilder buf, MethodDefinition method)
+       {
+               return buf;
+       }
+
+       protected virtual string GetPropertyDeclaration (PropertyDefinition property)
+       {
+               return GetPropertyName (property);
+       }
+
+       protected virtual string GetFieldDeclaration (FieldDefinition field)
+       {
+               return GetFieldName (field);
+       }
+
+       protected virtual string GetEventDeclaration (EventDefinition e)
+       {
+               return GetEventName (e);
+       }
+}
+
+class ILFullMemberFormatter : MemberFormatter {
+
+       public override string Language {
+               get {return "ILAsm";}
+       }
+
+       protected override char NestedTypeSeparator {
+               get {
+                       return '/';
+               }
+       }
+
+       protected override StringBuilder AppendNamespace (StringBuilder buf, TypeReference type)
+       {
+               if (GetBuiltinType (type.FullName) != null)
+                       return buf;
+               string ns = DocUtils.GetNamespace (type);
+               if (ns != null && ns.Length > 0) {
+                       if (type.IsValueType)
+                               buf.Append ("valuetype ");
+                       else
+                               buf.Append ("class ");
+                       buf.Append (ns).Append ('.');
+               }
+               return buf;
+       }
+
+       private static string GetBuiltinType (string t)
+       {
+               switch (t) {
+               case "System.Byte":    return "unsigned int8";
+               case "System.SByte":   return "int8";
+               case "System.Int16":   return "int16";
+               case "System.Int32":   return "int32";
+               case "System.Int64":   return "int64";
+               case "System.IntPtr":  return "native int";
+
+               case "System.UInt16":  return "unsigned int16";
+               case "System.UInt32":  return "unsigned int32";
+               case "System.UInt64":  return "unsigned int64";
+               case "System.UIntPtr": return "native unsigned int";
+
+               case "System.Single":  return "float32";
+               case "System.Double":  return "float64";
+               case "System.Boolean": return "bool";
+               case "System.Char":    return "char";
+               case "System.Void":    return "void";
+               case "System.String":  return "string";
+               case "System.Object":  return "object";
+               }
+               return null;
+       }
+
+       protected override StringBuilder AppendTypeName (StringBuilder buf, string typename)
+       {
+               return buf.Append (typename);
+       }
+
+       protected override StringBuilder AppendTypeName (StringBuilder buf, TypeReference type)
+       {
+               var gp = type as GenericParameter;
+               if (type is GenericParameter)
+                       return AppendGenericParameterConstraints (buf, (GenericParameter) type).Append (type.Name);
+
+               string s = GetBuiltinType (type.FullName);
+               if (s != null)
+                       return buf.Append (s);
+               return base.AppendTypeName (buf, type);
+       }
+
+       private StringBuilder AppendGenericParameterConstraints (StringBuilder buf, GenericParameter type)
+       {
+               if (MemberFormatterState != MemberFormatterState.WithinGenericTypeParameters) {
+                       return buf.Append (type.Owner is TypeReference ? "!" : "!!");
+               }
+               GenericParameterAttributes attrs = type.Attributes;
+               if ((attrs & GenericParameterAttributes.ReferenceTypeConstraint) != 0)
+                       buf.Append ("class ");
+               if ((attrs & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0)
+                       buf.Append ("struct ");
+               if ((attrs & GenericParameterAttributes.DefaultConstructorConstraint) != 0)
+                       buf.Append (".ctor ");
+               ConstraintCollection constraints = type.Constraints;
+               MemberFormatterState = 0;
+               if (constraints.Count > 0) {
+                       var full = new ILFullMemberFormatter ();
+                       buf.Append ("(").Append (full.GetName (constraints [0]));
+                       for (int i = 1; i < constraints.Count; ++i) {
+                               buf.Append (", ").Append (full.GetName (constraints [i]));
+                       }
+                       buf.Append (") ");
+               }
+               MemberFormatterState = MemberFormatterState.WithinGenericTypeParameters;
+
+               if ((attrs & GenericParameterAttributes.Covariant) != 0)
+                       buf.Append ("+ ");
+               if ((attrs & GenericParameterAttributes.Contravariant) != 0)
+                       buf.Append ("- ");
+               return buf;
+       }
+
+       protected override string GetTypeDeclaration (TypeDefinition type)
+       {
+               string visibility = GetTypeVisibility (type.Attributes);
+               if (visibility == null)
+                       return null;
+
+               StringBuilder buf = new StringBuilder ();
+
+               buf.Append (".class ");
+               if (type.IsNested)
+                       buf.Append ("nested ");
+               buf.Append (visibility).Append (" ");
+               if (type.IsInterface)
+                       buf.Append ("interface ");
+               if (type.IsSequentialLayout)
+                       buf.Append ("sequential ");
+               if (type.IsAutoLayout)
+                       buf.Append ("auto ");
+               if (type.IsAnsiClass)
+                       buf.Append ("ansi ");
+               if (type.IsAbstract)
+                       buf.Append ("abstract ");
+               if (type.IsSerializable)
+                       buf.Append ("serializable ");
+               if (type.IsSealed)
+                       buf.Append ("sealed ");
+               if (type.IsBeforeFieldInit)
+                       buf.Append ("beforefieldinit ");
+               var state = MemberFormatterState;
+               MemberFormatterState = MemberFormatterState.WithinGenericTypeParameters;
+               buf.Append (GetName (type));
+               MemberFormatterState = state;
+               var full = new ILFullMemberFormatter ();
+               if (type.BaseType != null) {
+                       buf.Append (" extends ");
+                       if (type.BaseType.FullName == "System.Object")
+                               buf.Append ("System.Object");
+                       else
+                               buf.Append (full.GetName (type.BaseType).Substring ("class ".Length));
+               }
+               bool first = true;
+               foreach (var name in type.Interfaces.Cast<TypeReference>()
+                               .Select (i => full.GetName (i))
+                               .OrderBy (n => n)) {
+                       if (first) {
+                               buf.Append (" implements ");
+                               first = false;
+                       }
+                       else {
+                               buf.Append (", ");
+                       }
+                       buf.Append (name);
+               }
+
+               return buf.ToString ();
+       }
+
+       protected override StringBuilder AppendGenericType (StringBuilder buf, TypeReference type)
+       {
+               List<TypeReference> decls = DocUtils.GetDeclaringTypes (
+                               type is GenericInstanceType ? type.GetOriginalType () : type);
+               bool first = true;
+               foreach (var decl in decls) {
+                       TypeReference declDef = decl.Resolve () ?? decl;
+                       if (!first) {
+                               buf.Append (NestedTypeSeparator);
+                       }
+                       first = false;
+                       AppendTypeName (buf, declDef);
+               }
+               buf.Append ('<');
+               first = true;
+               foreach (TypeReference arg in GetGenericArguments (type)) {
+                       if (!first)
+                               buf.Append (", ");
+                       first = false;
+                       _AppendTypeName (buf, arg);
+               }
+               buf.Append ('>');
+               return buf;
+       }
+
+       static string GetTypeVisibility (TypeAttributes ta)
        {
-               var args = new List<TypeReference> ();
-               GenericInstanceType inst = type as GenericInstanceType;
-               if (inst != null)
-                       args.AddRange (inst.GenericArguments.Cast<TypeReference> ());
-               else
-                       args.AddRange (type.GenericParameters.Cast<TypeReference> ());
-               return args;
+               switch (ta & TypeAttributes.VisibilityMask) {
+               case TypeAttributes.Public:
+               case TypeAttributes.NestedPublic:
+                       return "public";
+
+               case TypeAttributes.NestedFamily:
+               case TypeAttributes.NestedFamORAssem:
+                       return "protected";
+
+               default:
+                       return null;
+               }
        }
 
-       protected virtual StringBuilder AppendGenericTypeConstraints (StringBuilder buf, TypeReference type)
+       protected override string GetConstructorDeclaration (MethodDefinition constructor)
        {
-               return buf;
+               return GetMethodDeclaration (constructor);
        }
 
-       protected virtual string GetConstructorName (MethodReference constructor)
+       protected override string GetMethodDeclaration (MethodDefinition method)
        {
-               return constructor.Name;
+               if (method.IsPrivate && !DocUtils.IsExplicitlyImplemented (method))
+                       return null;
+
+               var buf = new StringBuilder ();
+               buf.Append (".method ");
+               AppendVisibility (buf, method);
+               if (method.IsStatic)
+                       buf.Append ("static ");
+               if (method.IsHideBySig)
+                       buf.Append ("hidebysig ");
+               if (method.IsPInvokeImpl) {
+                       var info = method.PInvokeInfo;
+                       buf.Append ("pinvokeimpl (\"")
+                               .Append (info.Module.Name)
+                               .Append ("\" as \"")
+                               .Append (info.EntryPoint)
+                               .Append ("\"");
+                       if (info.IsCharSetAuto)
+                               buf.Append (" auto");
+                       if (info.IsCharSetUnicode)
+                               buf.Append (" unicode");
+                       if (info.IsCharSetAnsi)
+                               buf.Append (" ansi");
+                       if (info.IsCallConvCdecl)
+                               buf.Append (" cdecl");
+                       if (info.IsCallConvStdCall)
+                               buf.Append (" stdcall");
+                       if (info.IsCallConvWinapi)
+                               buf.Append (" winapi");
+                       if (info.IsCallConvThiscall)
+                               buf.Append (" thiscall");
+                       if (info.SupportsLastError)
+                               buf.Append (" lasterr");
+                       buf.Append (")");
+               }
+               if (method.IsSpecialName)
+                       buf.Append ("specialname ");
+               if (method.IsRuntimeSpecialName)
+                       buf.Append ("rtspecialname ");
+               if (method.IsNewSlot)
+                       buf.Append ("newslot ");
+               if (method.IsVirtual)
+                       buf.Append ("virtual ");
+               if (!method.IsStatic)
+                       buf.Append ("instance ");
+               _AppendTypeName (buf, method.ReturnType.ReturnType);
+               buf.Append (' ')
+                       .Append (method.Name);
+               if (method.IsGenericMethod ()) {
+                       var state = MemberFormatterState;
+                       MemberFormatterState = MemberFormatterState.WithinGenericTypeParameters;
+                       GenericParameterCollection args = method.GenericParameters;
+                       if (args.Count > 0) {
+                               buf.Append ("<");
+                               _AppendTypeName (buf, args [0]);
+                               for (int i = 1; i < args.Count; ++i)
+                                       _AppendTypeName (buf.Append (", "), args [i]);
+                               buf.Append (">");
+                       }
+                       MemberFormatterState = state;
+               }
+
+               buf.Append ('(');
+               bool first = true;
+               for (int i = 0; i < method.Parameters.Count; ++i) {
+                       if (!first)
+                               buf.Append (", ");
+                       first = false;
+                       _AppendTypeName (buf, method.Parameters [i].ParameterType);
+                       buf.Append (' ');
+                       buf.Append (method.Parameters [i].Name);
+               }
+               buf.Append (')');
+               if (method.IsIL)
+                       buf.Append (" cil");
+               if (method.IsRuntime)
+                       buf.Append (" runtime");
+               if (method.IsManaged)
+                       buf.Append (" managed");
+
+               return buf.ToString ();
        }
 
-       protected virtual string GetMethodName (MethodReference method)
+       protected override StringBuilder AppendMethodName (StringBuilder buf, MethodDefinition method)
        {
-               return method.Name;
+               if (DocUtils.IsExplicitlyImplemented (method)) {
+                       TypeReference iface;
+                       MethodReference ifaceMethod;
+                       DocUtils.GetInfoForExplicitlyImplementedMethod (method, out iface, out ifaceMethod);
+                       return buf.Append (new CSharpMemberFormatter ().GetName (iface))
+                               .Append ('.')
+                               .Append (ifaceMethod.Name);
+               }
+               return base.AppendMethodName (buf, method);
        }
 
-       protected virtual string GetPropertyName (PropertyReference property)
+       protected override string RefTypeModifier {
+               get {return "";}
+       }
+
+       protected override StringBuilder AppendVisibility (StringBuilder buf, MethodDefinition method)
        {
-               return property.Name;
+               if (method.IsPublic)
+                       return buf.Append ("public ");
+               if (method.IsFamilyAndAssembly)
+                       return buf.Append ("familyandassembly");
+               if (method.IsFamilyOrAssembly)
+                       return buf.Append ("familyorassembly");
+               if (method.IsFamily)
+                       return buf.Append ("family");
+               return buf;
        }
 
-       protected virtual string GetFieldName (FieldReference field)
+       protected override StringBuilder AppendModifiers (StringBuilder buf, MethodDefinition method)
        {
-               return field.Name;
+               string modifiers = String.Empty;
+               if (method.IsStatic) modifiers += " static";
+               if (method.IsVirtual && !method.IsAbstract) {
+                       if ((method.Attributes & MethodAttributes.NewSlot) != 0) modifiers += " virtual";
+                       else modifiers += " override";
+               }
+               TypeDefinition declType = (TypeDefinition) method.DeclaringType;
+               if (method.IsAbstract && !declType.IsInterface) modifiers += " abstract";
+               if (method.IsFinal) modifiers += " sealed";
+               if (modifiers == " virtual sealed") modifiers = "";
+
+               return buf.Append (modifiers);
        }
 
-       protected virtual string GetEventName (EventReference e)
+       protected override StringBuilder AppendGenericMethod (StringBuilder buf, MethodDefinition method)
        {
-               return e.Name;
+               if (method.IsGenericMethod ()) {
+                       GenericParameterCollection args = method.GenericParameters;
+                       if (args.Count > 0) {
+                               buf.Append ("<");
+                               buf.Append (args [0].Name);
+                               for (int i = 1; i < args.Count; ++i)
+                                       buf.Append (",").Append (args [i].Name);
+                               buf.Append (">");
+                       }
+               }
+               return buf;
        }
 
-       public virtual string GetDeclaration (IMemberReference member)
+       protected override StringBuilder AppendParameters (StringBuilder buf, MethodDefinition method, ParameterDefinitionCollection parameters)
        {
-               if (member == null)
-                       throw new ArgumentNullException ("member");
-               TypeDefinition type = member as TypeDefinition;
-               if (type != null)
-                       return GetTypeDeclaration (type);
-               MethodDefinition method = member as MethodDefinition;
-               if (method != null && method.IsConstructor)
-                       return GetConstructorDeclaration (method);
-               if (method != null)
-                       return GetMethodDeclaration (method);
-               PropertyDefinition prop = member as PropertyDefinition;
-               if (prop != null)
-                       return GetPropertyDeclaration (prop);
-               FieldDefinition field = member as FieldDefinition;
-               if (field != null)
-                       return GetFieldDeclaration (field);
-               EventDefinition e = member as EventDefinition;
-               if (e != null)
-                       return GetEventDeclaration (e);
-               throw new NotSupportedException ("Can't handle: " + member.GetType().ToString());
+               return AppendParameters (buf, method, parameters, '(', ')');
        }
 
-       protected virtual string GetTypeDeclaration (TypeDefinition type)
+       private StringBuilder AppendParameters (StringBuilder buf, MethodDefinition method, ParameterDefinitionCollection parameters, char begin, char end)
        {
-               if (type == null)
-                       throw new ArgumentNullException ("type");
-               StringBuilder buf = new StringBuilder (type.Name.Length);
-               _AppendTypeName (buf, type);
-               AppendGenericTypeConstraints (buf, type);
-               return buf.ToString ();
+               buf.Append (begin);
+
+               if (parameters.Count > 0) {
+                       if (DocUtils.IsExtensionMethod (method))
+                               buf.Append ("this ");
+                       AppendParameter (buf, parameters [0]);
+                       for (int i = 1; i < parameters.Count; ++i) {
+                               buf.Append (", ");
+                               AppendParameter (buf, parameters [i]);
+                       }
+               }
+
+               return buf.Append (end);
        }
 
-       protected virtual string GetConstructorDeclaration (MethodDefinition constructor)
+       private StringBuilder AppendParameter (StringBuilder buf, ParameterDefinition parameter)
        {
-               return GetConstructorName (constructor);
+               if (parameter.ParameterType is ReferenceType) {
+                       if (parameter.IsOut)
+                               buf.Append ("out ");
+                       else
+                               buf.Append ("ref ");
+               }
+               buf.Append (GetName (parameter.ParameterType)).Append (" ");
+               return buf.Append (parameter.Name);
        }
 
-       protected virtual string GetMethodDeclaration (MethodDefinition method)
+       protected override string GetPropertyDeclaration (PropertyDefinition property)
        {
-               // Special signature for destructors.
-               if (method.Name == "Finalize" && method.Parameters.Count == 0)
-                       return GetFinalizerName (method);
+               MethodDefinition gm = null, sm = null;
 
-               StringBuilder buf = new StringBuilder ();
+               string get_visible = null;
+               if ((gm = property.GetMethod) != null &&
+                               (DocUtils.IsExplicitlyImplemented (gm) ||
+                                (!gm.IsPrivate && !gm.IsAssembly && !gm.IsFamilyAndAssembly)))
+                       get_visible = AppendVisibility (new StringBuilder (), gm).ToString ();
+               string set_visible = null;
+               if ((sm = property.SetMethod) != null &&
+                               (DocUtils.IsExplicitlyImplemented (sm) ||
+                                (!sm.IsPrivate && !sm.IsAssembly && !sm.IsFamilyAndAssembly)))
+                       set_visible = AppendVisibility (new StringBuilder (), sm).ToString ();
 
-               AppendVisibility (buf, method);
-               if (buf.Length == 0 && 
-                               !(DocUtils.IsExplicitlyImplemented (method) && !method.IsSpecialName))
+               if ((set_visible == null) && (get_visible == null))
                        return null;
 
-               AppendModifiers (buf, method);
+               string visibility;
+               StringBuilder buf = new StringBuilder ()
+                       .Append (".property ");
+               if (!(gm ?? sm).IsStatic)
+                       buf.Append ("instance ");
+               _AppendTypeName (buf, property.PropertyType);
+               buf.Append (' ').Append (property.Name);
+               if (!property.HasParameters || property.Parameters.Count == 0)
+                       return buf.ToString ();
 
-               if (buf.Length != 0)
-                       buf.Append (" ");
-               buf.Append (GetName (method.ReturnType.ReturnType)).Append (" ");
+               buf.Append ('(');
+               bool first = true;
+               foreach (ParameterDefinition p in property.Parameters) {
+                       if (!first)
+                               buf.Append (", ");
+                       first = false;
+                       _AppendTypeName (buf, p.ParameterType);
+               }
+               buf.Append (')');
 
-               AppendMethodName (buf, method);
-               AppendGenericMethod (buf, method).Append (" ");
-               AppendParameters (buf, method, method.Parameters);
-               AppendGenericMethodConstraints (buf, method);
                return buf.ToString ();
        }
 
-       protected virtual StringBuilder AppendMethodName (StringBuilder buf, MethodDefinition method)
+       protected override string GetFieldDeclaration (FieldDefinition field)
        {
-               return buf.Append (method.Name);
-       }
+               TypeDefinition declType = (TypeDefinition) field.DeclaringType;
+               if (declType.IsEnum && field.Name == "value__")
+                       return null; // This member of enums aren't documented.
 
-       protected virtual string GetFinalizerName (MethodDefinition method)
-       {
-               return "Finalize";
-       }
+               StringBuilder buf = new StringBuilder ();
+               AppendFieldVisibility (buf, field);
+               if (buf.Length == 0)
+                       return null;
 
-       protected virtual StringBuilder AppendVisibility (StringBuilder buf, MethodDefinition method)
-       {
-               return buf;
-       }
+               buf.Insert (0, ".field ");
 
-       protected virtual StringBuilder AppendModifiers (StringBuilder buf, MethodDefinition method)
-       {
-               return buf;
-       }
+               if (field.IsStatic)
+                       buf.Append ("static ");
+               if (field.IsInitOnly)
+                       buf.Append ("initonly ");
+               if (field.IsLiteral)
+                       buf.Append ("literal ");
+               _AppendTypeName (buf, field.FieldType);
+               buf.Append (' ').Append (field.Name);
+               AppendFieldValue (buf, field);
 
-       protected virtual StringBuilder AppendGenericMethod (StringBuilder buf, MethodDefinition method)
-       {
-               return buf;
+               return buf.ToString ();
        }
 
-       protected virtual StringBuilder AppendParameters (StringBuilder buf, MethodDefinition method, ParameterDefinitionCollection parameters)
+       static StringBuilder AppendFieldVisibility (StringBuilder buf, FieldDefinition field)
        {
+               if (field.IsPublic)
+                       return buf.Append ("public ");
+               if (field.IsFamilyAndAssembly)
+                       return buf.Append ("familyandassembly ");
+               if (field.IsFamilyOrAssembly)
+                       return buf.Append ("familyorassembly ");
+               if (field.IsFamily)
+                       return buf.Append ("family ");
                return buf;
        }
 
-       protected virtual StringBuilder AppendGenericMethodConstraints (StringBuilder buf, MethodDefinition method)
+       static StringBuilder AppendFieldValue (StringBuilder buf, FieldDefinition field)
        {
+               // enums have a value__ field, which we ignore
+               if (field.DeclaringType.IsGenericType ())
+                       return buf;
+               if (field.HasConstant && field.IsLiteral) {
+                       object val = null;
+                       try {
+                               val   = field.Constant;
+                       } catch {
+                               return buf;
+                       }
+                       if (val == null)
+                               buf.Append (" = ").Append ("null");
+                       else if (val is Enum)
+                               buf.Append (" = ")
+                                       .Append (GetBuiltinType (field.DeclaringType.GetUnderlyingType ().FullName))
+                                       .Append ('(')
+                                       .Append (val.ToString ())
+                                       .Append (')');
+                       else if (val is IFormattable) {
+                               string value = ((IFormattable)val).ToString();
+                               buf.Append (" = ");
+                               if (val is string)
+                                       buf.Append ("\"" + value + "\"");
+                               else
+                                       buf.Append (GetBuiltinType (field.DeclaringType.GetUnderlyingType ().FullName))
+                                               .Append ('(')
+                                               .Append (value)
+                                               .Append (')');
+                       }
+               }
                return buf;
        }
 
-       protected virtual string GetPropertyDeclaration (PropertyDefinition property)
+       protected override string GetEventDeclaration (EventDefinition e)
        {
-               return GetPropertyName (property);
-       }
+               StringBuilder buf = new StringBuilder ();
+               if (AppendVisibility (buf, e.AddMethod).Length == 0) {
+                       return null;
+               }
 
-       protected virtual string GetFieldDeclaration (FieldDefinition field)
-       {
-               return GetFieldName (field);
+               buf.Length = 0;
+               buf.Append (".event ")
+                       .Append (GetName (e.EventType))
+                       .Append (' ')
+                       .Append (e.Name);
+
+               return buf.ToString ();
        }
+}
 
-       protected virtual string GetEventDeclaration (EventDefinition e)
+class ILMemberFormatter : ILFullMemberFormatter {
+       protected override StringBuilder AppendNamespace (StringBuilder buf, TypeReference type)
        {
-               return GetEventName (e);
+               return buf;
        }
 }
 
 class CSharpFullMemberFormatter : MemberFormatter {
 
+       public override string Language {
+               get {return "C#";}
+       }
+
        protected override StringBuilder AppendNamespace (StringBuilder buf, TypeReference type)
        {
                string ns = DocUtils.GetNamespace (type);
@@ -3421,7 +4109,7 @@ class CSharpFullMemberFormatter : MemberFormatter {
 
        private StringBuilder AppendGenericParameterConstraints (StringBuilder buf, GenericParameter type)
        {
-               if (MemberFormatterState != MemberFormatterState.WithinGenericTypeContainer)
+               if (MemberFormatterState != MemberFormatterState.WithinGenericTypeParameters)
                        return buf;
                GenericParameterAttributes attrs = type.Attributes;
                bool isout = (attrs & GenericParameterAttributes.Covariant) != 0;
diff --git a/mcs/tools/mdoc/Mono.Documentation/msitomsx.cs b/mcs/tools/mdoc/Mono.Documentation/msitomsx.cs
new file mode 100644 (file)
index 0000000..65d77f5
--- /dev/null
@@ -0,0 +1,185 @@
+//
+// msitomsx.cs: Microsoft Internal XML to Microsoft XML Documentation
+//
+// Arguably this doesn't belong in mdoc, but I'd rather not do some
+// stand-alone tool either, especially since the primary reason it exists is
+// to facilitate generating ECMA documentation via mdoc-update and
+// mdoc-update-ecma-xml...
+//
+// Author:
+//   Jonathan Pryor  <jpryor@novell.com>
+//
+// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+using System.Xml.Xsl;
+
+using Mono.Options;
+
+namespace Mono.Documentation {
+
+       class MsidocToMsxdocConverter : MDocCommand {
+
+               XslCompiledTransform msiToMsxTransform = new XslCompiledTransform ();
+
+               public MsidocToMsxdocConverter ()
+               {
+                       using (var r = XmlReader.Create (
+                                               Assembly.GetExecutingAssembly ().GetManifestResourceStream ("msitomsx.xsl")))
+                               msiToMsxTransform.Load (r);
+               }
+
+               public override void Run (IEnumerable<string> args)
+               {
+                       string current_library = "";
+
+                       var types = new List<string> ();
+                       string outdir = null;
+
+                       var options = new OptionSet () {
+                               { "o|out=", 
+                                       "{DIRECTORY} to create Microsoft XML assembly.xml documentation files.",
+                                       v => outdir = v },
+                               { "library=",
+                                       "Ignored for compatibility with update-ecma-xml.",
+                                       v => {} },
+                               { "type=",
+                                       "The full {TYPE} name of a type to copy into the output file.",
+                                       v => types.Add (v) },
+                       };
+                       var sources = Parse (options, args, "export-ecma-xml", 
+                                       "[OPTIONS]+ DIRECTORIES",
+                                       "Convert Microsoft internal XML documentation within DIRECTORIES into\n" +
+                                       "Microsoft XML documentation.\n" +
+                                       "\n" +
+                                       "Microsoft internal XML documentation is a custom XML dialect (yay) with\n" +
+                                       "a specific directory structure:\n" +
+                                       "\n" +
+                                       "\tROOT/dotted.namespace/asset.xml\n" +
+                                       "\n" +
+                                       "where ROOT is a directory that can be passed as one of the DIRECTORIES\n" +
+                                       "arguments to x-msitomsx, dotted.namespace is the lowercased namespace\n" +
+                                       "in dotted form, e.g. 'system.threading', and asset.xml is the name of \n" +
+                                       "the \"asset\" being documented.  The asset.xml basename is a GUID, and\n" +
+                                       "the file contains type/namespace/etc. documentation, one file per asset.\n" +
+                                       "\n" +
+                                       "There is no separation of assemblies in this format, only namespaces.\n" +
+                                       "Types from all assemblies are intermixed with each other.\n" +
+                                       "\n" +
+                                       "The output of x-msitomsx will be a set of files in the --out directory,\n" +
+                                       "one file per assembly (normal 'csc /doc' convention).  For example,\n" +
+                                       "\n" +
+                                       "\tmdoc x-msitomsx -o docs import-root --type System.String\n" +
+                                       "\n" +
+                                       "will create the file 'docs/mscorlib.dll' which will contain the converted\n" +
+                                       "documentation for the System.String type.");
+                       if (sources == null)
+                               return;
+                       if (sources.Count == 0)
+                               Error ("No directories specified.");
+                       if (outdir == null)
+                               Error ("No output directory specified.  Please use --out=DIRECTORY.");
+
+                       types.Sort ();
+
+                       Dictionary<string, XDocument> docs = Convert (sources, types);
+                       foreach (KeyValuePair<string, XDocument> e in docs) {
+                               using (var o = CreateWriter (Path.Combine (outdir, e.Key + ".xml")))
+                                       e.Value.WriteTo (o);
+                       }
+               }
+
+               private Dictionary<string, XDocument> Convert (List<string> sources, List<string> types)
+               {
+                       var docs = new Dictionary<string, XDocument> ();
+
+                       foreach (var source in sources) {
+                               foreach (var dir in Directory.GetDirectories (source)) {
+                                       foreach (var file in Directory.GetFiles (dir, "*.xml")) {
+                                               ConvertDocs (docs, types, file);
+                                       }
+                               }
+                       }
+
+                       return docs;
+               }
+
+               private void ConvertDocs (Dictionary<string, XDocument> docs, List<string> types, string file)
+               {
+                       var doc = LoadFile (file);
+                       var type = doc.Root.Element ("members").Element ("member").Attribute ("name").Value;
+
+                       if (type.StartsWith ("N:"))
+                               return;
+
+                       if (!type.StartsWith ("T:"))
+                               throw new InvalidOperationException ("File '" + file + "' doesn't contain type documentation, it contains docs for: " + type);
+
+                       type = type.Substring (2);
+                       if (types.Count > 0 && types.BinarySearch (type) < 0)
+                               return;
+
+                       var assembly = doc.Root.Element ("assembly").Element ("name").Value;
+                       XDocument asmdocs;
+                       if (!docs.TryGetValue (assembly, out asmdocs)) {
+                               docs.Add (assembly, 
+                                               asmdocs = new XDocument (
+                                                       new XElement ("doc", 
+                                                               new XElement ("assembly",
+                                                                       new XElement ("name", assembly)),
+                                                               new XElement ("members"))));
+                       }
+
+                       var import = new XDocument ();
+                       msiToMsxTransform.Transform (doc.CreateReader (), import.CreateWriter ());
+
+                       asmdocs.Root.Element ("members").Add (import.Root.Element ("members").Elements ("member"));
+               }
+
+               static XDocument LoadFile (string file)
+               {
+                       using (XmlReader r = XmlReader.Create (file))
+                               return XDocument.Load (r);
+               }
+
+               static XmlWriter CreateWriter (string file)
+               {
+                       var settings = new XmlWriterSettings {
+                               Encoding            = new UTF8Encoding (false),
+                               Indent              = true,
+                               IndentChars         = "    ",
+                               NewLineChars        = "\r\n",
+                               OmitXmlDeclaration  = true,
+                       };
+
+                       return XmlWriter.Create (file, settings);
+               }
+       }
+}
+
index a9a2c73c74b944f4b18d6162f5fe067e5b1f56a7..ed63ed9c675b0b75f455266aeb41f1e596e39de9 100644 (file)
@@ -60,7 +60,11 @@ add masterdoc support?
   <xs:element name="MemberOfLibrary" type="xs:string" />
   <xs:element name="MemberType" type="xs:string" />
   <xs:element name="MemberValue" type="xs:string" />
-  <xs:element name="onequarter" type="xs:string" />
+  <xs:element name="onequarter" />
+  <xs:element name="PRE" />
+  <xs:element name="permille" />
+  <xs:element name="pi" />
+  <xs:element name="pre" />
   <xs:element name="ReturnType" type="xs:string" />
   <xs:element name="TypeExcluded" type="xs:string" />
 
@@ -150,6 +154,7 @@ add masterdoc support?
         <xs:element ref="see" />
         <xs:element ref="subscript" />
         <xs:element ref="sup" />
+        <xs:element ref="pi" />
         <xs:element ref="typeparamref" />
       </xs:choice>
       <xs:attribute ref="subset" />
@@ -227,8 +232,12 @@ add masterdoc support?
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="c" />
         <xs:element ref="block" />
+        <xs:element ref="geq" />
+        <xs:element ref="leq" />
         <xs:element ref="paramref" />
         <xs:element ref="para" />
+        <xs:element ref="permille" />
+        <xs:element ref="plusminus" />
         <xs:element ref="SPAN" />
         <xs:element ref="see" />
         <xs:element ref="sub" />
@@ -248,11 +257,13 @@ add masterdoc support?
         <xs:element ref="example" />
         <xs:element ref="value" />
         <xs:element ref="permission" />
+        <xs:element ref="PermissionSet" />
         <xs:element ref="altmember" />
         <xs:element ref="altcompliant" />
         <xs:element ref="since" />
         <xs:element ref="threadsafe" />
         <xs:element ref="typeparam" />
+        <xs:element ref="filterpriority" />
       </xs:choice>
     </xs:complexType>
   </xs:element>
@@ -281,6 +292,7 @@ add masterdoc support?
         <xs:element ref="format" />
         <xs:element ref="para" />
         <xs:element ref="code" />
+        <xs:element ref="codelink" />
         <xs:element ref="c" />
         <xs:element ref="list" />
         <xs:element ref="see" />
@@ -359,14 +371,6 @@ add masterdoc support?
     </xs:complexType>
   </xs:element>
 
-  <xs:element name="Libraries">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="Type" minOccurs = "1" maxOccurs="unbounded" />
-      </xs:choice>
-    </xs:complexType>
-  </xs:element>
-
   <xs:element name="link">
     <xs:complexType>
       <xs:simpleContent>
@@ -484,8 +488,11 @@ add masterdoc support?
     <xs:complexType mixed="true">
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="block" />
+        <xs:element ref="i" />
         <xs:element ref="format" />
         <xs:element ref="see" />
+        <xs:element ref="geq" />
+        <xs:element ref="leq" />
         <xs:element ref="list" />
         <xs:element ref="link" />
         <xs:element ref="ul" />
@@ -493,9 +500,15 @@ add masterdoc support?
         <xs:element ref="c" />
         <xs:element ref="onequarter" />
         <xs:element ref="sub" />
+        <xs:element ref="superscript" />
         <xs:element ref="sup" />
+        <xs:element ref="permille" />
+        <xs:element ref="plusminus" />
         <xs:element ref="SPAN" />
+        <xs:element ref="pi" />
+        <xs:element ref="theta" />
         <xs:element ref="typeparamref" />
+        <xs:element ref="whitespace" />
       </xs:choice>
     </xs:complexType>
   </xs:element>
@@ -507,10 +520,14 @@ add masterdoc support?
         <xs:element ref="format" />
         <xs:element ref="see" />
         <xs:element ref="block" />
+        <xs:element ref="geq" />
+        <xs:element ref="leq" />
         <xs:element ref="paramref" />
+        <xs:element ref="plusminus" />
         <xs:element ref="para" />
         <xs:element ref="SPAN" />
         <xs:element ref="typeparamref" />
+        <xs:element ref="whitespace" />
       </xs:choice>
       <xs:attribute ref="name" use="required" />
     </xs:complexType>
@@ -572,6 +589,8 @@ add masterdoc support?
         <xs:element ref="format" />
         <xs:element ref="para" />
         <xs:element ref="paramref" />
+        <xs:element ref="PRE" />
+        <xs:element ref="pre" />
         <xs:element ref="see" />
         <xs:element ref="ul" />
         <xs:element ref="example" />
@@ -586,12 +605,17 @@ add masterdoc support?
     <xs:complexType mixed="true">
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="format" />
+        <xs:element ref="geq" />
+        <xs:element ref="leq" />
         <xs:element ref="list" />
         <xs:element ref="para" />
         <xs:element ref="paramref" />
+        <xs:element ref="pi" />
         <xs:element ref="see" />
+        <xs:element ref="theta" />
         <xs:element ref="typeparamref" />
         <xs:element ref="ul" />
+        <xs:element ref="whitespace" />
       </xs:choice>
     </xs:complexType>
   </xs:element>
@@ -660,7 +684,7 @@ add masterdoc support?
   </xs:element>
 
   <xs:element name="subscript">
-    <xs:complexType mixed="true">
+    <xs:complexType>
       <xs:attribute name="term" type="xs:string" use="required" />
     </xs:complexType>
   </xs:element>
@@ -684,31 +708,46 @@ add masterdoc support?
   <xs:element name="sup">
     <xs:complexType mixed="true">
       <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="i" />
         <xs:element ref="paramref" />
         <xs:element ref="typeparamref" />
       </xs:choice>
     </xs:complexType>
   </xs:element>
 
+  <xs:element name="superscript">
+    <xs:complexType>
+      <xs:attribute name="term" type="xs:string" use="required" />
+    </xs:complexType>
+  </xs:element>
+
   <xs:element name="term">
     <xs:complexType mixed="true">
         <xs:choice minOccurs="0" maxOccurs="unbounded">
           <xs:element ref="block" />
           <xs:element ref="c" />
           <xs:element ref="format" />
+          <xs:element ref="geq" />
+          <xs:element ref="leq" />
           <xs:element ref="see" />
           <xs:element ref="para"  />
           <xs:element ref="paramref" />
+          <xs:element ref="pi" />
+          <xs:element ref="plusminus" />
           <xs:element ref="sup" />
+          <xs:element ref="theta" />
           <xs:element ref="typeparamref" />
+          <xs:element ref="whitespace" />
         </xs:choice>
     </xs:complexType>
   </xs:element>
 
+  <xs:element name="theta" />
+
   <xs:element name="threadsafe">
     <xs:complexType>
      <xs:sequence>
-       <xs:element ref="para" minOccurs="1" />
+       <xs:element ref="para" minOccurs="1" maxOccurs="unbounded" />
      </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -868,6 +907,8 @@ add masterdoc support?
   <xs:element name="Assembly">
     <xs:complexType>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="AssemblyPublicKey" />
+        <xs:element ref="AssemblyCulture" />
         <xs:element ref="Attributes" />
       </xs:choice>
       <xs:attribute ref="Name" />
@@ -966,5 +1007,103 @@ add masterdoc support?
     </xs:complexType>
   </xs:element>
 
+  <!--
+    ECMA 335 CLILibraryTypes.xml support
+    -->
+
+  <xs:element name="Libraries">
+    <xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="Types" minOccurs = "1" maxOccurs="unbounded" />
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+
+       <xs:element name="codelink">
+    <xs:complexType>
+      <xs:attribute name="SampleID" type="xs:string" />
+      <xs:attribute name="SnippedID" type="xs:string" />
+    </xs:complexType>
+       </xs:element>
+
+  <xs:element name="filterpriority" type="xs:string" />
+
+  <xs:element name="geq" />
+  <xs:element name="leq" />
+  <xs:element name="plusminus" />
+  <xs:element name="whitespace" />
+
+  <xs:element name="PermissionSet">
+    <xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="IPermission">
+          <xs:complexType>
+            <xs:attribute name="class" type="xs:string" />
+            <xs:attribute name="Flags" type="xs:string" />
+            <xs:attribute name="Name" type="xs:string" />
+            <xs:attribute name="PathDiscovery" type="xs:string" />
+            <xs:attribute name="PublicKeyBlob" type="xs:string" />
+            <xs:attribute name="Read" type="xs:string" />
+            <xs:attribute name="Unrestricted" type="xs:string" />
+            <xs:attribute name="version" type="xs:string" />
+            <xs:attribute name="Window" type="xs:string" />
+          </xs:complexType>
+        </xs:element>
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+
+  <!--
+    ECMA 334 Annex E Documentation Comments support.
+    -->
+
+  <xs:element name="seealso">
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base="xs:string">
+          <xs:attribute ref="cref" />
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="doc">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element name="assembly">
+          <xs:complexType>
+            <xs:choice>
+              <xs:element name="name" type="xs:string" />
+            </xs:choice>
+          </xs:complexType>
+        </xs:element>
+        <xs:element name="members">
+          <xs:complexType>
+            <xs:choice minOccurs="0" maxOccurs="unbounded">>
+              <xs:element name="member">
+                <xs:complexType>
+                  <xs:choice minOccurs="0" maxOccurs="unbounded">
+                    <xs:element ref="seealso" />
+                    <xs:element ref="example" />
+                    <xs:element ref="exception" />
+                    <xs:element ref="param" />
+                    <xs:element ref="permission" />
+                    <xs:element ref="PermissionSet" />
+                    <xs:element ref="remarks" />
+                    <xs:element ref="returns" />
+                    <xs:element ref="summary" />
+                    <xs:element ref="threadsafe" />
+                    <xs:element ref="typeparam" />
+                    <xs:element ref="value" />
+                  </xs:choice>
+                  <xs:attribute name="name" type="xs:type" />
+                </xs:complexType>
+              </xs:element>
+            </xs:choice>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
 </xs:schema>
 
diff --git a/mcs/tools/mdoc/Resources/msitomsx.xsl b/mcs/tools/mdoc/Resources/msitomsx.xsl
new file mode 100644 (file)
index 0000000..33e532e
--- /dev/null
@@ -0,0 +1,303 @@
+<?xml version="1.0"?>
+<!--
+  Converts the "Microsoft Internal XML Documentation Format" into the 
+  "Microsoft XML Documentation Format".
+
+  The "Microsoft Internal XML Documentation Format" (msidoc) is whatever XML
+  format is used within Microsoft to document the BCL, as deduced from reading
+  their ECMA documentation dump.
+
+  The "Microsoft XML Documentation Format" (msxdoc) is what 'gmcs /doc' 
+  produces, and is documented in ECMA 334 Â§E.
+
+  msidoc is similar, but not identical to, msxdoc.  For example, where msxdoc
+  uses <see cref="FOO"/>, msidoc uses
+  <codeEntityReference>FOO</codeEntityReference>.  They also introduce
+  additional "wrapping" elements in various places (e.g. <content/>), useful
+  extensions (such as documenting method overload lists), and other oddities.
+  -->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
+  xmlns:authoring="http://ddue.schemas.microsoft.com/authoring/2003/5"
+  exclude-result-prefixes="msxsl authoring"
+  >
+
+  <xsl:output omit-xml-declaration="yes" />
+
+  <xsl:template match="assembly" />
+  <xsl:template match="authoring:changeHistory" />
+  <xsl:template match="authoring:clsCompliantAlternative" />
+  <xsl:template match="authoring:internalOnly" />
+  <xsl:template match="authoring:notesForCallers" />
+  <xsl:template match="authoring:notesForImplementers" />
+  <xsl:template match="authoring:notesForInheritors" />
+  <xsl:template match="authoring:overload" />
+  <xsl:template match="authoring:platformNotes" />
+  <xsl:template match="authoring:relatedTopics" />
+  <xsl:template match="authoring:sections" />
+
+  <xsl:template match="member">
+    <!-- skip Overload: members, as these have no msxdoc equivalent. -->
+    <xsl:if test="not (starts-with (@name, 'Overload:'))">
+      <member name="{@name}">
+        <xsl:apply-templates />
+      </member>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="authoring:remarks">
+    <remarks>
+      <xsl:apply-templates />
+      <xsl:for-each select="../authoring:notesForInheritors">
+        <block subset="none" type="overrides">
+          <xsl:apply-templates />
+        </block>
+      </xsl:for-each>
+      <xsl:for-each select="../authoring:notesForImplementers">
+        <block subset="none" type="behaviors">
+          <xsl:apply-templates />
+        </block>
+      </xsl:for-each>
+      <xsl:for-each select="../authoring:notesForCallers">
+        <block subset="none" type="usage">
+          <xsl:apply-templates />
+        </block>
+      </xsl:for-each>
+    </remarks>
+  </xsl:template>
+
+  <xsl:template match="authoring:dduexml" >
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:codeEntityReference">
+    <see cref="{.}" />
+  </xsl:template>
+
+  <xsl:template match="authoring:equivalentCodeEntity">
+    <seealso cref="{authoring:codeEntityReference}" />
+  </xsl:template>
+
+  <xsl:template match="authoring:codeInline">
+    <c>
+      <xsl:apply-templates />
+    </c>
+  </xsl:template>
+
+  <xsl:template match="authoring:codeReference">
+    <code src="{.}" />
+  </xsl:template>
+
+  <xsl:template match="authoring:parameters">
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:parameter">
+    <param name="{authoring:parameterReference}">
+      <xsl:for-each select="*">
+        <xsl:if test="not (position () = 1)">
+          <xsl:apply-templates />
+        </xsl:if>
+      </xsl:for-each>
+    </param>
+  </xsl:template>
+
+  <xsl:template match="authoring:genericParameters">
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:genericParameter">
+    <typeparam name="{authoring:parameterReference}">
+      <xsl:for-each select="*">
+        <xsl:if test="not (position () = 1)">
+          <xsl:apply-templates />
+        </xsl:if>
+      </xsl:for-each>
+    </typeparam>
+  </xsl:template>
+
+  <xsl:template match="authoring:parameterReference">
+    <paramref name="{.}" />
+  </xsl:template>
+
+  <xsl:template match="authoring:returnValue">
+    <returns>
+      <xsl:apply-templates />
+    </returns>
+  </xsl:template>
+
+  <xsl:template match="authoring:exceptions">
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:exception">
+    <exception cref="{authoring:codeEntityReference}">
+      <xsl:apply-templates select="authoring:content" />
+    </exception>
+  </xsl:template>
+
+  <xsl:template match="authoring:codeExamples">
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:codeExample">
+    <xsl:choose>
+      <xsl:when test="count(authoring:legacy) &gt; 0">
+      </xsl:when>
+      <xsl:otherwise>
+        <example>
+          <xsl:apply-templates select="authoring:description/authoring:content" />
+          <xsl:apply-templates select="authoring:codeReference" />
+        </example>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="authoring:content">
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:languageKeyword">
+    <see langword="{.}" />
+  </xsl:template>
+
+  <xsl:template match="authoring:table">
+    <list type="table">
+      <xsl:apply-templates />
+    </list>
+  </xsl:template>
+
+  <xsl:template match="authoring:tableHeader">
+    <listheader>
+      <xsl:for-each select="authoring:row/authoring:entry">
+        <xsl:choose>
+          <xsl:when test="position() = 1">
+            <term>
+              <xsl:apply-templates />
+            </term>
+          </xsl:when>
+          <xsl:otherwise>
+            <description>
+              <xsl:apply-templates />
+            </description>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </listheader>
+  </xsl:template>
+
+  <xsl:template match="authoring:row">
+    <item>
+      <xsl:for-each select="authoring:entry">
+        <xsl:choose>
+          <xsl:when test="position() = 1">
+            <term>
+              <xsl:apply-templates />
+            </term>
+          </xsl:when>
+          <xsl:otherwise>
+            <description>
+              <xsl:apply-templates />
+            </description>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </item>
+  </xsl:template>
+
+  <xsl:template match="authoring:list">
+    <list type="{@class}">
+      <xsl:apply-templates />
+    </list>
+  </xsl:template>
+
+  <xsl:template match="authoring:listItem">
+    <item><term>
+      <xsl:apply-templates />
+    </term></item>
+  </xsl:template>
+
+  <xsl:template match="authoring:alert">
+    <block subset="none" type="note">
+      <xsl:apply-templates />
+    </block>
+  </xsl:template>
+
+  <xsl:template match="authoring:permissions">
+    <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="authoring:permission">
+    <permission cref="{authoring:codeEntityReference}">
+      <xsl:apply-templates select="authoring:content" />
+    </permission>
+  </xsl:template>
+
+  <xsl:template match="authoring:threadSafety">
+    <threadsafe>
+      <xsl:apply-templates />
+    </threadsafe>
+  </xsl:template>
+
+  <xsl:template match="authoring:embeddedLabel">
+    <i>
+      <xsl:value-of select="." />
+      <xsl:text>:</xsl:text>
+    </i>
+  </xsl:template>
+
+  <xsl:template match="authoring:externalLink">
+    <format type="text/html">
+      <a href="{authoring:linkUri}">
+        <xsl:value-of select="authoring:linkText" />
+      </a>
+    </format>
+  </xsl:template>
+
+  <xsl:template match="authoring:legacyLink">
+    <i>
+      <xsl:value-of select="." />
+    </i>
+  </xsl:template>
+
+  <xsl:template match="authoring:legacyItalic">
+    <i>
+      <xsl:value-of select="." />
+    </i>
+  </xsl:template>
+
+  <xsl:template match="authoring:token">
+    <xsl:choose>
+      <xsl:when test=". = 'compact_v20_long'">
+        <xsl:text>.NET Compact Framework version 2.0</xsl:text>
+      </xsl:when>
+      <xsl:when test=". = 'compact_v35_long'">
+        <xsl:text>.NET Compact Framework version 3.5</xsl:text>
+      </xsl:when>
+      <xsl:when test=". = 'dnprdnext'">
+        <xsl:text>.NET Framework version 2.0</xsl:text>
+      </xsl:when>
+      <xsl:when test=". = 'vbprvbext'">
+        <xsl:text>Microsoft Visual Basic 2005</xsl:text>
+      </xsl:when>
+      <xsl:when test=". = 'vbprvblong'">
+        <xsl:text>Visual Basic 2005</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>UNKNOWN_TOKEN(</xsl:text>
+        <xsl:value-of select="." />
+        <xsl:text>)</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- cute trick to remove the xmlns attributes on copied nodes. -->
+  <xsl:template match="*">
+    <xsl:element name="{local-name()}">
+      <xsl:apply-templates />
+    </xsl:element>
+  </xsl:template>
+</xsl:stylesheet>
+
index fefaa9f990d9ace583a75be7821aa21eb8d5cb5e..745c51531f0ded0d5d42cac68ce4a6d0f7af2265 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Action&lt;T&gt;" FullName="System.Action&lt;T&gt;">
   <TypeSignature Language="C#" Value="public delegate void Action&lt;T&gt;(T obj);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Action`1&lt;T&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e1bc04988b2c332961b5568dac482c67a2c0789d..b082688677f9891ede22b3618dd8a51d14a0f8a4 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Array" FullName="System.Array">
   <TypeSignature Language="C#" Value="public class Array" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Array extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -97,7 +98,7 @@ and the second dimension indexed by 1, 2, and 3. </para>
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Array ();" />
-      <MemberSignature Language="ILAsm" Value="private rtspecialname specialname instance void .ctor()" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -110,6 +111,7 @@ and the second dimension indexed by 1, 2, and 3. </para>
     </Member>
     <Member MemberName="AsReadOnly&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.ObjectModel.ReadOnlyCollection&lt;T&gt; AsReadOnly&lt;T&gt; (T[] array);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.ObjectModel.ReadOnlyCollection`1&lt;!!T&gt; AsReadOnly&lt;T&gt;(!!T[] array) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -134,7 +136,7 @@ and the second dimension indexed by 1, 2, and 3. </para>
     </Member>
     <Member MemberName="ConvertAll&lt;T,U&gt;">
       <MemberSignature Language="C#" Value="public static TOutput[] ConvertAll&lt;TInput,TOutput&gt; (TInput[] array, Converter&lt;TInput,TOutput&gt; converter);" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig static !!1[] ConvertAll&lt;T,U&gt;(!!0[] array, class System.Converter`1&lt;!!0,!!1&gt; converter)" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig !!TOutput[] ConvertAll&lt;TInput, TOutput&gt;(!!TInput[] array, class System.Converter`2&lt;!!TInput, !!TOutput&gt; converter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -173,6 +175,7 @@ and the second dimension indexed by 1, 2, and 3. </para>
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Resize&lt;T&gt; (ref T[] array, int newSize);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Resize&lt;T&gt;(!!T[] array, int32 newSize) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 2049b23dce1f2bad3ee4d6b1a73961f8b19d896f..a232e3c2499f9c5a33844cbcc36a7b24be2df886 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="AsyncCallback" FullName="System.AsyncCallback">
   <TypeSignature Language="C#" Value="public delegate void AsyncCallback(IAsyncResult ar);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AsyncCallback extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e46ad7e4ae4f160ffe01a37231a6dc2c689a278e..5ce89496398ac49cd002401634d0c52c6f1909f1 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment" FullName="System.Environment">
   <TypeSignature Language="C#" Value="public static class Environment" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Environment extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -42,6 +43,7 @@
   <Members>
     <Member MemberName="GetFolderPath">
       <MemberSignature Language="C#" Value="public static string GetFolderPath (Environment.SpecialFolder folder);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetFolderPath(valuetype System.Environment/SpecialFolder folder) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
diff --git a/mcs/tools/mdoc/Test/en.expected.importecmadoc/index.xml b/mcs/tools/mdoc/Test/en.expected.importecmadoc/index.xml
new file mode 100644 (file)
index 0000000..c2ec0ea
--- /dev/null
@@ -0,0 +1,21 @@
+<Overview>
+  <Assemblies>
+    <Assembly Name="DocTest" Version="0.0.0.0">
+      <Attributes>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
+        </Attribute>
+      </Attributes>
+    </Assembly>
+  </Assemblies>
+  <Remarks>To be added.</Remarks>
+  <Copyright>To be added.</Copyright>
+  <Types>
+    <Namespace Name="System">
+      <Type Name="Action`1" DisplayName="Action&lt;T&gt;" Kind="Delegate" />
+      <Type Name="Array" Kind="Class" />
+      <Type Name="AsyncCallback" Kind="Delegate" />
+      <Type Name="Environment" Kind="Class" />
+    </Namespace>
+  </Types>
+</Overview>
index 14da68cc2139bca8762fc4f5e8c8ed64c36dbce4..bf6e99b4d88173bbab47a864279350063369095d 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Extensions" FullName="Mono.DocTest.Generic.Extensions">
   <TypeSignature Language="C#" Value="public static class Extensions" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Extensions extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -17,6 +18,7 @@
   <Members>
     <Member MemberName="Bar&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Bar&lt;T&gt; (this Mono.DocTest.Generic.IFoo&lt;T&gt; self, string s);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Bar&lt;T&gt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt; self, string s) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -44,6 +46,7 @@
     </Member>
     <Member MemberName="ForEach&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void ForEach&lt;T&gt; (this System.Collections.Generic.IEnumerable&lt;T&gt; self, Action&lt;T&gt; a);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void ForEach&lt;T&gt;(class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; self, class System.Action`1&lt;!!T&gt; a) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -71,6 +74,7 @@
     </Member>
     <Member MemberName="ToDouble">
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;double&gt; ToDouble (this System.Collections.Generic.IEnumerable&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;float64&gt; ToDouble(class System.Collections.Generic.IEnumerable`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -95,6 +99,7 @@
     </Member>
     <Member MemberName="ToDouble&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static double ToDouble&lt;T&gt; (this T val) where T : Mono.DocTest.Generic.IFoo&lt;T&gt;;" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 ToDouble&lt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt;) T&gt;(!!T val) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="ToEnumerable&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index bb0601421aef4bb0e0b7019c0ff04897464a04c6..5d12001d4055707f2763ab9c7682725de2c8fc3e 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Func&lt;TArg,TRet&gt;" FullName="Mono.DocTest.Generic.Func&lt;TArg,TRet&gt;">
   <TypeSignature Language="C#" Value="public delegate TRet Func&lt;TArg,TRet&gt;(TArg a) where TArg : Exception;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Func`2&lt;(class System.Exception) TArg, TRet&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 1a56984c028fd73c946c665eca5ec85760b4760f..f169f10adf57fb66aa7bb1f87d10d03e740ac47d 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+FooEventArgs" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+FooEventArgs">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;.FooEventArgs : EventArgs" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit GenericBase`1/FooEventArgs&lt;U&gt; extends System.EventArgs" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -18,6 +19,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public FooEventArgs ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index d21457d9bdc72012a80d517b95f95b0a70a4cb38..4010ee4fa51b8117ef8fa79538faeb51e484a9e2 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+NestedCollection+Enumerator" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+NestedCollection+Enumerator">
   <TypeSignature Language="C#" Value="public struct GenericBase&lt;U&gt;.NestedCollection.Enumerator" />
+  <TypeSignature Language="ILAsm" Value=".class nested public sequential ansi sealed beforefieldinit GenericBase`1/NestedCollection/Enumerator&lt;U&gt; extends System.ValueType" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 47c32c99165add6d7fe02ab0b7835606b165b181..20075f82a1d82170b26d3fec97b5cd1ae0ccae22 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+NestedCollection" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+NestedCollection">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;.NestedCollection" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit GenericBase`1/NestedCollection&lt;U&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -18,6 +19,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedCollection ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 3a28b8262cc6b0420023b6eac35de37faa5dcdfe..49043294da29b000e4c0d6eb0375b0bfcf7aeffe 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit GenericBase`1&lt;U&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public GenericBase ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -32,6 +34,7 @@
     </Member>
     <Member MemberName="BaseMethod&lt;S&gt;">
       <MemberSignature Language="C#" Value="public U BaseMethod&lt;S&gt; (S genericParameter);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance !U BaseMethod&lt;S&gt;(!!S genericParameter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -62,6 +65,7 @@
     </Member>
     <Member MemberName="ConstField1">
       <MemberSignature Language="C#" Value="public const int ConstField1;" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal int32 ConstField1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -78,6 +82,7 @@
     </Member>
     <Member MemberName="MyEvent">
       <MemberSignature Language="C#" Value="public event EventHandler&lt;Mono.DocTest.Generic.GenericBase&lt;U&gt;.FooEventArgs&gt; MyEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class System.EventHandler`1&lt;class Mono.DocTest.Generic.GenericBase`1/FooEventArgs&lt;!U&gt;&gt; MyEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <remarks>E:Mono.DocTest.Generic.GenericBase`1.MyEvent</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
         <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
       <MemberSignature Language="C#" Value="public static U op_Explicit (Mono.DocTest.Generic.GenericBase&lt;U&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname !U op_Explicit(class Mono.DocTest.Generic.GenericBase`1&lt;!U&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="StaticField1">
       <MemberSignature Language="C#" Value="public static readonly Mono.DocTest.Generic.GenericBase&lt;U&gt; StaticField1;" />
+      <MemberSignature Language="ILAsm" Value=".field public static initonly class Mono.DocTest.Generic.GenericBase`1&lt;!U&gt; StaticField1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 7d7aca55db396d5bd2bf863391c837834ea8b3ea..15abb95c9a9a69468094cf5b839a9a0d2c1a2074 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="IFoo&lt;T&gt;" FullName="Mono.DocTest.Generic.IFoo&lt;T&gt;">
   <TypeSignature Language="C#" Value="public interface IFoo&lt;T&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IFoo`1&lt;T&gt;" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -17,6 +18,7 @@
   <Members>
     <Member MemberName="Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="public T Method&lt;U&gt; (T t, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance !T Method&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 276d36ea30ae09cf46eb49dc0e1567bcfa5fa5c4..bd6290207430910e2cdd3e2111a709f49798b7e4 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;T&gt;+Helper&lt;U,V&gt;" FullName="Mono.DocTest.Generic.MyList&lt;T&gt;+Helper&lt;U,V&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;T&gt;.Helper&lt;U,V&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit MyList`1/Helper`2&lt;T, U, V&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -23,6 +24,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Helper ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -35,6 +37,7 @@
     </Member>
     <Member MemberName="UseT">
       <MemberSignature Language="C#" Value="public void UseT (T a, U b, V c);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseT(!T a, !U b, !V c) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index ff1881ee4d16150e23242d180ba8fd489be20603..b0cf4b8ae75bdefb74a61db85fc73349b8e1aee9 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;T&gt;" FullName="Mono.DocTest.Generic.MyList&lt;T&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;T&gt; : Mono.DocTest.Generic.GenericBase&lt;T&gt;, System.Collections.Generic.IEnumerable&lt;int[]&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MyList`1&lt;T&gt; extends Mono.DocTest.Generic.GenericBase`1&lt;!T&gt; implements class System.Collections.Generic.IEnumerable`1&lt;int32[]&gt;, class System.Collections.IEnumerable" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -33,6 +34,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public MyList ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -45,6 +47,7 @@
     </Member>
     <Member MemberName="GetEnumerator">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerator&lt;int[]&gt; GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;int32[]&gt; GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -62,6 +65,7 @@
     </Member>
     <Member MemberName="GetHelper&lt;U,V&gt;">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; GetHelper&lt;U,V&gt; ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!T, !!U, !!V&gt; GetHelper&lt;U, V&gt;() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -86,6 +90,7 @@
     </Member>
     <Member MemberName="Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="public void Method&lt;U&gt; (T t, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Method&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="RefMethod&lt;U&gt;">
       <MemberSignature Language="C#" Value="public void RefMethod&lt;U&gt; (ref T t, ref U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RefMethod&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerable.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.MyList`1.System#Collections#GetEnumerator</c>.</remarks>
       </Docs>
     </Member>
     <Member MemberName="Test">
       <MemberSignature Language="C#" Value="public void Test (T t);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Test(!T t) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="UseHelper&lt;U,V&gt;">
       <MemberSignature Language="C#" Value="public void UseHelper&lt;U,V&gt; (Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; helper);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseHelper&lt;U, V&gt;(class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!T, !!U, !!V&gt; helper) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 849bcf6ab4a2083302dee06399dc3644622090cb..a903045048daae7356842880077a2b2987551462 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;A,B&gt;" FullName="Mono.DocTest.Generic.MyList&lt;A,B&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;A,B&gt; : Mono.DocTest.Generic.GenericBase&lt;System.Collections.Generic.Dictionary&lt;A,B&gt;&gt;, Mono.DocTest.Generic.IFoo&lt;A&gt;, System.Collections.Generic.ICollection&lt;A&gt;, System.Collections.Generic.IEnumerable&lt;A&gt;, System.Collections.Generic.IEnumerator&lt;A&gt; where A : class, IList&lt;B&gt;, new() where B : class, A" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MyList`2&lt;class .ctor (class System.Collections.Generic.IList`1&lt;!B&gt;) A, class (!A) B&gt; extends Mono.DocTest.Generic.GenericBase`1&lt;class System.Collections.Generic.Dictionary`2&lt;!A, !B&gt;&gt; implements class Mono.DocTest.Generic.IFoo`1&lt;!A&gt;, class System.Collections.Generic.ICollection`1&lt;!A&gt;, class System.Collections.Generic.IEnumerable`1&lt;!A&gt;, class System.Collections.Generic.IEnumerator`1&lt;!A&gt;, class System.Collections.IEnumerable, class System.Collections.IEnumerator, class System.IDisposable" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -49,6 +50,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public MyList ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -61,6 +63,7 @@
     </Member>
     <Member MemberName="CopyTo">
       <MemberSignature Language="C#" Value="public void CopyTo (A[] array, int arrayIndex);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyTo(!A[] array, int32 arrayIndex) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
         <Parameter Name="arrayIndex" Type="System.Int32" />
       </Parameters>
       <Docs>
-        <param name="array">To be added.</param>
-        <param name="arrayIndex">To be added.</param>
+        <param name="array">Where to copy elements to</param>
+        <param name="arrayIndex">Where to start copyingto</param>
         <summary>To be added.</summary>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.MyList`2.CopyTo(`0[],System.Int32)</c>.</remarks>
       </Docs>
     </Member>
     <Member MemberName="Count">
       <MemberSignature Language="C#" Value="public int Count { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Current">
       <MemberSignature Language="C#" Value="public A Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance !A Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Dispose">
       <MemberSignature Language="C#" Value="public void Dispose ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Foo">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.KeyValuePair&lt;System.Collections.Generic.IEnumerable&lt;A&gt;,System.Collections.Generic.IEnumerable&lt;B&gt;&gt; Foo ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Collections.Generic.KeyValuePair`2&lt;class System.Collections.Generic.IEnumerable`1&lt;!A&gt;, class System.Collections.Generic.IEnumerable`1&lt;!B&gt;&gt; Foo() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="GetEnumerator">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.List&lt;A&gt;.Enumerator GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Collections.Generic.List`1/Enumerator&lt;!A&gt; GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Mono.DocTest.Generic.IFoo&lt;A&gt;.Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="A IFoo&lt;A&gt;.Method&lt;U&gt; (A a, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance !A Mono.DocTest.Generic.IFoo&lt;A&gt;.Method&lt;U&gt;(!A a, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="MoveNext">
       <MemberSignature Language="C#" Value="public bool MoveNext ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool MoveNext() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Reset">
       <MemberSignature Language="C#" Value="public void Reset ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Reset() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Add">
       <MemberSignature Language="C#" Value="void ICollection&lt;A&gt;.Add (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.Generic.ICollection&lt;A&gt;.Add(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Clear">
       <MemberSignature Language="C#" Value="void ICollection&lt;A&gt;.Clear ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.Generic.ICollection&lt;A&gt;.Clear() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Contains">
       <MemberSignature Language="C#" Value="bool ICollection&lt;A&gt;.Contains (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.Generic.ICollection&lt;A&gt;.Contains(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly">
       <MemberSignature Language="C#" Value="bool System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Remove">
       <MemberSignature Language="C#" Value="bool ICollection&lt;A&gt;.Remove (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.Generic.ICollection&lt;A&gt;.Remove(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.Generic.IEnumerator&lt;A&gt; IEnumerable&lt;A&gt;.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;!A&gt; System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.IEnumerator&lt;A&gt;.Current">
       <MemberSignature Language="C#" Value="A System.Collections.Generic.IEnumerator&lt;A&gt;.Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance !A System.Collections.Generic.IEnumerator&lt;A&gt;.Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerable.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.MyList`2.System#Collections#GetEnumerator</c>.</remarks>
       </Docs>
     </Member>
     <Member MemberName="System.Collections.IEnumerator.Current">
       <MemberSignature Language="C#" Value="object System.Collections.IEnumerator.Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IEnumerator.Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 9702a772952675319bb420ad19f5c8e9aad16e39..602521615fb87641a48e5fd9147591786aa955af 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Color" FullName="Mono.DocTest.Color">
   <TypeSignature Language="C#" Value="public enum Color" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Color extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -17,6 +18,7 @@
   <Members>
     <Member MemberName="AnotherGreen">
       <MemberSignature Language="C#" Value="AnotherGreen" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color AnotherGreen = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -30,6 +32,7 @@
     </Member>
     <Member MemberName="Blue">
       <MemberSignature Language="C#" Value="Blue" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Blue = int32(1)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -45,6 +48,7 @@
     </Member>
     <Member MemberName="Green">
       <MemberSignature Language="C#" Value="Green" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Green = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -60,6 +64,7 @@
     </Member>
     <Member MemberName="Red">
       <MemberSignature Language="C#" Value="Red" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Red = int32(0)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 7a228704d5b95bcbb99d75a1110cadf005897b8c..caccb75e2da096a716c63fc4e9574a97dd74e868 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="DocAttribute" FullName="Mono.DocTest.DocAttribute">
   <TypeSignature Language="C#" Value="public class DocAttribute : Attribute" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DocAttribute extends System.Attribute" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -38,6 +39,7 @@ class Example {
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public DocAttribute (string docs);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string docs) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -56,6 +58,7 @@ class Example {
     </Member>
     <Member MemberName="Field">
       <MemberSignature Language="C#" Value="public bool Field;" />
+      <MemberSignature Language="ILAsm" Value=".field public bool Field" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -72,6 +75,7 @@ class Example {
     </Member>
     <Member MemberName="FlagsEnum">
       <MemberSignature Language="C#" Value="public ConsoleModifiers FlagsEnum;" />
+      <MemberSignature Language="ILAsm" Value=".field public valuetype System.ConsoleModifiers FlagsEnum" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -88,6 +92,7 @@ class Example {
     </Member>
     <Member MemberName="NonFlagsEnum">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Color NonFlagsEnum;" />
+      <MemberSignature Language="ILAsm" Value=".field public valuetype Mono.DocTest.Color NonFlagsEnum" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -104,6 +109,7 @@ class Example {
     </Member>
     <Member MemberName="Property">
       <MemberSignature Language="C#" Value="public Type Property { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance class System.Type Property" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e8a82e473adbd742523cfe577857fd156bf2b49a..42c429c98f8eb129ed800b2dff57f67c0a592047 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="DocValueType" FullName="Mono.DocTest.DocValueType">
   <TypeSignature Language="C#" Value="public struct DocValueType : Mono.DocTest.IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit DocValueType extends System.ValueType implements class Mono.DocTest.IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -41,6 +43,7 @@
     </Member>
     <Member MemberName="total">
       <MemberSignature Language="C#" Value="public int total;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 total" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index a63b5ba4485bf55d42008b34bf2603998ec22d71..6140cfff222fe1df13c4660da2c72fc022c71392 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="IProcess" FullName="Mono.DocTest.IProcess">
   <TypeSignature Language="C#" Value="public interface IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index a05b4faaf887b3a8c9f2cfdaf93e57b3f224f9d1..983cf0fd5f672ed972045c5c938f38cfc935442f 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="UseLists" FullName="Mono.DocTest.UseLists">
   <TypeSignature Language="C#" Value="public class UseLists" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UseLists extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public UseLists ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -28,6 +30,7 @@
     </Member>
     <Member MemberName="GetValues&lt;T&gt;">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Generic.MyList&lt;T&gt; GetValues&lt;T&gt; (T value) where T : struct;" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.DocTest.Generic.MyList`1&lt;!!T&gt; GetValues&lt;struct .ctor (class System.ValueType) T&gt;(!!T value) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -58,6 +61,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (Mono.DocTest.Generic.MyList&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class Mono.DocTest.Generic.MyList`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -77,6 +81,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (System.Collections.Generic.List&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class System.Collections.Generic.List`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (System.Collections.Generic.List&lt;Predicate&lt;int&gt;&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class System.Collections.Generic.List`1&lt;class System.Predicate`1&lt;int32&gt;&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
       <MemberSignature Language="C#" Value="public void Process&lt;T&gt; (System.Collections.Generic.List&lt;Predicate&lt;T&gt;&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process&lt;T&gt;(class System.Collections.Generic.List`1&lt;class System.Predicate`1&lt;!!T&gt;&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
       <MemberSignature Language="C#" Value="public void UseHelper&lt;T,U,V&gt; (Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; helper);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseHelper&lt;T, U, V&gt;(class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!!T, !!U, !!V&gt; helper) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index d2a9ac42d42996d6d9c6ec02cb0b8d338b997bb8..ce0c9399d06c0bf5103588a9d151a3a974fc7b01 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+Del" FullName="Mono.DocTest.Widget+Del">
   <TypeSignature Language="C#" Value="public delegate void Widget.Del(int i);" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Widget/Del extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 3de341936a261c68b6b0cb25d1d69a66cf413adb..9f9df0ab3d2c5d270a7f344fd536af0ca0a6a2c5 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+Direction" FullName="Mono.DocTest.Widget+Direction">
   <TypeSignature Language="C#" Value="public enum Widget.Direction" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Widget/Direction extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName="East">
       <MemberSignature Language="C#" Value="East" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction East = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -35,6 +37,7 @@
     </Member>
     <Member MemberName="North">
       <MemberSignature Language="C#" Value="North" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction North = int32(0)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -50,6 +53,7 @@
     </Member>
     <Member MemberName="South">
       <MemberSignature Language="C#" Value="South" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction South = int32(1)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -65,6 +69,7 @@
     </Member>
     <Member MemberName="West">
       <MemberSignature Language="C#" Value="West" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction West = int32(3)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e996959b13b71d1d27e8f91581b2a22a78d1c29e..31d5027897076d8fcf96e3888bf94db724cf9d3a 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+IMenuItem" FullName="Mono.DocTest.Widget+IMenuItem">
   <TypeSignature Language="C#" Value="public interface Widget.IMenuItem" />
+  <TypeSignature Language="ILAsm" Value=".class nested public interface auto ansi abstract Widget/IMenuItem" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -13,6 +14,7 @@
   <Members>
     <Member MemberName="A">
       <MemberSignature Language="C#" Value="public void A ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void A() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -29,6 +31,7 @@
     </Member>
     <Member MemberName="B">
       <MemberSignature Language="C#" Value="public int B { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 B" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e0347f409e6ba9802de0f9ba9efa11d27570abf2..57f8f615b603f309cd676291fbc8c9b6a2e12064 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double+Triple+Quadruple" FullName="Mono.DocTest.Widget+NestedClass+Double+Triple+Quadruple">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double.Triple.Quadruple" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double/Triple/Quadruple extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Quadruple ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 39ad226ab01d2f98abe6b87a2bd161146906020e..a7ec96cdd9bb56777dd513127f2080e6431c4c74 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double+Triple" FullName="Mono.DocTest.Widget+NestedClass+Double+Triple">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double.Triple" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double/Triple extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Triple ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 69e33ccf37cab53e4ba7f83d71f34e168b8f6efe..4f995ec6dfa0176c7ecb3e5786cdbed0bc632e2d 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double" FullName="Mono.DocTest.Widget+NestedClass+Double">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Double ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 9bf17ce037c6e455fb9b2ac96508aecf787bc500..1f9fc86874eb78e01eba60823cafd49884bd853c 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass" FullName="Mono.DocTest.Widget+NestedClass">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedClass ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -28,6 +30,7 @@
     </Member>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -47,6 +50,7 @@
     </Member>
     <Member MemberName="value">
       <MemberSignature Language="C#" Value="public int value;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 value" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 88669619e0f14a1e6fa4afde1631cd3f3f088f86..69bf681f46b7f8cfce49b9c7773373090c0715f3 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass&lt;T&gt;" FullName="Mono.DocTest.Widget+NestedClass&lt;T&gt;">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass&lt;T&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass`1&lt;T&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedClass ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -32,6 +34,7 @@
     </Member>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -51,6 +54,7 @@
     </Member>
     <Member MemberName="value">
       <MemberSignature Language="C#" Value="public int value;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 value" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 158f35523879d4f830524fcea3dfc1d28c1d8a68..4eddaba93b86e34e3d8c9839c04a87f387bc37d5 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget" FullName="Mono.DocTest.Widget">
   <TypeSignature Language="C#" Value="public class Widget : Mono.DocTest.IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Widget extends System.Object implements class Mono.DocTest.IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -22,6 +23,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -45,6 +47,7 @@
     </Member>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget (Converter&lt;string,string&gt; c);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Converter`2&lt;string, string&gt; c) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -63,6 +66,7 @@
     </Member>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget (string s);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string s) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -83,6 +87,7 @@
     </Member>
     <Member MemberName="AnEvent">
       <MemberSignature Language="C#" Value="public event Mono.DocTest.Widget.Del AnEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class Mono.DocTest.Widget/Del AnEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="AnotherEvent">
       <MemberSignature Language="C#" Value="protected event Mono.DocTest.Widget.Del AnotherEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class Mono.DocTest.Widget/Del AnotherEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
         <summary>To be added.</summary>
         <remarks>
           <c>E:Mono.DocTest.Widget.AnotherEvent</c>.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
         <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
       <MemberSignature Language="C#" Value="public long[] array1;" />
+      <MemberSignature Language="ILAsm" Value=".field public int64[] array1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="array2">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Widget[,] array2;" />
+      <MemberSignature Language="ILAsm" Value=".field public class Mono.DocTest.Widget[,] array2" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="classCtorError">
       <MemberSignature Language="C#" Value="public static readonly string[] classCtorError;" />
+      <MemberSignature Language="ILAsm" Value=".field public static initonly string[] classCtorError" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="defaultColor">
       <MemberSignature Language="C#" Value="protected static Mono.DocTest.Color defaultColor;" />
+      <MemberSignature Language="ILAsm" Value=".field family static valuetype Mono.DocTest.Color defaultColor" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Height">
       <MemberSignature Language="C#" Value="protected long Height { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int64 Height" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Item">
       <MemberSignature Language="C#" Value="public int this[int i] { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Item(int32)" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Item">
       <MemberSignature Language="C#" Value="public int this[string s, int i] { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Item(string, int32)" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M0">
       <MemberSignature Language="C#" Value="public static void M0 ();" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void M0() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M1">
       <MemberSignature Language="C#" Value="public void M1 (char c, out float f, ref Mono.DocTest.DocValueType v);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M1(char c, float32 f, valuetype Mono.DocTest.DocValueType v) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M2">
       <MemberSignature Language="C#" Value="public void M2 (short[] x1, int[,] x2, long[][] x3);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M2(int16[] x1, int32[,] x2, int64[][] x3) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M3">
       <MemberSignature Language="C#" Value="protected void M3 (long[][] x3, Mono.DocTest.Widget[,,][] x4);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M3(int64[][] x3, class Mono.DocTest.Widget[,,][] x4) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M4">
       <MemberSignature Language="C#" Value="protected void M4 (char* pc, Mono.DocTest.Color** ppf);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M4(char* pc, valuetype Mono.DocTest.Color** ppf) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M5">
       <MemberSignature Language="C#" Value="protected void M5 (void* pv, double*[,][] pd);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M5(void* pv, float64*[,][] pd) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M6">
       <MemberSignature Language="C#" Value="protected void M6 (int i, object[] args);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M6(int32 i, object[] args) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M7">
       <MemberSignature Language="C#" Value="public void M7 (Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple a);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M7(class Mono.DocTest.Widget/NestedClass/Double/Triple/Quadruple a) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="message">
       <MemberSignature Language="C#" Value="public string message;" />
+      <MemberSignature Language="ILAsm" Value=".field public string message" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="monthlyAverage">
       <MemberSignature Language="C#" Value="protected readonly double monthlyAverage;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly initonly float64 monthlyAverage" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Addition">
       <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Addition (Mono.DocTest.Widget x1, Mono.DocTest.Widget x2);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname class Mono.DocTest.Widget op_Addition(class Mono.DocTest.Widget x1, class Mono.DocTest.Widget x2) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Explicit">
       <MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Implicit">
       <MemberSignature Language="C#" Value="public static long op_Implicit (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int64 op_Implicit(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_UnaryPlus">
       <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_UnaryPlus (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname class Mono.DocTest.Widget op_UnaryPlus(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="pCount">
       <MemberSignature Language="C#" Value="public int* pCount;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32* pCount" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="PI">
       <MemberSignature Language="C#" Value="protected const double PI = 3.14159;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3.14159)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="ppValues">
       <MemberSignature Language="C#" Value="public float** ppValues;" />
+      <MemberSignature Language="ILAsm" Value=".field public float32** ppValues" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Width">
       <MemberSignature Language="C#" Value="public int Width { protected set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Width" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="X">
       <MemberSignature Language="C#" Value="protected short X { set; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int16 X" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Y">
       <MemberSignature Language="C#" Value="protected double Y { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance float64 Y" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 943e75dd7d6344e22b74b83f8ecae8e957b8c09a..29b4a72aabc89a36a5601e50cad637f688193bb3 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="NoNamespace" FullName="NoNamespace">
   <TypeSignature Language="C#" Value="public class NoNamespace" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit NoNamespace extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -17,6 +18,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NoNamespace ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 32894366e09680cb6b85f7d5bf9079404f68c041..f4e73d3b1e11d02b2fae432f0f077b76f6b5e697 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Action&lt;T&gt;" FullName="System.Action&lt;T&gt;">
   <TypeSignature Language="C#" Value="public delegate void Action&lt;T&gt;(T obj);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Action`1&lt;T&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index c18c5df9d23c6229376799217afc0349093e7695..2965a7f7da2ea1c9722dc82b5e48353be9932554 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Array" FullName="System.Array">
   <TypeSignature Language="C#" Value="public class Array" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Array extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Array ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -27,6 +29,7 @@
     </Member>
     <Member MemberName="AsReadOnly&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.ObjectModel.ReadOnlyCollection&lt;T&gt; AsReadOnly&lt;T&gt; (T[] array);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.ObjectModel.ReadOnlyCollection`1&lt;!!T&gt; AsReadOnly&lt;T&gt;(!!T[] array) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -51,6 +54,7 @@
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
       <MemberSignature Language="C#" Value="public static TOutput[] ConvertAll&lt;TInput,TOutput&gt; (TInput[] array, Converter&lt;TInput,TOutput&gt; converter);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig !!TOutput[] ConvertAll&lt;TInput, TOutput&gt;(!!TInput[] array, class System.Converter`2&lt;!!TInput, !!TOutput&gt; converter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -79,6 +83,7 @@
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Resize&lt;T&gt; (ref T[] array, int newSize);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Resize&lt;T&gt;(!!T[] array, int32 newSize) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 92d8dcf0f833410441830d48157ee7eef72489d3..deb06e912a1285c434ac96d46ae52414e2d01857 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="AsyncCallback" FullName="System.AsyncCallback">
   <TypeSignature Language="C#" Value="public delegate void AsyncCallback(IAsyncResult ar);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AsyncCallback extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index aeaedcde07bb61b6a27ef986a9c0d4d5d5b37d4d..163852417636cd5f4bf057fd196c602178074b8f 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment+SpecialFolder" FullName="System.Environment+SpecialFolder">
   <TypeSignature Language="C#" Value="public enum Environment.SpecialFolder" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Environment/SpecialFolder extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 932bb61bac48e6dd157b5d8c2d9f30ad2d721e5e..0a1b9400db414588564e9f653fc3fe729d0a67ec 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment" FullName="System.Environment">
   <TypeSignature Language="C#" Value="public static class Environment" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Environment extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -17,6 +18,7 @@
   <Members>
     <Member MemberName="GetFolderPath">
       <MemberSignature Language="C#" Value="public static string GetFolderPath (Environment.SpecialFolder folder);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetFolderPath(valuetype System.Environment/SpecialFolder folder) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index b1d44015d7f5e0bb9bec7259dfb3f57234d30977..ffc39640de3e61921f376808108707b9f1ad83ef 100644 (file)
@@ -58,6 +58,7 @@
       </Targets>
       <Member MemberName="Bar&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static void Bar&lt;T&gt; (this Mono.DocTest.Generic.IFoo&lt;T&gt; self, string s);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Bar&lt;T&gt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt; self, string s) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Void</ReturnType>
@@ -85,6 +86,7 @@
       </Targets>
       <Member MemberName="ForEach&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static void ForEach&lt;T&gt; (this System.Collections.Generic.IEnumerable&lt;T&gt; self, Action&lt;T&gt; a);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void ForEach&lt;T&gt;(class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; self, class System.Action`1&lt;!!T&gt; a) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Void</ReturnType>
       </Targets>
       <Member MemberName="ToDouble">
         <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;double&gt; ToDouble (this System.Collections.Generic.IEnumerable&lt;int&gt; list);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;float64&gt; ToDouble(class System.Collections.Generic.IEnumerable`1&lt;int32&gt; list) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Collections.Generic.IEnumerable&lt;System.Double&gt;</ReturnType>
       </Targets>
       <Member MemberName="ToDouble&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static double ToDouble&lt;T&gt; (this T val) where T : Mono.DocTest.Generic.IFoo&lt;T&gt;;" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 ToDouble&lt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt;) T&gt;(!!T val) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Double</ReturnType>
       </Targets>
       <Member MemberName="ToEnumerable&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
index 5baa170c3331f4a1937dccd7028c9b3873f726da..90164c97b0f876298ac6627e44b2301e6a11164e 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Extensions" FullName="Mono.DocTest.Generic.Extensions">
   <TypeSignature Language="C#" Value="public static class Extensions" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Extensions extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName="Bar&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Bar&lt;T&gt; (this Mono.DocTest.Generic.IFoo&lt;T&gt; self, string s);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Bar&lt;T&gt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt; self, string s) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -41,6 +43,7 @@
     </Member>
     <Member MemberName="ForEach&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void ForEach&lt;T&gt; (this System.Collections.Generic.IEnumerable&lt;T&gt; self, Action&lt;T&gt; a);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void ForEach&lt;T&gt;(class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; self, class System.Action`1&lt;!!T&gt; a) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -66,6 +69,7 @@
     </Member>
     <Member MemberName="ToDouble">
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;double&gt; ToDouble (this System.Collections.Generic.IEnumerable&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;float64&gt; ToDouble(class System.Collections.Generic.IEnumerable`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -86,6 +90,7 @@
     </Member>
     <Member MemberName="ToDouble&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static double ToDouble&lt;T&gt; (this T val) where T : Mono.DocTest.Generic.IFoo&lt;T&gt;;" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 ToDouble&lt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt;) T&gt;(!!T val) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="ToEnumerable&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index cfa836a08299eb8854c026b14757f1dd42f7fdd6..57a69d9c254e3b63ee623b8f981224d3698906c3 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Func&lt;TArg,TRet&gt;" FullName="Mono.DocTest.Generic.Func&lt;TArg,TRet&gt;">
   <TypeSignature Language="C#" Value="public delegate TRet Func&lt;TArg,TRet&gt;(TArg a) where TArg : Exception;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Func`2&lt;(class System.Exception) TArg, TRet&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 12b6614649f6a42175e769a41e9a828565f25e22..f8de1b03974f1932dcd8d80e2a225be04fcd11fb 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+FooEventArgs" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+FooEventArgs">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;.FooEventArgs : EventArgs" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit GenericBase`1/FooEventArgs&lt;U&gt; extends System.EventArgs" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public FooEventArgs ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 51bfdf89e15f75e8ec955ff4c7a14503593bf1d1..843ade526c241e236c27325ba5f8351fca7dc65e 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+NestedCollection+Enumerator" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+NestedCollection+Enumerator">
   <TypeSignature Language="C#" Value="public struct GenericBase&lt;U&gt;.NestedCollection.Enumerator" />
+  <TypeSignature Language="ILAsm" Value=".class nested public sequential ansi sealed beforefieldinit GenericBase`1/NestedCollection/Enumerator&lt;U&gt; extends System.ValueType" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index f1425b1b28e34d1e6ec3871fd65c50a0e1c721ab..5cd7a7e4e76f7a5c869cfdd40a93d44f0fa70dde 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+NestedCollection" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+NestedCollection">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;.NestedCollection" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit GenericBase`1/NestedCollection&lt;U&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedCollection ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index ec7e8f468c2f25983040e54ff5bb7d65f0e54476..a6fe899fd0c1b3a141ea6269fb210ccef068202d 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit GenericBase`1&lt;U&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public GenericBase ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -33,6 +35,7 @@
     </Member>
     <Member MemberName="AddedInVersion0_1_0_0">
       <MemberSignature Language="C#" Value="public void AddedInVersion0_1_0_0 ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddedInVersion0_1_0_0() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
@@ -49,6 +52,7 @@
     </Member>
     <Member MemberName="BaseMethod&lt;S&gt;">
       <MemberSignature Language="C#" Value="public U BaseMethod&lt;S&gt; (S genericParameter);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance !U BaseMethod&lt;S&gt;(!!S genericParameter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -79,6 +83,7 @@
     </Member>
     <Member MemberName="ConstField1">
       <MemberSignature Language="C#" Value="public const int ConstField1;" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal int32 ConstField1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -94,6 +99,7 @@
     </Member>
     <Member MemberName="MyEvent">
       <MemberSignature Language="C#" Value="public event EventHandler&lt;Mono.DocTest.Generic.GenericBase&lt;U&gt;.FooEventArgs&gt; MyEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class System.EventHandler`1&lt;class Mono.DocTest.Generic.GenericBase`1/FooEventArgs&lt;!U&gt;&gt; MyEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
         <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
       <MemberSignature Language="C#" Value="public static U op_Explicit (Mono.DocTest.Generic.GenericBase&lt;U&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname !U op_Explicit(class Mono.DocTest.Generic.GenericBase`1&lt;!U&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="StaticField1">
       <MemberSignature Language="C#" Value="public static readonly Mono.DocTest.Generic.GenericBase&lt;U&gt; StaticField1;" />
+      <MemberSignature Language="ILAsm" Value=".field public static initonly class Mono.DocTest.Generic.GenericBase`1&lt;!U&gt; StaticField1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 6eab8d90ca9c4409bc0ad1a88adaeccc12eca71a..512a73d16a291709cf4ef59d45be7a218ba7fcdb 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="IFoo&lt;T&gt;" FullName="Mono.DocTest.Generic.IFoo&lt;T&gt;">
   <TypeSignature Language="C#" Value="public interface IFoo&lt;T&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IFoo`1&lt;T&gt;" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -17,6 +18,7 @@
   <Members>
     <Member MemberName="Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="public T Method&lt;U&gt; (T t, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance !T Method&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index f9b00d6e1cf03a6e46b3d0c9150dcf5ab8ce8f01..dcb2a37522316571ec34b2f94298744972f7a49a 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;T&gt;+Helper&lt;U,V&gt;" FullName="Mono.DocTest.Generic.MyList&lt;T&gt;+Helper&lt;U,V&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;T&gt;.Helper&lt;U,V&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit MyList`1/Helper`2&lt;T, U, V&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -23,6 +24,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Helper ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -36,6 +38,7 @@
     </Member>
     <Member MemberName="UseT">
       <MemberSignature Language="C#" Value="public void UseT (T a, U b, V c);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseT(!T a, !U b, !V c) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 1bfffe992deaaa793fc652baf3a83c9e62c926e6..50cd32cef66444963d977c4f0bcc4e90c500b590 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;T&gt;" FullName="Mono.DocTest.Generic.MyList&lt;T&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;T&gt; : Mono.DocTest.Generic.GenericBase&lt;T&gt;, System.Collections.Generic.IEnumerable&lt;int[]&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MyList`1&lt;T&gt; extends Mono.DocTest.Generic.GenericBase`1&lt;!T&gt; implements class System.Collections.Generic.IEnumerable`1&lt;int32[]&gt;, class System.Collections.IEnumerable" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -33,6 +34,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public MyList ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -46,6 +48,7 @@
     </Member>
     <Member MemberName="GetEnumerator">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerator&lt;int[]&gt; GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;int32[]&gt; GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -63,6 +66,7 @@
     </Member>
     <Member MemberName="GetHelper&lt;U,V&gt;">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; GetHelper&lt;U,V&gt; ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!T, !!U, !!V&gt; GetHelper&lt;U, V&gt;() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -86,6 +90,7 @@
     </Member>
     <Member MemberName="Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="public void Method&lt;U&gt; (T t, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Method&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="RefMethod&lt;U&gt;">
       <MemberSignature Language="C#" Value="public void RefMethod&lt;U&gt; (ref T t, ref U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RefMethod&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerable.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Test">
       <MemberSignature Language="C#" Value="public void Test (T t);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Test(!T t) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="UseHelper&lt;U,V&gt;">
       <MemberSignature Language="C#" Value="public void UseHelper&lt;U,V&gt; (Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; helper);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseHelper&lt;U, V&gt;(class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!T, !!U, !!V&gt; helper) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index b8f98939724c49c75fa64f6dd1f45ab3c115dd12..0349333be0f9422e601cf782403dba275e914016 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;A,B&gt;" FullName="Mono.DocTest.Generic.MyList&lt;A,B&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;A,B&gt; : Mono.DocTest.Generic.GenericBase&lt;System.Collections.Generic.Dictionary&lt;A,B&gt;&gt;, Mono.DocTest.Generic.IFoo&lt;A&gt;, System.Collections.Generic.ICollection&lt;A&gt;, System.Collections.Generic.IEnumerable&lt;A&gt;, System.Collections.Generic.IEnumerator&lt;A&gt; where A : class, IList&lt;B&gt;, new() where B : class, A" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MyList`2&lt;class .ctor (class System.Collections.Generic.IList`1&lt;!B&gt;) A, class (!A) B&gt; extends Mono.DocTest.Generic.GenericBase`1&lt;class System.Collections.Generic.Dictionary`2&lt;!A, !B&gt;&gt; implements class Mono.DocTest.Generic.IFoo`1&lt;!A&gt;, class System.Collections.Generic.ICollection`1&lt;!A&gt;, class System.Collections.Generic.IEnumerable`1&lt;!A&gt;, class System.Collections.Generic.IEnumerator`1&lt;!A&gt;, class System.Collections.IEnumerable, class System.Collections.IEnumerator, class System.IDisposable" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -49,6 +50,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public MyList ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -62,6 +64,7 @@
     </Member>
     <Member MemberName="CopyTo">
       <MemberSignature Language="C#" Value="public void CopyTo (A[] array, int arrayIndex);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyTo(!A[] array, int32 arrayIndex) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -83,6 +86,7 @@
     </Member>
     <Member MemberName="Count">
       <MemberSignature Language="C#" Value="public int Count { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Current">
       <MemberSignature Language="C#" Value="public A Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance !A Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Dispose">
       <MemberSignature Language="C#" Value="public void Dispose ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Foo">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.KeyValuePair&lt;System.Collections.Generic.IEnumerable&lt;A&gt;,System.Collections.Generic.IEnumerable&lt;B&gt;&gt; Foo ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Collections.Generic.KeyValuePair`2&lt;class System.Collections.Generic.IEnumerable`1&lt;!A&gt;, class System.Collections.Generic.IEnumerable`1&lt;!B&gt;&gt; Foo() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="GetEnumerator">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.List&lt;A&gt;.Enumerator GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Collections.Generic.List`1/Enumerator&lt;!A&gt; GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Mono.DocTest.Generic.IFoo&lt;A&gt;.Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="A IFoo&lt;A&gt;.Method&lt;U&gt; (A a, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance !A Mono.DocTest.Generic.IFoo&lt;A&gt;.Method&lt;U&gt;(!A a, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="MoveNext">
       <MemberSignature Language="C#" Value="public bool MoveNext ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool MoveNext() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Reset">
       <MemberSignature Language="C#" Value="public void Reset ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Reset() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Add">
       <MemberSignature Language="C#" Value="void ICollection&lt;A&gt;.Add (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.Generic.ICollection&lt;A&gt;.Add(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Clear">
       <MemberSignature Language="C#" Value="void ICollection&lt;A&gt;.Clear ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.Generic.ICollection&lt;A&gt;.Clear() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Contains">
       <MemberSignature Language="C#" Value="bool ICollection&lt;A&gt;.Contains (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.Generic.ICollection&lt;A&gt;.Contains(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly">
       <MemberSignature Language="C#" Value="bool System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Remove">
       <MemberSignature Language="C#" Value="bool ICollection&lt;A&gt;.Remove (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.Generic.ICollection&lt;A&gt;.Remove(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.Generic.IEnumerator&lt;A&gt; IEnumerable&lt;A&gt;.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;!A&gt; System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.IEnumerator&lt;A&gt;.Current">
       <MemberSignature Language="C#" Value="A System.Collections.Generic.IEnumerator&lt;A&gt;.Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance !A System.Collections.Generic.IEnumerator&lt;A&gt;.Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerable.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerator.Current">
       <MemberSignature Language="C#" Value="object System.Collections.IEnumerator.Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IEnumerator.Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 012b5f2fb0df89c33ad14591c12c94356aee4764..7197f915c072a648d10939ff4e772e13ad33e474 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="AddedType" FullName="Mono.DocTest.AddedType">
   <TypeSignature Language="C#" Value="public class AddedType" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AddedType extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>2.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public AddedType ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
index 6a1f914e359da99ecd39473be8e29b8977994313..62e20a1f74623dd2fb49add29b237af9d1d5c075 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Color" FullName="Mono.DocTest.Color">
   <TypeSignature Language="C#" Value="public enum Color" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Color extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName="AnotherGreen">
       <MemberSignature Language="C#" Value="AnotherGreen" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color AnotherGreen = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -29,6 +31,7 @@
     </Member>
     <Member MemberName="Blue">
       <MemberSignature Language="C#" Value="Blue" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Blue = int32(1)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -43,6 +46,7 @@
     </Member>
     <Member MemberName="Green">
       <MemberSignature Language="C#" Value="Green" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Green = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -57,6 +61,7 @@
     </Member>
     <Member MemberName="Red">
       <MemberSignature Language="C#" Value="Red" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Red = int32(0)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 449d275f77f892a0c7c2584018363542cb1c5f40..6796b2bf8d691bc78fe72ff8186440a05c42514a 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="DocAttribute" FullName="Mono.DocTest.DocAttribute">
   <TypeSignature Language="C#" Value="public class DocAttribute : Attribute" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DocAttribute extends System.Attribute" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -21,6 +22,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public DocAttribute (string docs);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string docs) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -38,6 +40,7 @@
     </Member>
     <Member MemberName="Field">
       <MemberSignature Language="C#" Value="public bool Field;" />
+      <MemberSignature Language="ILAsm" Value=".field public bool Field" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -53,6 +56,7 @@
     </Member>
     <Member MemberName="FlagsEnum">
       <MemberSignature Language="C#" Value="public ConsoleModifiers FlagsEnum;" />
+      <MemberSignature Language="ILAsm" Value=".field public valuetype System.ConsoleModifiers FlagsEnum" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -68,6 +72,7 @@
     </Member>
     <Member MemberName="NonFlagsEnum">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Color NonFlagsEnum;" />
+      <MemberSignature Language="ILAsm" Value=".field public valuetype Mono.DocTest.Color NonFlagsEnum" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -83,6 +88,7 @@
     </Member>
     <Member MemberName="Property">
       <MemberSignature Language="C#" Value="public Type Property { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance class System.Type Property" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e44f0e0adbddbe0238e144b9ce4b5b9f4bdc0529..ae648fae699390fada86a85342186711cb2e5e47 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="DocValueType" FullName="Mono.DocTest.DocValueType">
   <TypeSignature Language="C#" Value="public struct DocValueType : Mono.DocTest.IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit DocValueType extends System.ValueType implements class Mono.DocTest.IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -41,6 +43,7 @@
     </Member>
     <Member MemberName="total">
       <MemberSignature Language="C#" Value="public int total;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 total" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 2fbd7d3b4a53aaeef81fc2b9b32ae74330178de8..76a31fe5a858d02f94380785be59ed19537cb3b3 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="IProcess" FullName="Mono.DocTest.IProcess">
   <TypeSignature Language="C#" Value="public interface IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 89f6ebf9281dda1ff8b794ce91a9a96a6cbe65b7..458a2e255ea570236decdc1ed5a0ee26b4ca178f 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="UseLists" FullName="Mono.DocTest.UseLists">
   <TypeSignature Language="C#" Value="public class UseLists" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UseLists extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public UseLists ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -29,6 +31,7 @@
     </Member>
     <Member MemberName="GetValues&lt;T&gt;">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Generic.MyList&lt;T&gt; GetValues&lt;T&gt; (T value) where T : struct;" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.DocTest.Generic.MyList`1&lt;!!T&gt; GetValues&lt;struct .ctor (class System.ValueType) T&gt;(!!T value) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -59,6 +62,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (Mono.DocTest.Generic.MyList&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class Mono.DocTest.Generic.MyList`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -78,6 +82,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (System.Collections.Generic.List&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class System.Collections.Generic.List`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (System.Collections.Generic.List&lt;Predicate&lt;int&gt;&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class System.Collections.Generic.List`1&lt;class System.Predicate`1&lt;int32&gt;&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
       <MemberSignature Language="C#" Value="public void Process&lt;T&gt; (System.Collections.Generic.List&lt;Predicate&lt;T&gt;&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process&lt;T&gt;(class System.Collections.Generic.List`1&lt;class System.Predicate`1&lt;!!T&gt;&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
       <MemberSignature Language="C#" Value="public void UseHelper&lt;T,U,V&gt; (Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; helper);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseHelper&lt;T, U, V&gt;(class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!!T, !!U, !!V&gt; helper) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 9f2111400481c3b697375a022b0fe826f5a734eb..2620b6aef299f6e786d4b689b69d723de2533ceb 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+Del" FullName="Mono.DocTest.Widget+Del">
   <TypeSignature Language="C#" Value="public delegate void Widget.Del(int i);" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Widget/Del extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 1b02291b96dea329ccaf0d5a7bb93da5068b5802..f7834f5d0d027a6f8fd9f555520b413fc77b71cb 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+Direction" FullName="Mono.DocTest.Widget+Direction">
   <TypeSignature Language="C#" Value="public enum Widget.Direction" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Widget/Direction extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName="East">
       <MemberSignature Language="C#" Value="East" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction East = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -34,6 +36,7 @@
     </Member>
     <Member MemberName="North">
       <MemberSignature Language="C#" Value="North" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction North = int32(0)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -48,6 +51,7 @@
     </Member>
     <Member MemberName="South">
       <MemberSignature Language="C#" Value="South" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction South = int32(1)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -62,6 +66,7 @@
     </Member>
     <Member MemberName="West">
       <MemberSignature Language="C#" Value="West" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction West = int32(3)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 8e57be47685a4155a22b0f60d0dbd0e9c3a6b860..53111efe9065b78374cccb550aae79415693da78 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+IMenuItem" FullName="Mono.DocTest.Widget+IMenuItem">
   <TypeSignature Language="C#" Value="public interface Widget.IMenuItem" />
+  <TypeSignature Language="ILAsm" Value=".class nested public interface auto ansi abstract Widget/IMenuItem" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -13,6 +14,7 @@
   <Members>
     <Member MemberName="A">
       <MemberSignature Language="C#" Value="public void A ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void A() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -29,6 +31,7 @@
     </Member>
     <Member MemberName="B">
       <MemberSignature Language="C#" Value="public int B { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 B" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 335ffffecbcb054b3e0026bec89443d8af5cc21e..cfab552c2ae67d762b36cddd9a5a77e7766f1074 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double+Triple+Quadruple" FullName="Mono.DocTest.Widget+NestedClass+Double+Triple+Quadruple">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double.Triple.Quadruple" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double/Triple/Quadruple extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Quadruple ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 73197a88d47c5fe72539347218ef80b4921de080..4686e27a8dbc15460d61ad7830fa8acdc4bdc25e 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double+Triple" FullName="Mono.DocTest.Widget+NestedClass+Double+Triple">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double.Triple" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double/Triple extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Triple ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 9003120eb04ddbe1a12ded949e5a1d54151a4deb..12cc838fdc4c0170d54788ba8bccb9af929a9ceb 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double" FullName="Mono.DocTest.Widget+NestedClass+Double">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Double ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 0c7c9b08bdf422bd33680cdac70b1c0967d16107..a3590a2d45bf1d711f52114249e27c14faf26c67 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass" FullName="Mono.DocTest.Widget+NestedClass">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedClass ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -29,6 +31,7 @@
     </Member>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -48,6 +51,7 @@
     </Member>
     <Member MemberName="value">
       <MemberSignature Language="C#" Value="public int value;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 value" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index f698f66c17dd9f538dfa291cd79c14dbcb8ea5cc..e18320037ae6a9eb22b4d45fdb3f2e1ec7d763d6 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass&lt;T&gt;" FullName="Mono.DocTest.Widget+NestedClass&lt;T&gt;">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass&lt;T&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass`1&lt;T&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedClass ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -33,6 +35,7 @@
     </Member>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -52,6 +55,7 @@
     </Member>
     <Member MemberName="value">
       <MemberSignature Language="C#" Value="public int value;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 value" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index dcddabdc4ed00b7bd8c8fadff558e0b94bac3dac..aed8f399d8921a8a1ee2da4e384b3c8aec5a1122 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget" FullName="Mono.DocTest.Widget">
   <TypeSignature Language="C#" Value="public class Widget : Mono.DocTest.IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Widget extends System.Object implements class Mono.DocTest.IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -33,6 +35,7 @@
     </Member>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget (Converter&lt;string,string&gt; c);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Converter`2&lt;string, string&gt; c) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -49,6 +52,7 @@
     </Member>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget (string s);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string s) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -65,6 +69,7 @@
     </Member>
     <Member MemberName="AnEvent">
       <MemberSignature Language="C#" Value="public event Mono.DocTest.Widget.Del AnEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class Mono.DocTest.Widget/Del AnEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -91,6 +96,7 @@
     </Member>
     <Member MemberName="AnotherEvent">
       <MemberSignature Language="C#" Value="protected event Mono.DocTest.Widget.Del AnotherEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class Mono.DocTest.Widget/Del AnotherEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
         <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
       <MemberSignature Language="C#" Value="public long[] array1;" />
+      <MemberSignature Language="ILAsm" Value=".field public int64[] array1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="array2">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Widget[,] array2;" />
+      <MemberSignature Language="ILAsm" Value=".field public class Mono.DocTest.Widget[,] array2" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="classCtorError">
       <MemberSignature Language="C#" Value="public static readonly string[] classCtorError;" />
+      <MemberSignature Language="ILAsm" Value=".field public static initonly string[] classCtorError" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="defaultColor">
       <MemberSignature Language="C#" Value="protected static Mono.DocTest.Color defaultColor;" />
+      <MemberSignature Language="ILAsm" Value=".field family static valuetype Mono.DocTest.Color defaultColor" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Height">
       <MemberSignature Language="C#" Value="protected long Height { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int64 Height" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Item">
       <MemberSignature Language="C#" Value="public int this[int i] { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Item(int32)" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Item">
       <MemberSignature Language="C#" Value="public int this[string s, int i] { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Item(string, int32)" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M0">
       <MemberSignature Language="C#" Value="public static void M0 ();" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void M0() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M1">
       <MemberSignature Language="C#" Value="public void M1 (char c, out float f, ref Mono.DocTest.DocValueType v);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M1(char c, float32 f, valuetype Mono.DocTest.DocValueType v) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M2">
       <MemberSignature Language="C#" Value="public void M2 (short[] x1, int[,] x2, long[][] x3);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M2(int16[] x1, int32[,] x2, int64[][] x3) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M3">
       <MemberSignature Language="C#" Value="protected void M3 (long[][] x3, Mono.DocTest.Widget[,,][] x4);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M3(int64[][] x3, class Mono.DocTest.Widget[,,][] x4) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M4">
       <MemberSignature Language="C#" Value="protected void M4 (char* pc, Mono.DocTest.Color** ppf);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M4(char* pc, valuetype Mono.DocTest.Color** ppf) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M5">
       <MemberSignature Language="C#" Value="protected void M5 (void* pv, double*[,][] pd);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M5(void* pv, float64*[,][] pd) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M6">
       <MemberSignature Language="C#" Value="protected void M6 (int i, object[] args);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M6(int32 i, object[] args) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M7">
       <MemberSignature Language="C#" Value="public void M7 (Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple a);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M7(class Mono.DocTest.Widget/NestedClass/Double/Triple/Quadruple a) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="message">
       <MemberSignature Language="C#" Value="public string message;" />
+      <MemberSignature Language="ILAsm" Value=".field public string message" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="monthlyAverage">
       <MemberSignature Language="C#" Value="protected readonly double monthlyAverage;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly initonly float64 monthlyAverage" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Addition">
       <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Addition (Mono.DocTest.Widget x1, Mono.DocTest.Widget x2);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname class Mono.DocTest.Widget op_Addition(class Mono.DocTest.Widget x1, class Mono.DocTest.Widget x2) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Explicit">
       <MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Implicit">
       <MemberSignature Language="C#" Value="public static long op_Implicit (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int64 op_Implicit(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_UnaryPlus">
       <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_UnaryPlus (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname class Mono.DocTest.Widget op_UnaryPlus(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="pCount">
       <MemberSignature Language="C#" Value="public int* pCount;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32* pCount" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="PI">
       <MemberSignature Language="C#" Value="protected const double PI = 3.14159;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3.14159)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="ppValues">
       <MemberSignature Language="C#" Value="public float** ppValues;" />
+      <MemberSignature Language="ILAsm" Value=".field public float32** ppValues" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Width">
       <MemberSignature Language="C#" Value="public int Width { protected set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Width" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="X">
       <MemberSignature Language="C#" Value="protected short X { set; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int16 X" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Y">
       <MemberSignature Language="C#" Value="protected double Y { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance float64 Y" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 0d18f9a96843bad94f603a74df94c29ee38bdfe6..6b82a6484f3103d59c371673d5af3cf5b3cd6120 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="NoNamespace" FullName="NoNamespace">
   <TypeSignature Language="C#" Value="public class NoNamespace" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit NoNamespace extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NoNamespace ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 9e769432c9e078190a65eec4464dceca22692467..a065b5abcc118cd7670eb3190825ea022b2f47c4 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Action&lt;T&gt;" FullName="System.Action&lt;T&gt;">
   <TypeSignature Language="C#" Value="public delegate void Action&lt;T&gt;(T obj);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Action`1&lt;T&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index aec402e593a2ad73d0200ab3ac1bbfff666633cb..67fbe3ef045eb8259cae8d1dd594d8f4060ce7ba 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Array" FullName="System.Array">
   <TypeSignature Language="C#" Value="public class Array" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Array extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Array ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -29,6 +31,7 @@
     </Member>
     <Member MemberName="AsReadOnly&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.ObjectModel.ReadOnlyCollection&lt;T&gt; AsReadOnly&lt;T&gt; (T[] array);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.ObjectModel.ReadOnlyCollection`1&lt;!!T&gt; AsReadOnly&lt;T&gt;(!!T[] array) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -54,6 +57,7 @@
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
       <MemberSignature Language="C#" Value="public static TOutput[] ConvertAll&lt;TInput,TOutput&gt; (TInput[] array, Converter&lt;TInput,TOutput&gt; converter);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig !!TOutput[] ConvertAll&lt;TInput, TOutput&gt;(!!TInput[] array, class System.Converter`2&lt;!!TInput, !!TOutput&gt; converter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -83,6 +87,7 @@
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Resize&lt;T&gt; (ref T[] array, int newSize);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Resize&lt;T&gt;(!!T[] array, int32 newSize) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 92d8dcf0f833410441830d48157ee7eef72489d3..deb06e912a1285c434ac96d46ae52414e2d01857 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="AsyncCallback" FullName="System.AsyncCallback">
   <TypeSignature Language="C#" Value="public delegate void AsyncCallback(IAsyncResult ar);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AsyncCallback extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 67f09377b6df195318307b77e6902bea96c4beb2..b5a9f1e20ecb7400f14159ce9a265a29dee7e95e 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment+SpecialFolder" FullName="System.Environment+SpecialFolder">
   <TypeSignature Language="C#" Value="public enum Environment.SpecialFolder" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Environment/SpecialFolder extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index d64d1a2f054026297d21b987b14440c7c41993f4..0576dfb26044af82a6ba47f3477b4eb1305862d9 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment" FullName="System.Environment">
   <TypeSignature Language="C#" Value="public static class Environment" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Environment extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName="GetFolderPath">
       <MemberSignature Language="C#" Value="public static string GetFolderPath (Environment.SpecialFolder folder);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetFolderPath(valuetype System.Environment/SpecialFolder folder) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e4ee769ea847d42cbd7ea1e02255e9c685baa195..32b45a01891095ac10b5a2896aa30057cee2e99b 100644 (file)
@@ -59,6 +59,7 @@
       </Targets>
       <Member MemberName="Bar&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static void Bar&lt;T&gt; (this Mono.DocTest.Generic.IFoo&lt;T&gt; self, string s);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Bar&lt;T&gt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt; self, string s) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Void</ReturnType>
@@ -85,6 +86,7 @@
       </Targets>
       <Member MemberName="ForEach&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static void ForEach&lt;T&gt; (this System.Collections.Generic.IEnumerable&lt;T&gt; self, Action&lt;T&gt; a);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void ForEach&lt;T&gt;(class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; self, class System.Action`1&lt;!!T&gt; a) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Void</ReturnType>
       </Targets>
       <Member MemberName="ToDouble">
         <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;double&gt; ToDouble (this System.Collections.Generic.IEnumerable&lt;int&gt; list);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;float64&gt; ToDouble(class System.Collections.Generic.IEnumerable`1&lt;int32&gt; list) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Collections.Generic.IEnumerable&lt;System.Double&gt;</ReturnType>
       </Targets>
       <Member MemberName="ToDouble&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static double ToDouble&lt;T&gt; (this T val) where T : Mono.DocTest.Generic.IFoo&lt;T&gt;;" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 ToDouble&lt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt;) T&gt;(!!T val) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Double</ReturnType>
       </Targets>
       <Member MemberName="ToEnumerable&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
index 06fd88175687cf1e4ebec3f40b5f2331c7da6570..7766049ec2829669ac1aeca7c6954dbbe67a05a1 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Extensions" FullName="Mono.DocTest.Generic.Extensions">
   <TypeSignature Language="C#" Value="public static class Extensions" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Extensions extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName="Bar&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Bar&lt;T&gt; (this Mono.DocTest.Generic.IFoo&lt;T&gt; self, string s);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Bar&lt;T&gt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt; self, string s) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -39,6 +41,7 @@
     </Member>
     <Member MemberName="ForEach&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void ForEach&lt;T&gt; (this System.Collections.Generic.IEnumerable&lt;T&gt; self, Action&lt;T&gt; a);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void ForEach&lt;T&gt;(class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; self, class System.Action`1&lt;!!T&gt; a) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -63,6 +66,7 @@
     </Member>
     <Member MemberName="ToDouble">
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;double&gt; ToDouble (this System.Collections.Generic.IEnumerable&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;float64&gt; ToDouble(class System.Collections.Generic.IEnumerable`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -82,6 +86,7 @@
     </Member>
     <Member MemberName="ToDouble&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static double ToDouble&lt;T&gt; (this T val) where T : Mono.DocTest.Generic.IFoo&lt;T&gt;;" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 ToDouble&lt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt;) T&gt;(!!T val) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="ToEnumerable&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 5600d7e006eb2d2cd67f89369f324beae0d4b02f..a389595271942cb4cfe9e478ac64aefae2740a83 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Func&lt;TArg,TRet&gt;" FullName="Mono.DocTest.Generic.Func&lt;TArg,TRet&gt;">
   <TypeSignature Language="C#" Value="public delegate TRet Func&lt;TArg,TRet&gt;(TArg a) where TArg : Exception;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Func`2&lt;(class System.Exception) TArg, TRet&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index e38e616e73f624220515b3fb612e97a9069a219a..dff4379aeb1c1d97e569c965d9ba5b2e11123046 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+FooEventArgs" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+FooEventArgs">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;.FooEventArgs : EventArgs" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit GenericBase`1/FooEventArgs&lt;U&gt; extends System.EventArgs" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -18,6 +19,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public FooEventArgs ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 68899a2a1ff9eca5350f4c1aa604b5c7e044a6b1..7ddcc914c0070061ddb8497730f042cc09647c2f 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+NestedCollection+Enumerator" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+NestedCollection+Enumerator">
   <TypeSignature Language="C#" Value="public struct GenericBase&lt;U&gt;.NestedCollection.Enumerator" />
+  <TypeSignature Language="ILAsm" Value=".class nested public sequential ansi sealed beforefieldinit GenericBase`1/NestedCollection/Enumerator&lt;U&gt; extends System.ValueType" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 7e24ded3173785a288801c85fe15ac4a5da37eb1..e396bd2dc7e283216161bebe8588bde39376246a 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;+NestedCollection" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;+NestedCollection">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;.NestedCollection" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit GenericBase`1/NestedCollection&lt;U&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -18,6 +19,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedCollection ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 2699dcd3cf2cd52c0497684510aad7e80c323de3..945f2223fda41cd8a7dc1b2f30adc2cd09df6a34 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="GenericBase&lt;U&gt;" FullName="Mono.DocTest.Generic.GenericBase&lt;U&gt;">
   <TypeSignature Language="C#" Value="public class GenericBase&lt;U&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit GenericBase`1&lt;U&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public GenericBase ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -31,6 +33,7 @@
     </Member>
     <Member MemberName="BaseMethod&lt;S&gt;">
       <MemberSignature Language="C#" Value="public U BaseMethod&lt;S&gt; (S genericParameter);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance !U BaseMethod&lt;S&gt;(!!S genericParameter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -60,6 +63,7 @@
     </Member>
     <Member MemberName="ConstField1">
       <MemberSignature Language="C#" Value="public const int ConstField1;" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal int32 ConstField1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -74,6 +78,7 @@
     </Member>
     <Member MemberName="MyEvent">
       <MemberSignature Language="C#" Value="public event EventHandler&lt;Mono.DocTest.Generic.GenericBase&lt;U&gt;.FooEventArgs&gt; MyEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class System.EventHandler`1&lt;class Mono.DocTest.Generic.GenericBase`1/FooEventArgs&lt;!U&gt;&gt; MyEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
         <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
       <MemberSignature Language="C#" Value="public static U op_Explicit (Mono.DocTest.Generic.GenericBase&lt;U&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname !U op_Explicit(class Mono.DocTest.Generic.GenericBase`1&lt;!U&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="StaticField1">
       <MemberSignature Language="C#" Value="public static readonly Mono.DocTest.Generic.GenericBase&lt;U&gt; StaticField1;" />
+      <MemberSignature Language="ILAsm" Value=".field public static initonly class Mono.DocTest.Generic.GenericBase`1&lt;!U&gt; StaticField1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 8e890ea120b4e3843726ce0747ea095c9e665a88..834141db73398683aeb00bbc45a405de5f8c9222 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="IFoo&lt;T&gt;" FullName="Mono.DocTest.Generic.IFoo&lt;T&gt;">
   <TypeSignature Language="C#" Value="public interface IFoo&lt;T&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IFoo`1&lt;T&gt;" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -16,6 +17,7 @@
   <Members>
     <Member MemberName="Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="public T Method&lt;U&gt; (T t, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance !T Method&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index c4c9438a9f8b8e8c54757e7e80c7e57720b1a23f..2f389db3b8712fd5e14a2e746bc1d0966bdb8025 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;T&gt;+Helper&lt;U,V&gt;" FullName="Mono.DocTest.Generic.MyList&lt;T&gt;+Helper&lt;U,V&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;T&gt;.Helper&lt;U,V&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit MyList`1/Helper`2&lt;T, U, V&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -22,6 +23,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Helper ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -34,6 +36,7 @@
     </Member>
     <Member MemberName="UseT">
       <MemberSignature Language="C#" Value="public void UseT (T a, U b, V c);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseT(!T a, !U b, !V c) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 02f0fc7ce9203c753c954a195749e0193b260602..71d07cfd2f08e422408905e164da4909ffcf4366 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;T&gt;" FullName="Mono.DocTest.Generic.MyList&lt;T&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;T&gt; : Mono.DocTest.Generic.GenericBase&lt;T&gt;, System.Collections.Generic.IEnumerable&lt;int[]&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MyList`1&lt;T&gt; extends Mono.DocTest.Generic.GenericBase`1&lt;!T&gt; implements class System.Collections.Generic.IEnumerable`1&lt;int32[]&gt;, class System.Collections.IEnumerable" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -32,6 +33,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public MyList ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -44,6 +46,7 @@
     </Member>
     <Member MemberName="GetEnumerator">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerator&lt;int[]&gt; GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;int32[]&gt; GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -60,6 +63,7 @@
     </Member>
     <Member MemberName="GetHelper&lt;U,V&gt;">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; GetHelper&lt;U,V&gt; ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!T, !!U, !!V&gt; GetHelper&lt;U, V&gt;() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -82,6 +86,7 @@
     </Member>
     <Member MemberName="Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="public void Method&lt;U&gt; (T t, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Method&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="RefMethod&lt;U&gt;">
       <MemberSignature Language="C#" Value="public void RefMethod&lt;U&gt; (ref T t, ref U u);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RefMethod&lt;U&gt;(!T t, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerable.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Test">
       <MemberSignature Language="C#" Value="public void Test (T t);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Test(!T t) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="UseHelper&lt;U,V&gt;">
       <MemberSignature Language="C#" Value="public void UseHelper&lt;U,V&gt; (Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; helper);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseHelper&lt;U, V&gt;(class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!T, !!U, !!V&gt; helper) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index bd4bbfa0ac4f5bdd015ebcd954714b01fd861b8f..1d5694716d28e3b82b4e3b24245c9fa545fbb552 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="MyList&lt;A,B&gt;" FullName="Mono.DocTest.Generic.MyList&lt;A,B&gt;">
   <TypeSignature Language="C#" Value="public class MyList&lt;A,B&gt; : Mono.DocTest.Generic.GenericBase&lt;System.Collections.Generic.Dictionary&lt;A,B&gt;&gt;, Mono.DocTest.Generic.IFoo&lt;A&gt;, System.Collections.Generic.ICollection&lt;A&gt;, System.Collections.Generic.IEnumerable&lt;A&gt;, System.Collections.Generic.IEnumerator&lt;A&gt; where A : class, IList&lt;B&gt;, new() where B : class, A" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MyList`2&lt;class .ctor (class System.Collections.Generic.IList`1&lt;!B&gt;) A, class (!A) B&gt; extends Mono.DocTest.Generic.GenericBase`1&lt;class System.Collections.Generic.Dictionary`2&lt;!A, !B&gt;&gt; implements class Mono.DocTest.Generic.IFoo`1&lt;!A&gt;, class System.Collections.Generic.ICollection`1&lt;!A&gt;, class System.Collections.Generic.IEnumerable`1&lt;!A&gt;, class System.Collections.Generic.IEnumerator`1&lt;!A&gt;, class System.Collections.IEnumerable, class System.Collections.IEnumerator, class System.IDisposable" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -48,6 +49,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public MyList ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -60,6 +62,7 @@
     </Member>
     <Member MemberName="CopyTo">
       <MemberSignature Language="C#" Value="public void CopyTo (A[] array, int arrayIndex);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyTo(!A[] array, int32 arrayIndex) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -80,6 +83,7 @@
     </Member>
     <Member MemberName="Count">
       <MemberSignature Language="C#" Value="public int Count { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -95,6 +99,7 @@
     </Member>
     <Member MemberName="Current">
       <MemberSignature Language="C#" Value="public A Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance !A Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Dispose">
       <MemberSignature Language="C#" Value="public void Dispose ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Foo">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.KeyValuePair&lt;System.Collections.Generic.IEnumerable&lt;A&gt;,System.Collections.Generic.IEnumerable&lt;B&gt;&gt; Foo ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Collections.Generic.KeyValuePair`2&lt;class System.Collections.Generic.IEnumerable`1&lt;!A&gt;, class System.Collections.Generic.IEnumerable`1&lt;!B&gt;&gt; Foo() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="GetEnumerator">
       <MemberSignature Language="C#" Value="public System.Collections.Generic.List&lt;A&gt;.Enumerator GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Collections.Generic.List`1/Enumerator&lt;!A&gt; GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Mono.DocTest.Generic.IFoo&lt;A&gt;.Method&lt;U&gt;">
       <MemberSignature Language="C#" Value="A IFoo&lt;A&gt;.Method&lt;U&gt; (A a, U u);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance !A Mono.DocTest.Generic.IFoo&lt;A&gt;.Method&lt;U&gt;(!A a, !!U u) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="MoveNext">
       <MemberSignature Language="C#" Value="public bool MoveNext ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool MoveNext() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Reset">
       <MemberSignature Language="C#" Value="public void Reset ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Reset() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Add">
       <MemberSignature Language="C#" Value="void ICollection&lt;A&gt;.Add (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.Generic.ICollection&lt;A&gt;.Add(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Clear">
       <MemberSignature Language="C#" Value="void ICollection&lt;A&gt;.Clear ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.Generic.ICollection&lt;A&gt;.Clear() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Contains">
       <MemberSignature Language="C#" Value="bool ICollection&lt;A&gt;.Contains (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.Generic.ICollection&lt;A&gt;.Contains(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly">
       <MemberSignature Language="C#" Value="bool System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.Generic.ICollection&lt;A&gt;.IsReadOnly" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.ICollection&lt;A&gt;.Remove">
       <MemberSignature Language="C#" Value="bool ICollection&lt;A&gt;.Remove (A item);" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.Generic.ICollection&lt;A&gt;.Remove(!A item) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.Generic.IEnumerator&lt;A&gt; IEnumerable&lt;A&gt;.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;!A&gt; System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.Generic.IEnumerator&lt;A&gt;.Current">
       <MemberSignature Language="C#" Value="A System.Collections.Generic.IEnumerator&lt;A&gt;.Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance !A System.Collections.Generic.IEnumerator&lt;A&gt;.Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerable.GetEnumerator">
       <MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
+      <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="System.Collections.IEnumerator.Current">
       <MemberSignature Language="C#" Value="object System.Collections.IEnumerator.Current { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance object System.Collections.IEnumerator.Current" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index b2cb4f0440dcd853c820e4b42e3725dc9b61bf9f..dfb73f953738109d70938d0b3db15a6b7ad64cd2 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Color" FullName="Mono.DocTest.Color">
   <TypeSignature Language="C#" Value="public enum Color" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Color extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -14,6 +15,7 @@
   <Members>
     <Member MemberName="AnotherGreen">
       <MemberSignature Language="C#" Value="AnotherGreen" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color AnotherGreen = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -27,6 +29,7 @@
     </Member>
     <Member MemberName="Blue">
       <MemberSignature Language="C#" Value="Blue" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Blue = int32(1)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -40,6 +43,7 @@
     </Member>
     <Member MemberName="Green">
       <MemberSignature Language="C#" Value="Green" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Green = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -53,6 +57,7 @@
     </Member>
     <Member MemberName="Red">
       <MemberSignature Language="C#" Value="Red" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Color Red = int32(0)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 25220d6f1ab0fc37a6f1052c2f2d8e2230f05549..9d3dd4ba7d1703c9df2a20bccce4a12363697054 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="DocAttribute" FullName="Mono.DocTest.DocAttribute">
   <TypeSignature Language="C#" Value="public class DocAttribute : Attribute" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DocAttribute extends System.Attribute" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -20,6 +21,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public DocAttribute (string docs);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string docs) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -36,6 +38,7 @@
     </Member>
     <Member MemberName="Field">
       <MemberSignature Language="C#" Value="public bool Field;" />
+      <MemberSignature Language="ILAsm" Value=".field public bool Field" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -50,6 +53,7 @@
     </Member>
     <Member MemberName="FlagsEnum">
       <MemberSignature Language="C#" Value="public ConsoleModifiers FlagsEnum;" />
+      <MemberSignature Language="ILAsm" Value=".field public valuetype System.ConsoleModifiers FlagsEnum" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -64,6 +68,7 @@
     </Member>
     <Member MemberName="NonFlagsEnum">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Color NonFlagsEnum;" />
+      <MemberSignature Language="ILAsm" Value=".field public valuetype Mono.DocTest.Color NonFlagsEnum" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -78,6 +83,7 @@
     </Member>
     <Member MemberName="Property">
       <MemberSignature Language="C#" Value="public Type Property { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance class System.Type Property" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 26a4a518fe8c1d5f6f9397a09b122de6389d1e3f..5d27f0ade8c51687f46f7c7573bdd77dd7b5836b 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="DocValueType" FullName="Mono.DocTest.DocValueType">
   <TypeSignature Language="C#" Value="public struct DocValueType : Mono.DocTest.IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit DocValueType extends System.ValueType implements class Mono.DocTest.IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -39,6 +41,7 @@
     </Member>
     <Member MemberName="total">
       <MemberSignature Language="C#" Value="public int total;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 total" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index f43dc558942c19ebb6a68b2f201dad61175cfcf4..2a35c4e7b8551c007bb0d5759b1a69720bc3dafb 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="IProcess" FullName="Mono.DocTest.IProcess">
   <TypeSignature Language="C#" Value="public interface IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index cbcb006384c05eb4bf18d8ee0c6c52abcd493fc7..b30f8bdb0f126284ac8577741e65c926b654b033 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="UseLists" FullName="Mono.DocTest.UseLists">
   <TypeSignature Language="C#" Value="public class UseLists" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UseLists extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public UseLists ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -27,6 +29,7 @@
     </Member>
     <Member MemberName="GetValues&lt;T&gt;">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Generic.MyList&lt;T&gt; GetValues&lt;T&gt; (T value) where T : struct;" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Mono.DocTest.Generic.MyList`1&lt;!!T&gt; GetValues&lt;struct .ctor (class System.ValueType) T&gt;(!!T value) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -56,6 +59,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (Mono.DocTest.Generic.MyList&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class Mono.DocTest.Generic.MyList`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -74,6 +78,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (System.Collections.Generic.List&lt;int&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class System.Collections.Generic.List`1&lt;int32&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -93,6 +98,7 @@
     </Member>
     <Member MemberName="Process">
       <MemberSignature Language="C#" Value="public void Process (System.Collections.Generic.List&lt;Predicate&lt;int&gt;&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process(class System.Collections.Generic.List`1&lt;class System.Predicate`1&lt;int32&gt;&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
       <MemberSignature Language="C#" Value="public void Process&lt;T&gt; (System.Collections.Generic.List&lt;Predicate&lt;T&gt;&gt; list);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Process&lt;T&gt;(class System.Collections.Generic.List`1&lt;class System.Predicate`1&lt;!!T&gt;&gt; list) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
       <MemberSignature Language="C#" Value="public void UseHelper&lt;T,U,V&gt; (Mono.DocTest.Generic.MyList&lt;T&gt;.Helper&lt;U,V&gt; helper);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void UseHelper&lt;T, U, V&gt;(class Mono.DocTest.Generic.MyList`1/Helper`2&lt;!!T, !!U, !!V&gt; helper) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 1c419c1005eb05466ea923c48895e905b60ce9f7..e3ad767a981d69cad3c0cef55a185c1c5b12ecc4 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+Del" FullName="Mono.DocTest.Widget+Del">
   <TypeSignature Language="C#" Value="public delegate void Widget.Del(int i);" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Widget/Del extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 129466d7dd66d8aceb13661d9884bc838b0f567d..93c746f2398cdf8746bc5d549c3b95e87c0adac3 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+Direction" FullName="Mono.DocTest.Widget+Direction">
   <TypeSignature Language="C#" Value="public enum Widget.Direction" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Widget/Direction extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName="East">
       <MemberSignature Language="C#" Value="East" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction East = int32(2)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -32,6 +34,7 @@
     </Member>
     <Member MemberName="North">
       <MemberSignature Language="C#" Value="North" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction North = int32(0)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -45,6 +48,7 @@
     </Member>
     <Member MemberName="South">
       <MemberSignature Language="C#" Value="South" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction South = int32(1)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -58,6 +62,7 @@
     </Member>
     <Member MemberName="West">
       <MemberSignature Language="C#" Value="West" />
+      <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Mono.DocTest.Widget/Direction West = int32(3)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index ec0f50d6269d955886b553a6859278e4c084c86e..6b5f9fc7f40e25477bd38ed65b2761a3f6c927ae 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+IMenuItem" FullName="Mono.DocTest.Widget+IMenuItem">
   <TypeSignature Language="C#" Value="public interface Widget.IMenuItem" />
+  <TypeSignature Language="ILAsm" Value=".class nested public interface auto ansi abstract Widget/IMenuItem" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -12,6 +13,7 @@
   <Members>
     <Member MemberName="A">
       <MemberSignature Language="C#" Value="public void A ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void A() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -27,6 +29,7 @@
     </Member>
     <Member MemberName="B">
       <MemberSignature Language="C#" Value="public int B { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 B" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 22cd62014d78804b6af276074dbbb7a789a431e5..937f51a62592641e5621fe25968a7c76fff40272 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double+Triple+Quadruple" FullName="Mono.DocTest.Widget+NestedClass+Double+Triple+Quadruple">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double.Triple.Quadruple" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double/Triple/Quadruple extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Quadruple ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index a6872574ed9aa8956e8d7bb76d7ece7c8a91f6a1..5726eadee83041c50be82ddb86b86595b1174a87 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double+Triple" FullName="Mono.DocTest.Widget+NestedClass+Double+Triple">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double.Triple" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double/Triple extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Triple ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 1a6fba76eb5b9c4d0f9dd641dbc92fb90e040dda..04d7bb444602b0fb6e1e8eef6e6e132a2a9e9873 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass+Double" FullName="Mono.DocTest.Widget+NestedClass+Double">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass.Double" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass/Double extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Double ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 135b3d8f25e3641a69b346cebbb63e516a298676..432b7c64a7f1890ff672f25e3da0d11535782c56 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass" FullName="Mono.DocTest.Widget+NestedClass">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedClass ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -27,6 +29,7 @@
     </Member>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -45,6 +48,7 @@
     </Member>
     <Member MemberName="value">
       <MemberSignature Language="C#" Value="public int value;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 value" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index d57403f73d98603d4996c571dfc75bbf70c57240..56114c56efde856409b774879f49896a621c558e 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget+NestedClass&lt;T&gt;" FullName="Mono.DocTest.Widget+NestedClass&lt;T&gt;">
   <TypeSignature Language="C#" Value="public class Widget.NestedClass&lt;T&gt;" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi beforefieldinit Widget/NestedClass`1&lt;T&gt; extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NestedClass ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -31,6 +33,7 @@
     </Member>
     <Member MemberName="M">
       <MemberSignature Language="C#" Value="public void M (int i);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M(int32 i) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -49,6 +52,7 @@
     </Member>
     <Member MemberName="value">
       <MemberSignature Language="C#" Value="public int value;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32 value" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index b6b1b91debf217d1163e7aff8160195c859ec8d6..ba6c70bf5b9a6ec44b5eb8d711aa9b3b36c205c7 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Widget" FullName="Mono.DocTest.Widget">
   <TypeSignature Language="C#" Value="public class Widget : Mono.DocTest.IProcess" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Widget extends System.Object implements class Mono.DocTest.IProcess" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -19,6 +20,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -31,6 +33,7 @@
     </Member>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget (Converter&lt;string,string&gt; c);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Converter`2&lt;string, string&gt; c) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -46,6 +49,7 @@
     </Member>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Widget (string s);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string s) cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -61,6 +65,7 @@
     </Member>
     <Member MemberName="AnEvent">
       <MemberSignature Language="C#" Value="public event Mono.DocTest.Widget.Del AnEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class Mono.DocTest.Widget/Del AnEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -86,6 +91,7 @@
     </Member>
     <Member MemberName="AnotherEvent">
       <MemberSignature Language="C#" Value="protected event Mono.DocTest.Widget.Del AnotherEvent;" />
+      <MemberSignature Language="ILAsm" Value=".event class Mono.DocTest.Widget/Del AnotherEvent" />
       <MemberType>Event</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
         <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
       <MemberSignature Language="C#" Value="public long[] array1;" />
+      <MemberSignature Language="ILAsm" Value=".field public int64[] array1" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="array2">
       <MemberSignature Language="C#" Value="public Mono.DocTest.Widget[,] array2;" />
+      <MemberSignature Language="ILAsm" Value=".field public class Mono.DocTest.Widget[,] array2" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="classCtorError">
       <MemberSignature Language="C#" Value="public static readonly string[] classCtorError;" />
+      <MemberSignature Language="ILAsm" Value=".field public static initonly string[] classCtorError" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="defaultColor">
       <MemberSignature Language="C#" Value="protected static Mono.DocTest.Color defaultColor;" />
+      <MemberSignature Language="ILAsm" Value=".field family static valuetype Mono.DocTest.Color defaultColor" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Height">
       <MemberSignature Language="C#" Value="protected long Height { get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int64 Height" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Item">
       <MemberSignature Language="C#" Value="public int this[int i] { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Item(int32)" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Item">
       <MemberSignature Language="C#" Value="public int this[string s, int i] { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Item(string, int32)" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M0">
       <MemberSignature Language="C#" Value="public static void M0 ();" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void M0() cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M1">
       <MemberSignature Language="C#" Value="public void M1 (char c, out float f, ref Mono.DocTest.DocValueType v);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M1(char c, float32 f, valuetype Mono.DocTest.DocValueType v) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M2">
       <MemberSignature Language="C#" Value="public void M2 (short[] x1, int[,] x2, long[][] x3);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M2(int16[] x1, int32[,] x2, int64[][] x3) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M3">
       <MemberSignature Language="C#" Value="protected void M3 (long[][] x3, Mono.DocTest.Widget[,,][] x4);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M3(int64[][] x3, class Mono.DocTest.Widget[,,][] x4) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M4">
       <MemberSignature Language="C#" Value="protected void M4 (char* pc, Mono.DocTest.Color** ppf);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M4(char* pc, valuetype Mono.DocTest.Color** ppf) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M5">
       <MemberSignature Language="C#" Value="protected void M5 (void* pv, double*[,][] pd);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M5(void* pv, float64*[,][] pd) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M6">
       <MemberSignature Language="C#" Value="protected void M6 (int i, object[] args);" />
+      <MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void M6(int32 i, object[] args) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="M7">
       <MemberSignature Language="C#" Value="public void M7 (Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple a);" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void M7(class Mono.DocTest.Widget/NestedClass/Double/Triple/Quadruple a) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="message">
       <MemberSignature Language="C#" Value="public string message;" />
+      <MemberSignature Language="ILAsm" Value=".field public string message" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="monthlyAverage">
       <MemberSignature Language="C#" Value="protected readonly double monthlyAverage;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly initonly float64 monthlyAverage" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Addition">
       <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Addition (Mono.DocTest.Widget x1, Mono.DocTest.Widget x2);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname class Mono.DocTest.Widget op_Addition(class Mono.DocTest.Widget x1, class Mono.DocTest.Widget x2) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Explicit">
       <MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_Implicit">
       <MemberSignature Language="C#" Value="public static long op_Implicit (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int64 op_Implicit(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="op_UnaryPlus">
       <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_UnaryPlus (Mono.DocTest.Widget x);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname class Mono.DocTest.Widget op_UnaryPlus(class Mono.DocTest.Widget x) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="pCount">
       <MemberSignature Language="C#" Value="public int* pCount;" />
+      <MemberSignature Language="ILAsm" Value=".field public int32* pCount" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="PI">
       <MemberSignature Language="C#" Value="protected const double PI = 3.14159;" />
+      <MemberSignature Language="ILAsm" Value=".field familyorassembly static literal float64 PI = (3.14159)" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="ppValues">
       <MemberSignature Language="C#" Value="public float** ppValues;" />
+      <MemberSignature Language="ILAsm" Value=".field public float32** ppValues" />
       <MemberType>Field</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Width">
       <MemberSignature Language="C#" Value="public int Width { protected set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int32 Width" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="X">
       <MemberSignature Language="C#" Value="protected short X { set; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance int16 X" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
     </Member>
     <Member MemberName="Y">
       <MemberSignature Language="C#" Value="protected double Y { set; get; }" />
+      <MemberSignature Language="ILAsm" Value=".property instance float64 Y" />
       <MemberType>Property</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index fdb3d64bf6419733804a414f03b8de316eed8da0..89aea7ab51e5e88013dac38bf64f9f97a9c5d9f1 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="NoNamespace" FullName="NoNamespace">
   <TypeSignature Language="C#" Value="public class NoNamespace" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit NoNamespace extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public NoNamespace ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index b2beb95b8f9ad33d7e69e16bcc5270c548981bd8..7560590f16251ce067dc08f9f6a4d76da63b4f90 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Action&lt;T&gt;" FullName="System.Action&lt;T&gt;">
   <TypeSignature Language="C#" Value="public delegate void Action&lt;T&gt;(T obj);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed Action`1&lt;T&gt; extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index c18c5df9d23c6229376799217afc0349093e7695..2965a7f7da2ea1c9722dc82b5e48353be9932554 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Array" FullName="System.Array">
   <TypeSignature Language="C#" Value="public class Array" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Array extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName=".ctor">
       <MemberSignature Language="C#" Value="public Array ();" />
+      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
       <MemberType>Constructor</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -27,6 +29,7 @@
     </Member>
     <Member MemberName="AsReadOnly&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static System.Collections.ObjectModel.ReadOnlyCollection&lt;T&gt; AsReadOnly&lt;T&gt; (T[] array);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.ObjectModel.ReadOnlyCollection`1&lt;!!T&gt; AsReadOnly&lt;T&gt;(!!T[] array) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -51,6 +54,7 @@
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
       <MemberSignature Language="C#" Value="public static TOutput[] ConvertAll&lt;TInput,TOutput&gt; (TInput[] array, Converter&lt;TInput,TOutput&gt; converter);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig !!TOutput[] ConvertAll&lt;TInput, TOutput&gt;(!!TInput[] array, class System.Converter`2&lt;!!TInput, !!TOutput&gt; converter) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -79,6 +83,7 @@
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
       <MemberSignature Language="C#" Value="public static void Resize&lt;T&gt; (ref T[] array, int newSize);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Resize&lt;T&gt;(!!T[] array, int32 newSize) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 92d8dcf0f833410441830d48157ee7eef72489d3..deb06e912a1285c434ac96d46ae52414e2d01857 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="AsyncCallback" FullName="System.AsyncCallback">
   <TypeSignature Language="C#" Value="public delegate void AsyncCallback(IAsyncResult ar);" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AsyncCallback extends System.MulticastDelegate" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index aac9cfd00f6d20854aa0b5039b693382c93d6e07..6e6a940835de1a7022aac9eb66f30ecf0932ee77 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment+SpecialFolder" FullName="System.Environment+SpecialFolder">
   <TypeSignature Language="C#" Value="public enum Environment.SpecialFolder" />
+  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed Environment/SpecialFolder extends System.Enum" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
index b3a0155baf9565919bb6be8dbf44a5051b9a940d..7bf1dc8fc10f9ae428990d1993772dcc90b8fbb1 100644 (file)
@@ -1,5 +1,6 @@
 <Type Name="Environment" FullName="System.Environment">
   <TypeSignature Language="C#" Value="public static class Environment" />
+  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Environment extends System.Object" />
   <AssemblyInfo>
     <AssemblyName>DocTest</AssemblyName>
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
@@ -15,6 +16,7 @@
   <Members>
     <Member MemberName="GetFolderPath">
       <MemberSignature Language="C#" Value="public static string GetFolderPath (Environment.SpecialFolder folder);" />
+      <MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetFolderPath(valuetype System.Environment/SpecialFolder folder) cil managed" />
       <MemberType>Method</MemberType>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
index 850624572c662a9fb659ae2bc6d9a2db0af8d38c..9e4659eae1db38ddfb41de82a674788b36dd8a60 100644 (file)
@@ -58,6 +58,7 @@
       </Targets>
       <Member MemberName="Bar&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static void Bar&lt;T&gt; (this Mono.DocTest.Generic.IFoo&lt;T&gt; self, string s);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Bar&lt;T&gt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt; self, string s) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Void</ReturnType>
@@ -84,6 +85,7 @@
       </Targets>
       <Member MemberName="ForEach&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static void ForEach&lt;T&gt; (this System.Collections.Generic.IEnumerable&lt;T&gt; self, Action&lt;T&gt; a);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void ForEach&lt;T&gt;(class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; self, class System.Action`1&lt;!!T&gt; a) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Void</ReturnType>
       </Targets>
       <Member MemberName="ToDouble">
         <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;double&gt; ToDouble (this System.Collections.Generic.IEnumerable&lt;int&gt; list);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;float64&gt; ToDouble(class System.Collections.Generic.IEnumerable`1&lt;int32&gt; list) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Collections.Generic.IEnumerable&lt;System.Double&gt;</ReturnType>
       </Targets>
       <Member MemberName="ToDouble&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static double ToDouble&lt;T&gt; (this T val) where T : Mono.DocTest.Generic.IFoo&lt;T&gt;;" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 ToDouble&lt;(class Mono.DocTest.Generic.IFoo`1&lt;!!T&gt;) T&gt;(!!T val) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Double</ReturnType>
       </Targets>
       <Member MemberName="ToEnumerable&lt;T&gt;">
         <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
+        <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
         <MemberType>ExtensionMethod</MemberType>
         <ReturnValue>
           <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
index 27a40ed29ffd3b1936ae3c2720683f1429ce583b..b37bff26582a6b1400e89e5d2218938ed8b6d803 100644 (file)
               <span id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Remarks:toggle">⊟</span> Remarks</a>
           </h4>
           <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
-          </blockquote>
+            <tt>M:Mono.DocTest.MyList`1.System#Collections#GetEnumerator</tt>.</blockquote>
           <h4 class="Subsection">
             <a href="javascript:toggle_display('M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Version Information')">
               <span id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Version Information:toggle">⊟</span> Requirements</a>
index 4a6be934d4bfcfa1e9fb42f0e1db25267b5f8d6d..22a3009824d49e374b379dcba96948e179d7c697 100644 (file)
               <dt>
                 <i>array</i>
               </dt>
-              <dd>
-                <span class="NotEntered">Documentation for this section has not yet been entered.</span>
-              </dd>
+              <dd>Where to copy elements to</dd>
               <dt>
                 <i>arrayIndex</i>
               </dt>
-              <dd>
-                <span class="NotEntered">Documentation for this section has not yet been entered.</span>
-              </dd>
+              <dd>Where to start copyingto</dd>
             </dl>
           </blockquote>
           <h4 class="Subsection">
               <span id="M:Mono.DocTest.Generic.MyList`2.CopyTo(`0[],System.Int32):Remarks:toggle">⊟</span> Remarks</a>
           </h4>
           <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.CopyTo(`0[],System.Int32):Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
-          </blockquote>
+            <tt>M:Mono.DocTest.MyList`2.CopyTo(`0[],System.Int32)</tt>.</blockquote>
           <h4 class="Subsection">
             <a href="javascript:toggle_display('M:Mono.DocTest.Generic.MyList`2.CopyTo(`0[],System.Int32):Version Information')">
               <span id="M:Mono.DocTest.Generic.MyList`2.CopyTo(`0[],System.Int32):Version Information:toggle">⊟</span> Requirements</a>
               <span id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Remarks:toggle">⊟</span> Remarks</a>
           </h4>
           <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
-          </blockquote>
+            <tt>M:Mono.DocTest.MyList`2.System#Collections#GetEnumerator</tt>.</blockquote>
           <h4 class="Subsection">
             <a href="javascript:toggle_display('M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Version Information')">
               <span id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Version Information:toggle">⊟</span> Requirements</a>
index 0be7d5d749482123925d8327e5c4775c22208652..aed861b98ed0c2d089735ed679f3eb17ef288339 100644 (file)
@@ -225,7 +225,7 @@ class Example {
             <summary>To be added.</summary>
             <remarks>
                 <c>E:Mono.DocTest.Widget.AnotherEvent</c>.</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
             <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
         </member>
         <member name="F:Mono.DocTest.Widget.array1">
@@ -607,7 +607,7 @@ class Example {
         <member name="E:Mono.DocTest.Generic.GenericBase`1.MyEvent">
             <summary>To be added.</summary>
             <remarks>E:Mono.DocTest.Generic.GenericBase`1.MyEvent</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
             <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
         </member>
         <member name="M:Mono.DocTest.Generic.GenericBase`1.op_Explicit(`0Mono`0.`0DocTest`0.`0Generic`0.`0GenericBase`0{`0U`0})~`0U`0">
@@ -702,7 +702,8 @@ class Example {
         <member name="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator">
             <summary>To be added.</summary>
             <returns>To be added.</returns>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.MyList`1.System#Collections#GetEnumerator</c>.</remarks>
         </member>
         <member name="M:Mono.DocTest.Generic.MyList`1.Test(T)">
             <param name="t">tko</param>
@@ -748,10 +749,11 @@ class Example {
             <remarks>To be added.</remarks>
         </member>
         <member name="M:Mono.DocTest.Generic.MyList`2.CopyTo(A[],System.Int32)">
-            <param name="array">To be added.</param>
-            <param name="arrayIndex">To be added.</param>
+            <param name="array">Where to copy elements to</param>
+            <param name="arrayIndex">Where to start copyingto</param>
             <summary>To be added.</summary>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.MyList`2.CopyTo(`0[],System.Int32)</c>.</remarks>
         </member>
         <member name="P:Mono.DocTest.Generic.MyList`2.Count">
             <summary>To be added.</summary>
@@ -841,7 +843,8 @@ class Example {
         <member name="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator">
             <summary>To be added.</summary>
             <returns>To be added.</returns>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.MyList`2.System#Collections#GetEnumerator</c>.</remarks>
         </member>
         <member name="P:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerator#Current">
             <summary>To be added.</summary>
index 6b360994ed8d538bfb38692bb0808f7f462ca1ae..ba75ca61912c42c3bca8712fef2a819e3ff30213 100644 (file)
@@ -1,4 +1,4 @@
-mdoc: XmlSchema error: Invalid start element: :extra XML URI: Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml . Line 20, Position 6.
-mdoc: XmlSchema error: Element declaration for extra is missing. XML URI: Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml . Line 20, Position 6.
-mdoc: XmlSchema error: Invalid end element. There are still required content items. XML URI: Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml . Line 21, Position 5.
+mdoc: XmlSchema error: Invalid start element: :extra XML URI: Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml . Line 21, Position 6.
+mdoc: XmlSchema error: Element declaration for extra is missing. XML URI: Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml . Line 21, Position 6.
+mdoc: XmlSchema error: Invalid end element. There are still required content items. XML URI: Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml . Line 22, Position 5.
 Total validation errors: 3
index 47cada3fb5f3de5035575a154d6a40cb03bee422..d39aea29d6934cade3e5115f945f69be6a5957fb 100644 (file)
@@ -2,11 +2,14 @@
 ../../class/Mono.Options/Mono.Options/Options.cs
 Mono.Documentation/assembler.cs
 Mono.Documentation/dump.cs
+Mono.Documentation/ecmadoc.cs
 Mono.Documentation/exceptions.cs
 Mono.Documentation/mdoc.cs
+Mono.Documentation/MdocFile.cs
 Mono.Documentation/monodocer.cs
 Mono.Documentation/monodocs2html.cs
 Mono.Documentation/monodocs2slashdoc.cs
+Mono.Documentation/msitomsx.cs
 Mono.Documentation/normalize.cs
 Mono.Documentation/validate.cs
 Mono.Documentation/webdoc.cs
index 36a05394c537241404ee8bb84441fc3341e22105..8227c1cec0b57d5a11cdc52049731185b1032a5b 100644 (file)
@@ -535,7 +535,8 @@ class MakeBundle {
                                   "    --machine-config F  Use the given file as the machine.config for the application.\n" +
                                   "    --static            Statically link to mono libs\n" +
                                   "    --nomain            Don't include a main() function, for libraries\n" +
-                                  "    -z                  Compress the assemblies before embedding.\n");
+                                  "    -z                  Compress the assemblies before embedding.\n" +
+                                  "                        You need zlib development headers and libraries.\n");
        }
 
        [DllImport ("libc")]
@@ -554,6 +555,7 @@ class MakeBundle {
                IntPtr buf = UnixMarshal.AllocHeap(8192);
                if (uname (buf) != 0){
                        Console.WriteLine ("Warning: Unable to detect OS");
+                       UnixMarshal.FreeHeap(buf);
                        return;
                }
                string os = Marshal.PtrToStringAnsi (buf);
index 43e327fac40ac5084ad81b0c82485b460fbe124f..cc2cd3cfc7f955542058d23f5b2a09ca1d05cf81 100644 (file)
                </xsl:call-template>
        </xsl:template>
 
-       <xsl:template match="onequarter">
-               1/4
-       </xsl:template>
-       <xsl:template match="pi">pi</xsl:template>
-       <xsl:template match="theta">theta</xsl:template>
+       <xsl:template match="onequarter">¼</xsl:template>
+       <xsl:template match="pi">Ï€</xsl:template>
+       <xsl:template match="theta">θ</xsl:template>
+       <xsl:template match="leq">≤</xsl:template>
+       <xsl:template match="geq">≥</xsl:template>
        <xsl:template match="subscript">
                <sub><xsl:value-of select="@term"/></sub>
        </xsl:template>
index 552b2f306306d9956730d9dc2539f0607e4d3102..1d4dea8938053bb97c5a802cc62915f803e9347a 100644 (file)
@@ -133,6 +133,7 @@ namespace Mono.XBuild.CommandLine {
                        Dictionary<Guid, ProjectInfo> projectInfos = new Dictionary<Guid, ProjectInfo> ();
                        Dictionary<Guid, ProjectInfo> websiteProjectInfos = new Dictionary<Guid, ProjectInfo> ();
                        List<ProjectInfo>[] infosByLevel = null;
+                       Dictionary<Guid, ProjectInfo> unsupportedProjectInfos = new Dictionary<Guid, ProjectInfo> ();
 
                        Match m = projectRegex.Match (line);
                        while (m.Success) {
@@ -146,10 +147,14 @@ namespace Mono.XBuild.CommandLine {
                                        continue;
                                }
 
+                               projectInfo.Guid = new Guid (m.Groups [4].Value);
+
                                if (String.Compare (m.Groups [1].Value, vcprojGuid,
                                                StringComparison.InvariantCultureIgnoreCase) == 0) {
                                        // Ignore vcproj 
                                        RaiseWarning (0, string.Format("Ignoring vcproj '{0}'.", projectInfo.Name));
+
+                                       unsupportedProjectInfos [projectInfo.Guid] = projectInfo;
                                        m = m.NextMatch ();
                                        continue;
                                }
@@ -158,9 +163,7 @@ namespace Mono.XBuild.CommandLine {
                                                StringComparison.InvariantCultureIgnoreCase) == 0)
                                        websiteProjectInfos.Add (new Guid (m.Groups[4].Value), projectInfo);
                                else
-                                       projectInfos.Add (new Guid (m.Groups[4].Value), projectInfo);
-
-                               projectInfo.Guid = new Guid (m.Groups [4].Value);
+                                       projectInfos.Add (projectInfo.Guid, projectInfo);
 
                                Match projectSectionMatch = projectDependenciesRegex.Match (m.Groups[6].Value);
                                while (projectSectionMatch.Success) {
@@ -203,7 +206,7 @@ namespace Mono.XBuild.CommandLine {
 
                                Project currentProject = p.ParentEngine.CreateNewProject ();
                                try {
-                                       currentProject.Load (filename);
+                                       currentProject.Load (filename, ProjectLoadSettings.IgnoreMissingImports);
                                } catch (InvalidProjectFileException e) {
                                        RaiseWarning (0, e.Message);
                                        continue;
@@ -220,6 +223,12 @@ namespace Mono.XBuild.CommandLine {
                                        if (hasGuid) {
                                                Guid guid = new Guid (projectReferenceGuid);
                                                projectInfos.TryGetValue (guid, out info);
+                                               if (info == null && unsupportedProjectInfos.TryGetValue (guid, out info)) {
+                                                       RaiseWarning (0, String.Format (
+                                                                       "{0}: ProjectReference '{1}' is of an unsupported type. Ignoring.",
+                                                                       filename, bi.Include));
+                                                       continue;
+                                               }
                                        }
 
                                        if (info == null || !hasGuid) {
@@ -229,10 +238,16 @@ namespace Mono.XBuild.CommandLine {
                                                string fullpath = Path.GetFullPath (Path.Combine (projectDir, bi.Include.Replace ('\\', Path.DirectorySeparatorChar)));
                                                info = projectInfos.Values.FirstOrDefault (pi => pi.FileName == fullpath);
 
-                                               if (info == null)
-                                                       RaiseWarning (0, String.Format (
-                                                                       "{0}: ProjectReference '{1}' not found, neither by guid '{2}' nor by project file name '{3}'.",
-                                                                       filename, bi.Include, projectReferenceGuid, fullpath));
+                                               if (info == null) {
+                                                       if (unsupportedProjectInfos.Values.Any (pi => pi.FileName == fullpath))
+                                                               RaiseWarning (0, String.Format (
+                                                                               "{0}: ProjectReference '{1}' is of an unsupported type. Ignoring.",
+                                                                               filename, bi.Include));
+                                                       else
+                                                               RaiseWarning (0, String.Format (
+                                                                               "{0}: ProjectReference '{1}' not found, neither by guid '{2}' nor by project file name '{3}'.",
+                                                                               filename, bi.Include, projectReferenceGuid.Replace ("{", "").Replace ("}", ""), fullpath));
+                                               }
 
                                        }
 
index 1de2a07cf0863fb8a480946221d9727161d4028e..7eeb83e3ef77fe01c64b35963f471db24c8cfa27 100644 (file)
                <GetFrameworkPath>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
                                TaskParameter="FrameworkVersion35Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
                                TaskParameter="FrameworkVersion30Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
                                TaskParameter="FrameworkVersion20Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                </GetFrameworkPath>
+               <CreateProperty Value="@(_TargetFrameworkDirectories)">
+                       <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+               </CreateProperty>
+
                <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
                        Condition="'$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
        </Target>
                        AssemblyFiles="@(ChildProjectReferences)"
                        SearchPaths="$(AssemblySearchPaths)"
                        CandidateAssemblyFiles="@(Content);@(None)"
-                       TargetFrameworkDirectories="@(TargetFrameworkDirectories)"
+                       TargetFrameworkDirectories="$(TargetFrameworkDirectory)"
                        AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
                        AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
                        FindDependencies="true"
                        SourceFiles="@(ReferenceCopyLocalPaths)"
                        DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
                        SkipUnchangedFiles="true">
-                       <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
+                       <Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
                </Copy>
        </Target>
 
                        <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
                </RemoveDuplicates>
 
+               <!-- CopyLocal files: In case all the projects build to common output
+                    directory, then other projects might depend on some of these
+                    CopyLocal files, so delete only the ones under *this* project
+                    directory -->
+               <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
+                       <Output TaskParameter="InPath" ItemName="FileWrites"/>
+               </FindUnderPath>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
index 1de2a07cf0863fb8a480946221d9727161d4028e..7eeb83e3ef77fe01c64b35963f471db24c8cfa27 100644 (file)
                <GetFrameworkPath>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
                                TaskParameter="FrameworkVersion35Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
                                TaskParameter="FrameworkVersion30Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
                                TaskParameter="FrameworkVersion20Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                </GetFrameworkPath>
+               <CreateProperty Value="@(_TargetFrameworkDirectories)">
+                       <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+               </CreateProperty>
+
                <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
                        Condition="'$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
        </Target>
                        AssemblyFiles="@(ChildProjectReferences)"
                        SearchPaths="$(AssemblySearchPaths)"
                        CandidateAssemblyFiles="@(Content);@(None)"
-                       TargetFrameworkDirectories="@(TargetFrameworkDirectories)"
+                       TargetFrameworkDirectories="$(TargetFrameworkDirectory)"
                        AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
                        AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
                        FindDependencies="true"
                        SourceFiles="@(ReferenceCopyLocalPaths)"
                        DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
                        SkipUnchangedFiles="true">
-                       <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
+                       <Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
                </Copy>
        </Target>
 
                        <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
                </RemoveDuplicates>
 
+               <!-- CopyLocal files: In case all the projects build to common output
+                    directory, then other projects might depend on some of these
+                    CopyLocal files, so delete only the ones under *this* project
+                    directory -->
+               <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
+                       <Output TaskParameter="InPath" ItemName="FileWrites"/>
+               </FindUnderPath>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
index 80d9431c3025b8e6501a95eb40bbe5098ec700cf..6545fc826d5f632b36bbdd613c06c33b6cee71c6 100644 (file)
                <GetFrameworkPath>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
                                TaskParameter="FrameworkVersion40Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
                                TaskParameter="FrameworkVersion35Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
                                TaskParameter="FrameworkVersion30Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
                                TaskParameter="FrameworkVersion20Path"
-                               ItemName="TargetFrameworkDirectories"/>
+                               ItemName="_TargetFrameworkDirectories"/>
                </GetFrameworkPath>
+               <CreateProperty Value="@(_TargetFrameworkDirectories)">
+                       <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+               </CreateProperty>
+
                <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
                        Condition="'$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
        </Target>
                        AssemblyFiles="@(ChildProjectReferences)"
                        SearchPaths="$(AssemblySearchPaths)"
                        CandidateAssemblyFiles="@(Content);@(None)"
-                       TargetFrameworkDirectories="@(TargetFrameworkDirectories)"
+                       TargetFrameworkDirectories="$(TargetFrameworkDirectory)"
                        AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
                        AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
                        FindDependencies="true"
                        SourceFiles="@(ReferenceCopyLocalPaths)"
                        DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
                        SkipUnchangedFiles="true">
-                       <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
+                       <Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
                </Copy>
        </Target>
 
                        <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
                </RemoveDuplicates>
 
+               <!-- CopyLocal files: In case all the projects build to common output
+                    directory, then other projects might depend on some of these
+                    CopyLocal files, so delete only the ones under *this* project
+                    directory -->
+               <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
+                       <Output TaskParameter="InPath" ItemName="FileWrites"/>
+               </FindUnderPath>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
index 2f85987ed02b482c2e4cd95c01067705b4ca7bd6..55eacf156833f7f785faa56267e21b7d6c92f7fa 100644 (file)
@@ -49,7 +49,7 @@
        <Target Name="GetFrameworkPaths">
                <GetMoonlightFrameworkPath
                        SilverlightVersion="$(SilverlightVersion)">
-                       <Output TaskParameter="FrameworkPath" ItemName="TargetFrameworkDirectories"/>
+                       <Output TaskParameter="FrameworkPath" PropertyName="TargetFrameworkDirectory"/>
                        <Output TaskParameter="FrameworkPath" ItemName="_FrameworkPath"/>
                </GetMoonlightFrameworkPath>
 
index dfb82ff32cca62292db7ec4ae69199fc7c1c1602..7da2c07074d7b15e5a17840b4e0389860d3bf089 100644 (file)
@@ -1,97 +1,74 @@
 %{!?ext_man: %define ext_man .gz}
+%define llvm no
+%define sgen yes
+
+%ifnarch %ix86 x86_64
+%define llvm no
+%define sgen no
+%endif
+
+%if %llvm == yes
+%define enable_llvm --enable-loadedllvm
+%endif
+
 Name:           mono-core
 License:        LGPL v2.1 only
 Group:          Development/Languages/Mono
 Summary:        A .NET Runtime Environment
-Url:            http://go-mono.org/
+Url:            http://www.mono-project.com
 Version:        @VERSION@
-Release:        0
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Release:        30
 Source0:        mono-%{version}.tar.bz2
-ExclusiveArch:  %ix86 x86_64 ppc ppc64 hppa armv4l sparc s390 ia64 s390x
+BuildRequires:  bison
+BuildRequires:  gcc-c++
+BuildRequires:  pkgconfig
+BuildRequires:  zlib-devel
+%ifnarch ia64
+BuildRequires:  valgrind-devel
+%endif
+%if %llvm == yes
+BuildRequires:  llvm-mono-devel
+%endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Provides:       mono = %{version}-%{release}
-Provides:       mono-ikvm = %{version}-%{release}
 Obsoletes:      mono
-Obsoletes:      mono-drawing
 Obsoletes:      mono-cairo
-Obsoletes:      mono-xml-relaxng
+Obsoletes:      mono-drawing
+Obsoletes:      mono-ikvm
 Obsoletes:      mono-posix
+Obsoletes:      mono-xml-relaxng
 Obsoletes:      mono-ziplib
-Obsoletes:      mono-ikvm
-Provides:       mono-drawing
+Provides:       mono = %{version}-%{release}
 Provides:       mono-cairo
-Provides:       mono-xml-relaxng
+Provides:       mono-drawing
+Provides:       mono-ikvm
 Provides:       mono-posix
+Provides:       mono-xml-relaxng
 Provides:       mono-ziplib
 # This version of mono has issues with the following versions of apps:
 #  (not because of regressions, but because bugfixes in mono uncover bugs in the apps)
-Conflicts:      helix-banshee < 1.0
 Conflicts:      banshee < 1.0
 Conflicts:      f-spot < 0.4
+Conflicts:      helix-banshee < 1.0
 Conflicts:      mono-addins < 0.3.1
-# Only use recommends for 11.0 and up
-%if 0%{?suse_version} >= 1100
-Recommends:     libgdiplus0
-%else
-Requires:       libgdiplus0
-%endif
-BuildRequires:  gcc-c++
-BuildRequires:  pkgconfig zlib-devel
-#######  distro specific changes  ########
-#####
-#### suse options ####
-%if 0%{?suse_version}
-# For some reason these weren't required in 10.2 and before... ?
-%if 0%{suse_version} >= 1030
-BuildRequires:  bison
-# Add valgrind support for 10.3 and above on archs that have it
-%ifarch %ix86 x86_64 ppc ppc64
-BuildRequires:  valgrind-devel
-%endif
-%endif
-%if 0%{suse_version} >= 1020
-BuildRequires:  xorg-x11-libX11
-%endif
-%if 0%{sles_version} == 10
-BuildRequires:  xorg-x11-devel
-%endif
-%if 0%{suse_version} == 1010
-BuildRequires:  xorg-x11-devel
-%endif
-%if 0%{sles_version} == 9
-%define configure_options export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/gnome/%_lib/pkgconfig
-BuildRequires:  XFree86-devel XFree86-libs pkgconfig
-%endif
-%endif
-# Fedora x11
-%if 0%{?fedora_version}
-BuildRequires:  libX11
-%endif
-# rhel x11
-%if 0%{?rhel_version}
-BuildRequires:  libX11
-%endif
-#####
-#######  End of distro specific changes  ########
-# Why was this needed?
-%ifarch s390 s390x
-PreReq:         grep
-%endif
-# This lib only needed for ia64
-%ifarch ia64
-BuildRequires:  libunwind-devel
-%endif
-# TODO:
-# This won't work until the rpm package passes .config files to mono-find-requires
-#%define __find_provides env MONO_PREFIX=%{buildroot}/usr /usr/lib/rpm/find-provides
-#%define __find_requires env MONO_PREFIX=%{buildroot}/usr /usr/lib/rpm/find-requires
-%if 0%{?fedora_version} || 0%{?rhel_version}
-# Allows overrides of __find_provides in fedora distros... (already set to zero on newer suse distros)
-%define _use_internal_dependency_generator 0
-%endif
-%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}/usr %{buildroot}%{_bindir}/mono-find-provides ; } | sort | uniq'
-%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}/usr %{buildroot}%{_bindir}/mono-find-requires ; } | sort | uniq'
+Recommends:     libgdiplus0 >= 2.6
+Provides:       mono(Commons.Xml.Relaxng) = 1.0.5000.0
+Provides:       mono(CustomMarshalers) = 1.0.5000.0
+Provides:       mono(I18N) = 1.0.5000.0
+Provides:       mono(I18N.West) = 1.0.5000.0
+Provides:       mono(ICSharpCode.SharpZipLib) = 0.6.0.0
+Provides:       mono(ICSharpCode.SharpZipLib) = 0.84.0.0
+Provides:       mono(Mono.Cairo) = 1.0.5000.0
+Provides:       mono(Mono.CompilerServices.SymbolWriter) = 1.0.5000.0
+Provides:       mono(Mono.Posix) = 1.0.5000.0
+Provides:       mono(Mono.Security) = 1.0.5000.0
+Provides:       mono(OpenSystem.C) = 1.0.5000.0
+Provides:       mono(System) = 1.0.5000.0
+Provides:       mono(System.Security) = 1.0.5000.0
+Provides:       mono(System.Xml) = 1.0.5000.0
+Provides:       mono(mscorlib) = 1.0.5000.0
+
+%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-provides ; } | sort | uniq'
+%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-requires ; } | sort | uniq'
 
 %description
 The Mono Project is an open development initiative that is working to
@@ -100,13 +77,54 @@ Its objective is to enable Unix developers to build and deploy
 cross-platform .NET applications. The project will implement various
 technologies that have been submitted to the ECMA for standardization.
 
+%prep
+%setup -q -n mono-%{version}
 
+%build
+# These are only needed if there are patches to the runtime
+#rm -f libgc/libtool.m4
+#autoreconf --force --install
+#autoreconf --force --install libgc
+export CFLAGS=" $RPM_OPT_FLAGS -fno-strict-aliasing"
+# distro specific configure options
+%if %llvm == yes
+export PATH=/opt/novell/llvm-mono/bin:$PATH
+%endif
+%configure \
+  --with-ikvm=yes \
+  --with-sgen=%{sgen} \
+  %{?enable_llvm} \
+  --with-moonlight=no
+make # We are not -jN safe! %{?jobs:-j%jobs}
+
+%install
+make install DESTDIR=%buildroot
+# remove .la files (they are generally bad news)
+rm -f %buildroot%_libdir/*.la
+# remove Windows-only stuff
+rm -rf %buildroot%_prefix/lib/mono/*/Mono.Security.Win32*
+rm -f %buildroot%_libdir/libMonoSupportW.*
+# remove .a files for libraries that are really only for us
+rm -f %buildroot%_libdir/libMonoPosixHelper.a
+rm -f %buildroot%_libdir/libikvm-native.a
+rm -f %buildroot%_libdir/libmono-llvm.a
+# remove libgc cruft
+rm -rf %buildroot%_datadir/libgc-mono
+# remove stuff that we don't package
+rm -f %buildroot%_bindir/cilc
+rm -f %buildroot%_mandir/man1/cilc.1*
+rm -f %buildroot%_prefix/lib/mono/*/browsercaps-updater.exe*
+rm -f %buildroot%_prefix/lib/mono/*/culevel.exe*
+rm -f %buildroot%_prefix/lib/mono/2.0/cilc.exe*
+# brp-compress doesn't search _mandir
+# so we cheat it
+ln -s . %buildroot%_prefix/usr
+RPM_BUILD_ROOT=%buildroot%_prefix /usr/lib/rpm/brp-compress
+rm %buildroot%_prefix/usr
+%find_lang mcs
 
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
+%clean
+rm -rf %buildroot
 
 %files -f mcs.lang
 %defattr(-, root, root)
@@ -120,6 +138,8 @@ Authors:
 %dir %_prefix/lib/mono/2.0
 %dir %_prefix/lib/mono/3.5
 %dir %_prefix/lib/mono/4.0
+%dir %_prefix/lib/mono/compat-2.0
+%dir %_prefix/lib/mono/compat-4.0
 %dir %_prefix/lib/mono/gac
 %dir %_sysconfdir/mono
 %dir %_sysconfdir/mono/2.0
@@ -135,7 +155,9 @@ Authors:
 %_bindir/mcs
 %_bindir/mono
 %_bindir/mono-configuration-crypto
+%if %sgen == yes
 %_bindir/mono-sgen
+%endif
 %_bindir/mono-test-install
 %_bindir/mozroots
 %_bindir/peverify
@@ -269,14 +291,7 @@ A Library for embedding Mono in your Application.
 %defattr(-, root, root)
 %_libdir/libmono-2.0.so.1*
 
-%post -n libmono-2_0-1
-/sbin/ldconfig
-%ifarch s390 s390x
-if grep -q "machine = 9672" /proc/cpuinfo 2>/dev/null ; then
-    # anchor for rebuild on failure
-    echo "mono may not work correctly on G5"
-fi
-%endif
+%post -n libmono-2_0-1 -p /sbin/ldconfig
 
 %postun -n libmono-2_0-1 -p /sbin/ldconfig
 
@@ -296,11 +311,12 @@ Development files for libmono.
 
 %files -n libmono-2_0-devel
 %defattr(-, root, root)
+%_includedir/mono-2.0
 %_libdir/libmono-2.0.a
 %_libdir/libmono-2.0.so
 %_libdir/pkgconfig/mono-2.pc
-%_includedir/mono-2.0
 
+%if %sgen == yes
 %package -n libmonosgen-2_0-0
 License:        LGPL v2.1 only
 Summary:       A Library for embedding Mono in your Application (sgen version)
@@ -341,12 +357,41 @@ Development files for libmonosgen.
 %defattr(-, root, root)
 %_libdir/libmonosgen-2.0.a
 %_libdir/libmonosgen-2.0.so
+%endif
+
+%if %llvm == yes
+%package -n libmono-llvm0
+License:        LGPL v2.1 only
+Summary:       Loadable LLVM libary for mono
+Group:          Development/Libraries/C and C++
+
+%description -n libmono-llvm0
+The Mono Project is an open development initiative that is working to
+develop an open source, Unix version of the .NET development platform.
+Its objective is to enable Unix developers to build and deploy
+cross-platform .NET applications. The project will implement various
+technologies that have been submitted to the ECMA for standardization.
+
+Loadable LLVM libary for mono.
+
+%files -n libmono-llvm0
+%defattr(-, root, root)
+%_libdir/libmono-llvm.so*
+
+%post -n libmono-llvm0 -p /sbin/ldconfig
+
+%postun -n libmono-llvm0 -p /sbin/ldconfig
+%endif
 
 %package -n mono-locale-extras
 License:        LGPL v2.1 only
 Summary:        Extra locale information
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
+Provides:       mono(I18N.CJK) = 1.0.5000.0
+Provides:       mono(I18N.MidEast) = 1.0.5000.0
+Provides:       mono(I18N.Other) = 1.0.5000.0
+Provides:       mono(I18N.Rare) = 1.0.5000.0
 
 %description -n mono-locale-extras
 The Mono Project is an open development initiative that is working to
@@ -357,14 +402,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Extra locale information.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-locale-extras
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/I18N.CJK.dll
@@ -385,12 +422,18 @@ License:        LGPL v2.1 only
 Summary:        Database connectivity for Mono
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
+Obsoletes:      mono-directory
 Obsoletes:      mono-ms-enterprise
 Obsoletes:      mono-novell-directory
-Obsoletes:      mono-directory
+Provides:       mono-directory
 Provides:       mono-ms-enterprise
 Provides:       mono-novell-directory
-Provides:       mono-directory
+Provides:       mono(Mono.Data) = 1.0.5000.0
+Provides:       mono(Mono.Data.Tds) = 1.0.5000.0
+Provides:       mono(Novell.Directory.Ldap) = 1.0.5000.0
+Provides:       mono(System.Data) = 1.0.5000.0
+Provides:       mono(System.DirectoryServices) = 1.0.5000.0
+Provides:       mono(System.EnterpriseServices) = 1.0.5000.0
 
 %description -n mono-data
 The Mono Project is an open development initiative that is working to
@@ -401,14 +444,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Database connectivity for Mono.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-data
 %defattr(-, root, root)
 %_bindir/sqlmetal
@@ -451,6 +486,11 @@ Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
 Provides:       mono-window-forms
 Obsoletes:      mono-window-forms
+Provides:       mono(Accessibility) = 1.0.5000.0
+Provides:       mono(System.Design) = 1.0.5000.0
+Provides:       mono(System.Drawing) = 1.0.5000.0
+Provides:       mono(System.Drawing.Design) = 1.0.5000.0
+Provides:       mono(System.Windows.Forms) = 1.0.5000.0
 
 %description -n mono-winforms
 The Mono Project is an open development initiative that is working to
@@ -461,14 +501,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Mono's Windows Forms implementation.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-winforms
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/Accessibility.dll
@@ -504,14 +536,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Database connectivity for DB2.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n ibm-data-db2
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/IBM.Data.DB2.dll
@@ -525,6 +549,14 @@ Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
 Obsoletes:      mono-ms-extras
 Provides:       mono-ms-extras
+Provides:       mono(Mono.Messaging) = 1.0.5000.0
+Provides:       mono(Mono.Messaging.RabbitMQ) = 1.0.5000.0
+Provides:       mono(RabbitMQ.Client) = 1.0.5000.0
+Provides:       mono(System.Configuration.Install) = 1.0.5000.0
+Provides:       mono(System.Management) = 1.0.5000.0
+Provides:       mono(System.Messaging) = 1.0.5000.0
+Provides:       mono(System.ServiceProcess) = 1.0.5000.0
+Provides:       mono(mono-service) = 1.0.5000.0
 
 %description -n mono-extras
 The Mono Project is an open development initiative that is working to
@@ -535,14 +567,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Extra packages.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-extras
 %defattr(-, root, root)
 %_bindir/mono-service
@@ -586,8 +610,7 @@ Summary:        Database connectivity for Mono
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
 Requires:       mono-data == %version-%release
-# TODO: Disable this, until a better solution is found
-#Requires:       sqlite2
+Provides:       mono(Mono.Data.Sqlite) = 1.0.5000.0
 
 %description -n mono-data-sqlite
 The Mono Project is an open development initiative that is working to
@@ -598,14 +621,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Database connectivity for Mono.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-data-sqlite
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/Mono.Data.Sqlite.dll
@@ -613,6 +628,7 @@ Authors:
 %_prefix/lib/mono/gac/Mono.Data.Sqlite
 
 %package -n mono-wcf
+License:        MIT License (or similar) ; Ms-Pl
 Summary:        Mono implementation of WCF, Windows Communication Foundation
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
@@ -626,15 +642,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Mono implementation of WCF, Windows Communication Foundation
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
-
 %files -n mono-wcf
 %defattr(-, root, root)
 %_bindir/svcutil
@@ -648,6 +655,7 @@ Authors:
 %_prefix/lib/mono/4.0/System.IdentityModel.dll
 %_prefix/lib/mono/4.0/System.Runtime.DurableInstancing.dll
 %_prefix/lib/mono/4.0/System.Runtime.Serialization.dll
+%_prefix/lib/mono/4.0/System.ServiceModel.Discovery.dll
 %_prefix/lib/mono/4.0/System.ServiceModel.Routing.dll
 %_prefix/lib/mono/4.0/System.ServiceModel.Web.dll
 %_prefix/lib/mono/4.0/System.ServiceModel.dll
@@ -659,11 +667,11 @@ Authors:
 %_prefix/lib/mono/gac/System.Runtime.DurableInstancing
 %_prefix/lib/mono/gac/System.Runtime.Serialization
 %_prefix/lib/mono/gac/System.ServiceModel
+%_prefix/lib/mono/gac/System.ServiceModel.Discovery
 %_prefix/lib/mono/gac/System.ServiceModel.Routing
 %_prefix/lib/mono/gac/System.ServiceModel.Web
 %_prefix/lib/mono/gac/System.Web.ApplicationServices
 
-
 %package -n mono-winfxcore
 License:        MIT License (or similar) ; Ms-Pl
 Summary:        Mono implementation of core WinFX APIs
@@ -679,15 +687,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Mono implementation of core WinFX APIs
 
-
-
-Authors:
---------
-Miguel de Icaza <miguel@ximian.com>
-Paolo Molaro <lupus@ximian.com>
-Dietmar Maurer <dietmar@ximian.com>
-
-
 %files -n mono-winfxcore
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/WindowsBase.dll*
@@ -699,12 +698,17 @@ License:        MIT License (or similar) ; Ms-Pl
 Summary:        Mono implementation of ASP.NET, Remoting and Web Services
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
+Obsoletes:      mono-remoting
 Obsoletes:      mono-web-forms
 Obsoletes:      mono-web-services
-Obsoletes:      mono-remoting
+Provides:       mono-remoting
 Provides:       mono-web-forms
 Provides:       mono-web-services
-Provides:       mono-remoting
+Provides:       mono(Mono.Http) = 1.0.5000.0
+Provides:       mono(System.Runtime.Remoting) = 1.0.5000.0
+Provides:       mono(System.Runtime.Serialization.Formatters.Soap) = 1.0.5000.0
+Provides:       mono(System.Web) = 1.0.5000.0
+Provides:       mono(System.Web.Services) = 1.0.5000.0
 
 %description -n mono-web
 The Mono Project is an open development initiative that is working to
@@ -715,14 +719,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Mono implementation of ASP.NET, Remoting and Web Services.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-web
 %defattr(-, root, root)
 %config %_sysconfdir/mono/2.0/Browsers
@@ -806,6 +802,7 @@ Summary:        Database connectivity for Mono
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
 Requires:       mono-data == %version-%release
+Provides:       mono(System.Data.OracleClient) = 1.0.5000.0
 
 %description -n mono-data-oracle
 The Mono Project is an open development initiative that is working to
@@ -816,14 +813,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Database connectivity for Mono.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-data-oracle
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/System.Data.OracleClient.dll
@@ -836,6 +825,7 @@ Summary:        Database connectivity for Mono
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
 Requires:       mono-data == %version-%release
+Provides:       mono(Npgsql) = 1.0.5000.0
 
 %description -n mono-data-postgresql
 The Mono Project is an open development initiative that is working to
@@ -846,14 +836,6 @@ technologies that have been submitted to the ECMA for standardization.
 
 Database connectivity for Mono.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-data-postgresql
 %defattr(-, root, root)
 %_prefix/lib/mono/2.0/Npgsql.dll
@@ -875,14 +857,6 @@ take advantage of many .NET language                features, for example
 custom attributes and other reflection related capabilities. NUnit
 brings xUnit to all .NET languages.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %files -n mono-nunit
 %defattr(-, root, root)
 %_libdir/pkgconfig/mono-nunit.pc
@@ -920,17 +894,22 @@ License:        LGPL v2.1 only
 Summary:        Mono development tools
 Group:          Development/Languages/Mono
 Requires:       mono-core == %version-%release
-Requires:       pkgconfig
-%if 0%{?monobuild}
 Requires:       libgdiplus0
-%else
-Requires:       libgdiplus0
-%endif
+Requires:       pkgconfig
+Provides:       mono-xbuild
+# Required because they are referenced by .pc files
+Requires:       mono-data == %version-%release
+Requires:       mono-data-oracle == %version-%release
+Requires:       mono-extras == %version-%release
+Requires:       mono-web == %version-%release
+Requires:       mono-winforms == %version-%release
 # We build natively on ppc64 now
 %ifarch ppc64
 Provides:       mono-biarchcompat
 Obsoletes:      mono-biarchcompat
 %endif
+Provides:       mono(PEAPI) = 1.0.5000.0
+Provides:       mono(resgen) = 1.0.5000.0
 
 %description -n mono-devel
 The Mono Project is an open development initiative that is working to
@@ -941,14 +920,6 @@ other tools needed to develop .NET applications.
 
 Mono development tools.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
-
 %post -n mono-devel -p /sbin/ldconfig
 
 %postun -n mono-devel -p /sbin/ldconfig
@@ -958,6 +929,7 @@ Authors:
 %_bindir/al
 %_bindir/al2
 %_bindir/caspol
+%_bindir/ccrewrite
 %_bindir/cert2spc
 %_bindir/dtd2rng
 %_bindir/dtd2xsd
@@ -992,6 +964,10 @@ Authors:
 %_bindir/sgen
 %_bindir/signcode
 %_bindir/xbuild
+%dir %_datadir/mono-2.0
+%dir %_datadir/mono-2.0/mono
+%dir %_datadir/mono-2.0/mono/cil
+%_datadir/mono-2.0/mono/cil/cil-opcodes.xml
 %_libdir/libmono-profiler-aot.*
 %_libdir/libmono-profiler-cov.*
 %_libdir/libmono-profiler-iomap.*
@@ -1004,6 +980,7 @@ Authors:
 %_libdir/pkgconfig/mono-options.pc
 %_libdir/pkgconfig/mono.pc
 %_mandir/man1/al.1%ext_man
+%_mandir/man1/ccrewrite.1%ext_man
 %_mandir/man1/cert2spc.1%ext_man
 %_mandir/man1/dtd2xsd.1%ext_man
 %_mandir/man1/genxs.1%ext_man
@@ -1013,6 +990,7 @@ Authors:
 %_mandir/man1/macpack.1%ext_man
 %_mandir/man1/makecert.1%ext_man
 %_mandir/man1/mkbundle.1%ext_man
+%_mandir/man1/mono-api-info.1%ext_man
 %_mandir/man1/mono-cil-strip.1%ext_man
 %_mandir/man1/mono-shlib-cop.1%ext_man
 %_mandir/man1/mono-xmltool.1%ext_man
@@ -1071,9 +1049,11 @@ Authors:
 %_prefix/lib/mono/4.0/Microsoft.Common.targets
 %_prefix/lib/mono/4.0/Microsoft.Common.tasks
 %_prefix/lib/mono/4.0/Microsoft.VisualBasic.targets
+%_prefix/lib/mono/4.0/Mono.CodeContracts.dll
 %_prefix/lib/mono/4.0/PEAPI.dll
 %_prefix/lib/mono/4.0/al.exe*
 %_prefix/lib/mono/4.0/caspol.exe*
+%_prefix/lib/mono/4.0/ccrewrite.exe*
 %_prefix/lib/mono/4.0/cert2spc.exe*
 %_prefix/lib/mono/4.0/dtd2rng.exe*
 %_prefix/lib/mono/4.0/dtd2xsd.exe*
@@ -1108,59 +1088,57 @@ Authors:
 %_prefix/lib/mono/gac/Microsoft.Build.Utilities
 %_prefix/lib/mono/gac/Microsoft.Build.Utilities.v3.5
 %_prefix/lib/mono/gac/Microsoft.Build.Utilities.v4.0
+%_prefix/lib/mono/gac/Mono.CodeContracts
 %_prefix/lib/mono/gac/Mono.Debugger.Soft
 %_prefix/lib/mono/gac/PEAPI
 %_prefix/lib/mono/xbuild
-%_prefix/share/mono-2.0/mono/cil/cil-opcodes.xml
-%dir %_prefix/share/mono-2.0
-%dir %_prefix/share/mono-2.0/mono
-%dir %_prefix/share/mono-2.0/mono/cil
 
 %package -n monodoc-core
 License:        LGPL v2.1 only
 Summary:        Monodoc - Documentation tools for C# code
 Group:          Development/Tools/Other
-Provides:       monodoc
 Obsoletes:      monodoc
+# Added to uncompress and compare documentation used by build-compare
+Requires:       unzip
 
 %description -n monodoc-core
 Monodoc-core contains documentation tools for C#.
 
 %files -n monodoc-core
 %defattr(-, root, root)
-%{_bindir}/mdassembler
-%{_bindir}/mdoc
-%{_bindir}/mdoc-assemble
-%{_bindir}/mdoc-export-html
-%{_bindir}/mdoc-export-msxdoc
-%{_bindir}/mdoc-update
-%{_bindir}/mdoc-validate
-%{_bindir}/mdvalidater
-%{_bindir}/mod
-%{_bindir}/monodocer
-%{_bindir}/monodocs2html
-%{_bindir}/monodocs2slashdoc
-%{_libdir}/pkgconfig/monodoc.pc
-%{_mandir}/man1/mdassembler.1%ext_man
-%{_mandir}/man1/mdoc-assemble.1%ext_man
-%{_mandir}/man1/mdoc-export-html.1%ext_man
-%{_mandir}/man1/mdoc-export-msxdoc.1%ext_man
-%{_mandir}/man1/mdoc-update.1%ext_man
-%{_mandir}/man1/mdoc-validate.1%ext_man
-%{_mandir}/man1/mdoc.1%ext_man
-%{_mandir}/man1/mdvalidater.1%ext_man
-%{_mandir}/man1/monodocer.1%ext_man
-%{_mandir}/man1/monodocs2html.1%ext_man
-%{_mandir}/man5/mdoc.5%ext_man
-%{_prefix}/lib/mono/4.0/mdoc.exe*
-%{_prefix}/lib/mono/4.0/mod.exe*
-%{_prefix}/lib/mono/gac/monodoc
-%{_prefix}/lib/mono/monodoc
-%{_prefix}/lib/monodoc
+%_bindir/mdassembler
+%_bindir/mdoc
+%_bindir/mdoc-assemble
+%_bindir/mdoc-export-html
+%_bindir/mdoc-export-msxdoc
+%_bindir/mdoc-update
+%_bindir/mdoc-validate
+%_bindir/mdvalidater
+%_bindir/mod
+%_bindir/monodocer
+%_bindir/monodocs2html
+%_bindir/monodocs2slashdoc
+%_libdir/pkgconfig/monodoc.pc
+%_mandir/man1/mdassembler.1%ext_man
+%_mandir/man1/mdoc-assemble.1%ext_man
+%_mandir/man1/mdoc-export-html.1%ext_man
+%_mandir/man1/mdoc-export-msxdoc.1%ext_man
+%_mandir/man1/mdoc-update.1%ext_man
+%_mandir/man1/mdoc-validate.1%ext_man
+%_mandir/man1/mdoc.1%ext_man
+%_mandir/man1/mdvalidater.1%ext_man
+%_mandir/man1/monodocer.1%ext_man
+%_mandir/man1/monodocs2html.1%ext_man
+%_mandir/man5/mdoc.5%ext_man
+%_prefix/lib/mono/4.0/mdoc.exe*
+%_prefix/lib/mono/4.0/mod.exe*
+%_prefix/lib/mono/gac/monodoc
+%_prefix/lib/mono/monodoc
+%_prefix/lib/monodoc
 
 %package -n mono-complete
 License:        LGPL v2.1 only
-Summary:        A .NET Runtime Environment
+Summary:        Install everything built from the mono source tree
 Group:          Development/Languages/Mono
 Requires:       bytefx-data-mysql = %version-%release
 Requires:       ibm-data-db2 = %version-%release
@@ -1173,7 +1151,6 @@ Requires:       mono-data-sqlite = %version-%release
 Requires:       mono-data-sybase = %version-%release
 Requires:       mono-devel = %version-%release
 Requires:       mono-extras = %version-%release
-Requires:       mono-jscript = %version-%release
 Requires:       mono-locale-extras = %version-%release
 Requires:       mono-nunit = %version-%release
 Requires:       mono-wcf = %version-%release
@@ -1187,62 +1164,12 @@ Its objective is to enable Unix developers to build and deploy
 cross-platform .NET applications. The project will implement various
 technologies that have been submitted to the ECMA for standardization.
 
-
-
-Authors:
---------
-    Miguel de Icaza <miguel@ximian.com>
-    Paolo Molaro <lupus@ximian.com>
-    Dietmar Maurer <dietmar@ximian.com>
+Install everything built from the mono source tree.  Note that this does
+not install anything from outside the mono source (XSP, mono-basic, etc.).
 
 %files -n mono-complete
 %defattr(-, root, root)
 %dir %_prefix/lib/mono/compat-2.0
 %dir %_prefix/lib/mono/compat-4.0
 
-%prep
-%setup -q -n mono-%{version}
-
-%build
-# These are only needed if there are patches to the runtime
-#rm -f libgc/libtool.m4
-#autoreconf --force --install
-#autoreconf --force --install libgc
-export CFLAGS=" $RPM_OPT_FLAGS -DKDE_ASSEMBLIES='\"/opt/kde3/%{_lib}\"' -fno-strict-aliasing"
-# distro specific configure options
-%{?configure_options}
-%configure \
-  --with-jit=yes \
-  --with-ikvm=yes \
-  --with-moonlight=no
-make
-
-%install
-make install DESTDIR=%buildroot
-# remove .la files (they are generally bad news)
-rm -f %buildroot%_libdir/*.la
-# remove Windows-only stuff
-rm -rf %buildroot%_prefix/lib/mono/*/Mono.Security.Win32*
-rm -f %buildroot%_libdir/libMonoSupportW.*
-# remove .a files for libraries that are really only for us
-rm -f %buildroot%_libdir/libMonoPosixHelper.a
-rm -f %buildroot%_libdir/libikvm-native.a
-# remove libgc cruft
-rm -rf %buildroot%_datadir/libgc-mono
-# remove stuff that we don't package
-rm -f %buildroot%_prefix/lib/mono/*/browsercaps-updater.exe*
-rm -f %buildroot%_bindir/cilc
-rm -f %buildroot%_mandir/man1/cilc.1*
-rm -f %buildroot%_prefix/lib/mono/2.0/cilc.exe*
-rm -f %buildroot%_prefix/lib/mono/*/culevel.exe*
-# brp-compress doesn't search _mandir
-# so we cheat it
-ln -s . %buildroot%_prefix/usr
-RPM_BUILD_ROOT=%buildroot%_prefix /usr/lib/rpm/brp-compress
-rm %buildroot%_prefix/usr
-%find_lang mcs
-
-%clean
-rm -rf ${RPM_BUILD_ROOT}
-
 %changelog
index e05bc38ac596ccc3915dd6a00ef8debb94560c24..20ad36762edefb53c5d349c61a14698af1d21cbb 100644 (file)
@@ -193,7 +193,7 @@ enum {
 #define mips_format_r(code,op,rs,rt,rd,sa,func) mips_emit32 ((code), (((op)<<26)|((rs)<<21)|((rt)<<16)|((rd)<<11)|((sa)<<6)|(func)))
 #define mips_format_divmul(code,op,src1,src2,fun) mips_emit32 ((code), (((op)<<26)|((src1)<<21)|((src2)<<16)|(fun)))
 
-#define mips_is_imm16(val) ((gint)(val) >= (gint)-(1<<15) && (gint)(val) <= (gint)((1<<15)-1))
+#define mips_is_imm16(val) ((gint)(gshort)(gint)(val) == (gint)(val))
 
 /* Load always using lui/addiu pair (for later patching) */
 #define mips_load(c,D,v) do {  \
index ad8e13a885cb7646f7a06f880ddd5aaeed0889fb..af3e3c6f5580f05afa3d1f1528a870daf0f69de7 100644 (file)
 #ifndef X86_H
 #define X86_H
 #include <assert.h>
+
+#ifdef __native_client_codegen__
+#define kNaClAlignment 32
+#define kNaClAlignmentMask (kNaClAlignment - 1)
+extern guint8 nacl_align_byte;
+#endif /* __native_client_codegen__ */
+
+
+#if defined( __native_client_codegen__ ) && defined( TARGET_X86 )
+#define x86_codegen_pre(inst_ptr_ptr, inst_len) do { mono_nacl_align_inst(inst_ptr_ptr, inst_len); } while (0)
+#define x86_call_sequence_pre(inst) guint8* _code_start = (inst);
+#define x86_call_sequence_post(inst) \
+  (mono_nacl_align_call(&_code_start, &(inst)), _code_start);
+#define x86_call_sequence_pre_val(inst) guint8* _code_start = (inst);
+#define x86_call_sequence_post_val(inst) \
+  (mono_nacl_align_call(&_code_start, &(inst)), _code_start);
+#else
+#define x86_codegen_pre(inst_ptr_ptr, inst_len) do {} while (0)
+#define x86_call_sequence_pre(inst)
+#define x86_call_sequence_post(inst)
+#define x86_call_sequence_pre_val(inst) guint8* _code_start = (inst);
+#define x86_call_sequence_post_val(inst) _code_start
+#endif  /* __native_client_codegen__ */
+
+
 /*
 // x86 register numbers
 */
@@ -278,6 +303,8 @@ typedef union {
 #define x86_regp_emit(inst,r,regno)  do { x86_address_byte ((inst), 0, (r), (regno)); } while (0)
 #define x86_mem_emit(inst,r,disp)    do { x86_address_byte ((inst), 0, (r), 5); x86_imm_emit32((inst), (disp)); } while (0)
 
+#define kMaxMembaseEmitPadding 6
+
 #define x86_membase_emit(inst,r,basereg,disp)  do {\
        if ((basereg) == X86_ESP) {     \
                if ((disp) == 0) {      \
@@ -307,6 +334,8 @@ typedef union {
        }       \
        } while (0)
 
+#define kMaxMemindexEmitPadding 6
+
 #define x86_memindex_emit(inst,r,basereg,disp,indexreg,shift)  \
        do {    \
                if ((basereg) == X86_NOBASEREG) {       \
@@ -343,7 +372,7 @@ typedef union {
  * the instruction is inspected for validity and the correct displacement
  * is inserted.
  */
-#define x86_patch(ins,target)  \
+#define x86_do_patch(ins,target)       \
        do {    \
                unsigned char* pos = (ins) + 1; \
                int disp, size = 0;     \
@@ -367,10 +396,73 @@ typedef union {
                else assert (0);        \
        } while (0)
 
+#if defined( __native_client_codegen__ ) && defined(TARGET_X86)
+
+#define x86_skip_nops(inst) \
+  do {    \
+    int in_nop = 0; \
+    do { \
+      in_nop = 0; \
+      if (inst[0] == 0x90) { \
+        in_nop = 1; \
+        inst += 1; \
+      } \
+      if (inst[0] == 0x8b && inst[1] == 0xc0) { \
+        in_nop = 1; \
+        inst += 2; \
+      } \
+      if (inst[0] == 0x8d && inst[1] == 0x6d \
+       && inst[2] == 0x00) { \
+        in_nop = 1; \
+        inst += 3; \
+      } \
+      if (inst[0] == 0x8d && inst[1] == 0x64 \
+       && inst[2] == 0x24 && inst[3] == 0x00) { \
+        in_nop = 1; \
+        inst += 4; \
+      } \
+      /* skip inst+=5 case because it's the 4-byte + 1-byte case */ \
+      if (inst[0] == 0x8d && inst[1] == 0xad \
+       && inst[2] == 0x00 && inst[3] == 0x00 \
+       && inst[4] == 0x00 && inst[5] == 0x00) { \
+        in_nop = 1; \
+        inst += 6; \
+      } \
+      if (inst[0] == 0x8d && inst[1] == 0xa4 \
+       && inst[2] == 0x24 && inst[3] == 0x00 \
+       && inst[4] == 0x00 && inst[5] == 0x00 \
+       && inst[6] == 0x00 ) { \
+        in_nop = 1; \
+        inst += 7; \
+      } \
+    } while ( in_nop );  \
+  } while (0)
+
+#define x86_patch(ins,target) \
+  do { \
+    unsigned char* inst = (ins); \
+    x86_skip_nops((inst)); \
+    x86_do_patch((inst), (target)); \
+  } while (0)
+
+#else
+#define x86_patch(ins,target) do { x86_do_patch((ins), (target)); } while (0)
+#endif /* __native_client_codegen__ */
+
+#ifdef __native_client_codegen__
+/* The breakpoint instruction is illegal in Native Client, although the HALT   */
+/* instruction is allowed. The breakpoint is used several places in mini-x86.c */
+/* and exceptions-x86.c.                                                       */
+#define x86_breakpoint(inst) \
+       do {    \
+               *(inst)++ = 0xf4;       \
+       } while (0)
+#else
 #define x86_breakpoint(inst) \
        do {    \
                *(inst)++ = 0xcc;       \
        } while (0)
+#endif
 
 #define x86_cld(inst) do { *(inst)++ =(unsigned char)0xfc; } while (0)
 #define x86_stosb(inst) do { *(inst)++ =(unsigned char)0xaa; } while (0)
@@ -380,7 +472,15 @@ typedef union {
 #define x86_movsl(inst) do { *(inst)++ =(unsigned char)0xa5; } while (0)
 #define x86_movsd(inst) x86_movsl((inst))
 
-#define x86_prefix(inst,p) do { *(inst)++ =(unsigned char) (p); } while (0)
+/* kNaClAlignment - 1 is the max value we can pass into x86_codegen_pre. */
+/* This keeps us from having to call x86_codegen_pre with specific       */
+/* knowledge of the size of the instruction that follows it, and         */
+/* localizes the alignment requirement to this spot.                     */
+#define x86_prefix(inst,p) \
+       do { \
+               x86_codegen_pre(&(inst), kNaClAlignment - 1); \
+               *(inst)++ =(unsigned char) (p); \
+       } while (0)
 
 #define x86_rdtsc(inst) \
        do {    \
@@ -390,6 +490,7 @@ typedef union {
 
 #define x86_cmpxchg_reg_reg(inst,dreg,reg)     \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xb1;        \
                x86_reg_emit ((inst), (reg), (dreg));   \
@@ -397,6 +498,7 @@ typedef union {
        
 #define x86_cmpxchg_mem_reg(inst,mem,reg)      \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xb1;        \
                x86_mem_emit ((inst), (reg), (mem));    \
@@ -404,6 +506,7 @@ typedef union {
        
 #define x86_cmpxchg_membase_reg(inst,basereg,disp,reg) \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xb1;        \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
@@ -411,6 +514,7 @@ typedef union {
 
 #define x86_xchg_reg_reg(inst,dreg,reg,size)   \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                if ((size) == 1)        \
                        *(inst)++ = (unsigned char)0x86;        \
                else    \
@@ -420,6 +524,7 @@ typedef union {
 
 #define x86_xchg_mem_reg(inst,mem,reg,size)    \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                if ((size) == 1)        \
                        *(inst)++ = (unsigned char)0x86;        \
                else    \
@@ -429,6 +534,7 @@ typedef union {
 
 #define x86_xchg_membase_reg(inst,basereg,disp,reg,size)       \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                if ((size) == 1)        \
                        *(inst)++ = (unsigned char)0x86;        \
                else    \
@@ -438,6 +544,7 @@ typedef union {
 
 #define x86_xadd_reg_reg(inst,dreg,reg,size)   \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0x0F;     \
                if ((size) == 1)        \
                        *(inst)++ = (unsigned char)0xC0;        \
@@ -448,6 +555,7 @@ typedef union {
 
 #define x86_xadd_mem_reg(inst,mem,reg,size)    \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                *(inst)++ = (unsigned char)0x0F;     \
                if ((size) == 1)        \
                        *(inst)++ = (unsigned char)0xC0;        \
@@ -458,6 +566,7 @@ typedef union {
 
 #define x86_xadd_membase_reg(inst,basereg,disp,reg,size)       \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0F;     \
                if ((size) == 1)        \
                        *(inst)++ = (unsigned char)0xC0;        \
@@ -468,12 +577,14 @@ typedef union {
 
 #define x86_inc_mem(inst,mem)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_mem_emit ((inst), 0, (mem));        \
        } while (0)
 
 #define x86_inc_membase(inst,basereg,disp)     \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_membase_emit ((inst), 0, (basereg), (disp));        \
        } while (0)
@@ -482,12 +593,14 @@ typedef union {
 
 #define x86_dec_mem(inst,mem)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_mem_emit ((inst), 1, (mem));        \
        } while (0)
 
 #define x86_dec_membase(inst,basereg,disp)     \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_membase_emit ((inst), 1, (basereg), (disp));        \
        } while (0)
@@ -496,36 +609,42 @@ typedef union {
 
 #define x86_not_mem(inst,mem)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_mem_emit ((inst), 2, (mem));        \
        } while (0)
 
 #define x86_not_membase(inst,basereg,disp)     \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_membase_emit ((inst), 2, (basereg), (disp));        \
        } while (0)
 
 #define x86_not_reg(inst,reg)  \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_reg_emit ((inst), 2, (reg));        \
        } while (0)
 
 #define x86_neg_mem(inst,mem)  \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_mem_emit ((inst), 3, (mem));        \
        } while (0)
 
 #define x86_neg_membase(inst,basereg,disp)     \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_membase_emit ((inst), 3, (basereg), (disp));        \
        } while (0)
 
 #define x86_neg_reg(inst,reg)  \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_reg_emit ((inst), 3, (reg));        \
        } while (0)
@@ -535,15 +654,18 @@ typedef union {
 #define x86_alu_reg_imm(inst,opc,reg,imm)      \
        do {    \
                if ((reg) == X86_EAX) { \
+                       x86_codegen_pre(&(inst), 5); \
                        *(inst)++ = (((unsigned char)(opc)) << 3) + 5;  \
                        x86_imm_emit32 ((inst), (imm)); \
                        break;  \
                }       \
                if (x86_is_imm8((imm))) {       \
+                       x86_codegen_pre(&(inst), 3); \
                        *(inst)++ = (unsigned char)0x83;        \
                        x86_reg_emit ((inst), (opc), (reg));    \
                        x86_imm_emit8 ((inst), (imm));  \
                } else {        \
+                       x86_codegen_pre(&(inst), 6); \
                        *(inst)++ = (unsigned char)0x81;        \
                        x86_reg_emit ((inst), (opc), (reg));    \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -553,10 +675,12 @@ typedef union {
 #define x86_alu_mem_imm(inst,opc,mem,imm)      \
        do {    \
                if (x86_is_imm8((imm))) {       \
+                       x86_codegen_pre(&(inst), 7); \
                        *(inst)++ = (unsigned char)0x83;        \
                        x86_mem_emit ((inst), (opc), (mem));    \
                        x86_imm_emit8 ((inst), (imm));  \
                } else {        \
+                       x86_codegen_pre(&(inst), 10); \
                        *(inst)++ = (unsigned char)0x81;        \
                        x86_mem_emit ((inst), (opc), (mem));    \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -566,10 +690,12 @@ typedef union {
 #define x86_alu_membase_imm(inst,opc,basereg,disp,imm)         \
        do {    \
                if (x86_is_imm8((imm))) {       \
+                       x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0x83;        \
                        x86_membase_emit ((inst), (opc), (basereg), (disp));    \
                        x86_imm_emit8 ((inst), (imm));  \
                } else {        \
+                       x86_codegen_pre(&(inst), 5 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0x81;        \
                        x86_membase_emit ((inst), (opc), (basereg), (disp));    \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -578,6 +704,7 @@ typedef union {
        
 #define x86_alu_membase8_imm(inst,opc,basereg,disp,imm)        \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x80;        \
                x86_membase_emit ((inst), (opc), (basereg), (disp));    \
                x86_imm_emit8 ((inst), (imm)); \
@@ -585,18 +712,21 @@ typedef union {
 
 #define x86_alu_mem_reg(inst,opc,mem,reg)      \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (((unsigned char)(opc)) << 3) + 1;  \
                x86_mem_emit ((inst), (reg), (mem));    \
        } while (0)
 
 #define x86_alu_membase_reg(inst,opc,basereg,disp,reg) \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (((unsigned char)(opc)) << 3) + 1;  \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
        } while (0)
 
 #define x86_alu_reg_reg(inst,opc,dreg,reg)     \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (((unsigned char)(opc)) << 3) + 3;  \
                x86_reg_emit ((inst), (dreg), (reg));   \
        } while (0)
@@ -612,24 +742,28 @@ typedef union {
  */
 #define x86_alu_reg8_reg8(inst,opc,dreg,reg,is_dreg_h,is_reg_h)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (((unsigned char)(opc)) << 3) + 2;  \
                x86_reg8_emit ((inst), (dreg), (reg), (is_dreg_h), (is_reg_h)); \
        } while (0)
 
 #define x86_alu_reg_mem(inst,opc,reg,mem)      \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (((unsigned char)(opc)) << 3) + 3;  \
                x86_mem_emit ((inst), (reg), (mem));    \
        } while (0)
 
 #define x86_alu_reg_membase(inst,opc,reg,basereg,disp) \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (((unsigned char)(opc)) << 3) + 3;  \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
        } while (0)
 
 #define x86_test_reg_imm(inst,reg,imm) \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                if ((reg) == X86_EAX) { \
                        *(inst)++ = (unsigned char)0xa9;        \
                } else {        \
@@ -641,6 +775,7 @@ typedef union {
 
 #define x86_test_mem_imm(inst,mem,imm) \
        do {    \
+               x86_codegen_pre(&(inst), 10); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_mem_emit ((inst), 0, (mem));        \
                x86_imm_emit32 ((inst), (imm)); \
@@ -648,6 +783,7 @@ typedef union {
 
 #define x86_test_membase_imm(inst,basereg,disp,imm)    \
        do {    \
+               x86_codegen_pre(&(inst), 5 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_membase_emit ((inst), 0, (basereg), (disp));        \
                x86_imm_emit32 ((inst), (imm)); \
@@ -655,18 +791,21 @@ typedef union {
 
 #define x86_test_reg_reg(inst,dreg,reg)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0x85;        \
                x86_reg_emit ((inst), (reg), (dreg));   \
        } while (0)
 
 #define x86_test_mem_reg(inst,mem,reg) \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0x85;        \
                x86_mem_emit ((inst), (reg), (mem));    \
        } while (0)
 
 #define x86_test_membase_reg(inst,basereg,disp,reg)    \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x85;        \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
        } while (0)
@@ -674,9 +813,11 @@ typedef union {
 #define x86_shift_reg_imm(inst,opc,reg,imm)    \
        do {    \
                if ((imm) == 1) {       \
+                       x86_codegen_pre(&(inst), 2); \
                        *(inst)++ = (unsigned char)0xd1;        \
                        x86_reg_emit ((inst), (opc), (reg));    \
                } else {        \
+                       x86_codegen_pre(&(inst), 3); \
                        *(inst)++ = (unsigned char)0xc1;        \
                        x86_reg_emit ((inst), (opc), (reg));    \
                        x86_imm_emit8 ((inst), (imm));  \
@@ -686,9 +827,11 @@ typedef union {
 #define x86_shift_mem_imm(inst,opc,mem,imm)    \
        do {    \
                if ((imm) == 1) {       \
+                       x86_codegen_pre(&(inst), 6); \
                        *(inst)++ = (unsigned char)0xd1;        \
                        x86_mem_emit ((inst), (opc), (mem));    \
                } else {        \
+                       x86_codegen_pre(&(inst), 7); \
                        *(inst)++ = (unsigned char)0xc1;        \
                        x86_mem_emit ((inst), (opc), (mem));    \
                        x86_imm_emit8 ((inst), (imm));  \
@@ -698,9 +841,11 @@ typedef union {
 #define x86_shift_membase_imm(inst,opc,basereg,disp,imm)       \
        do {    \
                if ((imm) == 1) {       \
+                       x86_codegen_pre(&(inst), 6); \
                        *(inst)++ = (unsigned char)0xd1;        \
                        x86_membase_emit ((inst), (opc), (basereg), (disp));    \
                } else {        \
+                       x86_codegen_pre(&(inst), 7); \
                        *(inst)++ = (unsigned char)0xc1;        \
                        x86_membase_emit ((inst), (opc), (basereg), (disp));    \
                        x86_imm_emit8 ((inst), (imm));  \
@@ -709,18 +854,21 @@ typedef union {
 
 #define x86_shift_reg(inst,opc,reg)    \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd3;        \
                x86_reg_emit ((inst), (opc), (reg));    \
        } while (0)
 
 #define x86_shift_mem(inst,opc,mem)    \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xd3;        \
                x86_mem_emit ((inst), (opc), (mem));    \
        } while (0)
 
 #define x86_shift_membase(inst,opc,basereg,disp)       \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xd3;        \
                x86_membase_emit ((inst), (opc), (basereg), (disp));    \
        } while (0)
@@ -731,6 +879,7 @@ typedef union {
 
 #define x86_shrd_reg(inst,dreg,reg)                     \
         do {                                            \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xad;        \
                x86_reg_emit ((inst), (reg), (dreg));   \
@@ -738,6 +887,7 @@ typedef union {
 
 #define x86_shrd_reg_imm(inst,dreg,reg,shamt)           \
         do {                                            \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xac;        \
                x86_reg_emit ((inst), (reg), (dreg));   \
@@ -746,6 +896,7 @@ typedef union {
 
 #define x86_shld_reg(inst,dreg,reg)                     \
         do {                                            \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xa5;        \
                x86_reg_emit ((inst), (reg), (dreg));   \
@@ -753,6 +904,7 @@ typedef union {
 
 #define x86_shld_reg_imm(inst,dreg,reg,shamt)           \
         do {                                            \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xa4;        \
                x86_reg_emit ((inst), (reg), (dreg));   \
@@ -764,18 +916,21 @@ typedef union {
  */
 #define x86_mul_reg(inst,reg,is_signed)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_reg_emit ((inst), 4 + ((is_signed) ? 1 : 0), (reg));        \
        } while (0)
 
 #define x86_mul_mem(inst,mem,is_signed)        \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_mem_emit ((inst), 4 + ((is_signed) ? 1 : 0), (mem));        \
        } while (0)
 
 #define x86_mul_membase(inst,basereg,disp,is_signed)   \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_membase_emit ((inst), 4 + ((is_signed) ? 1 : 0), (basereg), (disp));        \
        } while (0)
@@ -785,6 +940,7 @@ typedef union {
  */
 #define x86_imul_reg_reg(inst,dreg,reg)        \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xaf;        \
                x86_reg_emit ((inst), (dreg), (reg));   \
@@ -792,6 +948,7 @@ typedef union {
 
 #define x86_imul_reg_mem(inst,reg,mem) \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xaf;        \
                x86_mem_emit ((inst), (reg), (mem));    \
@@ -799,6 +956,7 @@ typedef union {
 
 #define x86_imul_reg_membase(inst,reg,basereg,disp)    \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0xaf;        \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
@@ -810,10 +968,12 @@ typedef union {
 #define x86_imul_reg_reg_imm(inst,dreg,reg,imm)        \
        do {    \
                if (x86_is_imm8 ((imm))) {      \
+                       x86_codegen_pre(&(inst), 3); \
                        *(inst)++ = (unsigned char)0x6b;        \
                        x86_reg_emit ((inst), (dreg), (reg));   \
                        x86_imm_emit8 ((inst), (imm));  \
                } else {        \
+                       x86_codegen_pre(&(inst), 6); \
                        *(inst)++ = (unsigned char)0x69;        \
                        x86_reg_emit ((inst), (dreg), (reg));   \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -823,10 +983,12 @@ typedef union {
 #define x86_imul_reg_mem_imm(inst,reg,mem,imm) \
        do {    \
                if (x86_is_imm8 ((imm))) {      \
+                       x86_codegen_pre(&(inst), 7); \
                        *(inst)++ = (unsigned char)0x6b;        \
                        x86_mem_emit ((inst), (reg), (mem));    \
                        x86_imm_emit8 ((inst), (imm));  \
                } else {        \
+                       x86_codegen_pre(&(inst), 6); \
                        *(inst)++ = (unsigned char)0x69;        \
                        x86_reg_emit ((inst), (reg), (mem));    \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -836,10 +998,12 @@ typedef union {
 #define x86_imul_reg_membase_imm(inst,reg,basereg,disp,imm)    \
        do {    \
                if (x86_is_imm8 ((imm))) {      \
+                       x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0x6b;        \
                        x86_membase_emit ((inst), (reg), (basereg), (disp));    \
                        x86_imm_emit8 ((inst), (imm));  \
                } else {        \
+                       x86_codegen_pre(&(inst), 5 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0x69;        \
                        x86_membase_emit ((inst), (reg), (basereg), (disp));    \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -853,24 +1017,28 @@ typedef union {
 
 #define x86_div_reg(inst,reg,is_signed)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_reg_emit ((inst), 6 + ((is_signed) ? 1 : 0), (reg));        \
        } while (0)
 
 #define x86_div_mem(inst,mem,is_signed)        \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_mem_emit ((inst), 6 + ((is_signed) ? 1 : 0), (mem));        \
        } while (0)
 
 #define x86_div_membase(inst,basereg,disp,is_signed)   \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xf7;        \
                x86_membase_emit ((inst), 6 + ((is_signed) ? 1 : 0), (basereg), (disp));        \
        } while (0)
 
 #define x86_mov_mem_reg(inst,mem,reg,size)     \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x88; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -882,6 +1050,7 @@ typedef union {
 
 #define x86_mov_regp_reg(inst,regp,reg,size)   \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x88; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -893,6 +1062,7 @@ typedef union {
 
 #define x86_mov_membase_reg(inst,basereg,disp,reg,size)        \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x88; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -904,6 +1074,7 @@ typedef union {
 
 #define x86_mov_memindex_reg(inst,basereg,disp,indexreg,shift,reg,size)        \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMemindexEmitPadding); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x88; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -915,6 +1086,7 @@ typedef union {
 
 #define x86_mov_reg_reg(inst,dreg,reg,size)    \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x8a; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -926,6 +1098,7 @@ typedef union {
 
 #define x86_mov_reg_mem(inst,reg,mem,size)     \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x8a; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -935,8 +1108,11 @@ typedef union {
                x86_mem_emit ((inst), (reg), (mem));    \
        } while (0)
 
+#define kMovRegMembasePadding (2 + kMaxMembaseEmitPadding)
+
 #define x86_mov_reg_membase(inst,reg,basereg,disp,size)        \
        do {    \
+               x86_codegen_pre(&(inst), kMovRegMembasePadding); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x8a; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -948,6 +1124,7 @@ typedef union {
 
 #define x86_mov_reg_memindex(inst,reg,basereg,disp,indexreg,shift,size)        \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMemindexEmitPadding); \
                switch ((size)) {       \
                case 1: *(inst)++ = (unsigned char)0x8a; break; \
                case 2: *(inst)++ = (unsigned char)0x66; /* fall through */     \
@@ -964,6 +1141,7 @@ typedef union {
 
 #define x86_mov_reg_imm(inst,reg,imm)  \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                *(inst)++ = (unsigned char)0xb8 + (reg);        \
                x86_imm_emit32 ((inst), (imm)); \
        } while (0)
@@ -971,15 +1149,18 @@ typedef union {
 #define x86_mov_mem_imm(inst,mem,imm,size)     \
        do {    \
                if ((size) == 1) {      \
+                       x86_codegen_pre(&(inst), 7); \
                        *(inst)++ = (unsigned char)0xc6;        \
                        x86_mem_emit ((inst), 0, (mem));        \
                        x86_imm_emit8 ((inst), (imm));  \
                } else if ((size) == 2) {       \
+                       x86_codegen_pre(&(inst), 9); \
                        *(inst)++ = (unsigned char)0x66;        \
                        *(inst)++ = (unsigned char)0xc7;        \
                        x86_mem_emit ((inst), 0, (mem));        \
                        x86_imm_emit16 ((inst), (imm)); \
                } else {        \
+                       x86_codegen_pre(&(inst), 10); \
                        *(inst)++ = (unsigned char)0xc7;        \
                        x86_mem_emit ((inst), 0, (mem));        \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -989,15 +1170,18 @@ typedef union {
 #define x86_mov_membase_imm(inst,basereg,disp,imm,size)        \
        do {    \
                if ((size) == 1) {      \
+                       x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0xc6;        \
                        x86_membase_emit ((inst), 0, (basereg), (disp));        \
                        x86_imm_emit8 ((inst), (imm));  \
                } else if ((size) == 2) {       \
+                       x86_codegen_pre(&(inst), 4 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0x66;        \
                        *(inst)++ = (unsigned char)0xc7;        \
                        x86_membase_emit ((inst), 0, (basereg), (disp));        \
                        x86_imm_emit16 ((inst), (imm)); \
                } else {        \
+                       x86_codegen_pre(&(inst), 5 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0xc7;        \
                        x86_membase_emit ((inst), 0, (basereg), (disp));        \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -1007,15 +1191,18 @@ typedef union {
 #define x86_mov_memindex_imm(inst,basereg,disp,indexreg,shift,imm,size)        \
        do {    \
                if ((size) == 1) {      \
+                       x86_codegen_pre(&(inst), 2 + kMaxMemindexEmitPadding); \
                        *(inst)++ = (unsigned char)0xc6;        \
                        x86_memindex_emit ((inst), 0, (basereg), (disp), (indexreg), (shift));  \
                        x86_imm_emit8 ((inst), (imm));  \
                } else if ((size) == 2) {       \
+                       x86_codegen_pre(&(inst), 4 + kMaxMemindexEmitPadding); \
                        *(inst)++ = (unsigned char)0x66;        \
                        *(inst)++ = (unsigned char)0xc7;        \
                        x86_memindex_emit ((inst), 0, (basereg), (disp), (indexreg), (shift));  \
                        x86_imm_emit16 ((inst), (imm)); \
                } else {        \
+                       x86_codegen_pre(&(inst), 5 + kMaxMemindexEmitPadding); \
                        *(inst)++ = (unsigned char)0xc7;        \
                        x86_memindex_emit ((inst), 0, (basereg), (disp), (indexreg), (shift));  \
                        x86_imm_emit32 ((inst), (imm)); \
@@ -1024,18 +1211,21 @@ typedef union {
 
 #define x86_lea_mem(inst,reg,mem)      \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                *(inst)++ = (unsigned char)0x8d;        \
                x86_mem_emit ((inst), (reg), (mem));    \
        } while (0)
 
 #define x86_lea_membase(inst,reg,basereg,disp) \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x8d;        \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
        } while (0)
 
 #define x86_lea_memindex(inst,reg,basereg,disp,indexreg,shift) \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMemindexEmitPadding); \
                *(inst)++ = (unsigned char)0x8d;        \
                x86_memindex_emit ((inst), (reg), (basereg), (disp), (indexreg), (shift));      \
        } while (0)
@@ -1044,6 +1234,7 @@ typedef union {
        do {    \
                unsigned char op = 0xb6;        \
                 g_assert (is_half ||  X86_IS_BYTE_REG (reg)); \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed)) op += 0x08;    \
                if ((is_half)) op += 0x01;      \
@@ -1054,6 +1245,7 @@ typedef union {
 #define x86_widen_mem(inst,dreg,mem,is_signed,is_half) \
        do {    \
                unsigned char op = 0xb6;        \
+               x86_codegen_pre(&(inst), 7); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed)) op += 0x08;    \
                if ((is_half)) op += 0x01;      \
@@ -1064,6 +1256,7 @@ typedef union {
 #define x86_widen_membase(inst,dreg,basereg,disp,is_signed,is_half)    \
        do {    \
                unsigned char op = 0xb6;        \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed)) op += 0x08;    \
                if ((is_half)) op += 0x01;      \
@@ -1074,6 +1267,7 @@ typedef union {
 #define x86_widen_memindex(inst,dreg,basereg,disp,indexreg,shift,is_signed,is_half)    \
        do {    \
                unsigned char op = 0xb6;        \
+               x86_codegen_pre(&(inst), 2 + kMaxMemindexEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed)) op += 0x08;    \
                if ((is_half)) op += 0x01;      \
@@ -1086,18 +1280,21 @@ typedef union {
 
 #define x86_fp_op_mem(inst,opc,mem,is_double)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (is_double) ? (unsigned char)0xdc : (unsigned char)0xd8;    \
                x86_mem_emit ((inst), (opc), (mem));    \
        } while (0)
 
 #define x86_fp_op_membase(inst,opc,basereg,disp,is_double)     \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (is_double) ? (unsigned char)0xdc : (unsigned char)0xd8;    \
                x86_membase_emit ((inst), (opc), (basereg), (disp));    \
        } while (0)
 
 #define x86_fp_op(inst,opc,index)      \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd8;        \
                *(inst)++ = (unsigned char)0xc0+((opc)<<3)+((index)&0x07);      \
        } while (0)
@@ -1105,6 +1302,7 @@ typedef union {
 #define x86_fp_op_reg(inst,opc,index,pop_stack)        \
        do {    \
                static const unsigned char map[] = { 0, 1, 2, 3, 5, 4, 7, 6, 8};        \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (pop_stack) ? (unsigned char)0xde : (unsigned char)0xdc;    \
                *(inst)++ = (unsigned char)0xc0+(map[(opc)]<<3)+((index)&0x07); \
        } while (0)
@@ -1118,126 +1316,147 @@ typedef union {
  */
 #define x86_fp_int_op_membase(inst,opc,basereg,disp,is_int)    \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (is_int) ? (unsigned char)0xda : (unsigned char)0xde;       \
                x86_membase_emit ((inst), opc, (basereg), (disp));      \
        } while (0)
 
 #define x86_fstp(inst,index)   \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xdd;        \
                *(inst)++ = (unsigned char)0xd8+(index);        \
        } while (0)
 
 #define x86_fcompp(inst)       \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xde;        \
                *(inst)++ = (unsigned char)0xd9;        \
        } while (0)
 
 #define x86_fucompp(inst)      \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xda;        \
                *(inst)++ = (unsigned char)0xe9;        \
        } while (0)
 
 #define x86_fnstsw(inst)       \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xdf;        \
                *(inst)++ = (unsigned char)0xe0;        \
        } while (0)
 
 #define x86_fnstcw(inst,mem)   \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xd9;        \
                x86_mem_emit ((inst), 7, (mem));        \
        } while (0)
 
 #define x86_fnstcw_membase(inst,basereg,disp)  \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xd9;        \
                x86_membase_emit ((inst), 7, (basereg), (disp));        \
        } while (0)
 
 #define x86_fldcw(inst,mem)    \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xd9;        \
                x86_mem_emit ((inst), 5, (mem));        \
        } while (0)
 
 #define x86_fldcw_membase(inst,basereg,disp)   \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xd9;        \
                x86_membase_emit ((inst), 5, (basereg), (disp));        \
        } while (0)
 
 #define x86_fchs(inst) \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xe0;        \
        } while (0)
 
 #define x86_frem(inst) \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xf8;        \
        } while (0)
 
 #define x86_fxch(inst,index)   \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xc8 + ((index) & 0x07);     \
        } while (0)
 
 #define x86_fcomi(inst,index)  \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xdb;        \
                *(inst)++ = (unsigned char)0xf0 + ((index) & 0x07);     \
        } while (0)
 
 #define x86_fcomip(inst,index) \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xdf;        \
                *(inst)++ = (unsigned char)0xf0 + ((index) & 0x07);     \
        } while (0)
 
 #define x86_fucomi(inst,index) \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xdb;        \
                *(inst)++ = (unsigned char)0xe8 + ((index) & 0x07);     \
        } while (0)
 
 #define x86_fucomip(inst,index)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xdf;        \
                *(inst)++ = (unsigned char)0xe8 + ((index) & 0x07);     \
        } while (0)
 
 #define x86_fld(inst,mem,is_double)    \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (is_double) ? (unsigned char)0xdd : (unsigned char)0xd9;    \
                x86_mem_emit ((inst), 0, (mem));        \
        } while (0)
 
 #define x86_fld_membase(inst,basereg,disp,is_double)   \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (is_double) ? (unsigned char)0xdd : (unsigned char)0xd9;    \
                x86_membase_emit ((inst), 0, (basereg), (disp));        \
        } while (0)
 
 #define x86_fld80_mem(inst,mem)        \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xdb;        \
                x86_mem_emit ((inst), 5, (mem));        \
        } while (0)
 
 #define x86_fld80_membase(inst,basereg,disp)   \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xdb;        \
                x86_membase_emit ((inst), 5, (basereg), (disp));        \
        } while (0)
 
 #define x86_fild(inst,mem,is_long)     \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                if ((is_long)) {        \
                        *(inst)++ = (unsigned char)0xdf;        \
                        x86_mem_emit ((inst), 5, (mem));        \
@@ -1249,6 +1468,7 @@ typedef union {
 
 #define x86_fild_membase(inst,basereg,disp,is_long)    \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                if ((is_long)) {        \
                        *(inst)++ = (unsigned char)0xdf;        \
                        x86_membase_emit ((inst), 5, (basereg), (disp));        \
@@ -1260,42 +1480,49 @@ typedef union {
 
 #define x86_fld_reg(inst,index)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xc0 + ((index) & 0x07);     \
        } while (0)
 
 #define x86_fldz(inst) \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xee;        \
        } while (0)
 
 #define x86_fld1(inst) \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xe8;        \
        } while (0)
 
 #define x86_fldpi(inst)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xd9;        \
                *(inst)++ = (unsigned char)0xeb;        \
        } while (0)
 
 #define x86_fst(inst,mem,is_double,pop_stack)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (is_double) ? (unsigned char)0xdd: (unsigned char)0xd9;     \
                x86_mem_emit ((inst), 2 + ((pop_stack) ? 1 : 0), (mem));        \
        } while (0)
 
 #define x86_fst_membase(inst,basereg,disp,is_double,pop_stack) \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (is_double) ? (unsigned char)0xdd: (unsigned char)0xd9;     \
                x86_membase_emit ((inst), 2 + ((pop_stack) ? 1 : 0), (basereg), (disp));        \
        } while (0)
 
 #define x86_fst80_mem(inst,mem)        \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xdb;        \
                x86_mem_emit ((inst), 7, (mem));        \
        } while (0)
@@ -1303,6 +1530,7 @@ typedef union {
 
 #define x86_fst80_membase(inst,basereg,disp)   \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xdb;        \
                x86_membase_emit ((inst), 7, (basereg), (disp));        \
        } while (0)
@@ -1310,6 +1538,7 @@ typedef union {
 
 #define x86_fist_pop(inst,mem,is_long) \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                if ((is_long)) {        \
                        *(inst)++ = (unsigned char)0xdf;        \
                        x86_mem_emit ((inst), 7, (mem));        \
@@ -1321,6 +1550,7 @@ typedef union {
 
 #define x86_fist_pop_membase(inst,basereg,disp,is_long)        \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                if ((is_long)) {        \
                        *(inst)++ = (unsigned char)0xdf;        \
                        x86_membase_emit ((inst), 7, (basereg), (disp));        \
@@ -1332,6 +1562,7 @@ typedef union {
 
 #define x86_fstsw(inst)        \
        do {    \
+                       x86_codegen_pre(&(inst), 3); \
                        *(inst)++ = (unsigned char)0x9b;        \
                        *(inst)++ = (unsigned char)0xdf;        \
                        *(inst)++ = (unsigned char)0xe0;        \
@@ -1345,6 +1576,7 @@ typedef union {
  */
 #define x86_fist_membase(inst,basereg,disp,is_int)     \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                if ((is_int)) { \
                        *(inst)++ = (unsigned char)0xdb;        \
                        x86_membase_emit ((inst), 2, (basereg), (disp));        \
@@ -1362,24 +1594,28 @@ typedef union {
 
 #define x86_push_regp(inst,reg)        \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_regp_emit ((inst), 6, (reg));       \
        } while (0)
 
 #define x86_push_mem(inst,mem) \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_mem_emit ((inst), 6, (mem));        \
        } while (0)
 
 #define x86_push_membase(inst,basereg,disp)    \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_membase_emit ((inst), 6, (basereg), (disp));        \
        } while (0)
 
 #define x86_push_memindex(inst,basereg,disp,indexreg,shift)    \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMemindexEmitPadding); \
                *(inst)++ = (unsigned char)0xff;        \
                x86_memindex_emit ((inst), 6, (basereg), (disp), (indexreg), (shift));  \
        } while (0)
@@ -1390,9 +1626,11 @@ typedef union {
        do {    \
                int _imm = (int) (imm); \
                if (x86_is_imm8 (_imm)) {       \
+                       x86_codegen_pre(&(inst), 2); \
                        *(inst)++ = (unsigned char)0x6A;        \
                        x86_imm_emit8 ((inst), (_imm)); \
                } else {        \
+                       x86_codegen_pre(&(inst), 5); \
                        *(inst)++ = (unsigned char)0x68;        \
                        x86_imm_emit32 ((inst), (_imm));        \
                }       \
@@ -1405,12 +1643,14 @@ typedef union {
 
 #define x86_pop_mem(inst,mem)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0x87;        \
                x86_mem_emit ((inst), 0, (mem));        \
        } while (0)
 
 #define x86_pop_membase(inst,basereg,disp)     \
        do {    \
+               x86_codegen_pre(&(inst), 1 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x87;        \
                x86_membase_emit ((inst), 0, (basereg), (disp));        \
        } while (0)
@@ -1422,34 +1662,70 @@ typedef union {
 
 #define x86_loop(inst,imm)     \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xe2;        \
                x86_imm_emit8 ((inst), (imm));  \
        } while (0)
 
 #define x86_loope(inst,imm)    \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xe1;        \
                x86_imm_emit8 ((inst), (imm));  \
        } while (0)
 
 #define x86_loopne(inst,imm)   \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xe0;        \
                x86_imm_emit8 ((inst), (imm));  \
        } while (0)
 
 #define x86_jump32(inst,imm)   \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                *(inst)++ = (unsigned char)0xe9;        \
                x86_imm_emit32 ((inst), (imm)); \
        } while (0)
 
 #define x86_jump8(inst,imm)    \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                *(inst)++ = (unsigned char)0xeb;        \
                x86_imm_emit8 ((inst), (imm));  \
        } while (0)
 
+
+#ifdef __native_client_codegen__
+#define x86_jump_reg(inst,reg) do {    \
+    x86_codegen_pre(&(inst), 5);                       \
+    *(inst)++ = (unsigned char)0x83;  /* and */                \
+    x86_reg_emit ((inst), 4, (reg));  /* reg */                \
+    *(inst)++ = (unsigned char)nacl_align_byte;                \
+    *(inst)++ = (unsigned char)0xff;                   \
+    x86_reg_emit ((inst), 4, (reg));                   \
+  } while (0)
+
+/* Let's hope ECX is available for these... */
+#define x86_jump_mem(inst,mem) do {    \
+    x86_mov_reg_mem(inst, (X86_ECX), (mem), 4);                \
+    x86_jump_reg(inst, (X86_ECX));                     \
+  } while (0)
+
+#define x86_jump_membase(inst,basereg,disp) do {       \
+    x86_mov_reg_membase(inst, (X86_ECX), basereg, disp, 4);    \
+    x86_jump_reg(inst, (X86_ECX));                             \
+  } while (0)
+
+/* like x86_jump_membase, but force a 32-bit displacement  */
+#define x86_jump_membase32(inst,basereg,disp) do {     \
+    x86_codegen_pre(&(inst), 6); \
+    *(inst)++ = (unsigned char)0x8b;                   \
+    x86_address_byte ((inst), 2, X86_ECX, (basereg));  \
+    x86_imm_emit32 ((inst), (disp));                   \
+    x86_jump_reg(inst, (X86_ECX));                     \
+  } while (0)
+#else  /* __native_client_codegen__ */
 #define x86_jump_reg(inst,reg) \
        do {    \
                *(inst)++ = (unsigned char)0xff;        \
@@ -1467,17 +1743,20 @@ typedef union {
                *(inst)++ = (unsigned char)0xff;        \
                x86_membase_emit ((inst), 4, (basereg), (disp));        \
        } while (0)
-
+#endif  /* __native_client_codegen__ */
 /*
  * target is a pointer in our buffer.
  */
 #define x86_jump_code(inst,target)     \
        do {    \
-               int t = (unsigned char*)(target) - (inst) - 2;  \
+               int t; \
+               x86_codegen_pre(&(inst), 2); \
+               t = (unsigned char*)(target) - (inst) - 2;      \
                if (x86_is_imm8(t)) {   \
                        x86_jump8 ((inst), t);  \
                } else {        \
-                       t -= 3; \
+                       x86_codegen_pre(&(inst), 5); \
+                       t = (unsigned char*)(target) - (inst) - 5;      \
                        x86_jump32 ((inst), t); \
                }       \
        } while (0)
@@ -1495,6 +1774,7 @@ typedef union {
 
 #define x86_branch8(inst,cond,imm,is_signed)   \
        do {    \
+               x86_codegen_pre(&(inst), 2); \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)]; \
                else    \
@@ -1504,6 +1784,7 @@ typedef union {
 
 #define x86_branch32(inst,cond,imm,is_signed)  \
        do {    \
+               x86_codegen_pre(&(inst), 6); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] + 0x10;  \
@@ -1514,11 +1795,14 @@ typedef union {
 
 #define x86_branch(inst,cond,target,is_signed) \
        do {    \
-               int offset = (target) - (inst) - 2;     \
+               int offset;                                      \
+               x86_codegen_pre(&(inst), 2); \
+               offset = (target) - (inst) - 2; \
                if (x86_is_imm8 ((offset)))     \
                        x86_branch8 ((inst), (cond), offset, (is_signed));      \
                else {  \
-                       offset -= 4;    \
+                       x86_codegen_pre(&(inst), 6); \
+                       offset = (target) - (inst) - 6; \
                        x86_branch32 ((inst), (cond), offset, (is_signed));     \
                }       \
        } while (0)
@@ -1537,6 +1821,7 @@ typedef union {
 #define x86_set_reg(inst,cond,reg,is_signed)   \
        do {    \
                 g_assert (X86_IS_BYTE_REG (reg)); \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] + 0x20;  \
@@ -1547,6 +1832,7 @@ typedef union {
 
 #define x86_set_mem(inst,cond,mem,is_signed)   \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] + 0x20;  \
@@ -1557,6 +1843,7 @@ typedef union {
 
 #define x86_set_membase(inst,cond,basereg,disp,is_signed)      \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] + 0x20;  \
@@ -1565,12 +1852,48 @@ typedef union {
                x86_membase_emit ((inst), 0, (basereg), (disp));        \
        } while (0)
 
-#define x86_call_imm(inst,disp)        \
+#define x86_call_imm_body(inst,disp) \
        do {    \
                *(inst)++ = (unsigned char)0xe8;        \
                x86_imm_emit32 ((inst), (int)(disp));   \
        } while (0)
 
+#define x86_call_imm(inst,disp)        \
+       do {    \
+               x86_call_sequence_pre((inst)); \
+               x86_call_imm_body((inst), (disp)); \
+               x86_call_sequence_post((inst)); \
+       } while (0)
+
+#ifdef __native_client_codegen__
+#define x86_call_reg_internal(inst,reg)        \
+  do {                                                 \
+    x86_codegen_pre(&(inst), 5);                       \
+    *(inst)++ = (unsigned char)0x83;  /* and */                \
+    x86_reg_emit ((inst), 4, (reg));  /* reg */                \
+    *(inst)++ = (unsigned char)nacl_align_byte;                \
+    *(inst)++ = (unsigned char)0xff;  /* call */       \
+    x86_reg_emit ((inst), 2, (reg));  /* reg */                \
+  } while (0)
+
+#define x86_call_reg(inst, reg) do {           \
+    x86_call_sequence_pre((inst));              \
+    x86_call_reg_internal(inst, reg);          \
+    x86_call_sequence_post((inst));             \
+  } while (0)
+
+
+/* It appears that x86_call_mem() is never used, so I'm leaving it out. */
+#define x86_call_membase(inst,basereg,disp)  do {              \
+    x86_call_sequence_pre((inst));                              \
+    /* x86_mov_reg_membase() inlined so its fixed size */      \
+    *(inst)++ = (unsigned char)0x8b;                           \
+    x86_address_byte ((inst), 2, (X86_ECX), (basereg));                \
+    x86_imm_emit32 ((inst), (disp));                           \
+    x86_call_reg_internal(inst, X86_ECX);                      \
+    x86_call_sequence_post((inst));                             \
+  } while (0)
+#else  /* __native_client_codegen__ */
 #define x86_call_reg(inst,reg) \
        do {    \
                *(inst)++ = (unsigned char)0xff;        \
@@ -1588,12 +1911,57 @@ typedef union {
                *(inst)++ = (unsigned char)0xff;        \
                x86_membase_emit ((inst), 2, (basereg), (disp));        \
        } while (0)
+#endif  /* __native_client_codegen__ */
+
+
+#ifdef __native_client_codegen__
 
 #define x86_call_code(inst,target)     \
        do {    \
-               int _x86_offset = (unsigned char*)(target) - (inst);    \
+               int _x86_offset; \
+               guint8* _aligned_start; \
+               x86_call_sequence_pre_val ((inst)); \
+               _x86_offset = (unsigned char*)(target) - (inst);        \
+               _x86_offset -= 5;       \
+               x86_call_imm_body ((inst), _x86_offset);        \
+               _aligned_start = x86_call_sequence_post_val ((inst)); \
+               _x86_offset = (unsigned char*)(target) - (_aligned_start);      \
                _x86_offset -= 5;       \
-               x86_call_imm ((inst), _x86_offset);     \
+               x86_call_imm_body ((_aligned_start), _x86_offset);      \
+       } while (0)
+
+#define SIZE_OF_RET 6
+#define x86_ret(inst) do { \
+    *(inst)++ = (unsigned char)0x59;  /* pop ecx */            \
+    x86_codegen_pre(&(inst), 5); \
+    *(inst)++ = (unsigned char)0x83;  /* and 0xffffffff, ecx */ \
+    *(inst)++ = (unsigned char)0xe1;                           \
+    *(inst)++ = (unsigned char)nacl_align_byte;                        \
+    *(inst)++ = (unsigned char)0xff;  /* jmp ecx */            \
+    *(inst)++ = (unsigned char)0xe1;                           \
+  } while (0)
+
+/* pop return address */
+/* pop imm bytes from stack */
+/* return */
+#define x86_ret_imm(inst,imm)  do {    \
+    *(inst)++ = (unsigned char)0x59;  /* pop ecx */            \
+    x86_alu_reg_imm ((inst), X86_ADD, X86_ESP, imm);           \
+    x86_codegen_pre(&(inst), 5); \
+    *(inst)++ = (unsigned char)0x83;  /* and 0xffffffff, ecx */ \
+    *(inst)++ = (unsigned char)0xe1;                           \
+    *(inst)++ = (unsigned char)nacl_align_byte;                        \
+    *(inst)++ = (unsigned char)0xff;  /* jmp ecx */            \
+    *(inst)++ = (unsigned char)0xe1;                           \
+} while (0)
+#else  /* __native_client_codegen__ */
+
+#define x86_call_code(inst,target)     \
+       do {    \
+               int _x86_offset; \
+               _x86_offset = (unsigned char*)(target) - (inst);        \
+               _x86_offset -= 5;       \
+               x86_call_imm_body ((inst), _x86_offset);        \
        } while (0)
 
 #define x86_ret(inst) do { *(inst)++ = (unsigned char)0xc3; } while (0)
@@ -1603,13 +1971,16 @@ typedef union {
                if ((imm) == 0) {       \
                        x86_ret ((inst));       \
                } else {        \
+                       x86_codegen_pre(&(inst), 3); \
                        *(inst)++ = (unsigned char)0xc2;        \
                        x86_imm_emit16 ((inst), (imm)); \
                }       \
        } while (0)
+#endif  /* __native_client_codegen__ */
 
 #define x86_cmov_reg(inst,cond,is_signed,dreg,reg)     \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char) 0x0f;       \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] - 0x30;  \
@@ -1620,6 +1991,7 @@ typedef union {
 
 #define x86_cmov_mem(inst,cond,is_signed,reg,mem)      \
        do {    \
+               x86_codegen_pre(&(inst), 7); \
                *(inst)++ = (unsigned char) 0x0f;       \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] - 0x30;  \
@@ -1630,6 +2002,7 @@ typedef union {
 
 #define x86_cmov_membase(inst,cond,is_signed,reg,basereg,disp) \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char) 0x0f;       \
                if ((is_signed))        \
                        *(inst)++ = x86_cc_signed_map [(cond)] - 0x30;  \
@@ -1640,6 +2013,7 @@ typedef union {
 
 #define x86_enter(inst,framesize)      \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0xc8;        \
                x86_imm_emit16 ((inst), (framesize));   \
                *(inst)++ = 0;  \
@@ -1648,17 +2022,17 @@ typedef union {
 #define x86_leave(inst) do { *(inst)++ = (unsigned char)0xc9; } while (0)
 #define x86_sahf(inst)  do { *(inst)++ = (unsigned char)0x9e; } while (0)
 
-#define x86_fsin(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xfe; } while (0)
-#define x86_fcos(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xff; } while (0)
-#define x86_fabs(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xe1; } while (0)
-#define x86_ftst(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xe4; } while (0)
-#define x86_fxam(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xe5; } while (0)
-#define x86_fpatan(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf3; } while (0)
-#define x86_fprem(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf8; } while (0)
-#define x86_fprem1(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf5; } while (0)
-#define x86_frndint(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xfc; } while (0)
-#define x86_fsqrt(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xfa; } while (0)
-#define x86_fptan(inst) do { *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf2; } while (0)
+#define x86_fsin(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xfe; } while (0)
+#define x86_fcos(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xff; } while (0)
+#define x86_fabs(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xe1; } while (0)
+#define x86_ftst(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xe4; } while (0)
+#define x86_fxam(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xe5; } while (0)
+#define x86_fpatan(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf3; } while (0)
+#define x86_fprem(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf8; } while (0)
+#define x86_fprem1(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf5; } while (0)
+#define x86_frndint(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xfc; } while (0)
+#define x86_fsqrt(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xfa; } while (0)
+#define x86_fptan(inst) do { x86_codegen_pre(&(inst), 2); *(inst)++ = (unsigned char)0xd9; *(inst)++ = (unsigned char)0xf2; } while (0)
 
 #define x86_padding(inst,size) \
        do {    \
@@ -1686,6 +2060,14 @@ typedef union {
                }       \
        } while (0)
 
+#ifdef __native_client_codegen__
+
+#define kNaClLengthOfCallReg 5
+#define kNaClLengthOfCallImm 5
+#define kNaClLengthOfCallMembase (kNaClLengthOfCallReg + 6)
+
+#endif  /* __native_client_codegen__ */
+
 #define x86_prolog(inst,frame_size,reg_mask)   \
        do {    \
                unsigned i, m = 1;      \
@@ -1853,6 +2235,7 @@ typedef enum {
 /* minimal SSE* support */
 #define x86_movsd_reg_membase(inst,dreg,basereg,disp)  \
        do {    \
+               x86_codegen_pre(&(inst), 3 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xf2;        \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x10;        \
@@ -1861,6 +2244,7 @@ typedef enum {
 
 #define x86_cvttsd2si(inst,dreg,reg)   \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0xf2;        \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x2c;        \
@@ -1869,6 +2253,7 @@ typedef enum {
 
 #define x86_sse_alu_reg_reg(inst,opc,dreg,reg) \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0F;        \
                *(inst)++ = (unsigned char)(opc);       \
                x86_reg_emit ((inst), (dreg), (reg));   \
@@ -1876,6 +2261,7 @@ typedef enum {
 
 #define x86_sse_alu_reg_membase(inst,opc,sreg,basereg,disp)    \
                do {    \
+                       x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                        *(inst)++ = (unsigned char)0x0f;        \
                        *(inst)++ = (unsigned char)(opc);       \
                        x86_membase_emit ((inst), (sreg), (basereg), (disp));   \
@@ -1883,6 +2269,7 @@ typedef enum {
 
 #define x86_sse_alu_membase_reg(inst,opc,basereg,disp,reg)     \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0F;        \
                *(inst)++ = (unsigned char)(opc);       \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
@@ -1891,30 +2278,35 @@ typedef enum {
 
 #define x86_sse_alu_pd_reg_reg(inst,opc,dreg,reg)       \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0x66;        \
                x86_sse_alu_reg_reg ((inst), (opc), (dreg), (reg)); \
        } while (0)
 
 #define x86_sse_alu_pd_membase_reg(inst,opc,basereg,disp,reg)  \
        do {    \
+               x86_codegen_pre(&(inst), 3 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x66;        \
                x86_sse_alu_membase_reg ((inst), (opc), (basereg), (disp), (reg)); \
        } while (0)
 
 #define x86_sse_alu_pd_reg_membase(inst,opc,dreg,basereg,disp) \
        do {    \
+               x86_codegen_pre(&(inst), 3 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x66;        \
                x86_sse_alu_reg_membase ((inst), (opc), (dreg),(basereg), (disp)); \
        } while (0)
 
 #define x86_sse_alu_pd_reg_reg_imm(inst,opc,dreg,reg,imm)      \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                x86_sse_alu_pd_reg_reg ((inst), (opc), (dreg), (reg)); \
                *(inst)++ = (unsigned char)(imm);       \
        } while (0)
 
 #define x86_sse_alu_pd_reg_membase_imm(inst,opc,dreg,basereg,disp,imm) \
        do {    \
+               x86_codegen_pre(&(inst), 4 + kMaxMembaseEmitPadding); \
                x86_sse_alu_pd_reg_membase ((inst), (opc), (dreg),(basereg), (disp)); \
                *(inst)++ = (unsigned char)(imm);       \
        } while (0)
@@ -1927,6 +2319,7 @@ typedef enum {
 
 #define x86_sse_alu_ps_reg_reg_imm(inst,opc,dreg,reg, imm)     \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                x86_sse_alu_reg_reg ((inst), (opc), (dreg), (reg)); \
                *(inst)++ = (unsigned char)imm; \
        } while (0)
@@ -1934,12 +2327,14 @@ typedef enum {
 
 #define x86_sse_alu_sd_reg_reg(inst,opc,dreg,reg)       \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0xF2;        \
                x86_sse_alu_reg_reg ((inst), (opc), (dreg), (reg)); \
        } while (0)
 
 #define x86_sse_alu_sd_membase_reg(inst,opc,basereg,disp,reg)  \
        do {    \
+               x86_codegen_pre(&(inst), 3 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xF2;        \
                x86_sse_alu_membase_reg ((inst), (opc), (basereg), (disp), (reg));      \
        } while (0)
@@ -1947,12 +2342,14 @@ typedef enum {
 
 #define x86_sse_alu_ss_reg_reg(inst,opc,dreg,reg)       \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0xF3;        \
                x86_sse_alu_reg_reg ((inst), (opc), (dreg), (reg)); \
        } while (0)
 
 #define x86_sse_alu_ss_membase_reg(inst,opc,basereg,disp,reg)       \
        do {    \
+               x86_codegen_pre(&(inst), 3 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0xF3;        \
                x86_sse_alu_membase_reg ((inst), (opc), (basereg), (disp), (reg));      \
        } while (0)
@@ -1961,6 +2358,7 @@ typedef enum {
 
 #define x86_sse_alu_sse41_reg_reg(inst,opc,dreg,reg)       \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                *(inst)++ = (unsigned char)0x66;        \
                *(inst)++ = (unsigned char)0x0F;        \
                *(inst)++ = (unsigned char)0x38;        \
@@ -1970,6 +2368,7 @@ typedef enum {
 
 #define x86_movups_reg_membase(inst,sreg,basereg,disp) \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x10;        \
                x86_membase_emit ((inst), (sreg), (basereg), (disp));   \
@@ -1977,6 +2376,7 @@ typedef enum {
 
 #define x86_movups_membase_reg(inst,basereg,disp,reg)  \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x11;        \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
@@ -1984,6 +2384,7 @@ typedef enum {
 
 #define x86_movaps_reg_membase(inst,sreg,basereg,disp) \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x28;        \
                x86_membase_emit ((inst), (sreg), (basereg), (disp));   \
@@ -1991,6 +2392,7 @@ typedef enum {
 
 #define x86_movaps_membase_reg(inst,basereg,disp,reg)  \
        do {    \
+               x86_codegen_pre(&(inst), 2 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x29;        \
                x86_membase_emit ((inst), (reg), (basereg), (disp));    \
@@ -1998,6 +2400,7 @@ typedef enum {
 
 #define x86_movaps_reg_reg(inst,dreg,sreg)     \
        do {    \
+               x86_codegen_pre(&(inst), 3); \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x28;        \
                x86_reg_emit ((inst), (dreg), (sreg));  \
@@ -2006,6 +2409,7 @@ typedef enum {
 
 #define x86_movd_reg_xreg(inst,dreg,sreg)      \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0x66;        \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x7e;        \
@@ -2014,6 +2418,7 @@ typedef enum {
 
 #define x86_movd_xreg_reg(inst,dreg,sreg)      \
        do {    \
+               x86_codegen_pre(&(inst), 4); \
                *(inst)++ = (unsigned char)0x66;        \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x6e;        \
@@ -2022,6 +2427,7 @@ typedef enum {
 
 #define x86_movd_xreg_membase(inst,sreg,basereg,disp)  \
        do {    \
+               x86_codegen_pre(&(inst), 3 + kMaxMembaseEmitPadding); \
                *(inst)++ = (unsigned char)0x66;        \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x6e;        \
@@ -2030,6 +2436,7 @@ typedef enum {
 
 #define x86_pshufw_reg_reg(inst,dreg,sreg,mask,high_words)     \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                *(inst)++ = (unsigned char)(high_words) ? 0xF3 : 0xF2;  \
                *(inst)++ = (unsigned char)0x0f;        \
                *(inst)++ = (unsigned char)0x70;        \
@@ -2039,6 +2446,7 @@ typedef enum {
 
 #define x86_sse_shift_reg_imm(inst,opc,mode, dreg,imm) \
        do {    \
+               x86_codegen_pre(&(inst), 5); \
                x86_sse_alu_pd_reg_reg (inst, opc, mode, dreg); \
                x86_imm_emit8 ((inst), (imm));  \
        } while (0)
index 5522dfa05164ccf9db5f277356a3911d53ab21dc..1e958d61793a85f75bc84bb8a263236b924aa59b 100644 (file)
@@ -2903,6 +2903,7 @@ init_key_table (void)
        g_hash_table_insert (key_table, (char *) "ldvirtftn", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "leave", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "leave.s", GINT_TO_POINTER (TRUE));
+       g_hash_table_insert (key_table, (char *) "legacy", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "linkcheck", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "literal", GINT_TO_POINTER (TRUE));
        g_hash_table_insert (key_table, (char *) "localloc", GINT_TO_POINTER (TRUE));
index 9388819d7472160d311d94138c0a1c4ba152c6a4..a9054d48f9ca033f98388a5aa76d3ca9b0753491 100644 (file)
@@ -84,6 +84,9 @@ void _wapi_handle_collect (void)
 {
        guint32 count = _wapi_shared_layout->collection_count;
        int i, thr_ret;
+
+       if (!_wapi_shm_enabled ())
+               return;
        
        LOGDEBUG ("%s: (%d) Starting a collection", __func__, _wapi_getpid ());
 
index b74d5bedf82f743a33566272c91762ddb1916d15..ebd3068add84887640d7d78e1ab9f57ddbfecef1 100644 (file)
@@ -96,6 +96,7 @@ extern void _wapi_handle_update_refs (void);
 extern void _wapi_handle_foreach (WapiHandleType type,
                                        gboolean (*on_each)(gpointer test, gpointer user),
                                        gpointer user_data);
+void _wapi_free_share_info (_WapiFileShare *share_info);
 
 /* This is OK to use for atomic writes of individual struct members, as they
  * are independent
@@ -358,7 +359,7 @@ static inline int _wapi_namespace_unlock (gpointer data G_GNUC_UNUSED)
 static inline void _wapi_handle_share_release (struct _WapiFileShare *info)
 {
        int thr_ret;
-       
+
        g_assert (info->handle_refs > 0);
        
        /* Prevent new entries racing with us */
@@ -366,7 +367,7 @@ static inline void _wapi_handle_share_release (struct _WapiFileShare *info)
        g_assert(thr_ret == 0);
 
        if (InterlockedDecrement ((gint32 *)&info->handle_refs) == 0) {
-               memset (info, '\0', sizeof(struct _WapiFileShare));
+               _wapi_free_share_info (info);
        }
 
        thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
index 355fac755a69baabef6aa5a332f93b790afdaf6e..23ef0f4a2aa33a7f1f1fb2ecdf0601e44ff9a8c0 100644 (file)
@@ -112,8 +112,19 @@ static guint32 _wapi_private_handle_count = 0;
 static guint32 _wapi_private_handle_slot_count = 0;
 
 struct _WapiHandleSharedLayout *_wapi_shared_layout = NULL;
+
+/*
+ * If SHM is enabled, this will point to shared memory, otherwise it will be NULL.
+ */
 struct _WapiFileShareLayout *_wapi_fileshare_layout = NULL;
 
+/*
+ * If SHM is disabled, this will point to a hash of _WapiFileShare structures, otherwise
+ * it will be NULL. We use this instead of _wapi_fileshare_layout to avoid allocating a
+ * 4MB array.
+ */
+static GHashTable *file_share_hash;
+
 guint32 _wapi_fd_reserve;
 
 /* 
@@ -205,6 +216,15 @@ static void handle_cleanup (void)
        }
        
        _wapi_shm_semaphores_remove ();
+
+       _wapi_shm_detach (WAPI_SHM_DATA);
+       _wapi_shm_detach (WAPI_SHM_FILESHARE);
+
+       if (file_share_hash)
+               g_hash_table_destroy (file_share_hash);
+
+       for (i = 0; i < _WAPI_PRIVATE_MAX_SLOTS; ++i)
+               g_free (_wapi_private_handles [i]);
 }
 
 void _wapi_cleanup ()
@@ -248,11 +268,14 @@ static void shared_init (void)
        _wapi_shared_layout = _wapi_shm_attach (WAPI_SHM_DATA);
        g_assert (_wapi_shared_layout != NULL);
        
-       _wapi_fileshare_layout = _wapi_shm_attach (WAPI_SHM_FILESHARE);
-       g_assert (_wapi_fileshare_layout != NULL);
+       if (_wapi_shm_enabled ()) {
+               /* This allocates a 4mb array, so do it only if SHM is enabled */
+               _wapi_fileshare_layout = _wapi_shm_attach (WAPI_SHM_FILESHARE);
+               g_assert (_wapi_fileshare_layout != NULL);
+       }
        
 #if !defined (DISABLE_SHARED_HANDLES)
-       if (!g_getenv ("MONO_DISABLE_SHM"))
+       if (_wapi_shm_enabled ())
                _wapi_collection_init ();
 #endif
 
@@ -1616,6 +1639,35 @@ int _wapi_handle_timedwait_signal_handle (gpointer handle,
        }
 }
 
+void
+_wapi_free_share_info (_WapiFileShare *share_info)
+{
+       if (!_wapi_shm_enabled ()) {
+               _wapi_handle_lock_shared_handles ();
+               g_hash_table_remove (file_share_hash, share_info);
+               _wapi_handle_unlock_shared_handles ();
+       } else {
+               memset (share_info, '\0', sizeof(struct _WapiFileShare));
+       }
+}
+
+static gint
+wapi_share_info_equal (gconstpointer ka, gconstpointer kb)
+{
+       const _WapiFileShare *s1 = ka;
+       const _WapiFileShare *s2 = kb;
+
+       return (s1->device == s2->device && s1->inode == s2->inode) ? 1 : 0;
+}
+
+static guint
+wapi_share_info_hash (gconstpointer data)
+{
+       const _WapiFileShare *s = data;
+
+       return s->inode;
+}
+
 gboolean _wapi_handle_get_or_set_share (dev_t device, ino_t inode,
                                        guint32 new_sharemode,
                                        guint32 new_access,
@@ -1636,55 +1688,31 @@ gboolean _wapi_handle_get_or_set_share (dev_t device, ino_t inode,
        /* Prevent new entries racing with us */
        thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_FILESHARE);
        g_assert (thr_ret == 0);
-       
-       /* If a linear scan gets too slow we'll have to fit a hash
-        * table onto the shared mem backing store
-        */
-       *share_info = NULL;
-       for (i = 0; i <= _wapi_fileshare_layout->hwm; i++) {
-               file_share = &_wapi_fileshare_layout->share_info[i];
 
-               /* Make a note of an unused slot, in case we need to
-                * store share info
+       if (!_wapi_shm_enabled ()) {
+               _WapiFileShare tmp;
+
+               /*
+                * Instead of allocating a 4MB array, we use a hash table to keep track of this
+                * info. This is needed even if SHM is disabled, to track sharing inside
+                * the current process.
                 */
-               if (first_unused == -1 && file_share->handle_refs == 0) {
-                       first_unused = i;
-                       continue;
-               }
-               
-               if (file_share->handle_refs == 0) {
-                       continue;
-               }
-               
-               if (file_share->device == device &&
-                   file_share->inode == inode) {
+               if (!file_share_hash)
+                       file_share_hash = g_hash_table_new_full (wapi_share_info_hash, wapi_share_info_equal, NULL, g_free);
+               tmp.device = device;
+               tmp.inode = inode;
+
+               file_share = g_hash_table_lookup (file_share_hash, &tmp);
+               if (file_share) {
                        *old_sharemode = file_share->sharemode;
                        *old_access = file_share->access;
                        *share_info = file_share;
                        
-                       /* Increment the reference count while we
-                        * still have sole access to the shared area.
-                        * This makes the increment atomic wrt
-                        * collections
-                        */
                        InterlockedIncrement ((gint32 *)&file_share->handle_refs);
-                       
                        exists = TRUE;
-                       break;
-               }
-       }
-       
-       if (!exists) {
-               if (i == _WAPI_FILESHARE_SIZE && first_unused == -1) {
-                       /* No more space */
                } else {
-                       if (first_unused == -1) {
-                               file_share = &_wapi_fileshare_layout->share_info[++i];
-                               _wapi_fileshare_layout->hwm = i;
-                       } else {
-                               file_share = &_wapi_fileshare_layout->share_info[first_unused];
-                       }
-                       
+                       file_share = g_new0 (_WapiFileShare, 1);
+
                        file_share->device = device;
                        file_share->inode = inode;
                        file_share->opened_by_pid = _wapi_getpid ();
@@ -1692,11 +1720,71 @@ gboolean _wapi_handle_get_or_set_share (dev_t device, ino_t inode,
                        file_share->access = new_access;
                        file_share->handle_refs = 1;
                        *share_info = file_share;
+
+                       g_hash_table_insert (file_share_hash, file_share, file_share);
                }
-       }
+       } else {
+               /* If a linear scan gets too slow we'll have to fit a hash
+                * table onto the shared mem backing store
+                */
+               *share_info = NULL;
+               for (i = 0; i <= _wapi_fileshare_layout->hwm; i++) {
+                       file_share = &_wapi_fileshare_layout->share_info[i];
 
-       if (*share_info != NULL) {
-               InterlockedExchange ((gint32 *)&(*share_info)->timestamp, now);
+                       /* Make a note of an unused slot, in case we need to
+                        * store share info
+                        */
+                       if (first_unused == -1 && file_share->handle_refs == 0) {
+                               first_unused = i;
+                               continue;
+                       }
+               
+                       if (file_share->handle_refs == 0) {
+                               continue;
+                       }
+               
+                       if (file_share->device == device &&
+                               file_share->inode == inode) {
+                               *old_sharemode = file_share->sharemode;
+                               *old_access = file_share->access;
+                               *share_info = file_share;
+                       
+                               /* Increment the reference count while we
+                                * still have sole access to the shared area.
+                                * This makes the increment atomic wrt
+                                * collections
+                                */
+                               InterlockedIncrement ((gint32 *)&file_share->handle_refs);
+                       
+                               exists = TRUE;
+                               break;
+                       }
+               }
+       
+               if (!exists) {
+                       if (i == _WAPI_FILESHARE_SIZE && first_unused == -1) {
+                               /* No more space */
+                       } else {
+                               if (first_unused == -1) {
+                                       file_share = &_wapi_fileshare_layout->share_info[++i];
+                                       _wapi_fileshare_layout->hwm = i;
+                               } else {
+                                       file_share = &_wapi_fileshare_layout->share_info[first_unused];
+                               }
+                       
+                               file_share->device = device;
+                               file_share->inode = inode;
+                               file_share->opened_by_pid = _wapi_getpid ();
+                               file_share->sharemode = new_sharemode;
+                               file_share->access = new_access;
+                               file_share->handle_refs = 1;
+                               *share_info = file_share;
+                       }
+               }
+
+               if (*share_info != NULL) {
+                       InterlockedExchange ((gint32 *)&(*share_info)->timestamp, now);
+               }
        }
        
        thr_ret = _wapi_shm_sem_unlock (_WAPI_SHARED_SEM_FILESHARE);
index 5d572974d49d9bae9009b402123500f3d5181a65..2b331f8e915f9c00b325191789d42fee74d6af26 100644 (file)
@@ -326,7 +326,8 @@ static void file_close (gpointer handle, gpointer data)
        
        g_free (file_handle->filename);
        
-       _wapi_handle_share_release (file_handle->share_info);
+       if (file_handle->share_info)
+               _wapi_handle_share_release (file_handle->share_info);
        
        close (GPOINTER_TO_UINT(handle));
 }
@@ -1732,7 +1733,8 @@ gboolean DeleteFile(const gunichar2 *name)
                g_free (filename);
                return FALSE;
        }
-       _wapi_handle_share_release (shareinfo);
+       if (shareinfo)
+               _wapi_handle_share_release (shareinfo);
 #endif
 
        retval = _wapi_unlink (filename);
@@ -1843,7 +1845,8 @@ gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name)
                SetLastError (ERROR_SHARING_VIOLATION);
                return FALSE;
        }
-       _wapi_handle_share_release (shareinfo);
+       if (shareinfo)
+               _wapi_handle_share_release (shareinfo);
 
        result = _wapi_rename (utf8_name, utf8_dest_name);
        errno_copy = errno;
@@ -3550,6 +3553,34 @@ guint32 GetTempPath (guint32 len, gunichar2 *buf)
        return(ret);
 }
 
+/* In-place octal sequence replacement */
+static void
+unescape_octal (gchar *str)
+{
+       gchar *rptr;
+       gchar *wptr;
+
+       if (str == NULL)
+               return;
+
+       rptr = wptr = str;
+       while (*rptr != '\0') {
+               if (*rptr == '\\') {
+                       char c;
+                       rptr++;
+                       c = (*(rptr++) - '0') << 6;
+                       c += (*(rptr++) - '0') << 3;
+                       c += *(rptr++) - '0';
+                       *wptr++ = c;
+               } else if (wptr != rptr) {
+                       *wptr++ = *rptr++;
+               } else {
+                       rptr++; wptr++;
+               }
+       }
+       *wptr = '\0';
+}
+
 gint32
 GetLogicalDriveStrings (guint32 len, gunichar2 *buf)
 {
@@ -3585,10 +3616,12 @@ GetLogicalDriveStrings (guint32 len, gunichar2 *buf)
                        continue;
                }
 
-               dir = g_utf8_to_utf16 (*(splitted + 1), -1, &length, NULL, NULL);
+               unescape_octal (*(splitted + 1));
+               dir = g_utf8_to_utf16 (*(splitted + 1), -1, NULL, &length, NULL);
                g_strfreev (splitted);
                if (total + length + 1 > len) {
                        fclose (fp);
+                       g_free (dir);
                        return len * 2; /* guess */
                }
 
index 17d8acac6bfecbc89e4007b8a61255a14e08e7d0..a3439d019ce745ea2c20a8112f9a802ceb0366fc 100644 (file)
 gboolean
 _wapi_lock_file_region (int fd, off_t offset, off_t length)
 {
+#if defined(__native_client__)
+       printf("WARNING: locking.c: _wapi_lock_file_region(): fcntl() not available on Native Client!\n");
+       // behave as below -- locks are not available
+       return(TRUE);
+#else
        struct flock lock_data;
        int ret;
 
@@ -58,11 +63,16 @@ _wapi_lock_file_region (int fd, off_t offset, off_t length)
        }
 
        return(TRUE);
+#endif /* __native_client__ */
 }
 
 gboolean
 _wapi_unlock_file_region (int fd, off_t offset, off_t length)
 {
+#if defined(__native_client__)
+       printf("WARNING: locking.c: _wapi_unlock_file_region(): fcntl() not available on Native Client!\n");
+       return (TRUE);
+#else
        struct flock lock_data;
        int ret;
 
@@ -98,6 +108,7 @@ _wapi_unlock_file_region (int fd, off_t offset, off_t length)
        }
 
        return(TRUE);
+#endif /* __native_client__ */
 }
 
 gboolean
index bf966d202c3c01f1a37590693c7e8bb104c465d0..2bd47b2059b498b83af4d67b84ebaba256d62104 100644 (file)
@@ -46,6 +46,8 @@ static mono_mutex_t noshm_sems[_WAPI_SHARED_SEM_COUNT];
 
 gboolean _wapi_shm_disabled = TRUE;
 
+static gpointer wapi_storage [16];
+
 static void
 noshm_semaphores_init (void)
 {
@@ -125,20 +127,30 @@ _wapi_shm_sem_unlock (int sem)
 gpointer
 _wapi_shm_attach (_wapi_shm_t type)
 {
-       guint32 size;
+       gpointer res;
 
        switch(type) {
        case WAPI_SHM_DATA:
-               return g_malloc0 (sizeof(struct _WapiHandleSharedLayout));
-               
+               res = g_malloc0 (sizeof(struct _WapiHandleSharedLayout));
+               break;
        case WAPI_SHM_FILESHARE:
-               return g_malloc0 (sizeof(struct _WapiFileShareLayout));
-
+               res = g_malloc0 (sizeof(struct _WapiFileShareLayout));
+               break;
        default:
                g_error ("Invalid type in _wapi_shm_attach ()");
                return NULL;
        }
+
+       wapi_storage [type] = res;
+       return res;
 }
+
+void
+_wapi_shm_detach (_wapi_shm_t type)
+{
+       g_free (wapi_storage [type]);
+}
+
 #else
 /*
  * Use POSIX shared memory if possible, it is simpler, and it has the advantage that 
@@ -384,8 +396,8 @@ try_again:
        return fd;
 }
 
-static gboolean
-check_disabled (void)
+gboolean
+_wapi_shm_enabled (void)
 {
        static gboolean env_checked;
 
@@ -395,7 +407,7 @@ check_disabled (void)
                env_checked = TRUE;
        }
 
-       return _wapi_shm_disabled;
+       return !_wapi_shm_disabled;
 }
 
 /*
@@ -427,8 +439,9 @@ _wapi_shm_attach (_wapi_shm_t type)
                return NULL;
        }
 
-       if (check_disabled ()) {
-               return g_malloc0 (size);
+       if (!_wapi_shm_enabled ()) {
+               wapi_storage [type] = g_malloc0 (size);
+               return wapi_storage [type];
        }
 
 #ifdef USE_SHM
@@ -471,6 +484,13 @@ _wapi_shm_attach (_wapi_shm_t type)
        return shm_seg;
 }
 
+void
+_wapi_shm_detach (_wapi_shm_t type)
+{
+       if (!_wapi_shm_enabled ())
+               g_free (wapi_storage [type]);
+}
+
 static void
 shm_semaphores_init (void)
 {
@@ -815,7 +835,7 @@ shm_sem_unlock (int sem)
 void
 _wapi_shm_semaphores_init (void)
 {
-       if (check_disabled ()) 
+       if (!_wapi_shm_enabled ())
                noshm_semaphores_init ();
        else
                shm_semaphores_init ();
index b2accf82c30399776d33ba827a7acc388195e2f7..b175b6e306bf2e26aeb6ed7df1571bbbe455f416 100644 (file)
@@ -20,6 +20,8 @@ typedef enum {
 extern gboolean _wapi_shm_disabled;
 
 extern gpointer _wapi_shm_attach (_wapi_shm_t type);
+extern void _wapi_shm_detach (_wapi_shm_t type);
+extern gboolean _wapi_shm_enabled (void);
 extern void _wapi_shm_semaphores_init (void);
 extern void _wapi_shm_semaphores_remove (void);
 extern int _wapi_shm_sem_lock (int sem);
index edb8e3aad1d2852a3cdf0e1bb0e06bbffc9431f4..2a88bd49ed7a7ea0a10abdd5be36a88a3f65114c 100644 (file)
@@ -7,6 +7,8 @@
  * (C) 2002 Ximian, Inc.
  */
 
+#ifndef DISABLE_SOCKETS
+
 #include <config.h>
 #include <glib.h>
 #include <pthread.h>
@@ -714,6 +716,15 @@ int _wapi_send(guint32 fd, const void *msg, size_t len, int send_flags)
                g_message ("%s: send error: %s", __func__, strerror (errno));
 #endif
 
+               /* At least linux returns EAGAIN/EWOULDBLOCK when the timeout has been set on
+                * a blocking socket. See bug #599488 */
+               if (errnum == EAGAIN) {
+                       gboolean nonblock;
+
+                       ret = ioctlsocket (fd, FIONBIO, (gulong *) &nonblock);
+                       if (ret != SOCKET_ERROR && !nonblock)
+                               errnum = ETIMEDOUT;
+               }
                errnum = errno_to_WSA (errnum, __func__);
                WSASetLastError (errnum);
                
@@ -1581,3 +1592,5 @@ int WSASend (guint32 fd, WapiWSABuf *buffers, guint32 count, guint32 *sent,
        *sent = ret;
        return 0;
 }
+
+#endif /* ifndef DISABLE_SOCKETS */
index 0c7899a3237982b0aa4a7409ed91e2c2242f1c5e..ac7959b657c909946a7444c5e99df15fb29731fa 100644 (file)
@@ -188,6 +188,8 @@ struct _WapiFileShare
        guint32 timestamp;
 };
 
+typedef struct _WapiFileShare _WapiFileShare;
+
 struct _WapiFileShareLayout
 {
        guint32 hwm;
index 6615c317616ddba5a329cea033cc034d5d641469..8b4675c647977b6374bbf4f4a4c14c63f8e8e461 100644 (file)
@@ -892,11 +892,16 @@ gboolean TlsFree(guint32 idx)
        g_message ("%s: freeing key %d", __func__, idx);
 #endif
 
+       if (idx >= TLS_MINIMUM_AVAILABLE) {
+               SetLastError (ERROR_INVALID_PARAMETER);
+               return FALSE;
+       }
+
        pthread_mutex_lock (&TLS_mutex);
        
        if(TLS_used[idx]==FALSE) {
                pthread_mutex_unlock (&TLS_mutex);
-
+               SetLastError (ERROR_INVALID_PARAMETER);
                return(FALSE);
        }
        
@@ -926,13 +931,17 @@ gpointer TlsGetValue(guint32 idx)
 #ifdef TLS_DEBUG
        g_message ("%s: looking up key %d", __func__, idx);
 #endif
-       
+       if (idx >= TLS_MINIMUM_AVAILABLE) {
+               SetLastError (ERROR_INVALID_PARAMETER);
+               return NULL;
+       }
        ret=pthread_getspecific(TLS_keys[idx]);
 
 #ifdef TLS_DEBUG
        g_message ("%s: returning %p", __func__, ret);
 #endif
-       
+
+       SetLastError (ERROR_SUCCESS);
        return(ret);
 }
 
@@ -952,7 +961,10 @@ gboolean TlsSetValue(guint32 idx, gpointer value)
 #ifdef TLS_DEBUG
        g_message ("%s: setting key %d to %p", __func__, idx, value);
 #endif
-       
+       if (idx >= TLS_MINIMUM_AVAILABLE) {
+               SetLastError (ERROR_INVALID_PARAMETER);
+               return FALSE;
+       }
        
        ret=pthread_setspecific(TLS_keys[idx], value);
 #ifdef TLS_DEBUG
index a31f6f8c786fcbc2a8937ebc9e7a6ed94fb2aff3..c9e1e119eda957508b96a57464366dc5469cc151 100644 (file)
@@ -61,12 +61,13 @@ null_sources = \
        console-null.c
 
 sgen_sources = \
-       sgen-gray.c     \
-       sgen-pinning.c  \
+       sgen-cardtable.c        \
+       sgen-gray.c             \
+       sgen-pinning.c          \
        sgen-pinning-stats.c    \
-       sgen-marksweep.c                \
-       sgen-los.c                              \
-       sgen-protocol.c
+       sgen-los.c              \
+       sgen-protocol.c         \
+       sgen-workers.c
 
 libmonoruntime_la_SOURCES = \
        $(platform_sources)     \
@@ -142,6 +143,7 @@ libmonoruntime_la_SOURCES = \
        mono-wsq.h              \
        monitor.c               \
        monitor.h               \
+       nacl-stub.c             \
        normalization-tables.h  \
        null-gc.c               \
        number-formatter.h      \
@@ -168,8 +170,16 @@ libmonoruntime_la_SOURCES = \
        sgen-os-mach.c          \
        sgen-gc.c               \
        sgen-internal.c         \
+       sgen-marksweep.c        \
+       sgen-marksweep-fixed.c  \
+       sgen-marksweep-par.c    \
+       sgen-marksweep-fixed-par.c      \
+       sgen-major-copying.c    \
        sgen-gc.h               \
        sgen-archdep.h          \
+       sgen-major-copy-object.h \
+       sgen-major-scan-object.h \
+       sgen-protocol.h         \
        sgen-scan-object.h      \
        string-icalls.c         \
        string-icalls.h         \
index 731ef771ea31bd7cbe67bf298998b2599ce4df76..3764d293b6265b64c17de04d640852cead198ad7 100644 (file)
@@ -73,7 +73,7 @@
  * Changes which are already detected at runtime, like the addition
  * of icalls, do not require an increment.
  */
-#define MONO_CORLIB_VERSION 91
+#define MONO_CORLIB_VERSION 93
 
 typedef struct
 {
@@ -85,12 +85,7 @@ typedef struct
 
 CRITICAL_SECTION mono_delegate_section;
 
-#ifdef _EGLIB_MAJOR
-/* Need to lock here because EGLIB has locking defined as no-ops, we can not depend on mono_strtod do the right locking */
-/* Ideally this will be fixed in eglib */
 CRITICAL_SECTION mono_strtod_mutex;
-#endif
-
 
 static gunichar2 process_guid [36];
 static gboolean process_guid_set = FALSE;
@@ -254,10 +249,7 @@ mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb,
 
        InitializeCriticalSection (&mono_delegate_section);
 
-#ifdef _EGLIB_MAJOR
-       /* Needed until EGLIB is fixed #464316 */
        InitializeCriticalSection (&mono_strtod_mutex);
-#endif
        
        mono_thread_attach (domain);
        mono_context_init (domain);
@@ -370,10 +362,6 @@ mono_runtime_cleanup (MonoDomain *domain)
        mono_type_initialization_cleanup ();
 
        mono_monitor_cleanup ();
-
-#ifndef HOST_WIN32
-       _wapi_cleanup ();
-#endif
 }
 
 static MonoDomainFunc quit_function = NULL;
index 29ef8580add944c3bf2f4eab668bda3b01a1623a..4bb632cbb90be7dfb752e477a0684ea0cdf2f429 100644 (file)
@@ -92,6 +92,7 @@ static const AssemblyVersionMap framework_assemblies [] = {
        {"PEAPI", 0},
        {"System", 0},
        {"System.ComponentModel.DataAnnotations", 2},
+       {"System.Configuration", 0},
        {"System.Configuration.Install", 0},
        {"System.Core", 2},
        {"System.Data", 0},
@@ -126,6 +127,27 @@ static const AssemblyVersionMap framework_assemblies [] = {
 static GList *loaded_assemblies = NULL;
 static MonoAssembly *corlib;
 
+#if defined(__native_client__)
+
+/* On Native Client, allow mscorlib to be loaded from memory  */
+/* instead of loaded off disk.  If these are not set, default */
+/* mscorlib loading will take place                           */
+
+/* NOTE: If mscorlib data is passed to mono in this way then */
+/* it needs to remain allocated during the use of mono.      */
+
+static void *corlibData = NULL;
+static size_t corlibSize = 0;
+
+void
+mono_set_corlib_data (void *data, size_t size)
+{
+  corlibData = data;
+  corlibSize = size;
+}
+
+#endif
+
 /* This protects loaded_assemblies and image->references */
 #define mono_assemblies_lock() EnterCriticalSection (&assemblies_mutex)
 #define mono_assemblies_unlock() LeaveCriticalSection (&assemblies_mutex)
@@ -2514,7 +2536,6 @@ mono_assembly_load_from_gac (MonoAssemblyName *aname,  gchar *filename, MonoImag
        return result;
 }
 
-
 MonoAssembly*
 mono_assembly_load_corlib (const MonoRuntimeInfo *runtime, MonoImageOpenStatus *status)
 {
@@ -2524,6 +2545,22 @@ mono_assembly_load_corlib (const MonoRuntimeInfo *runtime, MonoImageOpenStatus *
                /* g_print ("corlib already loaded\n"); */
                return corlib;
        }
+
+#if defined(__native_client__)
+       if (corlibData != NULL && corlibSize != 0) {
+               int status = 0;
+               /* First "FALSE" instructs mono not to make a copy. */
+               /* Second "FALSE" says this is not just a ref.      */
+               MonoImage* image = mono_image_open_from_data_full (corlibData, corlibSize, FALSE, &status, FALSE);
+               if (image == NULL || status != 0)
+                       g_print("mono_image_open_from_data_full failed: %d\n", status);
+               corlib = mono_assembly_load_from_full (image, "mscorlib", &status, FALSE);
+               if (corlib == NULL || status != 0)
+                       g_print ("mono_assembly_load_from_full failed: %d\n", status);
+               if (corlib)
+                       return corlib;
+       }
+#endif
        
        if (assemblies_path) {
                corlib = load_in_path ("mscorlib.dll", (const char**)assemblies_path, status, FALSE);
index 79114c3822c33fae71b04d333957c3ae94b65104..504bdcb526e94b40f97f393f253c5272a349fe38 100644 (file)
@@ -817,6 +817,7 @@ create_allocator (int atype, int offset)
        mono_method_get_header (res)->init_locals = FALSE;
 
        info = mono_image_alloc0 (mono_defaults.corlib, sizeof (AllocatorWrapperInfo));
+       info->gc_name = "boehm";
        info->alloc_type = atype;
        mono_marshal_set_wrapper_info (res, info);
 
@@ -947,6 +948,12 @@ mono_gc_get_write_barrier (void)
 
 #endif
 
+const char *
+mono_gc_get_gc_name (void)
+{
+       return "boehm";
+}
+
 void*
 mono_gc_invoke_with_gc_lock (MonoGCLockedCallbackFunc func, void *data)
 {
index a03de2072c2943afca7cdf71af0090714102d942..c1652605d5b180787466a9561029f6f052d398ff 100644 (file)
@@ -143,6 +143,11 @@ struct _MonoClassField {
 #define mono_field_is_deleted(field) (((field)->type->attrs & (FIELD_ATTRIBUTE_SPECIAL_NAME | FIELD_ATTRIBUTE_RT_SPECIAL_NAME)) \
                                      && (strcmp (mono_field_get_name (field), "_Deleted") == 0))
 
+/* a field is ignored if it's named "_Deleted" and it has the specialname and rtspecialname flags set */
+/* Try to avoid loading the field's type */
+#define mono_field_is_deleted_with_flags(field, flags) (((flags) & (FIELD_ATTRIBUTE_SPECIAL_NAME | FIELD_ATTRIBUTE_RT_SPECIAL_NAME)) \
+                                     && (strcmp (mono_field_get_name (field), "_Deleted") == 0))
+
 typedef struct {
        MonoClassField *field;
        guint32 offset;
@@ -1271,4 +1276,9 @@ mono_class_has_variant_generic_params (MonoClass *klass) MONO_INTERNAL;
 
 gboolean mono_is_corlib_image (MonoImage *image) MONO_INTERNAL;
 
+MonoType*
+mono_field_get_type_checked (MonoClassField *field, MonoError *error) MONO_INTERNAL;
+
+MonoClassField*
+mono_class_get_fields_lazy (MonoClass* klass, gpointer *iter) MONO_INTERNAL;
 #endif /* __MONO_METADATA_CLASS_INTERBALS_H__ */
index db5e0177164dfd0f377be98ad603baffb4916ddc..5d0a8cc8289fbcef70a2091aae9c98930f1fae99 100644 (file)
@@ -41,7 +41,7 @@
 #include <mono/utils/mono-counters.h>
 #include <mono/utils/mono-string.h>
 #include <mono/utils/mono-error-internals.h>
-
+#include <mono/utils/mono-logger-internal.h>
 MonoStats mono_stats;
 
 gboolean mono_print_vtable = FALSE;
@@ -63,6 +63,8 @@ static void setup_generic_array_ifaces (MonoClass *class, MonoClass *iface, Mono
 static MonoMethod* mono_class_get_virtual_methods (MonoClass* klass, gpointer *iter);
 static char* mono_assembly_name_from_token (MonoImage *image, guint32 type_token);
 static gboolean mono_class_is_variant_compatible (MonoClass *klass, MonoClass *oklass);
+static void mono_field_resolve_type (MonoClassField *field, MonoError *error);
+static guint32 mono_field_resolve_flags (MonoClassField *field);
 
 
 void (*mono_debugger_class_init_func) (MonoClass *klass) = NULL;
@@ -1227,6 +1229,67 @@ mono_class_alloc0 (MonoClass *class, int size)
 #define mono_class_new0(class,struct_type, n_structs)          \
     ((struct_type *) mono_class_alloc0 ((class), ((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
 
+/**
+ * mono_class_setup_basic_field_info:
+ * @class: The class to initialize
+ *
+ * Initializes the class->fields.
+ * LOCKING: Assumes the loader lock is held.
+ */
+static void
+mono_class_setup_basic_field_info (MonoClass *class)
+{
+       MonoClassField *field;
+       MonoClass *gtd;
+       MonoImage *image;
+       int i, top;
+
+       if (class->fields)
+               return;
+
+       gtd = class->generic_class ? mono_class_get_generic_type_definition (class) : NULL;
+       image = class->image;
+       top = class->field.count;
+
+       if (class->generic_class && class->generic_class->container_class->image->dynamic && !class->generic_class->container_class->wastypebuilder) {
+               /*
+                * This happens when a generic instance of an unfinished generic typebuilder
+                * is used as an element type for creating an array type. We can't initialize
+                * the fields of this class using the fields of gklass, since gklass is not
+                * finished yet, fields could be added to it later.
+                */
+               return;
+       }
+
+       if (gtd) {
+               mono_class_setup_basic_field_info (gtd);
+
+               top = gtd->field.count;
+               class->field.first = gtd->field.first;
+               class->field.count = gtd->field.count;
+       }
+
+       class->fields = mono_class_alloc0 (class, sizeof (MonoClassField) * top);
+
+       /*
+        * Fetch all the field information.
+        */
+       for (i = 0; i < top; i++){
+               field = &class->fields [i];
+               field->parent = class;
+
+               if (gtd) {
+                       field->name = mono_field_get_name (&gtd->fields [i]);
+               } else {
+                       int idx = class->field.first + i;
+                       /* class->field.first and idx points into the fieldptr table */
+                       guint32 name_idx = mono_metadata_decode_table_row_col (image, MONO_TABLE_FIELD, idx, MONO_FIELD_NAME);
+                       /* The name is needed for fieldrefs */
+                       field->name = mono_metadata_string_heap (image, name_idx);
+               }
+       }
+}
+
 /** 
  * mono_class_setup_fields:
  * @class: The class to initialize
@@ -1239,7 +1302,7 @@ mono_class_setup_fields (MonoClass *class)
 {
        MonoError error;
        MonoImage *m = class->image; 
-       int top = class->field.count;
+       int top;
        guint32 layout = class->flags & TYPE_ATTRIBUTE_LAYOUT_MASK;
        int i, blittable = TRUE;
        guint32 real_size = 0;
@@ -1262,16 +1325,15 @@ mono_class_setup_fields (MonoClass *class)
                return;
        }
 
+       mono_class_setup_basic_field_info (class);
+       top = class->field.count;
+
        if (gtd) {
                mono_class_setup_fields (gtd);
                if (gtd->exception_type) {
                        mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, NULL);
                        return;
                }
-
-               top = gtd->field.count;
-               class->field.first = gtd->field.first;
-               class->field.count = gtd->field.count;
        }
 
        class->instance_size = 0;
@@ -1330,8 +1392,6 @@ mono_class_setup_fields (MonoClass *class)
        /* Prevent infinite loops if the class references itself */
        class->size_inited = 1;
 
-       class->fields = mono_class_alloc0 (class, sizeof (MonoClassField) * top);
-
        if (class->generic_container) {
                container = class->generic_container;
        } else if (gtd) {
@@ -1348,46 +1408,24 @@ mono_class_setup_fields (MonoClass *class)
 
                field->parent = class;
 
-               if (gtd) {
-                       MonoClassField *gfield = &gtd->fields [i];
-
-                       field->name = mono_field_get_name (gfield);
-                       /*This memory must come from the image mempool as we don't have a chance to free it.*/
-                       field->type = mono_class_inflate_generic_type_no_copy (class->image, gfield->type, mono_class_get_context (class), &error);
+               if (!field->type) {
+                       mono_field_resolve_type (field, &error);
                        if (!mono_error_ok (&error)) {
-                               char *err_msg = g_strdup_printf ("Could not load field %d type due to: %s", i, mono_error_get_message (&error));
-                               mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, err_msg);
-                               g_free (err_msg);
+                               /*mono_field_resolve_type already failed class*/
                                mono_error_cleanup (&error);
                                return;
                        }
-                       g_assert (field->type->attrs == gfield->type->attrs);
-                       if (mono_field_is_deleted (field))
-                               continue;
+                       if (!field->type)
+                               g_error ("could not resolve %s:%s\n", mono_type_get_full_name(class), field->name);
+                       g_assert (field->type);
+               }
+
+               if (mono_field_is_deleted (field))
+                       continue;
+               if (gtd) {
+                       MonoClassField *gfield = &gtd->fields [i];
                        field->offset = gfield->offset;
                } else {
-                       const char *sig;
-                       guint32 cols [MONO_FIELD_SIZE];
-
-                       /* class->field.first and idx points into the fieldptr table */
-                       mono_metadata_decode_table_row (m, MONO_TABLE_FIELD, idx, cols, MONO_FIELD_SIZE);
-                       /* The name is needed for fieldrefs */
-                       field->name = mono_metadata_string_heap (m, cols [MONO_FIELD_NAME]);
-                       if (!mono_verifier_verify_field_signature (class->image, cols [MONO_FIELD_SIGNATURE], NULL)) {
-                               mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, NULL);
-                               break;
-                       }
-                       sig = mono_metadata_blob_heap (m, cols [MONO_FIELD_SIGNATURE]);
-                       mono_metadata_decode_value (sig, &sig);
-                       /* FIELD signature == 0x06 */
-                       g_assert (*sig == 0x06);
-                       field->type = mono_metadata_parse_type_full (m, container, MONO_PARSE_FIELD, cols [MONO_FIELD_FLAGS], sig + 1, &sig);
-                       if (!field->type) {
-                               mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, NULL);
-                               break;
-                       }
-                       if (mono_field_is_deleted (field))
-                               continue;
                        if (layout == TYPE_ATTRIBUTE_EXPLICIT_LAYOUT) {
                                guint32 offset;
                                mono_metadata_field_info (m, idx, &offset, NULL, NULL);
@@ -3646,19 +3684,19 @@ print_unimplemented_interface_method_info (MonoClass *class, MonoClass *ic, Mono
        char *type_name;
        
        for (index = 0; index < onum; ++index) {
-               g_print (" at slot %d: %s (%d) overrides %s (%d)\n", im_slot, overrides [index*2+1]->name, 
+               mono_trace_warning (MONO_TRACE_TYPE, " at slot %d: %s (%d) overrides %s (%d)\n", im_slot, overrides [index*2+1]->name, 
                         overrides [index*2+1]->slot, overrides [index*2]->name, overrides [index*2]->slot);
        }
        method_signature = mono_signature_get_desc (mono_method_signature (im), FALSE);
        type_name = mono_type_full_name (&class->byval_arg);
-       printf ("no implementation for interface method %s::%s(%s) in class %s\n",
+       mono_trace_warning (MONO_TRACE_TYPE, "no implementation for interface method %s::%s(%s) in class %s\n",
                mono_type_get_name (&ic->byval_arg), im->name, method_signature, type_name);
        g_free (method_signature);
        g_free (type_name);
        mono_class_setup_methods (class);
        if (class->exception_type) {
                char *name = mono_type_get_full_name (class);
-               printf ("CLASS %s failed to resolve methods\n", name);
+               mono_trace_warning (MONO_TRACE_TYPE, "CLASS %s failed to resolve methods\n", name);
                g_free (name);
                return;
        }
@@ -3666,7 +3704,7 @@ print_unimplemented_interface_method_info (MonoClass *class, MonoClass *ic, Mono
                MonoMethod *cm = class->methods [index];
                method_signature = mono_signature_get_desc (mono_method_signature (cm), TRUE);
 
-               printf ("METHOD %s(%s)\n", cm->name, method_signature);
+               mono_trace_warning (MONO_TRACE_TYPE, "METHOD %s(%s)\n", cm->name, method_signature);
                g_free (method_signature);
        }
 }
@@ -4316,7 +4354,7 @@ generic_array_methods (MonoClass *class)
                }
        }
        list = g_list_reverse (list);
-       generic_array_method_info = g_malloc (sizeof (GenericArrayMethodInfo) * count_generic);
+       generic_array_method_info = mono_image_alloc (mono_defaults.corlib, sizeof (GenericArrayMethodInfo) * count_generic);
        i = 0;
        for (tmp = list; tmp; tmp = tmp->next) {
                const char *mname, *iname;
@@ -5105,6 +5143,12 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token)
                                mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
                                return NULL;
                        }
+                       if (class->generic_container && tmp->generic_class && tmp->generic_class->container_class == class) {
+                               mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Parent extends generic instance of this type"));
+                               mono_loader_unlock ();
+                               mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
+                               return NULL;
+                       }
                }
        }
 
@@ -7806,8 +7850,6 @@ mono_class_get_methods (MonoClass* klass, gpointer *iter)
        MonoMethod** method;
        if (!iter)
                return NULL;
-       if (!klass->inited)
-               mono_class_init (klass);
        if (!*iter) {
                mono_class_setup_methods (klass);
 
@@ -7924,8 +7966,6 @@ mono_class_get_properties (MonoClass* klass, gpointer *iter)
        MonoProperty* property;
        if (!iter)
                return NULL;
-       if (!klass->inited)
-               mono_class_init (klass);
        if (!*iter) {
                mono_class_setup_properties (klass);
                /* start from the first */
@@ -7962,8 +8002,6 @@ mono_class_get_events (MonoClass* klass, gpointer *iter)
        MonoEvent* event;
        if (!iter)
                return NULL;
-       if (!klass->inited)
-               mono_class_init (klass);
        if (!*iter) {
                mono_class_setup_events (klass);
                /* start from the first */
@@ -8050,8 +8088,6 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
 
        if (!iter)
                return NULL;
-       if (!klass->inited)
-               mono_class_init (klass);
        if (!klass->nested_classes_inited) {
                if (!klass->type_token)
                        klass->nested_classes_inited = TRUE;
@@ -8063,8 +8099,11 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
                                guint32 cols [MONO_NESTED_CLASS_SIZE];
                                mono_metadata_decode_row (&klass->image->tables [MONO_TABLE_NESTEDCLASS], i - 1, cols, MONO_NESTED_CLASS_SIZE);
                                nclass = mono_class_create_from_typedef (klass->image, MONO_TOKEN_TYPE_DEF | cols [MONO_NESTED_CLASS_NESTED]);
-                               if (!nclass)
+                               if (!nclass) {
+                                       mono_loader_clear_error ();
+                                       i = mono_metadata_nesting_typedef (klass->image, klass->type_token, i + 1);
                                        continue;
+                               }
                                mono_class_alloc_ext (klass);
                                klass->ext->nested_classes = g_list_prepend_image (klass->image, klass->ext->nested_classes, nclass);
 
@@ -8116,6 +8155,29 @@ mono_field_get_name (MonoClassField *field)
 MonoType*
 mono_field_get_type (MonoClassField *field)
 {
+       MonoError error;
+       MonoType *type = mono_field_get_type_checked (field, &error);
+       if (!mono_error_ok (&error)) {
+               mono_trace_warning (MONO_TRACE_TYPE, "Could not load field's type due to %s", mono_error_get_message (&error));
+               mono_error_cleanup (&error);
+       }
+       return type;
+}
+
+
+/**
+ * mono_field_get_type_checked:
+ * @field: the MonoClassField to act on
+ * @error: used to return any erro found while retrieving @field type
+ *
+ * Returns: MonoType of the field.
+ */
+MonoType*
+mono_field_get_type_checked (MonoClassField *field, MonoError *error)
+{
+       mono_error_init (error);
+       if (!field->type)
+               mono_field_resolve_type (field, error);
        return field->type;
 }
 
@@ -8143,6 +8205,8 @@ mono_field_get_parent (MonoClassField *field)
 guint32
 mono_field_get_flags (MonoClassField *field)
 {
+       if (!field->type)
+               return mono_field_resolve_flags (field);
        return field->type->attrs;
 }
 
@@ -9156,3 +9220,144 @@ mono_class_setup_interfaces (MonoClass *klass, MonoError *error)
 
        mono_loader_unlock ();
 }
+
+static void
+mono_field_resolve_type (MonoClassField *field, MonoError *error)
+{
+       MonoClass *class = field->parent;
+       MonoImage *image = class->image;
+       MonoClass *gtd = class->generic_class ? mono_class_get_generic_type_definition (class) : NULL;
+       int field_idx = field - class->fields;
+
+       mono_error_init (error);
+
+       if (gtd) {
+               MonoClassField *gfield = &gtd->fields [field_idx];
+               MonoType *gtype = mono_field_get_type_checked (gfield, error);
+               if (!mono_error_ok (error)) {
+                       char *err_msg = g_strdup_printf ("Could not load field %d type due to: %s", field_idx, mono_error_get_message (error));
+                       mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, err_msg);
+                       g_free (err_msg);
+               }
+
+               field->type = mono_class_inflate_generic_type_no_copy (image, gtype, mono_class_get_context (class), error);
+               if (!mono_error_ok (error)) {
+                       char *err_msg = g_strdup_printf ("Could not load field %d type due to: %s", field_idx, mono_error_get_message (error));
+                       mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, err_msg);
+                       g_free (err_msg);
+               }
+       } else {
+               const char *sig;
+               guint32 cols [MONO_FIELD_SIZE];
+               MonoGenericContainer *container = NULL;
+               int idx = class->field.first + field_idx;
+
+               /*FIXME, in theory we do not lazy load SRE fields*/
+               g_assert (!image->dynamic);
+
+               if (class->generic_container) {
+                       container = class->generic_container;
+               } else if (gtd) {
+                       container = gtd->generic_container;
+                       g_assert (container);
+               }
+
+               /* class->field.first and idx points into the fieldptr table */
+               mono_metadata_decode_table_row (image, MONO_TABLE_FIELD, idx, cols, MONO_FIELD_SIZE);
+
+               if (!mono_verifier_verify_field_signature (image, cols [MONO_FIELD_SIGNATURE], NULL)) {
+                       mono_error_set_type_load_class (error, class, "Could not verify field %s signature", field->name);
+                       mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, NULL);
+                       return;
+               }
+
+               sig = mono_metadata_blob_heap (image, cols [MONO_FIELD_SIGNATURE]);
+
+               mono_metadata_decode_value (sig, &sig);
+               /* FIELD signature == 0x06 */
+               g_assert (*sig == 0x06);
+               field->type = mono_metadata_parse_type_full (image, container, MONO_PARSE_FIELD, cols [MONO_FIELD_FLAGS], sig + 1, &sig);
+               if (!field->type) {
+                       mono_error_set_type_load_class (error, class, "Could not load field %s type", field->name);
+                       mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, NULL);
+                       mono_loader_clear_error ();
+               }
+       }
+}
+
+static guint32
+mono_field_resolve_flags (MonoClassField *field)
+{
+       MonoClass *class = field->parent;
+       MonoImage *image = class->image;
+       MonoClass *gtd = class->generic_class ? mono_class_get_generic_type_definition (class) : NULL;
+       int field_idx = field - class->fields;
+
+
+       if (gtd) {
+               MonoClassField *gfield = &gtd->fields [field_idx];
+               return mono_field_get_flags (gfield);
+       } else {
+               int idx = class->field.first + field_idx;
+
+               /*FIXME, in theory we do not lazy load SRE fields*/
+               g_assert (!image->dynamic);
+
+               return mono_metadata_decode_table_row_col (image, MONO_TABLE_FIELD, idx, MONO_FIELD_FLAGS);
+       }
+}
+
+/**
+ * mono_class_setup_basic_field_info:
+ * @class: The class to initialize
+ *
+ * Initializes the class->fields array of fields.
+ * Aquires the loader lock.
+ */
+static void
+mono_class_setup_basic_field_info_locking (MonoClass *class)
+{
+       mono_loader_lock ();
+       mono_class_setup_basic_field_info (class);
+       mono_loader_unlock ();
+}
+
+/**
+ * mono_class_get_fields_lazy:
+ * @klass: the MonoClass to act on
+ *
+ * This routine is an iterator routine for retrieving the fields in a class.
+ * Only minimal information about fields are loaded. Accessors must be used
+ * for all MonoClassField returned.
+ *
+ * You must pass a gpointer that points to zero and is treated as an opaque handle to
+ * iterate over all of the elements.  When no more values are
+ * available, the return value is NULL.
+ *
+ * Returns: a @MonoClassField* on each iteration, or NULL when no more fields are available.
+ */
+MonoClassField*
+mono_class_get_fields_lazy (MonoClass* klass, gpointer *iter)
+{
+       MonoClassField* field;
+       if (!iter)
+               return NULL;
+       if (!*iter) {
+               mono_class_setup_basic_field_info_locking (klass);
+               if (!klass->fields)
+                       return NULL;
+               /* start from the first */
+               if (klass->field.count) {
+                       return *iter = &klass->fields [0];
+               } else {
+                       /* no fields */
+                       return NULL;
+               }
+       }
+       field = *iter;
+       field++;
+       if (field < &klass->fields [klass->field.count]) {
+               return *iter = field;
+       }
+       return NULL;
+}
index 0808baabc2d15bfcc425cb593a5eff22e1397b87..773833deabcd73f42783b41ca20c0ea5e4fffdfc 100644 (file)
@@ -6,6 +6,9 @@
  *
  * Copyright (C) 2005-2009 Novell, Inc. (http://www.novell.com)
  */
+#if defined(__native_client__)
+#include "console-null.c"
+#else
 
 #include <config.h>
 #include <glib.h>
@@ -485,3 +488,5 @@ ves_icall_System_ConsoleDriver_TtySetup (MonoString *keypad, MonoString *teardow
 
        return TRUE;
 }
+#endif /* #if defined(__native_client__) */
+
index 10a4cc6a892b48547df5ac355910fdbd333774ec..415a29c6bddf8edd97a96dd3070112b6e9724f9f 100644 (file)
@@ -231,6 +231,8 @@ struct _MonoDomain {
        MonoObject         *typeof_void;
        /* Ephemeron Tombstone*/
        MonoObject         *ephemeron_tombstone;
+       /* new MonoType [0] */
+       MonoArray          *empty_types;
        /* 
         * The fields between FIRST_GC_TRACKED and LAST_GC_TRACKED are roots, but
         * not object references.
@@ -280,12 +282,13 @@ struct _MonoDomain {
         * if the hashtable contains a GC visible reference to them.
         */
        GHashTable         *finalizable_objects_hash;
-#ifndef HAVE_SGEN_GC
+
+       /* These two are boehm only */
        /* Maps MonoObjects to a GSList of WeakTrackResurrection GCHandles pointing to them */
        GHashTable         *track_resurrection_objects_hash;
        /* Maps WeakTrackResurrection GCHandles to the MonoObjects they point to */
        GHashTable         *track_resurrection_handles_hash;
-#endif
+
        /* Protects the three hashes above */
        CRITICAL_SECTION   finalizable_objects_hash_lock;
        /* Used when accessing 'domain_assemblies' */
index e161c325f1c8eb48a6be66d59f5f27dcc9116b1d..f791cb1a9eabd9be7ec6bb84518467e16f157f4a 100644 (file)
@@ -1181,15 +1181,24 @@ mono_domain_create (void)
        }
        mono_appdomains_unlock ();
 
+#ifdef HAVE_BOEHM_GC
+       /*
+        * Boehm doesn't like roots inside GC allocated objects, and alloc_fixed returns
+        * a GC_MALLOC-ed object, contrary to the api docs. This causes random crashes when
+        * running the corlib test suite.
+        * To solve this, we pass a NULL descriptor, and don't register roots.
+        */
+       domain = mono_gc_alloc_fixed (sizeof (MonoDomain), NULL);
+#else
        domain = mono_gc_alloc_fixed (sizeof (MonoDomain), domain_gc_desc);
+       mono_gc_register_root ((char*)&(domain->MONO_DOMAIN_FIRST_GC_TRACKED), G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_LAST_GC_TRACKED) - G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_FIRST_GC_TRACKED), NULL);
+#endif
        domain->shadow_serial = shadow_serial;
        domain->domain = NULL;
        domain->setup = NULL;
        domain->friendly_name = NULL;
        domain->search_path = NULL;
 
-       mono_gc_register_root ((char*)&(domain->MONO_DOMAIN_FIRST_GC_TRACKED), G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_LAST_GC_TRACKED) - G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_FIRST_GC_TRACKED), NULL);
-
        mono_profiler_appdomain_event (domain, MONO_PROFILE_START_LOAD);
 
        domain->mp = mono_mempool_new ();
@@ -1730,6 +1739,9 @@ mono_cleanup (void)
 {
        mono_close_exe_image ();
 
+       mono_defaults.corlib = NULL;
+
+       mono_config_cleanup ();
        mono_loader_cleanup ();
        mono_classes_cleanup ();
        mono_assemblies_cleanup ();
@@ -1739,6 +1751,14 @@ mono_cleanup (void)
 
        TlsFree (appdomain_thread_id);
        DeleteCriticalSection (&appdomains_mutex);
+
+       /*
+        * This should be called last as TlsGetValue ()/TlsSetValue () can be called during
+        * shutdown.
+        */
+#ifndef HOST_WIN32
+       _wapi_cleanup ();
+#endif
 }
 
 void
index 8df916e3c8e47804d353fd8fd2de955b8afd37bd..3ac6ecc7727a8ca85c8f6c8f6be0bdad43d8fd93 100644 (file)
@@ -158,6 +158,7 @@ void  mono_gc_finalize_threadpool_threads (void) MONO_INTERNAL;
 
 /* Accessible using mono_marshal_wrapper_info_from_wrapper () */
 typedef struct {
+       const char *gc_name;
        int alloc_type;
 } AllocatorWrapperInfo;
 
@@ -167,6 +168,9 @@ MonoMethod *mono_gc_get_managed_allocator_by_type (int atype) MONO_INTERNAL;
 
 guint32 mono_gc_get_managed_allocator_types (void) MONO_INTERNAL;
 
+/* Return a short string identifying the GC, indented to be saved in AOT images */
+const char *mono_gc_get_gc_name (void) MONO_INTERNAL;
+
 /* Fast write barriers */
 MonoMethod* mono_gc_get_write_barrier (void) MONO_INTERNAL;
 
@@ -245,6 +249,10 @@ void* mono_gc_invoke_with_gc_lock (MonoGCLockedCallbackFunc func, void *data) MO
 
 #ifdef HAVE_SGEN_GC
 int mono_gc_get_los_limit (void) MONO_INTERNAL;
+
+guint8* mono_gc_get_card_table (int *shift_bits, gpointer *card_mask) MONO_INTERNAL;
+
+void* mono_gc_get_nursery (int *shift_bits, size_t *size) MONO_INTERNAL;
 #endif
 
 /*
index d30c72a48aa980b464a0ccfd0d521ba7b4652a51..9ff14881dd9e3c461964316d96b6c36897b946eb 100644 (file)
@@ -125,7 +125,8 @@ ICALL(DEFAULTC_2, "get_machine_config_path", ves_icall_System_Configuration_Defa
 
 /* Note that the below icall shares the same function as DefaultConfig uses */
 ICALL_TYPE(INTCFGHOST, "System.Configuration.InternalConfigurationHost", INTCFGHOST_1)
-ICALL(INTCFGHOST_1, "get_bundled_machine_config", get_bundled_machine_config)
+ICALL(INTCFGHOST_1, "get_bundled_app_config", get_bundled_app_config)
+ICALL(INTCFGHOST_2, "get_bundled_machine_config", get_bundled_machine_config)
 
 ICALL_TYPE(CONSOLE, "System.ConsoleDriver", CONSOLE_1)
 ICALL(CONSOLE_1, "InternalKeyAvailable", ves_icall_System_ConsoleDriver_InternalKeyAvailable )
@@ -505,6 +506,9 @@ ICALL(ASSEM_26, "load_with_partial_name", ves_icall_System_Reflection_Assembly_l
 ICALL_TYPE(ASSEMN, "System.Reflection.AssemblyName", ASSEMN_1)
 ICALL(ASSEMN_1, "ParseName", ves_icall_System_Reflection_AssemblyName_ParseName)
 
+ICALL_TYPE(CATTR_DATA, "System.Reflection.CustomAttributeData", CATTR_DATA_1)
+ICALL(CATTR_DATA_1, "ResolveArgumentsInternal", mono_reflection_resolve_custom_attribute_data)
+
 ICALL_TYPE(ASSEMB, "System.Reflection.Emit.AssemblyBuilder", ASSEMB_1)
 ICALL(ASSEMB_1, "InternalAddModule", mono_image_load_module_dynamic)
 ICALL(ASSEMB_2, "basic_init", mono_image_basic_init)
@@ -596,6 +600,7 @@ ICALL(MFIELD_1, "GetFieldOffset", ves_icall_MonoField_GetFieldOffset)
 ICALL(MFIELD_2, "GetParentType", ves_icall_MonoField_GetParentType)
 ICALL(MFIELD_5, "GetRawConstantValue", ves_icall_MonoField_GetRawConstantValue)
 ICALL(MFIELD_3, "GetValueInternal", ves_icall_MonoField_GetValueInternal)
+ICALL(MFIELD_6, "ResolveType", ves_icall_MonoField_ResolveType)
 ICALL(MFIELD_4, "SetValueInternal", ves_icall_MonoField_SetValueInternal)
 
 ICALL_TYPE(MGENCM, "System.Reflection.MonoGenericCMethod", MGENCM_1)
index 07e25281a4071ffa27c07e0acb46dd6cf928b7d0..ab790a3151b8fa82f65806f4d8cb6e8d09387ba5 100644 (file)
@@ -119,14 +119,10 @@ mono_double_ParseImpl (char *ptr, double *result)
                *result = strtod (ptr, &endptr);
 #else
        if (*ptr){
-#ifdef _EGLIB_MAJOR
-               /* Need to lock here because EGLIB (#464316) has locking defined as no-ops, and that breaks mono_strtod */
+               /* mono_strtod () is not thread-safe */
                EnterCriticalSection (&mono_strtod_mutex);
                *result = mono_strtod (ptr, &endptr);
                LeaveCriticalSection (&mono_strtod_mutex);
-#else
-               *result = mono_strtod (ptr, &endptr);
-#endif
        }
 #endif
 
@@ -1690,7 +1686,10 @@ ves_icall_System_Reflection_FieldInfo_internal_from_handle_type (MonoClassField
 static MonoArray*
 ves_icall_System_Reflection_FieldInfo_GetTypeModifiers (MonoReflectionField *field, MonoBoolean optional)
 {
-       MonoType *type = field->field->type;
+       MonoError error;
+       MonoType *type = mono_field_get_type_checked (field->field, &error);
+       if (!mono_error_ok (&error))
+               mono_error_raise_exception (&error);
 
        return type_array_from_modifiers (field->field->parent->image, type, optional);
 }
@@ -1756,6 +1755,10 @@ ves_icall_System_MonoMethodInfo_get_retval_marshal (MonoMethod *method)
 static gint32
 ves_icall_MonoField_GetFieldOffset (MonoReflectionField *field)
 {
+       MonoClass *parent = field->field->parent;
+       if (!parent->size_inited)
+               mono_class_init (parent);
+
        return field->field->offset - sizeof (MonoObject);
 }
 
@@ -1935,6 +1938,17 @@ ves_icall_MonoField_GetRawConstantValue (MonoReflectionField *this)
        return o;
 }
 
+static MonoReflectionType*
+ves_icall_MonoField_ResolveType (MonoReflectionField *ref_field)
+{
+       MonoError error;
+       MonoClassField *field = ref_field->field;
+       MonoType *type = mono_field_get_type_checked (field, &error);
+       if (!mono_error_ok (&error))
+               mono_error_raise_exception (&error);
+       return mono_type_get_object (mono_object_domain (ref_field), type);
+}
+
 static MonoReflectionType*
 ves_icall_MonoGenericMethod_get_ReflectedType (MonoReflectionGenericMethod *rmethod)
 {
@@ -1962,8 +1976,8 @@ ves_icall_get_property_info (MonoReflectionProperty *property, MonoPropertyInfo
 
        if ((req_info & PInfo_ReflectedType) != 0)
                MONO_STRUCT_SETREF (info, parent, mono_type_get_object (domain, &property->klass->byval_arg));
-       else if ((req_info & PInfo_DeclaringType) != 0)
-               MONO_STRUCT_SETREF (info, parent, mono_type_get_object (domain, &property->property->parent->byval_arg));
+       if ((req_info & PInfo_DeclaringType) != 0)
+               MONO_STRUCT_SETREF (info, declaring_type, mono_type_get_object (domain, &property->property->parent->byval_arg));
 
        if ((req_info & PInfo_Name) != 0)
                MONO_STRUCT_SETREF (info, name, mono_string_new (domain, property->property->name));
@@ -2092,8 +2106,12 @@ ves_icall_Type_GetInterfaces (MonoReflectionType* type)
        data.domain = mono_object_domain (type);
 
        len = g_hash_table_size (iface_hash);
-       if (len == 0)
-               return mono_array_new_cached (data.domain, mono_defaults.monotype_class, 0);
+       if (len == 0) {
+               g_hash_table_destroy (iface_hash);
+               if (!data.domain->empty_types)
+                       data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.monotype_class, 0);
+               return data.domain->empty_types;
+       }
 
        data.iface_array = mono_array_new_cached (data.domain, mono_defaults.monotype_class, len);
        g_hash_table_foreach (iface_hash, fill_iface_array, &data);
@@ -2230,8 +2248,6 @@ static MonoReflectionModule*
 ves_icall_MonoType_get_Module (MonoReflectionType *type)
 {
        MonoClass *class = mono_class_from_mono_type (type->type);
-       mono_class_init_or_throw (class);
-
        return mono_module_get_object (mono_object_domain (type), class->image);
 }
 
@@ -2240,9 +2256,6 @@ ves_icall_MonoType_get_Assembly (MonoReflectionType *type)
 {
        MonoDomain *domain = mono_domain_get (); 
        MonoClass *class = mono_class_from_mono_type (type->type);
-
-       mono_class_init_or_throw (class);
-
        return mono_assembly_get_object (domain, class->image->assembly);
 }
 
@@ -3336,24 +3349,24 @@ ves_icall_Type_GetFields_internal (MonoReflectionType *type, guint32 bflags, Mon
        klass = startklass = mono_class_from_mono_type (type->type);
        refklass = mono_class_from_mono_type (reftype->type);
 
-       mono_class_init_or_throw (klass);
-       mono_class_init_or_throw (refklass);
-
        mono_ptr_array_init (tmp_array, 2);
        
 handle_parent: 
-       if (klass->exception_type != MONO_EXCEPTION_NONE)
+       if (klass->exception_type != MONO_EXCEPTION_NONE) {
+               mono_ptr_array_destroy (tmp_array);
                mono_raise_exception (mono_class_get_exception_for_failure (klass));
+       }
 
        iter = NULL;
-       while ((field = mono_class_get_fields (klass, &iter))) {
+       while ((field = mono_class_get_fields_lazy (klass, &iter))) {
+               guint32 flags = mono_field_get_flags (field);
                match = 0;
-               if (mono_field_is_deleted (field))
+               if (mono_field_is_deleted_with_flags (field, flags))
                        continue;
-               if ((field->type->attrs & FIELD_ATTRIBUTE_FIELD_ACCESS_MASK) == FIELD_ATTRIBUTE_PUBLIC) {
+               if ((flags & FIELD_ATTRIBUTE_FIELD_ACCESS_MASK) == FIELD_ATTRIBUTE_PUBLIC) {
                        if (bflags & BFLAGS_Public)
                                match++;
-               } else if ((klass == startklass) || (field->type->attrs & FIELD_ATTRIBUTE_FIELD_ACCESS_MASK) != FIELD_ATTRIBUTE_PRIVATE) {
+               } else if ((klass == startklass) || (flags & FIELD_ATTRIBUTE_FIELD_ACCESS_MASK) != FIELD_ATTRIBUTE_PRIVATE) {
                        if (bflags & BFLAGS_NonPublic) {
                                match++;
                        }
@@ -3361,7 +3374,7 @@ handle_parent:
                if (!match)
                        continue;
                match = 0;
-               if (field->type->attrs & FIELD_ATTRIBUTE_STATIC) {
+               if (flags & FIELD_ATTRIBUTE_STATIC) {
                        if (bflags & BFLAGS_Static)
                                if ((bflags & BFLAGS_FlattenHierarchy) || (klass == startklass))
                                        match++;
@@ -3438,9 +3451,6 @@ ves_icall_Type_GetMethodsByName (MonoReflectionType *type, MonoString *name, gui
        klass = startklass = mono_class_from_mono_type (type->type);
        refklass = mono_class_from_mono_type (reftype->type);
 
-       mono_class_init_or_throw (klass);
-       mono_class_init_or_throw (refklass);
-
        len = 0;
        if (name != NULL) {
                mname = mono_string_to_utf8 (name);
@@ -3578,12 +3588,6 @@ ves_icall_Type_GetConstructors_internal (MonoReflectionType *type, guint32 bflag
        klass = startklass = mono_class_from_mono_type (type->type);
        refklass = mono_class_from_mono_type (reftype->type);
 
-       mono_class_init_or_throw (klass);
-       mono_class_init_or_throw (refklass);
-
-       if (klass->exception_type != MONO_EXCEPTION_NONE)
-               mono_raise_exception (mono_class_get_exception_for_failure (klass));
-
        if (!System_Reflection_ConstructorInfo)
                System_Reflection_ConstructorInfo = mono_class_from_name (
                        mono_defaults.corlib, "System.Reflection", "ConstructorInfo");
@@ -3663,6 +3667,7 @@ property_accessor_nonpublic (MonoMethod* accessor, gboolean start_klass)
 static MonoArray*
 ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
 {
+       MonoException *ex;
        MonoDomain *domain; 
        static MonoClass *System_Reflection_PropertyInfo;
        MonoClass *startklass, *klass;
@@ -3674,7 +3679,7 @@ ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name,
        gchar *propname = NULL;
        int (*compare_func) (const char *s1, const char *s2) = NULL;
        gpointer iter;
-       GHashTable *properties;
+       GHashTable *properties = NULL;
        MonoPtrArray tmp_array;
 
        MONO_ARCH_SAVE_REGS;
@@ -3689,26 +3694,17 @@ ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name,
        if (type->type->byref)
                return mono_array_new_cached (domain, System_Reflection_PropertyInfo, 0);
        klass = startklass = mono_class_from_mono_type (type->type);
-       mono_class_init_or_throw (klass);
-
-
 
        if (name != NULL) {
                propname = mono_string_to_utf8 (name);
                compare_func = (ignore_case) ? mono_utf8_strcasecmp : strcmp;
        }
 
-       mono_class_setup_vtable (klass);
-
        properties = g_hash_table_new (property_hash, (GEqualFunc)property_equal);
 handle_parent:
        mono_class_setup_vtable (klass);
-       if (klass->exception_type != MONO_EXCEPTION_NONE) {
-               g_hash_table_destroy (properties);
-               if (name != NULL)
-                       g_free (propname);
-               mono_raise_exception (mono_class_get_exception_for_failure (klass));
-       }
+       if (klass->exception_type != MONO_EXCEPTION_NONE || mono_loader_get_last_error ())
+               goto loader_error;
 
        iter = NULL;
        while ((prop = mono_class_get_properties (klass, &iter))) {
@@ -3771,6 +3767,22 @@ handle_parent:
        mono_ptr_array_destroy (tmp_array);
 
        return res;
+
+loader_error:
+       if (properties)
+               g_hash_table_destroy (properties);
+       if (name)
+               g_free (propname);
+       mono_ptr_array_destroy (tmp_array);
+
+       if (klass->exception_type != MONO_EXCEPTION_NONE) {
+               ex = mono_class_get_exception_for_failure (klass);
+       } else {
+               ex = mono_loader_error_prepare_exception (mono_loader_get_last_error ());
+               mono_loader_clear_error ();
+       }
+       mono_raise_exception (ex);
+       return NULL;
 }
 
 static MonoReflectionEvent *
@@ -3847,6 +3859,7 @@ handle_parent:
 static MonoArray*
 ves_icall_Type_GetEvents_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
 {
+       MonoException *ex;
        MonoDomain *domain; 
        static MonoClass *System_Reflection_EventInfo;
        MonoClass *startklass, *klass;
@@ -3870,12 +3883,11 @@ ves_icall_Type_GetEvents_internal (MonoReflectionType *type, guint32 bflags, Mon
        if (type->type->byref)
                return mono_array_new_cached (domain, System_Reflection_EventInfo, 0);
        klass = startklass = mono_class_from_mono_type (type->type);
-       mono_class_init_or_throw (klass);
 
-
-handle_parent: 
-       if (klass->exception_type != MONO_EXCEPTION_NONE)
-               mono_raise_exception (mono_class_get_exception_for_failure (klass));
+handle_parent:
+       mono_class_setup_vtable (klass);
+       if (klass->exception_type != MONO_EXCEPTION_NONE || mono_loader_get_last_error ())
+               goto loader_error;
 
        iter = NULL;
        while ((event = mono_class_get_events (klass, &iter))) {
@@ -3928,6 +3940,17 @@ handle_parent:
        mono_ptr_array_destroy (tmp_array);
 
        return res;
+
+loader_error:
+       mono_ptr_array_destroy (tmp_array);
+       if (klass->exception_type != MONO_EXCEPTION_NONE) {
+               ex = mono_class_get_exception_for_failure (klass);
+       } else {
+               ex = mono_loader_error_prepare_exception (mono_loader_get_last_error ());
+               mono_loader_clear_error ();
+       }
+       mono_raise_exception (ex);
+       return NULL;
 }
 
 static MonoReflectionType *
@@ -3948,7 +3971,6 @@ ves_icall_Type_GetNestedType (MonoReflectionType *type, MonoString *name, guint3
        if (type->type->byref)
                return NULL;
        klass = mono_class_from_mono_type (type->type);
-       mono_class_init_or_throw (klass);
 
        str = mono_string_to_utf8 (name);
 
@@ -4009,7 +4031,6 @@ ves_icall_Type_GetNestedTypes (MonoReflectionType *type, guint32 bflags)
        if (type->type->byref)
                return mono_array_new (domain, mono_defaults.monotype_class, 0);
        klass = mono_class_from_mono_type (type->type);
-       mono_class_init_or_throw (klass);
 
        /*
         * If a nested type is generic, return its generic type definition.
@@ -4136,6 +4157,10 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssembly *as
                        mono_raise_exception (e);
 
                return NULL;
+       } else if (mono_loader_get_last_error ()) {
+               if (throwOnError)
+                       mono_raise_exception (mono_loader_error_prepare_exception (mono_loader_get_last_error ()));
+               mono_loader_clear_error ();
        }
 
        if (type->type == MONO_TYPE_CLASS) {
@@ -6497,7 +6522,7 @@ ves_icall_System_Environment_GetWindowsFolderPath (int folder)
 static MonoArray *
 ves_icall_System_Environment_GetLogicalDrives (void)
 {
-        gunichar2 buf [128], *ptr, *dname;
+        gunichar2 buf [256], *ptr, *dname;
        gunichar2 *u16;
        guint initial_size = 127, size = 128;
        gint ndrives;
@@ -6846,6 +6871,40 @@ ves_icall_System_Configuration_DefaultConfig_get_machine_config_path (void)
        return mcpath;
 }
 
+static MonoString *
+get_bundled_app_config (void)
+{
+       const gchar *app_config;
+       MonoDomain *domain;
+       MonoString *file;
+       gchar *config_file;
+       gsize len;
+       gchar *module;
+
+       MONO_ARCH_SAVE_REGS;
+
+       domain = mono_domain_get ();
+       file = domain->setup->configuration_file;
+       if (!file)
+               return NULL;
+
+       // Retrieve config file and remove the extension
+       config_file = mono_string_to_utf8 (file);
+       len = strlen (config_file) - strlen (".config");
+       module = g_malloc0 (len + 1);
+       memcpy (module, config_file, len);
+       // Get the config file from the module name
+       app_config = mono_config_string_for_assembly_file (module);
+       // Clean-up
+       g_free (module);
+       g_free (config_file);
+
+       if (!app_config)
+               return NULL;
+
+       return mono_string_new (mono_domain_get (), app_config);
+}
+
 static MonoString *
 get_bundled_machine_config (void)
 {
index f054be8acca0621cc168f399aeefa6e1468d354a..c6f9ca5a79e8844a3c17d36aa2621c8d4f2187ac 100644 (file)
@@ -60,12 +60,11 @@ static CRITICAL_SECTION images_mutex;
 
 typedef struct ImageUnloadHook ImageUnloadHook;
 struct ImageUnloadHook {
-       ImageUnloadHook *next;
        MonoImageUnloadFunc func;
        gpointer user_data;
 };
 
-ImageUnloadHook *image_unload_hook = NULL;
+GSList *image_unload_hooks;
 
 void
 mono_install_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data)
@@ -77,16 +76,35 @@ mono_install_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data)
        hook = g_new0 (ImageUnloadHook, 1);
        hook->func = func;
        hook->user_data = user_data;
-       hook->next = image_unload_hook;
-       image_unload_hook = hook;
+       image_unload_hooks = g_slist_prepend (image_unload_hooks, hook);
+}
+
+void
+mono_remove_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data)
+{
+       GSList *l;
+       ImageUnloadHook *hook;
+
+       for (l = image_unload_hooks; l; l = l->next) {
+               hook = l->data;
+
+               if (hook->func == func && hook->user_data == user_data) {
+                       g_free (hook);
+                       image_unload_hooks = g_slist_delete_link (image_unload_hooks, l);
+                       break;
+               }
+       }
 }
 
 static void
 mono_image_invoke_unload_hook (MonoImage *image)
 {
+       GSList *l;
        ImageUnloadHook *hook;
 
-       for (hook = image_unload_hook; hook; hook = hook->next) {
+       for (l = image_unload_hooks; l; l = l->next) {
+               hook = l->data;
+
                hook->func (image, hook->user_data);
        }
 }
@@ -1510,7 +1528,7 @@ mono_image_close_except_pools (MonoImage *image)
                int i;
 
                for (i = 0; i < t->rows; i++) {
-                       if (image->references [i]) {
+                       if (image->references [i] && image->references [i] != REFERENCE_MISSING) {
                                if (!mono_assembly_close_except_image_pools (image->references [i]))
                                        image->references [i] = NULL;
                        }
@@ -1674,7 +1692,7 @@ mono_image_close_finish (MonoImage *image)
                int i;
 
                for (i = 0; i < t->rows; i++) {
-                       if (image->references [i])
+                       if (image->references [i] && image->references [i] != REFERENCE_MISSING)
                                mono_assembly_close_finish (image->references [i]);
                }
 
index 625071a0dbcf98655e3f94de6fb2f328861916bc..4e9a1520805d7b1fc99297083d85d62e953da9f8 100644 (file)
@@ -71,6 +71,8 @@ guint32 loader_error_thread_id;
  */
 guint32 loader_lock_nest_id;
 
+static void dllmap_cleanup (void);
+
 void
 mono_loader_init ()
 {
@@ -95,11 +97,13 @@ mono_loader_init ()
 void
 mono_loader_cleanup (void)
 {
+       dllmap_cleanup ();
+
        TlsFree (loader_error_thread_id);
        TlsFree (loader_lock_nest_id);
 
        DeleteCriticalSection (&loader_mutex);
-       loader_lock_inited = FALSE;
+       loader_lock_inited = FALSE;     
 }
 
 /*
@@ -1189,6 +1193,28 @@ mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, cons
        mono_loader_unlock ();
 }
 
+static void
+free_dllmap (MonoDllMap *map)
+{
+       while (map) {
+               MonoDllMap *next = map->next;
+
+               g_free (map->dll);
+               g_free (map->target);
+               g_free (map->func);
+               g_free (map->target_func);
+               g_free (map);
+               map = next;
+       }
+}
+
+static void
+dllmap_cleanup (void)
+{
+       free_dllmap (global_dll_map);
+       global_dll_map = NULL;
+}
+
 static GHashTable *global_module_map;
 
 static MonoDl*
@@ -1378,6 +1404,16 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
                return NULL;
        }
 
+#ifdef TARGET_WIN32
+       if (import && import [0] == '#' && isdigit (import [1])) {
+               char *end;
+               long id;
+
+               id = strtol (import + 1, &end, 10);
+               if (id > 0 && *end == '\0')
+                       import++;
+       }
+#endif
        mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
                                "Searching for '%s'.", import);
 
@@ -2188,9 +2224,8 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
        if (!signature) {
                const char *sig_body;
                /*TODO we should cache the failure result somewhere*/
-               if (!mono_verifier_verify_method_signature (img, sig_offset, NULL)) {
+               if (!mono_verifier_verify_method_signature (img, sig_offset, error)) {
                        mono_loader_unlock ();
-                       mono_error_set_method_load (error, m->klass, m->name, "");
                        return NULL;
                }
 
@@ -2278,7 +2313,9 @@ mono_method_signature (MonoMethod *m)
 
        sig = mono_method_signature_checked (m, &error);
        if (!sig) {
-               g_warning ("Could not load signature due to: %s", mono_error_get_message (&error));
+               char *type_name = mono_type_get_full_name (m->klass);
+               g_warning ("Could not load signature of %s:%s due to: %s", type_name, m->name, mono_error_get_message (&error));
+               g_free (type_name);
                mono_error_cleanup (&error);
        }
 
@@ -2327,8 +2364,10 @@ mono_method_get_header (MonoMethod *method)
                }
 
                header = mono_method_get_header (imethod->declaring);
-               if (!header)
+               if (!header) {
+                       mono_loader_unlock ();
                        return NULL;
+               }
 
                imethod->header = inflate_generic_header (header, mono_method_get_context (method));
                mono_loader_unlock ();
@@ -2379,6 +2418,10 @@ mono_method_get_index (MonoMethod *method) {
        MonoClass *klass = method->klass;
        int i;
 
+       if (klass->rank)
+               /* constructed array methods are not in the MethodDef table */
+               return 0;
+
        if (method->token)
                return mono_metadata_token_index (method->token);
 
index 006a29c8729a09f2d3b235cf70fa1977deaff38b..afec4e588835c4f2f13a556bde22c90f6142b3fc 100644 (file)
@@ -2422,14 +2422,25 @@ MonoMethod *
 mono_marshal_method_from_wrapper (MonoMethod *wrapper)
 {
        gpointer res;
+       int wrapper_type = wrapper->wrapper_type;
 
-       if (wrapper->wrapper_type == MONO_WRAPPER_NONE || wrapper->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
+       if (wrapper_type == MONO_WRAPPER_NONE || wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
                return wrapper;
 
-       res = mono_method_get_wrapper_data (wrapper, 1);
-       if (res == NULL)
-               return wrapper;
-       return res;
+       switch (wrapper_type) {
+       case MONO_WRAPPER_REMOTING_INVOKE:
+       case MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK:
+       case MONO_WRAPPER_XDOMAIN_INVOKE:
+       case MONO_WRAPPER_SYNCHRONIZED:
+       case MONO_WRAPPER_MANAGED_TO_NATIVE:
+       case MONO_WRAPPER_RUNTIME_INVOKE:
+               res = mono_method_get_wrapper_data (wrapper, 1);
+               if (res == NULL)
+                       return wrapper;
+               return res;
+       default:
+               return NULL;
+       }
 }
 
 /*
@@ -3754,6 +3765,7 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
        MonoMethod *target_method = NULL;
        MonoClass *target_class = NULL;
        gboolean callvirt = FALSE;
+       gboolean closed_over_null = FALSE;
 
        /*
         * If the delegate target is null, and the target method is not static, a virtual 
@@ -3780,6 +3792,9 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
                
        sig = mono_signature_no_pinvoke (method);
 
+       if (callvirt)
+               closed_over_null = sig->param_count == mono_method_signature (del->method)->param_count;
+
        if (callvirt) {
                /* We need to cache the signature+method pair */
                mono_marshal_lock ();
@@ -3877,11 +3892,18 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
        mono_mb_patch_branch (mb, pos0);
 
        if (callvirt) {
-               mono_mb_emit_ldarg (mb, 1);
-               mono_mb_emit_op (mb, CEE_CASTCLASS, target_class);
-               for (i = 1; i < sig->param_count; ++i)
-                       mono_mb_emit_ldarg (mb, i + 1);
-               mono_mb_emit_op (mb, CEE_CALLVIRT, target_method);
+               if (!closed_over_null) {
+                       mono_mb_emit_ldarg (mb, 1);
+                       mono_mb_emit_op (mb, CEE_CASTCLASS, target_class);
+                       for (i = 1; i < sig->param_count; ++i)
+                               mono_mb_emit_ldarg (mb, i + 1);
+                       mono_mb_emit_op (mb, CEE_CALLVIRT, target_method);
+               } else {
+                       mono_mb_emit_byte (mb, CEE_LDNULL);
+                       for (i = 0; i < sig->param_count; ++i)
+                               mono_mb_emit_ldarg (mb, i + 1);
+                       mono_mb_emit_op (mb, CEE_CALL, target_method);
+               }
        } else {
                for (i = 0; i < sig->param_count; ++i)
                        mono_mb_emit_ldarg (mb, i + 1);
@@ -4080,158 +4102,26 @@ runtime_invoke_signature_equal (MonoMethodSignature *sig1, MonoMethodSignature *
 }
 
 /*
- * generates IL code for the runtime invoke function 
- * MonoObject *runtime_invoke (MonoObject *this, void **params, MonoObject **exc, void* method)
+ * emit_invoke_call:
  *
- * we also catch exceptions if exc != null
- * If VIRTUAL is TRUE, then METHOD is invoked virtually on THIS. This is useful since
- * it means that the compiled code for METHOD does not have to be looked up 
- * before calling the runtime invoke wrapper. In this case, the wrapper ignores
- * its METHOD argument.
+ *   Emit the call to the wrapper method from a runtime invoke wrapper.
  */
-MonoMethod *
-mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
+static void
+emit_invoke_call (MonoMethodBuilder *mb, MonoMethod *method,
+                                 MonoMethodSignature *sig, MonoMethodSignature *callsig,
+                                 int loc_res,
+                                 gboolean virtual, gboolean need_direct_wrapper)
 {
-       MonoMethodSignature *sig, *csig, *callsig;
-       MonoExceptionClause *clause;
-       MonoMethodBuilder *mb;
-       GHashTable *cache = NULL;
-       MonoClass *target_klass;
-       MonoMethod *res = NULL;
        static MonoString *string_dummy = NULL;
-       static MonoMethodSignature *cctor_signature = NULL;
-       static MonoMethodSignature *finalize_signature = NULL;
-       int i, pos;
-       char *name;
-       gboolean need_direct_wrapper = FALSE;
+       int i;
        int *tmp_nullable_locals;
-
-       g_assert (method);
-
-       if (!cctor_signature) {
-               cctor_signature = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
-               cctor_signature->ret = &mono_defaults.void_class->byval_arg;
-       }
-       if (!finalize_signature) {
-               finalize_signature = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
-               finalize_signature->ret = &mono_defaults.void_class->byval_arg;
-               finalize_signature->hasthis = 1;
-       }
-
-       if (virtual)
-               need_direct_wrapper = TRUE;
-
-       /* 
-        * Use a separate cache indexed by methods to speed things up and to avoid the
-        * boundless mempool growth caused by the signature_dup stuff below.
-        */
-       if (virtual)
-               cache = get_cache (&method->klass->image->runtime_invoke_vcall_cache, mono_aligned_addr_hash, NULL);
-       else
-               cache = get_cache (&method->klass->image->runtime_invoke_direct_cache, mono_aligned_addr_hash, NULL);
-       res = mono_marshal_find_in_cache (cache, method);
-       if (res)
-               return res;
-               
-       if (method->klass->rank && (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) &&
-               (method->iflags & METHOD_IMPL_ATTRIBUTE_NATIVE)) {
-               /* 
-                * Array Get/Set/Address methods. The JIT implements them using inline code
-                * so we need to create an invoke wrapper which calls the method directly.
-                */
-               need_direct_wrapper = TRUE;
-       }
-               
-       if (method->string_ctor) {
-               callsig = lookup_string_ctor_signature (mono_method_signature (method));
-               if (!callsig)
-                       callsig = add_string_ctor_signature (method);
-               /* Can't share this as we push a string as this */
-               need_direct_wrapper = TRUE;
-       } else {
-               if (method->klass->valuetype && mono_method_signature (method)->hasthis) {
-                       /* 
-                        * Valuetype methods receive a managed pointer as the this argument.
-                        * Create a new signature to reflect this.
-                        */
-                       callsig = signature_dup_add_this (mono_method_signature (method), method->klass);
-                       /* Can't share this as it would be shared with static methods taking an IntPtr argument */
-                       need_direct_wrapper = TRUE;
-               } else {
-                       if (method->dynamic)
-                               callsig = signature_dup (method->klass->image, mono_method_signature (method));
-                       else
-                               callsig = mono_method_signature (method);
-               }
-       }
-
-       target_klass = get_wrapper_target_class (method->klass->image);
-
-       /* Try to share wrappers for non-corlib methods with simple signatures */
-       if (mono_metadata_signature_equal (callsig, cctor_signature)) {
-               callsig = cctor_signature;
-               target_klass = mono_defaults.object_class;
-       } else if (mono_metadata_signature_equal (callsig, finalize_signature)) {
-               callsig = finalize_signature;
-               target_klass = mono_defaults.object_class;
-       }
-
-       if (need_direct_wrapper) {
-               /* Already searched at the start */
-       } else {
-               MonoMethodSignature *tmp_sig;
-
-               callsig = mono_marshal_get_runtime_invoke_sig (callsig);
-
-               cache = get_cache (&target_klass->image->runtime_invoke_cache, 
-                                                  (GHashFunc)mono_signature_hash, 
-                                                  (GCompareFunc)runtime_invoke_signature_equal);
-
-               /* from mono_marshal_find_in_cache */
-               mono_marshal_lock ();
-               res = g_hash_table_lookup (cache, callsig);
-               mono_marshal_unlock ();
-
-               if (res) {
-                       g_free (callsig);
-                       return res;
-               }
-
-               /* Make a copy of the signature from the image mempool */
-               tmp_sig = callsig;
-               callsig = mono_metadata_signature_dup_full (target_klass->image, callsig);
-               g_free (tmp_sig);
-       }
+       gboolean void_ret = FALSE;
 
        /* to make it work with our special string constructors */
        if (!string_dummy) {
                MONO_GC_REGISTER_ROOT (string_dummy);
                string_dummy = mono_string_new_wrapper ("dummy");
        }
-       
-       sig = mono_method_signature (method);
-
-       csig = mono_metadata_signature_alloc (target_klass->image, 4);
-
-       csig->ret = &mono_defaults.object_class->byval_arg;
-       if (method->klass->valuetype && mono_method_signature (method)->hasthis)
-               csig->params [0] = callsig->params [0];
-       else
-               csig->params [0] = &mono_defaults.object_class->byval_arg;
-       csig->params [1] = &mono_defaults.int_class->byval_arg;
-       csig->params [2] = &mono_defaults.int_class->byval_arg;
-       csig->params [3] = &mono_defaults.int_class->byval_arg;
-
-       name = mono_signature_to_name (callsig, virtual ? "runtime_invoke_virtual" : "runtime_invoke");
-       mb = mono_mb_new (target_klass, name,  MONO_WRAPPER_RUNTIME_INVOKE);
-       g_free (name);
-
-       /* allocate local 0 (object) tmp */
-       mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
-       /* allocate local 1 (object) exc */
-       mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
-
-       emit_thread_force_interrupt_checkpoint (mb);
 
        if (virtual) {
                g_assert (sig->hasthis);
@@ -4325,7 +4215,7 @@ handle_enum:
                        break;
                default:
                        g_assert_not_reached ();
-               }               
+               }
        }
        
        if (virtual) {
@@ -4345,7 +4235,7 @@ handle_enum:
        switch (sig->ret->type) {
        case MONO_TYPE_VOID:
                if (!method->string_ctor)
-                       mono_mb_emit_byte (mb, CEE_LDNULL);
+                       void_ret = TRUE;
                break;
        case MONO_TYPE_BOOLEAN:
        case MONO_TYPE_CHAR:
@@ -4382,7 +4272,8 @@ handle_enum:
                g_assert_not_reached ();
        }
 
-       mono_mb_emit_stloc (mb, 0);
+       if (!void_ret)
+               mono_mb_emit_stloc (mb, loc_res);
 
        /* Convert back nullable-byref arguments */
        for (i = 0; i < sig->param_count; i++) {
@@ -4403,49 +4294,226 @@ handle_enum:
                        mono_mb_emit_byte (mb, CEE_STIND_REF);
                }
        }
-                       
-       pos = mono_mb_emit_branch (mb, CEE_LEAVE);
 
-       clause = mono_image_alloc0 (target_klass->image, sizeof (MonoExceptionClause));
-       clause->flags = MONO_EXCEPTION_CLAUSE_FILTER;
-       clause->try_len = mono_mb_get_label (mb);
+       g_free (tmp_nullable_locals);
+}
+
+static void
+emit_runtime_invoke_body (MonoMethodBuilder *mb, MonoClass *target_klass, MonoMethod *method,
+                                                 MonoMethodSignature *sig, MonoMethodSignature *callsig,
+                                                 gboolean virtual, gboolean need_direct_wrapper)
+{
+       gint32 labels [16];
+       MonoExceptionClause *clause;
+       int loc_res, loc_exc;
+
+       /* The wrapper looks like this:
+        *
+        * <interrupt check>
+        * if (exc) {
+        *       try {
+        *         return <call>
+        *       } catch (Exception e) {
+        *     *exc = e;
+        *   }
+        * } else {
+        *     return <call>
+        * }
+        */
+
+       /* allocate local 0 (object) tmp */
+       loc_res = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
+       /* allocate local 1 (object) exc */
+       loc_exc = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
+
+       /* *exc is assumed to be initialized to NULL by the caller */
 
-       /* filter code */
-       clause->data.filter_offset = mono_mb_get_label (mb);
-       
-       mono_mb_emit_byte (mb, CEE_POP);
        mono_mb_emit_byte (mb, CEE_LDARG_2);
-       mono_mb_emit_byte (mb, CEE_LDC_I4_0);
-       mono_mb_emit_byte (mb, CEE_PREFIX1);
-       mono_mb_emit_byte (mb, CEE_CGT_UN);
-       mono_mb_emit_byte (mb, CEE_PREFIX1);
-       mono_mb_emit_byte (mb, CEE_ENDFILTER);
+       labels [0] = mono_mb_emit_branch (mb, CEE_BRFALSE);
+
+       /*
+        * if (exc) case
+        */
+       labels [1] = mono_mb_get_label (mb);
+       emit_thread_force_interrupt_checkpoint (mb);
+       emit_invoke_call (mb, method, sig, callsig, loc_res, virtual, need_direct_wrapper);
+
+       labels [2] = mono_mb_emit_branch (mb, CEE_LEAVE);
+
+       /* Add a try clause around the call */
+       clause = mono_image_alloc0 (target_klass->image, sizeof (MonoExceptionClause));
+       clause->flags = MONO_EXCEPTION_CLAUSE_NONE;
+       clause->data.catch_class = mono_defaults.exception_class;
+       clause->try_offset = labels [1];
+       clause->try_len = mono_mb_get_label (mb) - labels [1];
 
        clause->handler_offset = mono_mb_get_label (mb);
 
        /* handler code */
-       /* store exception */
-       mono_mb_emit_stloc (mb, 1);
-       
+       mono_mb_emit_stloc (mb, loc_exc);       
        mono_mb_emit_byte (mb, CEE_LDARG_2);
-       mono_mb_emit_ldloc (mb, 1);
+       mono_mb_emit_ldloc (mb, loc_exc);
        mono_mb_emit_byte (mb, CEE_STIND_REF);
 
-       mono_mb_emit_byte (mb, CEE_LDNULL);
-       mono_mb_emit_stloc (mb, 0);
-
        mono_mb_emit_branch (mb, CEE_LEAVE);
 
        clause->handler_len = mono_mb_get_pos (mb) - clause->handler_offset;
 
        mono_mb_set_clauses (mb, 1, clause);
 
-       /* return result */
-       mono_mb_patch_branch (mb, pos);
+       mono_mb_patch_branch (mb, labels [2]);
+       mono_mb_emit_ldloc (mb, loc_res);
+       mono_mb_emit_byte (mb, CEE_RET);
+
+       /*
+        * if (!exc) case
+        */
+       mono_mb_patch_branch (mb, labels [0]);
+       emit_thread_force_interrupt_checkpoint (mb);
+       emit_invoke_call (mb, method, sig, callsig, loc_res, virtual, need_direct_wrapper);
+
        mono_mb_emit_ldloc (mb, 0);
        mono_mb_emit_byte (mb, CEE_RET);
+}
 
-       g_free (tmp_nullable_locals);
+/*
+ * generates IL code for the runtime invoke function 
+ * MonoObject *runtime_invoke (MonoObject *this, void **params, MonoObject **exc, void* method)
+ *
+ * we also catch exceptions if exc != null
+ * If VIRTUAL is TRUE, then METHOD is invoked virtually on THIS. This is useful since
+ * it means that the compiled code for METHOD does not have to be looked up 
+ * before calling the runtime invoke wrapper. In this case, the wrapper ignores
+ * its METHOD argument.
+ */
+MonoMethod *
+mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
+{
+       MonoMethodSignature *sig, *csig, *callsig;
+       MonoMethodBuilder *mb;
+       GHashTable *cache = NULL;
+       MonoClass *target_klass;
+       MonoMethod *res = NULL;
+       static MonoMethodSignature *cctor_signature = NULL;
+       static MonoMethodSignature *finalize_signature = NULL;
+       char *name;
+       gboolean need_direct_wrapper = FALSE;
+
+       g_assert (method);
+
+       if (!cctor_signature) {
+               cctor_signature = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
+               cctor_signature->ret = &mono_defaults.void_class->byval_arg;
+       }
+       if (!finalize_signature) {
+               finalize_signature = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
+               finalize_signature->ret = &mono_defaults.void_class->byval_arg;
+               finalize_signature->hasthis = 1;
+       }
+
+       if (virtual)
+               need_direct_wrapper = TRUE;
+
+       /* 
+        * Use a separate cache indexed by methods to speed things up and to avoid the
+        * boundless mempool growth caused by the signature_dup stuff below.
+        */
+       if (virtual)
+               cache = get_cache (&method->klass->image->runtime_invoke_vcall_cache, mono_aligned_addr_hash, NULL);
+       else
+               cache = get_cache (&method->klass->image->runtime_invoke_direct_cache, mono_aligned_addr_hash, NULL);
+       res = mono_marshal_find_in_cache (cache, method);
+       if (res)
+               return res;
+               
+       if (method->klass->rank && (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) &&
+               (method->iflags & METHOD_IMPL_ATTRIBUTE_NATIVE)) {
+               /* 
+                * Array Get/Set/Address methods. The JIT implements them using inline code
+                * so we need to create an invoke wrapper which calls the method directly.
+                */
+               need_direct_wrapper = TRUE;
+       }
+               
+       if (method->string_ctor) {
+               callsig = lookup_string_ctor_signature (mono_method_signature (method));
+               if (!callsig)
+                       callsig = add_string_ctor_signature (method);
+               /* Can't share this as we push a string as this */
+               need_direct_wrapper = TRUE;
+       } else {
+               if (method->klass->valuetype && mono_method_signature (method)->hasthis) {
+                       /* 
+                        * Valuetype methods receive a managed pointer as the this argument.
+                        * Create a new signature to reflect this.
+                        */
+                       callsig = signature_dup_add_this (mono_method_signature (method), method->klass);
+                       /* Can't share this as it would be shared with static methods taking an IntPtr argument */
+                       need_direct_wrapper = TRUE;
+               } else {
+                       if (method->dynamic)
+                               callsig = signature_dup (method->klass->image, mono_method_signature (method));
+                       else
+                               callsig = mono_method_signature (method);
+               }
+       }
+
+       target_klass = get_wrapper_target_class (method->klass->image);
+
+       /* Try to share wrappers for non-corlib methods with simple signatures */
+       if (mono_metadata_signature_equal (callsig, cctor_signature)) {
+               callsig = cctor_signature;
+               target_klass = mono_defaults.object_class;
+       } else if (mono_metadata_signature_equal (callsig, finalize_signature)) {
+               callsig = finalize_signature;
+               target_klass = mono_defaults.object_class;
+       }
+
+       if (need_direct_wrapper) {
+               /* Already searched at the start */
+       } else {
+               MonoMethodSignature *tmp_sig;
+
+               callsig = mono_marshal_get_runtime_invoke_sig (callsig);
+
+               cache = get_cache (&target_klass->image->runtime_invoke_cache, 
+                                                  (GHashFunc)mono_signature_hash, 
+                                                  (GCompareFunc)runtime_invoke_signature_equal);
+
+               /* from mono_marshal_find_in_cache */
+               mono_marshal_lock ();
+               res = g_hash_table_lookup (cache, callsig);
+               mono_marshal_unlock ();
+
+               if (res) {
+                       g_free (callsig);
+                       return res;
+               }
+
+               /* Make a copy of the signature from the image mempool */
+               tmp_sig = callsig;
+               callsig = mono_metadata_signature_dup_full (target_klass->image, callsig);
+               g_free (tmp_sig);
+       }
+       
+       sig = mono_method_signature (method);
+
+       csig = mono_metadata_signature_alloc (target_klass->image, 4);
+
+       csig->ret = &mono_defaults.object_class->byval_arg;
+       if (method->klass->valuetype && mono_method_signature (method)->hasthis)
+               csig->params [0] = callsig->params [0];
+       else
+               csig->params [0] = &mono_defaults.object_class->byval_arg;
+       csig->params [1] = &mono_defaults.int_class->byval_arg;
+       csig->params [2] = &mono_defaults.int_class->byval_arg;
+       csig->params [3] = &mono_defaults.int_class->byval_arg;
+
+       name = mono_signature_to_name (callsig, virtual ? "runtime_invoke_virtual" : "runtime_invoke");
+       mb = mono_mb_new (target_klass, name,  MONO_WRAPPER_RUNTIME_INVOKE);
+       g_free (name);
+
+       emit_runtime_invoke_body (mb, target_klass, method, sig, callsig, virtual, need_direct_wrapper);
 
        if (need_direct_wrapper) {
                mb->skip_visibility = 1;
index 238b67da2533fabdd93917806b9eb289bdc2e53f..1344632927bdaf94f4a7da82d26cd6443a71b400 100644 (file)
@@ -525,6 +525,9 @@ typedef void  (*MonoImageUnloadFunc) (MonoImage *image, gpointer user_data);
 void
 mono_install_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data) MONO_INTERNAL;
 
+void
+mono_remove_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data) MONO_INTERNAL;
+
 MonoType*
 mono_metadata_get_shared_type (MonoType *type) MONO_INTERNAL;
 
index c5c418c3562625d762fbbc48c6fa4f479ccb674c..dffab37255929bbc90acd6d027641fef6bc0e84e 100644 (file)
@@ -23,6 +23,7 @@
 #include <mono/metadata/cil-coff.h>
 #include <mono/metadata/attrdefs.h>
 #include <mono/utils/strenc.h>
+#include <mono/utils/mono-error-internals.h>
 #include <string.h>
 //#include <signal.h>
 #include <ctype.h>
@@ -2181,13 +2182,15 @@ is_valid_constant (VerifyContext *ctx, guint32 type, guint32 offset)
 #define SECTION_HEADER_INVALID_FLAGS 0x3E
 
 static gboolean
-is_valid_method_header (VerifyContext *ctx, guint32 rva)
+is_valid_method_header (VerifyContext *ctx, guint32 rva, guint32 *locals_token)
 {
        unsigned local_vars_tok, code_size, offset = mono_cli_rva_image_map (ctx->image, rva);
        unsigned header = 0;
        unsigned fat_header = 0, size = 0, max_stack;
        const char *ptr = NULL, *end;
 
+       *locals_token = 0;
+
        if (offset == INVALID_ADDRESS)
                FAIL (ctx, g_strdup ("MethodHeader: Invalid RVA"));
 
@@ -2230,6 +2233,7 @@ is_valid_method_header (VerifyContext *ctx, guint32 rva)
                        FAIL (ctx, g_strdup_printf ("MethodHeader: Invalid local vars signature table 0x%x", ((local_vars_tok >> 24) & 0xFF)));
                if ((local_vars_tok & 0xFFFFFF) > ctx->image->tables [MONO_TABLE_STANDALONESIG].rows)   
                        FAIL (ctx, g_strdup_printf ("MethodHeader: Invalid local vars signature points to invalid row 0x%x", local_vars_tok & 0xFFFFFF));
+               *locals_token = local_vars_tok & 0xFFFFFF;
        }
 
        if (fat_header & FAT_HEADER_INVALID_FLAGS)
@@ -2672,7 +2676,7 @@ static void
 verify_method_table_full (VerifyContext *ctx)
 {
        MonoTableInfo *table = &ctx->image->tables [MONO_TABLE_METHOD];
-       guint32 data [MONO_METHOD_SIZE], rva;
+       guint32 data [MONO_METHOD_SIZE], rva, locals_token;
        int i;
 
        for (i = 0; i < table->rows; ++i) {
@@ -2682,7 +2686,7 @@ verify_method_table_full (VerifyContext *ctx)
                if (!data [MONO_METHOD_SIGNATURE] || !is_valid_method_signature (ctx, data [MONO_METHOD_SIGNATURE]))
                        ADD_ERROR (ctx, g_strdup_printf ("Invalid method row %d invalid signature token 0x%08x", i, data [MONO_METHOD_SIGNATURE]));
 
-               if (rva && !is_valid_method_header (ctx, rva))
+               if (rva && !is_valid_method_header (ctx, rva, &locals_token))
                        ADD_ERROR (ctx, g_strdup_printf ("Invalid method row %d RVA points to an invalid method header", i));
        }
 }
@@ -3782,11 +3786,11 @@ verify_tables_data (VerifyContext *ctx)
 }
 
 static void
-init_verify_context (VerifyContext *ctx, MonoImage *image, GSList **error_list)
+init_verify_context (VerifyContext *ctx, MonoImage *image, gboolean report_error)
 {
        memset (ctx, 0, sizeof (VerifyContext));
        ctx->image = image;
-       ctx->report_error = error_list != NULL;
+       ctx->report_error = report_error;
        ctx->report_warning = FALSE; //export this setting in the API
        ctx->valid = 1;
        ctx->size = image->raw_data_len;
@@ -3804,6 +3808,18 @@ cleanup_context (VerifyContext *ctx, GSList **error_list)
        return ctx->valid;      
 }
 
+static gboolean
+cleanup_context_checked (VerifyContext *ctx, MonoError *error)
+{
+       g_free (ctx->sections);
+       if (ctx->errors) {
+               MonoVerifyInfo *info = ctx->errors->data;
+               mono_error_set_bad_image (error, ctx->image, "%s", info->message);
+               mono_free_verify_list (ctx->errors);
+       }
+       return ctx->valid;
+}
+
 gboolean
 mono_verifier_verify_pe_data (MonoImage *image, GSList **error_list)
 {
@@ -3812,7 +3828,7 @@ mono_verifier_verify_pe_data (MonoImage *image, GSList **error_list)
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_PE;
 
        verify_msdos_header (&ctx);
@@ -3842,7 +3858,7 @@ mono_verifier_verify_cli_data (MonoImage *image, GSList **error_list)
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_CLI;
 
        verify_cli_header (&ctx);
@@ -3875,7 +3891,7 @@ mono_verifier_verify_table_data (MonoImage *image, GSList **error_list)
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        verify_tables_data (&ctx);
@@ -3895,7 +3911,7 @@ mono_verifier_verify_full_table_data (MonoImage *image, GSList **error_list)
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        verify_typedef_table_full (&ctx);
@@ -3934,7 +3950,7 @@ mono_verifier_verify_field_signature (MonoImage *image, guint32 offset, GSList *
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        is_valid_field_signature (&ctx, offset);
@@ -3945,30 +3961,39 @@ gboolean
 mono_verifier_verify_method_header (MonoImage *image, guint32 offset, GSList **error_list)
 {
        VerifyContext ctx;
+       guint32 locals_token;
 
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
-       is_valid_method_header (&ctx, offset);
+       is_valid_method_header (&ctx, offset, &locals_token);
+       if (locals_token) {
+               guint32 sig_offset = mono_metadata_decode_row_col (&image->tables [MONO_TABLE_STANDALONESIG], locals_token - 1, MONO_STAND_ALONE_SIGNATURE);
+               is_valid_standalonesig_blob (&ctx, sig_offset);
+       }
+
        return cleanup_context (&ctx, error_list);
 }
 
 gboolean
-mono_verifier_verify_method_signature (MonoImage *image, guint32 offset, GSList **error_list)
+mono_verifier_verify_method_signature (MonoImage *image, guint32 offset, MonoError *error)
 {
        VerifyContext ctx;
 
+       mono_error_init (error);
+
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, TRUE);
        ctx.stage = STAGE_TABLES;
 
        is_valid_method_signature (&ctx, offset);
-       return cleanup_context (&ctx, error_list);
+       /*XXX This returns a bad image exception, it might be the case that the right exception is method load.*/
+       return cleanup_context_checked (&ctx, error);
 }
 
 gboolean
@@ -3979,7 +4004,7 @@ mono_verifier_verify_memberref_signature (MonoImage *image, guint32 offset, GSLi
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        is_valid_method_or_field_signature (&ctx, offset);
@@ -3994,7 +4019,7 @@ mono_verifier_verify_standalone_signature (MonoImage *image, guint32 offset, GSL
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        is_valid_standalonesig_blob (&ctx, offset);
@@ -4009,7 +4034,7 @@ mono_verifier_verify_typespec_signature (MonoImage *image, guint32 offset, guint
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
        ctx.token = token;
 
@@ -4025,7 +4050,7 @@ mono_verifier_verify_methodspec_signature (MonoImage *image, guint32 offset, GSL
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        is_valid_methodspec_blob (&ctx, offset);
@@ -4061,7 +4086,7 @@ mono_verifier_verify_string_signature (MonoImage *image, guint32 offset, GSList
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        verify_user_string (&ctx, offset);
@@ -4077,7 +4102,7 @@ mono_verifier_verify_cattr_blob (MonoImage *image, guint32 offset, GSList **erro
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        is_valid_cattr_blob (&ctx, offset);
@@ -4093,7 +4118,7 @@ mono_verifier_verify_cattr_content (MonoImage *image, MonoMethod *ctor, const gu
        if (!mono_verifier_is_enabled_for_image (image))
                return TRUE;
 
-       init_verify_context (&ctx, image, error_list);
+       init_verify_context (&ctx, image, error_list != NULL);
        ctx.stage = STAGE_TABLES;
 
        is_valid_cattr_content (&ctx, ctor, (const char*)data, size);
@@ -4167,8 +4192,9 @@ mono_verifier_verify_method_header (MonoImage *image, guint32 offset, GSList **e
 }
 
 gboolean
-mono_verifier_verify_method_signature (MonoImage *image, guint32 offset, GSList **error_list)
+mono_verifier_verify_method_signature (MonoImage *image, guint32 offset, MonoError *error)
 {
+       mono_error_init (error);
        return TRUE;
 }
 
index aafcbb55e121991306c9cc99078ec3dfe264769c..e2ed9c7749f22e4faa2fbd57b635da71127c86cc 100644 (file)
@@ -1371,6 +1371,9 @@ builtin_types[] = {
 static GHashTable *type_cache = NULL;
 static int next_generic_inst_id = 0;
 
+static MonoImageSet *mscorlib_image_set;
+static GPtrArray *image_sets;
+
 static guint mono_generic_class_hash (gconstpointer data);
 
 /*
@@ -1495,6 +1498,8 @@ mono_metadata_cleanup (void)
 {
        g_hash_table_destroy (type_cache);
        type_cache = NULL;
+       g_ptr_array_free (image_sets, TRUE);
+       image_sets = NULL;
 }
 
 /**
@@ -2177,9 +2182,6 @@ retry:
        }
 }
 
-static MonoImageSet *mscorlib_image_set;
-static GPtrArray *image_sets;
-
 /*
  * get_image_set:
  *
index fc7038490faebae35fb1763ed0bdbbde7eab8553..c88d40c126794d5dc7c9d390c38afebac8f6c057 100644 (file)
@@ -125,7 +125,14 @@ mono_monitor_init (void)
 void
 mono_monitor_cleanup (void)
 {
+       MonitorArray *marray, *next = NULL;
+
        /*DeleteCriticalSection (&monitor_mutex);*/
+
+       for (marray = monitor_allocated; marray; marray = next) {
+               next = marray->next;
+               g_free (marray);
+       }
 }
 
 /*
index 8f3b63303858e5d4d658540638c7731f3e63289b..e73b23ab258c325e5a9b03058204f070a39b91f3 100644 (file)
@@ -132,6 +132,9 @@ mono_parser = {
 
 static GHashTable *config_handlers;
 
+static const char *mono_cfg_dir = NULL;
+static char *mono_cfg_dir_allocated = NULL;
+
 /* when this interface is stable, export it. */
 typedef struct MonoParseHandler MonoParseHandler;
 
@@ -368,6 +371,14 @@ mono_config_init (void)
        g_hash_table_insert (config_handlers, (gpointer) legacyUEP_handler.element_name, (gpointer) &legacyUEP_handler);
 }
 
+void
+mono_config_cleanup (void)
+{
+       if (config_handlers)
+               g_hash_table_destroy (config_handlers);
+       g_free (mono_cfg_dir_allocated);
+}
+
 /* FIXME: error handling */
 
 static void
@@ -567,8 +578,6 @@ mono_config_parse (const char *filename) {
 #endif
 }
 
-static const char *mono_cfg_dir = NULL;
-
 /* Invoked during startup */
 void
 mono_set_config_dir (const char *dir)
@@ -576,7 +585,7 @@ mono_set_config_dir (const char *dir)
        /* If this variable is set, overrides the directory computed */
        mono_cfg_dir = g_getenv ("MONO_CFG_DIR");
        if (mono_cfg_dir == NULL)
-               mono_cfg_dir = g_strdup (dir);
+               mono_cfg_dir = mono_cfg_dir_allocated = g_strdup (dir);
 }
 
 const char* 
index 81720776077262f4ae75bd3efda25e2b2641e27d..0b46425cdb5985a4a5a094a29b811266f3480df9 100644 (file)
@@ -18,6 +18,7 @@ void        mono_set_config_dir (const char *dir);
 
 const char* mono_get_machine_config (void);
 
+void mono_config_cleanup      (void);
 void mono_config_parse        (const char *filename);
 void mono_config_for_assembly (MonoImage *assembly);
 void mono_config_parse_memory (const char *buffer);
index 1fab688742d83f7dfd92479900519030a5c1253c..6755f63630980bd65f60e80a3cea1df44182be44 100644 (file)
@@ -323,10 +323,3 @@ mono_debugger_class_initialized (MonoClass *klass)
                goto again;
        }
 }
-
-int
-mono_debugger_get_thread_abort_signal (void)
-{
-       return mono_thread_get_abort_signal ();
-}
-
index 30a50a55138fc24fd3c1a8dbfa462aac18d2ba82..ed6efa072945478e099bcf7ad2a70db1f80a9f8d 100644 (file)
@@ -91,7 +91,4 @@ mono_debugger_register_class_init_callback (MonoImage *image, const gchar *full_
 void
 mono_debugger_remove_class_init_callback (int index);
 
-int
-mono_debugger_get_thread_abort_signal (void);
-
 #endif /* __MONO_DEBUG_DEBUGGER_H__ */
index 1f4fda49a6d77262f0f4bf057a184890670701d0..d4ff5b9a0241bbdd19bdf8e25a66150e6c5e89fe 100644 (file)
@@ -132,7 +132,7 @@ struct _MonoDebugVarInfo {
 };
 
 #define MONO_DEBUGGER_MAJOR_VERSION                    81
-#define MONO_DEBUGGER_MINOR_VERSION                    5
+#define MONO_DEBUGGER_MINOR_VERSION                    6
 #define MONO_DEBUGGER_MAGIC                            0x7aff65af4253d427ULL
 
 extern MonoSymbolTable *mono_symbol_table;
index 84aac36dc8ccc98176d5e592681bd5dedc2e5d71..7263e8cc952e2d869e4a0d765a2c095d524cfdd6 100644 (file)
@@ -468,6 +468,23 @@ mono_g_hash_table_replace(MonoGHashTable *h, gpointer k, gpointer v)
        mono_g_hash_table_insert_replace (h, k, v, TRUE);
 }
 
+void
+mono_g_hash_table_print_stats (MonoGHashTable *table)
+{
+       int i, chain_size, max_chain_size;
+       Slot *node;
+
+       max_chain_size = 0;
+       for (i = 0; i < table->table_size; i++) {
+               chain_size = 0;
+               for (node = table->table [i]; node; node = node->next)
+                       chain_size ++;
+               max_chain_size = MAX(max_chain_size, chain_size);
+       }
+
+       printf ("Size: %d Table Size: %d Max Chain Length: %d\n", table->in_use, table->table_size, max_chain_size);
+}
+
 #ifdef HAVE_SGEN_GC
 
 /* GC marker function */
@@ -503,5 +520,5 @@ mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
                }
        }
 }
-
+       
 #endif
index 2e66f8edbde1541349776904bc45e2bc97db3f4a..79c80b78d8dfe1824eff324cf7a568a7eba6b0be 100644 (file)
@@ -96,6 +96,8 @@ void        mono_g_hash_table_remap (MonoGHashTable *hash_table,
                                                                         MonoGRemapperFunc func,
                                                                         gpointer user_data);
 
+void        mono_g_hash_table_print_stats (MonoGHashTable *table);
+
 G_END_DECLS
 
 #endif /* __MONO_G_HASH_H__ */
index 14c7fd1dc27e6defb9874749c65805e9abc72975..c1f20bc4848deb361cad1032f32dba9d9567548c 100644 (file)
@@ -24,7 +24,8 @@ struct _MonoWSQ {
        MonoSemType lock;
 };
 
-static guint32 wsq_tlskey = -1;
+#define NO_KEY ((guint32) -1)
+static guint32 wsq_tlskey = NO_KEY;
 
 void
 mono_wsq_init ()
@@ -35,10 +36,10 @@ mono_wsq_init ()
 void
 mono_wsq_cleanup ()
 {
-       if (wsq_tlskey == -1)
+       if (wsq_tlskey == NO_KEY)
                return;
        TlsFree (wsq_tlskey);
-       wsq_tlskey = -1;
+       wsq_tlskey = NO_KEY;
 }
 
 MonoWSQ *
@@ -47,7 +48,7 @@ mono_wsq_create ()
        MonoWSQ *wsq;
        MonoDomain *root;
 
-       if (wsq_tlskey == -1)
+       if (wsq_tlskey == NO_KEY)
                return NULL;
 
        wsq = g_new0 (MonoWSQ, 1);
@@ -56,7 +57,10 @@ mono_wsq_create ()
        root = mono_get_root_domain ();
        wsq->queue = mono_array_new_cached (root, mono_defaults.object_class, INITIAL_LENGTH);
        MONO_SEM_INIT (&wsq->lock, 1);
-       TlsSetValue (wsq_tlskey, wsq);
+       if (!TlsSetValue (wsq_tlskey, wsq)) {
+               mono_wsq_destroy (wsq);
+               wsq = NULL;
+       }
        return wsq;
 }
 
@@ -69,9 +73,9 @@ mono_wsq_destroy (MonoWSQ *wsq)
        g_assert (mono_wsq_count (wsq) == 0);
        MONO_GC_UNREGISTER_ROOT (wsq->queue);
        MONO_SEM_DESTROY (&wsq->lock);
-       if (wsq_tlskey != -1 && TlsGetValue (wsq_tlskey) == wsq)
-               TlsSetValue (wsq_tlskey, NULL);
        memset (wsq, 0, sizeof (MonoWSQ));
+       if (wsq_tlskey != NO_KEY && TlsGetValue (wsq_tlskey) == wsq)
+               TlsSetValue (wsq_tlskey, NULL);
        g_free (wsq);
 }
 
@@ -91,7 +95,7 @@ mono_wsq_local_push (void *obj)
        int count;
        MonoWSQ *wsq;
 
-       if (obj == NULL || wsq_tlskey == -1)
+       if (obj == NULL || wsq_tlskey == NO_KEY)
                return FALSE;
 
        wsq = (MonoWSQ *) TlsGetValue (wsq_tlskey);
@@ -141,7 +145,7 @@ mono_wsq_local_pop (void **ptr)
        gboolean res;
        MonoWSQ *wsq;
 
-       if (ptr == NULL || wsq_tlskey == -1)
+       if (ptr == NULL || wsq_tlskey == NO_KEY)
                return FALSE;
 
        wsq = (MonoWSQ *) TlsGetValue (wsq_tlskey);
@@ -181,7 +185,7 @@ mono_wsq_local_pop (void **ptr)
 void
 mono_wsq_try_steal (MonoWSQ *wsq, void **ptr, guint32 ms_timeout)
 {
-       if (wsq == NULL || ptr == NULL || *ptr != NULL || wsq_tlskey == -1)
+       if (wsq == NULL || ptr == NULL || *ptr != NULL || wsq_tlskey == NO_KEY)
                return;
 
        if (TlsGetValue (wsq_tlskey) == wsq)
diff --git a/mono/metadata/nacl-stub.c b/mono/metadata/nacl-stub.c
new file mode 100644 (file)
index 0000000..83494de
--- /dev/null
@@ -0,0 +1,16 @@
+
+#if defined(__native_client__)
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <eglib/src/glib.h>
+#include <errno.h>
+#include <sys/types.h>
+
+struct group *getgrnam(const char *name) { return NULL; }
+struct group *getgrgid(gid_t gid) { errno=EIO; return NULL; }
+int fsync(int fd) { errno=EINVAL; return -1; }
+dev_t makedev(guint32 maj, guint32 min) { return (maj)*256+(min); }
+
+#endif
index 816a7d3886ddf203e26b6fd9a5440024c3763893..b7140a29d4f9e5d80d40c05997535d4e2637bef9 100644 (file)
@@ -223,6 +223,12 @@ mono_gc_get_managed_allocator_types (void)
        return 0;
 }
 
+const char *
+mono_gc_get_gc_name (void)
+{
+       return "null";
+}
+
 void
 mono_gc_add_weak_track_handle (MonoObject *obj, guint32 gchandle)
 {
index a515c36cda40fc34106be23dcb2b847294ebd6fa..2fa7af210e5743e417c67473d23be1754d047097 100644 (file)
@@ -813,6 +813,7 @@ typedef struct {
 
 typedef struct {
        MonoReflectionType *parent;
+       MonoReflectionType *declaring_type;
        MonoString *name;
        MonoReflectionMethod *get;
        MonoReflectionMethod *set;
@@ -1376,6 +1377,9 @@ mono_reflection_call_is_assignable_to (MonoClass *klass, MonoClass *oklass) MONO
 gboolean
 mono_reflection_is_valid_dynamic_token (MonoDynamicImage *image, guint32 token) MONO_INTERNAL;
 
+void
+mono_reflection_resolve_custom_attribute_data (MonoReflectionMethod *method, MonoReflectionAssembly *assembly, gpointer data, guint32 data_length, MonoArray **ctor_args, MonoArray ** named_args) MONO_INTERNAL;
+
 MonoType*
 mono_reflection_type_get_handle (MonoReflectionType *ref) MONO_INTERNAL;
 
index 0eb1c1a9ee8a737ba8d9005824a6cfb46d21cf19..7d9bc14c645b8cfed24f507e9c63e62397488fdf 100644 (file)
@@ -79,6 +79,9 @@ get_default_field_value (MonoDomain* domain, MonoClassField *field, void *value)
 static MonoString*
 mono_ldstr_metadata_sig (MonoDomain *domain, const char* sig);
 
+static void
+free_main_args (void);
+
 #define ldstr_lock() EnterCriticalSection (&ldstr_section)
 #define ldstr_unlock() LeaveCriticalSection (&ldstr_section)
 static CRITICAL_SECTION ldstr_section;
@@ -185,8 +188,14 @@ mono_type_initialization_cleanup (void)
         * mono_release_type_locks
         */
        DeleteCriticalSection (&type_initialization_section);
+       g_hash_table_destroy (type_initialization_hash);
+       type_initialization_hash = NULL;
 #endif
        DeleteCriticalSection (&ldstr_section);
+       g_hash_table_destroy (blocked_thread_hash);
+       blocked_thread_hash = NULL;
+
+       free_main_args ();
 }
 
 /**
@@ -2985,8 +2994,13 @@ mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObje
        gboolean is_static = FALSE;
        gboolean is_ref = FALSE;
        gboolean is_literal = FALSE;
+       MonoError error;
+       MonoType *type = mono_field_get_type_checked (field, &error);
+
+       if (!mono_error_ok (&error))
+               mono_error_raise_exception (&error);
 
-       switch (field->type->type) {
+       switch (type->type) {
        case MONO_TYPE_STRING:
        case MONO_TYPE_OBJECT:
        case MONO_TYPE_CLASS:
@@ -3009,21 +3023,21 @@ mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObje
        case MONO_TYPE_I8:
        case MONO_TYPE_R8:
        case MONO_TYPE_VALUETYPE:
-               is_ref = field->type->byref;
+               is_ref = type->byref;
                break;
        case MONO_TYPE_GENERICINST:
-               is_ref = !mono_type_generic_inst_is_valuetype (field->type);
+               is_ref = !mono_type_generic_inst_is_valuetype (type);
                break;
        default:
                g_error ("type 0x%x not handled in "
-                        "mono_field_get_value_object", field->type->type);
+                        "mono_field_get_value_object", type->type);
                return NULL;
        }
 
-       if (field->type->attrs & FIELD_ATTRIBUTE_LITERAL)
+       if (type->attrs & FIELD_ATTRIBUTE_LITERAL)
                is_literal = TRUE;
 
-       if (field->type->attrs & FIELD_ATTRIBUTE_STATIC) {
+       if (type->attrs & FIELD_ATTRIBUTE_STATIC) {
                is_static = TRUE;
 
                if (!is_literal) {
@@ -3054,7 +3068,7 @@ mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObje
        }
 
        /* boxed value type */
-       klass = mono_class_from_mono_type (field->type);
+       klass = mono_class_from_mono_type (type);
 
        if (mono_class_is_nullable (klass))
                return mono_nullable_box (mono_field_get_addr (obj, vtable, field), klass);
@@ -3340,6 +3354,16 @@ mono_runtime_get_main_args (void)
        return res;
 }
 
+static void
+free_main_args (void)
+{
+       int i;
+
+       for (i = 0; i < num_main_args; ++i)
+               g_free (main_args [i]);
+       g_free (main_args);
+}
+
 /**
  * mono_runtime_run_main:
  * @method: the method to start the application with (usually Main)
@@ -3361,6 +3385,7 @@ mono_runtime_run_main (MonoMethod *method, int argc, char* argv[],
        MonoArray *args = NULL;
        MonoDomain *domain = mono_domain_get ();
        gchar *utf8_fullpath;
+       MonoMethodSignature *sig;
 
        g_assert (method != NULL);
        
@@ -3415,7 +3440,14 @@ mono_runtime_run_main (MonoMethod *method, int argc, char* argv[],
        }
        argc--;
        argv++;
-       if (mono_method_signature (method)->param_count) {
+
+       sig = mono_method_signature (method);
+       if (!sig) {
+               g_print ("Unable to load Main method.\n");
+               exit (-1);
+       }
+
+       if (sig->param_count) {
                args = (MonoArray*)mono_array_new (domain, mono_defaults.string_class, argc);
                for (i = 0; i < argc; ++i) {
                        /* The encodings should all work, given that
index 7e050c1ed3700622ba4b219a3df8cd3b47f32a1c..faf0794ea63f14acc6af85ee6223a493765f7994 100644 (file)
@@ -705,6 +705,8 @@ mono_profiler_shutdown (void)
                if (prof->shutdown_callback)
                        prof->shutdown_callback (prof->profiler);
        }
+
+       mono_profiler_set_events (0);
 }
 
 void
index 9b657343ca4eb028dfb144777d745d7486479227..935325ed198af50cf485a5e6d1ad57cdc56fac4c 100644 (file)
 #include <mono/metadata/rand.h>
 #include <mono/metadata/exception.h>
 
+#if defined(__native_client__)
+#include <errno.h>
+
+static void
+get_entropy_from_server (const char *path, guchar *buf, int len)
+{
+    return;
+}
+
+#else /* defined(__native_client__) */
+
 #if !defined(HOST_WIN32)
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -96,6 +107,7 @@ get_entropy_from_server (const char *path, guchar *buf, int len)
     close (file);
 }
 #endif
+#endif /* __native_client__ */
 
 #if defined (HOST_WIN32)
 
index ae98b1c44370f7fa1f6e37c4ecbc9da8129fda3e..1338f2cf2d0ea1ecc0fc3cde882f8cfb2fd4177a 100644 (file)
@@ -6355,7 +6355,7 @@ mymono_metadata_type_hash (MonoType *t1)
        case MONO_TYPE_CLASS:
        case MONO_TYPE_SZARRAY:
                /* check if the distribution is good enough */
-               return ((hash << 5) - hash) ^ g_str_hash (t1->data.klass->name);
+               return ((hash << 5) - hash) ^ mono_aligned_addr_hash (t1->data.klass);
        case MONO_TYPE_PTR:
                return ((hash << 5) - hash) ^ mymono_metadata_type_hash (t1->data.type);
        case MONO_TYPE_GENERICINST: {
@@ -6369,6 +6369,9 @@ mymono_metadata_type_hash (MonoType *t1)
                }
                return hash;
        }
+       case MONO_TYPE_VAR:
+       case MONO_TYPE_MVAR:
+               return ((hash << 5) - hash) ^ GPOINTER_TO_UINT (t1->data.generic_param);
        }
        return hash;
 }
@@ -6674,11 +6677,15 @@ mono_field_get_object (MonoDomain *domain, MonoClass *klass, MonoClassField *fie
        res->klass = klass;
        res->field = field;
        MONO_OBJECT_SETREF (res, name, mono_string_new (domain, mono_field_get_name (field)));
-       if (is_field_on_inst (field))
+
+       if (is_field_on_inst (field)) {
                res->attrs = get_field_on_inst_generic_type (field)->attrs;
-       else
-               res->attrs = field->type->attrs;
-       MONO_OBJECT_SETREF (res, type, mono_type_get_object (domain, field->type));
+               MONO_OBJECT_SETREF (res, type, mono_type_get_object (domain, field->type));
+       } else {
+               if (field->type)
+                       MONO_OBJECT_SETREF (res, type, mono_type_get_object (domain, field->type));
+               res->attrs = mono_field_get_flags (field);
+       }
        CACHE_OBJECT (MonoReflectionField *, field, res, klass);
 }
 
@@ -6919,6 +6926,7 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
        static MonoClass *System_Reflection_ExceptionHandlingClause = NULL;
        MonoReflectionMethodBody *ret;
        MonoMethodHeader *header;
+       MonoImage *image;
        guint32 method_rva, local_var_sig_token;
     char *ptr;
        unsigned char format, flags;
@@ -6938,26 +6946,31 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
            (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) ||
            (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME))
                return NULL;
+
+       image = method->klass->image;
        header = mono_method_get_header (method);
-       
-       /* Obtain local vars signature token */
-       method_rva = mono_metadata_decode_row_col (&method->klass->image->tables [MONO_TABLE_METHOD], mono_metadata_token_index (method->token) - 1, MONO_METHOD_RVA);
-       ptr = mono_image_rva_map (method->klass->image, method_rva);
-       flags = *(const unsigned char *) ptr;
-       format = flags & METHOD_HEADER_FORMAT_MASK;
-       switch (format){
-       case METHOD_HEADER_TINY_FORMAT:
-               local_var_sig_token = 0;
-               break;
-       case METHOD_HEADER_FAT_FORMAT:
-               ptr += 2;
-               ptr += 2;
-               ptr += 4;
-               local_var_sig_token = read32 (ptr);
-               break;
-       default:
-               g_assert_not_reached ();
-       }
+
+       if (!image->dynamic) {
+               /* Obtain local vars signature token */
+               method_rva = mono_metadata_decode_row_col (&image->tables [MONO_TABLE_METHOD], mono_metadata_token_index (method->token) - 1, MONO_METHOD_RVA);
+               ptr = mono_image_rva_map (image, method_rva);
+               flags = *(const unsigned char *) ptr;
+               format = flags & METHOD_HEADER_FORMAT_MASK;
+               switch (format){
+               case METHOD_HEADER_TINY_FORMAT:
+                       local_var_sig_token = 0;
+                       break;
+               case METHOD_HEADER_FAT_FORMAT:
+                       ptr += 2;
+                       ptr += 2;
+                       ptr += 4;
+                       local_var_sig_token = read32 (ptr);
+                       break;
+               default:
+                       g_assert_not_reached ();
+               }
+       } else
+               local_var_sig_token = 0; //FIXME
 
        ret = (MonoReflectionMethodBody*)mono_object_new (domain, System_Reflection_MethodBody);
 
@@ -7504,7 +7517,6 @@ mono_reflection_get_type_internal (MonoImage *rootimage, MonoImage* image, MonoT
        }
        if (!klass)
                return NULL;
-       mono_class_init (klass);
 
        if (info->type_arguments) {
                MonoType **type_args = g_new0 (MonoType *, info->type_arguments->len);
@@ -7545,7 +7557,6 @@ mono_reflection_get_type_internal (MonoImage *rootimage, MonoImage* image, MonoT
                } else { /* array rank */
                        klass = mono_bounded_array_class_get (klass, modval, bounded);
                }
-               mono_class_init (klass);
        }
 
        return &klass->byval_arg;
@@ -8350,35 +8361,35 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
        *named_args = namedargs;
 }
 
-static MonoObject*
-create_custom_attr_data (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len)
+void
+mono_reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method, MonoReflectionAssembly *assembly, gpointer data, guint32 len, MonoArray **ctor_args, MonoArray **named_args)
 {
-       MonoArray *typedargs, *namedargs;
-       static MonoMethod *ctor;
        MonoDomain *domain;
-       MonoObject *attr;
-       void *params [3];
+       MonoArray *typedargs, *namedargs;
+       MonoImage *image;
+       MonoMethod *method;
        CattrNamedArg *arginfo;
        int i;
 
-       mono_class_init (method->klass);
+       *ctor_args = NULL;
+       *named_args = NULL;
 
-       if (!ctor)
-               ctor = mono_class_get_method_from_name (mono_defaults.customattribute_data_class, ".ctor", 3);
+       if (len == 0)
+               return;
 
-       domain = mono_domain_get ();
-       if (len == 0) {
-               /* This is for Attributes with no parameters */
-               attr = mono_object_new (domain, mono_defaults.customattribute_data_class);
-               params [0] = mono_method_get_object (domain, method, NULL);
-               params [1] = params [2] = NULL;
-               mono_runtime_invoke (method, attr, params, NULL);
-               return attr;
-       }
+       image = assembly->assembly->image;
+       method = ref_method->method;
+       domain = mono_object_domain (ref_method);
+
+       if (!mono_class_init (method->klass))
+               mono_raise_exception (mono_class_get_exception_for_failure (method->klass));
 
        mono_reflection_create_custom_attr_data_args (image, method, data, len, &typedargs, &namedargs, &arginfo);
+       if (mono_loader_get_last_error ())
+               mono_raise_exception (mono_loader_error_prepare_exception (mono_loader_get_last_error ()));
+
        if (!typedargs || !namedargs)
-               return NULL;
+               return;
 
        for (i = 0; i < mono_method_signature (method)->param_count; ++i) {
                MonoObject *obj = mono_array_get (typedargs, MonoObject*, i);
@@ -8403,10 +8414,29 @@ create_custom_attr_data (MonoImage *image, MonoMethod *method, const guchar *dat
                mono_array_setref (namedargs, i, namedarg);
        }
 
+       *ctor_args = typedargs;
+       *named_args = namedargs;
+}
+
+static MonoObject*
+create_custom_attr_data (MonoImage *image, MonoCustomAttrEntry *cattr)
+{
+       static MonoMethod *ctor;
+       MonoDomain *domain;
+       MonoObject *attr;
+       void *params [4];
+
+       g_assert (image->assembly);
+
+       if (!ctor)
+               ctor = mono_class_get_method_from_name (mono_defaults.customattribute_data_class, ".ctor", 4);
+
+       domain = mono_domain_get ();
        attr = mono_object_new (domain, mono_defaults.customattribute_data_class);
-       params [0] = mono_method_get_object (domain, method, NULL);
-       params [1] = typedargs;
-       params [2] = namedargs;
+       params [0] = mono_method_get_object (domain, cattr->ctor, NULL);
+       params [1] = mono_assembly_get_object (domain, image->assembly);
+       params [2] = (gpointer)&cattr->data;
+       params [3] = &cattr->data_size;
        mono_runtime_invoke (ctor, attr, params, NULL);
        return attr;
 }
@@ -8464,7 +8494,7 @@ mono_custom_attrs_data_construct (MonoCustomAttrInfo *cinfo)
        
        result = mono_array_new (mono_domain_get (), mono_defaults.customattribute_data_class, cinfo->num_attrs);
        for (i = 0; i < cinfo->num_attrs; ++i) {
-               attr = create_custom_attr_data (cinfo->image, cinfo->attrs [i].ctor, cinfo->attrs [i].data, cinfo->attrs [i].data_size);
+               attr = create_custom_attr_data (cinfo->image, &cinfo->attrs [i]);
                mono_array_setref (result, i, attr);
        }
        return result;
@@ -8699,6 +8729,8 @@ mono_custom_attrs_from_param (MonoMethod *method, guint32 param)
 
        image = method->klass->image;
        method_index = mono_method_get_index (method);
+       if (!method_index)
+               return NULL;
        ca = &image->tables [MONO_TABLE_METHOD];
 
        param_list = mono_metadata_decode_row_col (ca, method_index - 1, MONO_METHOD_PARAMLIST);
@@ -8782,8 +8814,7 @@ mono_reflection_get_custom_attrs_info (MonoObject *obj)
        if (klass == mono_defaults.monotype_class) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj);
                klass = mono_class_from_mono_type (type);
-               if (!mono_class_init (klass))
-                       mono_raise_exception (mono_class_get_exception_for_failure (klass));
+               /*We cannot mono_class_init the class from which we'll load the custom attributes since this must work with broken types.*/
                cinfo = mono_custom_attrs_from_class (klass);
        } else if (strcmp ("Assembly", klass->name) == 0 || strcmp ("MonoAssembly", klass->name) == 0) {
                MonoReflectionAssembly *rassembly = (MonoReflectionAssembly*)obj;
@@ -10184,6 +10215,23 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass,
                        container->type_params [i] = *param;
                }
 
+               /*
+                * The method signature might have pointers to generic parameters that belong to other methods.
+                * This is a valid SRE case, but the resulting method signature must be encoded using the proper
+                * generic parameters.
+                */
+               for (i = 0; i < m->signature->param_count; ++i) {
+                       MonoType *t = m->signature->params [i];
+                       if (t->type == MONO_TYPE_MVAR) {
+                               MonoGenericParam *gparam =  t->data.generic_param;
+                               if (gparam->num < count) {
+                                       m->signature->params [i] = mono_metadata_type_dup (image, m->signature->params [i]);
+                                       m->signature->params [i]->data.generic_param = mono_generic_container_get_param (container, gparam->num);
+                               }
+
+                       }
+               }
+
                if (klass->generic_container) {
                        container->parent = klass->generic_container;
                        container->context.class_inst = klass->generic_container->context.class_inst;
diff --git a/mono/metadata/sgen-cardtable.c b/mono/metadata/sgen-cardtable.c
new file mode 100644 (file)
index 0000000..dadca2a
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+ * sgen-cardtable.c: Card table implementation for sgen
+ *
+ * Author:
+ *     Rodrigo Kumpera (rkumpera@novell.com)
+ *
+ * SGen is licensed under the terms of the MIT X11 license
+ *
+ * Copyright 2001-2003 Ximian, Inc
+ * Copyright 2003-2010 Novell, Inc.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef SGEN_HAVE_CARDTABLE
+
+//#define CARDTABLE_STATS
+
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+
+guint8 *sgen_cardtable;
+
+static mword
+cards_in_range (mword address, mword size)
+{
+       mword end = address + size;
+       return (end >> CARD_BITS) - (address >> CARD_BITS) + 1;
+}
+
+#ifdef SGEN_HAVE_OVERLAPPING_CARDS
+
+guint8 *sgen_shadow_cardtable;
+
+static gboolean
+sgen_card_table_region_begin_scanning (mword start, mword end)
+{
+       while (start <= end) {
+               if (sgen_card_table_card_begin_scanning (start))
+                       return TRUE;
+               start += CARD_SIZE_IN_BYTES;
+       }
+       return FALSE;
+}
+
+void
+sgen_card_table_get_card_data (guint8 *dest, mword address, mword cards)
+{
+       memcpy (dest, sgen_card_table_get_shadow_card_address (address), cards);
+}
+
+#else
+
+static gboolean
+sgen_card_table_region_begin_scanning (mword start, mword size)
+{
+       gboolean res = FALSE;
+       guint8 *card = sgen_card_table_get_card_address (start);
+       guint8 *end = card + cards_in_range (start, size);
+
+       while (card != end) {
+               if (*card++) {
+                       res = TRUE;
+                       break;
+               }
+       }
+
+       memset (sgen_card_table_get_card_address (start), 0, size >> CARD_BITS);
+
+       return res;
+}
+
+void
+sgen_card_table_get_card_data (guint8 *dest, mword address, mword cards)
+{
+       guint8 *src = sgen_card_table_get_card_address (address);
+       memcpy (dest, src, cards);
+       memset (src, 0, cards);
+}
+
+#endif
+
+static gboolean
+sgen_card_table_address_is_marked (mword address)
+{
+       return *sgen_card_table_get_card_address (address) != 0;
+}
+
+void
+sgen_card_table_mark_address (mword address)
+{
+       *sgen_card_table_get_card_address (address) = 1;
+}
+
+void*
+sgen_card_table_align_pointer (void *ptr)
+{
+       return (void*)((mword)ptr & ~(CARD_SIZE_IN_BYTES - 1));
+}
+
+void
+sgen_card_table_mark_range (mword address, mword size)
+{
+       mword end = address + size;
+       do {
+               sgen_card_table_mark_address (address);
+               address += CARD_SIZE_IN_BYTES;
+       } while (address < end);
+}
+
+static gboolean
+sgen_card_table_is_range_marked (guint8 *cards, mword size)
+{
+       mword start = 0;
+       while (start <= size) {
+               if (*cards++)
+                       return TRUE;
+               start += CARD_SIZE_IN_BYTES;
+       }
+       return FALSE;
+
+}
+
+static void
+card_table_init (void)
+{
+       sgen_cardtable = mono_sgen_alloc_os_memory (CARD_COUNT_IN_BYTES, TRUE);
+
+#ifdef SGEN_HAVE_OVERLAPPING_CARDS
+       sgen_shadow_cardtable = mono_sgen_alloc_os_memory (CARD_COUNT_IN_BYTES, TRUE);
+#endif
+}
+
+
+void los_scan_card_table (GrayQueue *queue);
+void los_iterate_live_block_ranges (sgen_cardtable_block_callback callback);
+
+
+static void
+clear_cards (mword start, mword size)
+{
+       memset (sgen_card_table_get_card_address (start), 0, size >> CARD_BITS);
+}
+
+#ifdef SGEN_HAVE_OVERLAPPING_CARDS
+
+static void
+move_cards_to_shadow_table (mword start, mword size)
+{
+       guint8 *from = sgen_card_table_get_card_address (start);
+       guint8 *to = sgen_card_table_get_shadow_card_address (start);
+       size_t bytes = cards_in_range (start, size);
+       memcpy (to, from, bytes);
+}
+
+#endif
+
+static void
+card_table_clear (void)
+{
+       /*XXX we could do this in 2 ways. using mincore or iterating over all sections/los objects */
+       if (use_cardtable) {
+               major.iterate_live_block_ranges (clear_cards);
+               los_iterate_live_block_ranges (clear_cards);
+       }
+}
+static void
+scan_from_card_tables (void *start_nursery, void *end_nursery, GrayQueue *queue)
+{
+       if (use_cardtable) {
+#ifdef SGEN_HAVE_OVERLAPPING_CARDS
+       /*First we copy*/
+       major.iterate_live_block_ranges (move_cards_to_shadow_table);
+       los_iterate_live_block_ranges (move_cards_to_shadow_table);
+
+       /*Then we clear*/
+       card_table_clear ();
+#endif
+               major.scan_card_table (queue);
+               los_scan_card_table (queue);
+       }
+}
+
+guint8*
+mono_gc_get_card_table (int *shift_bits, gpointer *mask)
+{
+       if (!use_cardtable)
+               return NULL;
+
+       g_assert (sgen_cardtable);
+       *shift_bits = CARD_BITS;
+#ifdef SGEN_HAVE_OVERLAPPING_CARDS
+       *mask = (gpointer)CARD_MASK;
+#else
+       *mask = NULL;
+#endif
+
+       return sgen_cardtable;
+}
+
+static void
+collect_faulted_cards (void)
+{
+#define CARD_PAGES (CARD_COUNT_IN_BYTES / 4096)
+       int i, count = 0;
+       unsigned char faulted [CARD_PAGES] = { 0 };
+       mincore (sgen_cardtable, CARD_COUNT_IN_BYTES, faulted);
+
+       for (i = 0; i < CARD_PAGES; ++i) {
+               if (faulted [i])
+                       ++count;
+       }
+
+       printf ("TOTAL card pages %d faulted %d\n", CARD_PAGES, count);
+}
+
+
+void
+sgen_cardtable_scan_object (char *obj, mword obj_size, guint8 *cards, SgenGrayQueue *queue)
+{
+       MonoVTable *vt = (MonoVTable*)LOAD_VTABLE (obj);
+       MonoClass *klass = vt->klass;
+
+       if (!klass->has_references)
+               return;
+
+       if (vt->rank) {
+               MonoArray *arr = (MonoArray*)obj;
+               mword desc = (mword)klass->element_class->gc_descr;
+               char *start = sgen_card_table_align_pointer (obj);
+               char *end = obj + obj_size;
+               int size = mono_array_element_size (klass);
+
+               g_assert (desc);
+
+               for (; start <= end; start += CARD_SIZE_IN_BYTES) {
+                       char *elem, *card_end;
+                       uintptr_t index;
+
+                       if (cards) {
+                               if (!*cards++)
+                                       continue;
+                       } else if (!sgen_card_table_card_begin_scanning ((mword)start)) {
+                               continue;
+                       }
+
+                       card_end = start + CARD_SIZE_IN_BYTES;
+                       if (end < card_end)
+                               card_end = end;
+
+                       if (start <= (char*)arr->vector)
+                               index = 0;
+                       else
+                               index = ARRAY_OBJ_INDEX (start, obj, size);
+
+                       elem = (char*)mono_array_addr_with_size ((MonoArray*)obj, size, index);
+                       if (klass->element_class->valuetype) {
+                               while (elem < card_end) {
+                                       major.minor_scan_vtype (elem, desc, nursery_start, nursery_next, queue);
+                                       elem += size;
+                               }
+                       } else {
+                               while (elem < card_end) {
+                                       gpointer new, old = *(gpointer*)elem;
+                                       if (old) {
+                                               major.copy_object ((void**)elem, queue);
+                                               new = *(gpointer*)elem;
+                                               if (G_UNLIKELY (ptr_in_nursery (new)))
+                                                       mono_sgen_add_to_global_remset (elem);
+                                       }
+                                       elem += size;
+                               }
+                       }
+               }
+       } else {
+               if (cards) {
+                       if (sgen_card_table_is_range_marked (cards, obj_size))
+                               major.minor_scan_object (obj, queue);
+               } else if (sgen_card_table_region_begin_scanning ((mword)obj, obj_size)) {
+                       major.minor_scan_object (obj, queue);
+               }
+       }
+}
+
+#ifdef CARDTABLE_STATS
+
+static int total_cards, marked_cards, remarked_cards;
+
+static void
+count_marked_cards (mword start, mword size)
+{
+       mword end = start + size;
+       while (start <= end) {
+               ++total_cards;
+               if (sgen_card_table_address_is_marked (start))
+                       ++marked_cards;
+               start += CARD_SIZE_IN_BYTES;
+       }
+}
+
+static void
+count_remarked_cards (mword start, mword size)
+{
+       mword end = start + size;
+       while (start <= end) {
+               if (sgen_card_table_address_is_marked (start))
+                       ++remarked_cards;
+               start += CARD_SIZE_IN_BYTES;
+       }
+}
+
+#endif
+
+static void
+card_tables_collect_starts (gboolean begin)
+{
+#ifdef CARDTABLE_STATS
+       if (begin) {
+               total_cards = marked_cards = remarked_cards = 0;
+               major.iterate_live_block_ranges (count_marked_cards);
+               los_iterate_live_block_ranges (count_marked_cards);
+       } else {
+               major.iterate_live_block_ranges (count_marked_cards);
+               los_iterate_live_block_ranges (count_remarked_cards);
+               printf ("cards total %d marked %d remarked %d\n", total_cards, marked_cards, remarked_cards);
+       }
+#endif
+}
+
+#else
+
+void
+sgen_card_table_mark_address (mword address)
+{
+       g_assert_not_reached ();
+}
+
+void
+sgen_card_table_mark_range (mword address, mword size)
+{
+       g_assert_not_reached ();
+}
+
+#define sgen_card_table_address_is_marked(p)   FALSE
+#define scan_from_card_tables(start,end,queue)
+#define card_table_clear()
+#define card_table_init()
+#define card_tables_collect_starts(begin)
+
+guint8*
+mono_gc_get_card_table (int *shift_bits, gpointer *mask)
+{
+       return NULL;
+}
+
+#endif
diff --git a/mono/metadata/sgen-cardtable.h b/mono/metadata/sgen-cardtable.h
new file mode 100644 (file)
index 0000000..ac92aa1
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2001-2003 Ximian, Inc
+ * Copyright 2003-2010 Novell, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#ifndef __MONO_SGEN_CARD_TABLE_INLINES_H__
+#define __MONO_SGEN_CARD_TABLE_INLINES_H__
+
+#define SGEN_HAVE_CARDTABLE    1
+
+#if SIZEOF_VOID_P == 8
+#define SGEN_HAVE_OVERLAPPING_CARDS    1
+#endif
+
+#ifdef SGEN_HAVE_CARDTABLE
+
+void sgen_card_table_reset_region (mword start, mword end) MONO_INTERNAL;
+void* sgen_card_table_align_pointer (void *ptr) MONO_INTERNAL;
+void sgen_card_table_mark_address (mword address) MONO_INTERNAL;
+void sgen_card_table_mark_range (mword address, mword size) MONO_INTERNAL;
+void sgen_cardtable_scan_object (char *obj, mword obj_size, guint8 *cards, SgenGrayQueue *queue) MONO_INTERNAL;
+void sgen_card_table_get_card_data (guint8 *dest, mword address, mword cards) MONO_INTERNAL;
+typedef void (*sgen_cardtable_block_callback) (mword start, mword size);
+
+#define CARD_BITS 9
+#define CARD_SIZE_IN_BYTES (1 << CARD_BITS)
+#define CARD_COUNT_BITS (32 - 9)
+#define CARD_COUNT_IN_BYTES (1 << CARD_COUNT_BITS)
+#define CARD_MASK ((1 << CARD_COUNT_BITS) - 1)
+
+extern guint8 *sgen_cardtable MONO_INTERNAL;
+
+
+#ifdef SGEN_HAVE_OVERLAPPING_CARDS
+
+static inline guint8*
+sgen_card_table_get_card_address (mword address)
+{
+       return sgen_cardtable + ((address >> CARD_BITS) & CARD_MASK);
+}
+
+extern guint8 *sgen_shadow_cardtable MONO_INTERNAL;
+
+static inline  guint8*
+sgen_card_table_get_shadow_card_address (mword address)
+{
+       return sgen_shadow_cardtable + ((address >> CARD_BITS) & CARD_MASK);
+}
+
+static inline gboolean
+sgen_card_table_card_begin_scanning (mword address)
+{
+       return *sgen_card_table_get_shadow_card_address (address) != 0;
+}
+
+#else
+
+static inline guint8*
+sgen_card_table_get_card_address (mword address)
+{
+       return sgen_cardtable + (address >> CARD_BITS);
+}
+
+static inline gboolean
+sgen_card_table_card_begin_scanning (mword address)
+{
+       guint8 *card = sgen_card_table_get_card_address (address);
+       gboolean res = *card;
+       *card = 0;
+       return res;
+}
+#endif
+
+#endif
+
+
+
+#endif
index 0c94659fa7d120e9c6d46abdad6e29ecb075e988..e84b7b880c66969f36d25ef947b254c9fd106dc6 100644 (file)
 #include "metadata/object-internals.h"
 #include "metadata/threads.h"
 #include "metadata/sgen-gc.h"
+#include "metadata/sgen-cardtable.h"
 #include "metadata/sgen-archdep.h"
 #include "metadata/mono-gc.h"
 #include "metadata/method-builder.h"
 #include "utils/mono-time.h"
 #include "utils/mono-semaphore.h"
 #include "utils/mono-counters.h"
+#include "utils/mono-proclib.h"
 
 #include <mono/utils/memcheck.h>
 
@@ -256,26 +258,27 @@ static gboolean do_scan_starts_check = FALSE;
 #ifdef HEAVY_STATISTICS
 static long long stat_objects_alloced = 0;
 static long long stat_bytes_alloced = 0;
-static long long stat_objects_alloced_degraded = 0;
-static long long stat_bytes_alloced_degraded = 0;
+long long stat_objects_alloced_degraded = 0;
+long long stat_bytes_alloced_degraded = 0;
 static long long stat_bytes_alloced_los = 0;
 
-static long long stat_copy_object_called_nursery = 0;
-static long long stat_objects_copied_nursery = 0;
-static long long stat_copy_object_called_major = 0;
-static long long stat_objects_copied_major = 0;
+long long stat_copy_object_called_nursery = 0;
+long long stat_objects_copied_nursery = 0;
+long long stat_copy_object_called_major = 0;
+long long stat_objects_copied_major = 0;
 
-static long long stat_scan_object_called_nursery = 0;
-static long long stat_scan_object_called_major = 0;
+long long stat_scan_object_called_nursery = 0;
+long long stat_scan_object_called_major = 0;
 
-static long long stat_nursery_copy_object_failed_from_space = 0;
-static long long stat_nursery_copy_object_failed_forwarded = 0;
-static long long stat_nursery_copy_object_failed_pinned = 0;
+long long stat_nursery_copy_object_failed_from_space = 0;
+long long stat_nursery_copy_object_failed_forwarded = 0;
+long long stat_nursery_copy_object_failed_pinned = 0;
 
 static long long stat_store_remsets = 0;
 static long long stat_store_remsets_unique = 0;
 static long long stat_saved_remsets_1 = 0;
 static long long stat_saved_remsets_2 = 0;
+static long long stat_local_remsets_processed = 0;
 static long long stat_global_remsets_added = 0;
 static long long stat_global_remsets_readded = 0;
 static long long stat_global_remsets_processed = 0;
@@ -297,6 +300,7 @@ static int stat_wbarrier_object_copy = 0;
 static long long time_minor_pre_collection_fragment_clear = 0;
 static long long time_minor_pinning = 0;
 static long long time_minor_scan_remsets = 0;
+static long long time_minor_scan_card_table = 0;
 static long long time_minor_scan_pinned = 0;
 static long long time_minor_scan_registered_roots = 0;
 static long long time_minor_scan_thread_data = 0;
@@ -317,8 +321,7 @@ static long long time_major_los_sweep = 0;
 static long long time_major_sweep = 0;
 static long long time_major_fragment_creation = 0;
 
-#define MAX_DEBUG_LEVEL 2
-#define DEBUG(level,a) do {if (G_UNLIKELY ((level) <= MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) a;} while (0)
+#define DEBUG(level,a) do {if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) a;} while (0)
 
 static int gc_debug_level = 0;
 static FILE* gc_debug_file;
@@ -331,9 +334,11 @@ mono_gc_flush_info (void)
 }
 */
 
-/* Define this to allow the user to change some of the constants by specifying
- * their values in the MONO_GC_PARAMS environmental variable. See
- * mono_gc_base_init for details. */
+/*
+ * Define this to allow the user to change the nursery size by
+ * specifying its value in the MONO_GC_PARAMS environmental
+ * variable. See mono_gc_base_init for details.
+ */
 #define USER_CONFIG 1
 
 #define TV_DECLARE(name) gint64 name
@@ -343,31 +348,6 @@ mono_gc_flush_info (void)
 
 #define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
 
-#define GC_BITS_PER_WORD (sizeof (mword) * 8)
-
-/* each request from the OS ends up in a GCMemSection */
-typedef struct _GCMemSection GCMemSection;
-struct _GCMemSection {
-       SgenBlock block;
-       char *data;
-       mword size;
-       /* pointer where more data could be allocated if it fits */
-       char *next_data;
-       char *end_data;
-       /* 
-        * scan starts is an array of pointers to objects equally spaced in the allocation area
-        * They let use quickly find pinned objects from pinning pointers.
-        */
-       char **scan_starts;
-       /* in major collections indexes in the pin_queue for objects that pin this section */
-       int pin_queue_start;
-       int pin_queue_end;
-       unsigned short num_scan_start;
-       gboolean is_to_space;
-};
-
-#define SIZEOF_GC_MEM_SECTION  ((sizeof (GCMemSection) + 7) & ~7)
-
 /* The method used to clear the nursery */
 /* Clearing at nursery collections is the safest, but has bad interactions with caches.
  * Clearing at TLAB creation is much faster, but more complex and it might expose hard
@@ -380,14 +360,6 @@ typedef enum {
 
 static NurseryClearPolicy nursery_clear_policy = CLEAR_AT_TLAB_CREATION;
 
-/* 
- * If this is set, the nursery is aligned to an address aligned to its size, ie.
- * a 1MB nursery will be aligned to an address divisible by 1MB. This allows us to
- * speed up ptr_in_nursery () checks which are very frequent. This requires the
- * nursery size to be a compile time constant.
- */
-#define ALIGN_NURSERY 1
-
 /*
  * The young generation is divided into fragments. This is because
  * we can hand one fragments to a thread for lock-less fast alloc and
@@ -465,55 +437,14 @@ static gpointer global_remset_cache [2];
 #define DEFAULT_REMSET_SIZE 1024
 static RememberedSet* alloc_remset (int size, gpointer id);
 
-/* Structure that corresponds to a MonoVTable: desc is a mword so requires
- * no cast from a pointer to an integer
- */
-typedef struct {
-       MonoClass *klass;
-       mword desc;
-} GCVTable;
-
-/* these bits are set in the object vtable: we could merge them since an object can be
- * either pinned or forwarded but not both.
- * We store them in the vtable slot because the bits are used in the sync block for
- * other purposes: if we merge them and alloc the sync blocks aligned to 8 bytes, we can change
- * this and use bit 3 in the syncblock (with the lower two bits both set for forwarded, that
- * would be an invalid combination for the monitor and hash code).
- * The values are already shifted.
- * The forwarding address is stored in the sync block.
- */
-#define FORWARDED_BIT 1
-#define PINNED_BIT 2
-#define VTABLE_BITS_MASK 0x3
-
-/* returns NULL if not forwarded, or the forwarded address */
-#define object_is_forwarded(obj) (((mword*)(obj))[0] & FORWARDED_BIT ? (void*)(((mword*)(obj))[0] & ~VTABLE_BITS_MASK) : NULL)
-/* set the forwarded address fw_addr for object obj */
-#define forward_object(obj,fw_addr) do {                               \
-               ((mword*)(obj))[0] = (mword)(fw_addr) | FORWARDED_BIT;  \
-       } while (0)
+#define object_is_forwarded    SGEN_OBJECT_IS_FORWARDED
+#define object_is_pinned       SGEN_OBJECT_IS_PINNED
+#define pin_object             SGEN_PIN_OBJECT
+#define unpin_object           SGEN_UNPIN_OBJECT
 
-#define object_is_pinned(obj) (((mword*)(obj))[0] & PINNED_BIT)
-#define pin_object(obj) do {   \
-               ((mword*)(obj))[0] |= PINNED_BIT;       \
-       } while (0)
-#define unpin_object(obj) do { \
-               ((mword*)(obj))[0] &= ~PINNED_BIT;      \
-       } while (0)
-
-#ifdef ALIGN_NURSERY
-#define ptr_in_nursery(ptr) (((mword)(ptr) & ~((1 << DEFAULT_NURSERY_BITS) - 1)) == (mword)nursery_start)
-#else
-#define ptr_in_nursery(ptr) ((char*)(ptr) >= nursery_start && (char*)(ptr) < nursery_real_end)
-#endif
-
-/*
- * Since we set bits in the vtable, use the macro to load it from the pointer to
- * an object that is potentially pinned.
- */
-#define LOAD_VTABLE(addr) ((*(mword*)(addr)) & ~VTABLE_BITS_MASK)
+#define ptr_in_nursery(p)      (SGEN_PTR_IN_NURSERY ((p), DEFAULT_NURSERY_BITS, nursery_start, nursery_real_end))
 
-#define VTABLE_HAS_REFERENCES(vt)      (((MonoVTable*)(vt))->gc_descr != (void*)DESC_TYPE_RUN_LENGTH)
+#define LOAD_VTABLE    SGEN_LOAD_VTABLE
 
 static const char*
 safe_name (void* obj)
@@ -522,37 +453,7 @@ safe_name (void* obj)
        return vt->klass->name;
 }
 
-/*
- * This function can be called on an object whose first word, the
- * vtable field, is not intact.  This is necessary for the parallel
- * collector.
- */
-static inline guint
-par_object_get_size (MonoVTable *vtable, MonoObject* o)
-{
-       MonoClass *klass = vtable->klass;
-       /*
-        * We depend on mono_string_length_fast and
-        * mono_array_length_fast not using the object's vtable.
-        */
-       if (klass == mono_defaults.string_class) {
-               return sizeof (MonoString) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
-       } else if (klass->rank) {
-               MonoArray *array = (MonoArray*)o;
-               size_t size = sizeof (MonoArray) + klass->sizes.element_size * mono_array_length_fast (array);
-               if (G_UNLIKELY (array->bounds)) {
-                       size += sizeof (mono_array_size_t) - 1;
-                       size &= ~(sizeof (mono_array_size_t) - 1);
-                       size += sizeof (MonoArrayBounds) * klass->rank;
-               }
-               return size;
-       } else {
-               /* from a created object: the class must be inited already */
-               return klass->instance_size;
-       }
-}
-
-#define safe_object_get_size(o)                par_object_get_size ((MonoVTable*)LOAD_VTABLE ((o)), (o))
+#define safe_object_get_size   mono_sgen_safe_object_get_size
 
 /*
  * ######################################################################
@@ -564,12 +465,14 @@ static int gc_disabled = 0;
 static int num_minor_gcs = 0;
 static int num_major_gcs = 0;
 
+static gboolean use_cardtable;
+
 #ifdef USER_CONFIG
 
 /* good sizes are 512KB-1MB: larger ones increase a lot memzeroing time */
 #define DEFAULT_NURSERY_SIZE (default_nursery_size)
 static int default_nursery_size = (1 << 22);
-#ifdef ALIGN_NURSERY
+#ifdef SGEN_ALIGN_NURSERY
 /* The number of trailing 0 bits in DEFAULT_NURSERY_SIZE */
 #define DEFAULT_NURSERY_BITS (default_nursery_bits)
 static int default_nursery_bits = 22;
@@ -578,19 +481,20 @@ static int default_nursery_bits = 22;
 #else
 
 #define DEFAULT_NURSERY_SIZE (4*1024*1024)
-#ifdef ALIGN_NURSERY
+#ifdef SGEN_ALIGN_NURSERY
 #define DEFAULT_NURSERY_BITS 22
 #endif
 
 #endif
 
+#ifndef SGEN_ALIGN_NURSERY
+#define DEFAULT_NURSERY_BITS -1
+#endif
+
 #define MIN_MINOR_COLLECTION_ALLOWANCE (DEFAULT_NURSERY_SIZE * 4)
-/* to quickly find the head of an object pinned by a conservative address
- * we keep track of the objects allocated for each SCAN_START_SIZE memory
- * chunk in the nursery or other memory sections. Larger values have less
- * memory overhead and bigger runtime cost. 4-8 KB are reasonable values.
- */
-#define SCAN_START_SIZE (4096*2)
+
+#define SCAN_START_SIZE        SGEN_SCAN_START_SIZE
+
 /* the minimum size of a fragment that we consider useful for allocation */
 #define FRAGMENT_MIN_SIZE (512)
 
@@ -601,7 +505,7 @@ static int degraded_mode = 0;
 static mword total_alloc = 0;
 /* use this to tune when to do a major/minor collection */
 static mword memory_pressure = 0;
-static int minor_collection_allowance;
+static mword minor_collection_allowance;
 static int minor_collection_sections_alloced = 0;
 
 static GCMemSection *nursery_section = NULL;
@@ -609,6 +513,10 @@ static mword lowest_heap_address = ~(mword)0;
 static mword highest_heap_address = 0;
 
 static LOCK_DECLARE (interruption_mutex);
+static LOCK_DECLARE (global_remset_mutex);
+
+#define LOCK_GLOBAL_REMSET pthread_mutex_lock (&global_remset_mutex)
+#define UNLOCK_GLOBAL_REMSET pthread_mutex_unlock (&global_remset_mutex)
 
 typedef struct _FinalizeEntry FinalizeEntry;
 struct _FinalizeEntry {
@@ -786,15 +694,7 @@ static Fragment *nursery_fragments = NULL;
 /* freeelist of fragment structures */
 static Fragment *fragment_freelist = NULL;
 
-/*
- * Objects bigger then this go into the large object space.  This size
- * has a few constraints.  It must fit into the major heap, which in
- * the case of the copying collector means that it must fit into a
- * pinned chunk.  It must also play well with the GC descriptors, some
- * of which (DESC_TYPE_RUN_LENGTH, DESC_TYPE_SMALL_BITMAP) encode the
- * object size.
- */
-#define MAX_SMALL_OBJ_SIZE 8000
+#define MAX_SMALL_OBJ_SIZE     SGEN_MAX_SMALL_OBJ_SIZE
 
 /* Functions supplied by the runtime to be called by the GC */
 static MonoGCCallbacks gc_callbacks;
@@ -825,7 +725,7 @@ align_pointer (void *ptr)
        return (void*)p;
 }
 
-typedef struct _GrayQueue GrayQueue;
+typedef SgenGrayQueue GrayQueue;
 
 typedef void (*CopyOrMarkObjectFunc) (void**, GrayQueue*);
 typedef char* (*ScanObjectFunc) (char*, GrayQueue*);
@@ -833,7 +733,6 @@ typedef char* (*ScanObjectFunc) (char*, GrayQueue*);
 /* forward declarations */
 static int stop_world (void);
 static int restart_world (void);
-static void add_to_global_remset (gpointer ptr);
 static void scan_thread_data (void *start_nursery, void *end_nursery, gboolean precise);
 static void scan_from_remsets (void *start_nursery, void *end_nursery, GrayQueue *queue);
 static void scan_from_registered_roots (CopyOrMarkObjectFunc copy_func, char *addr_start, char *addr_end, int root_type, GrayQueue *queue);
@@ -846,20 +745,12 @@ static void null_link_in_range (CopyOrMarkObjectFunc copy_func, char *start, cha
 static void null_links_for_domain (MonoDomain *domain, int generation);
 static gboolean search_fragment_for_size (size_t size);
 static int search_fragment_for_size_range (size_t desired_size, size_t minimum_size);
-static void build_nursery_fragments (int start_pin, int end_pin);
 static void clear_nursery_fragments (char *next);
 static void pin_from_roots (void *start_nursery, void *end_nursery);
 static int pin_objects_from_addresses (GCMemSection *section, void **start, void **end, void *start_nursery, void *end_nursery, GrayQueue *queue);
-static void pin_objects_in_section (GCMemSection *section, GrayQueue *queue);
 static void optimize_pin_queue (int start_slot);
 static void clear_remsets (void);
 static void clear_tlabs (void);
-static void scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc callback, void *data);
-static void scan_object (char *start, GrayQueue *queue);
-static void major_scan_object (char *start, GrayQueue *queue);
-static void par_copy_object_no_checks (char *destination, MonoVTable *vt, void *obj, mword objsize, GrayQueue *queue);
-static void* copy_object_no_checks (void *obj, GrayQueue *queue);
-static void copy_object (void **obj_slot, GrayQueue *queue);
 static void sort_addresses (void **array, int size);
 static void drain_gray_stack (GrayQueue *queue);
 static void finish_gray_stack (char *start_addr, char *end_addr, int generation, GrayQueue *queue);
@@ -873,11 +764,8 @@ void check_object (char *start);
 
 static void check_consistency (void);
 static void check_major_refs (void);
-static void check_section_scan_starts (GCMemSection *section);
 static void check_scan_starts (void);
 static void check_for_xdomain_refs (void);
-static void dump_occupied (char *start, char *end, char *section_start);
-static void dump_section (GCMemSection *section, const char *type);
 static void dump_heap (const char *type, int num, const char *reason);
 
 void mono_gc_scan_for_specific_ref (MonoObject *key);
@@ -888,77 +776,15 @@ static int mark_ephemerons_in_range (CopyOrMarkObjectFunc copy_func, char *start
 static void clear_unreachable_ephemerons (CopyOrMarkObjectFunc copy_func, char *start, char *end, GrayQueue *queue);
 static void null_ephemerons_for_domain (MonoDomain *domain);
 
-//#define BINARY_PROTOCOL
+SgenMajorCollector major;
+
 #include "sgen-protocol.c"
 #include "sgen-pinning.c"
 #include "sgen-pinning-stats.c"
 #include "sgen-gray.c"
+#include "sgen-workers.c"
 #include "sgen-los.c"
-
-/*
- * ######################################################################
- * ########  GC descriptors
- * ######################################################################
- * Used to quickly get the info the GC needs about an object: size and
- * where the references are held.
- */
-/* objects are aligned to 8 bytes boundaries
- * A descriptor is a pointer in MonoVTable, so 32 or 64 bits of size.
- * The low 3 bits define the type of the descriptor. The other bits
- * depend on the type.
- * As a general rule the 13 remaining low bits define the size, either
- * of the whole object or of the elements in the arrays. While for objects
- * the size is already in bytes, for arrays we need to shift, because
- * array elements might be smaller than 8 bytes. In case of arrays, we
- * use two bits to describe what the additional high bits represents,
- * so the default behaviour can handle element sizes less than 2048 bytes.
- * The high 16 bits, if 0 it means the object is pointer-free.
- * This design should make it easy and fast to skip over ptr-free data.
- * The first 4 types should cover >95% of the objects.
- * Note that since the size of objects is limited to 64K, larger objects
- * will be allocated in the large object heap.
- * If we want 4-bytes alignment, we need to put vector and small bitmap
- * inside complex.
- */
-enum {
-       /*
-        * We don't use 0 so that 0 isn't a valid GC descriptor.  No
-        * deep reason for this other than to be able to identify a
-        * non-inited descriptor for debugging.
-        *
-        * If an object contains no references, its GC descriptor is
-        * always DESC_TYPE_RUN_LENGTH, without a size, no exceptions.
-        * This is so that we can quickly check for that in
-        * copy_object_no_checks(), without having to fetch the
-        * object's class.
-        */
-       DESC_TYPE_RUN_LENGTH = 1, /* 15 bits aligned byte size | 1-3 (offset, numptr) bytes tuples */
-       DESC_TYPE_SMALL_BITMAP, /* 15 bits aligned byte size | 16-48 bit bitmap */
-       DESC_TYPE_COMPLEX,      /* index for bitmap into complex_descriptors */
-       DESC_TYPE_VECTOR,       /* 10 bits element size | 1 bit array | 2 bits desc | element desc */
-       DESC_TYPE_ARRAY,        /* 10 bits element size | 1 bit array | 2 bits desc | element desc */
-       DESC_TYPE_LARGE_BITMAP, /* | 29-61 bitmap bits */
-       DESC_TYPE_COMPLEX_ARR,  /* index for bitmap into complex_descriptors */
-       /* subtypes for arrays and vectors */
-       DESC_TYPE_V_PTRFREE = 0,/* there are no refs: keep first so it has a zero value  */
-       DESC_TYPE_V_REFS,       /* all the array elements are refs */
-       DESC_TYPE_V_RUN_LEN,    /* elements are run-length encoded as DESC_TYPE_RUN_LENGTH */
-       DESC_TYPE_V_BITMAP      /* elements are as the bitmap in DESC_TYPE_SMALL_BITMAP */
-};
-
-#define OBJECT_HEADER_WORDS (sizeof(MonoObject)/sizeof(gpointer))
-#define LOW_TYPE_BITS 3
-#define SMALL_BITMAP_SHIFT 16
-#define SMALL_BITMAP_SIZE (GC_BITS_PER_WORD - SMALL_BITMAP_SHIFT)
-#define VECTOR_INFO_SHIFT 14
-#define VECTOR_ELSIZE_SHIFT 3
-#define LARGE_BITMAP_SIZE (GC_BITS_PER_WORD - LOW_TYPE_BITS)
-#define MAX_ELEMENT_SIZE 0x3ff
-#define VECTOR_SUBTYPE_PTRFREE (DESC_TYPE_V_PTRFREE << VECTOR_INFO_SHIFT)
-#define VECTOR_SUBTYPE_REFS    (DESC_TYPE_V_REFS << VECTOR_INFO_SHIFT)
-#define VECTOR_SUBTYPE_RUN_LEN (DESC_TYPE_V_RUN_LEN << VECTOR_INFO_SHIFT)
-#define VECTOR_SUBTYPE_BITMAP  (DESC_TYPE_V_BITMAP << VECTOR_INFO_SHIFT)
-
+#include "sgen-cardtable.c"
 
 /* Root bitmap descriptors are simpler: the lower three bits describe the type
  * and we either have 30/62 bitmap bits or nibble-based run-length,
@@ -1030,6 +856,12 @@ alloc_complex_descriptor (gsize *bitmap, int numbits)
        return res;
 }
 
+gsize*
+mono_sgen_get_complex_descriptor (GCVTable *vt)
+{
+       return complex_descriptors + (vt->desc >> LOW_TYPE_BITS);
+}
+
 /*
  * Descriptor builders.
  */
@@ -1170,172 +1002,6 @@ mono_gc_get_bitmap_for_descr (void *descr, int *numbits)
        }
 }
 
-/* helper macros to scan and traverse objects, macros because we resue them in many functions */
-#define OBJ_RUN_LEN_SIZE(size,desc,obj) do { \
-               (size) = ((desc) & 0xfff8) >> 1;        \
-    } while (0)
-
-#define OBJ_BITMAP_SIZE(size,desc,obj) do { \
-               (size) = ((desc) & 0xfff8) >> 1;        \
-    } while (0)
-
-//#define PREFETCH(addr) __asm__ __volatile__ ("     prefetchnta     %0": : "m"(*(char *)(addr)))
-#define PREFETCH(addr)
-
-/* code using these macros must define a HANDLE_PTR(ptr) macro that does the work */
-#define OBJ_RUN_LEN_FOREACH_PTR(desc,obj)      do {    \
-               if ((desc) & 0xffff0000) {      \
-                       /* there are pointers */        \
-                       void **_objptr_end;     \
-                       void **_objptr = (void**)(obj); \
-                       _objptr += ((desc) >> 16) & 0xff;       \
-                       _objptr_end = _objptr + (((desc) >> 24) & 0xff);        \
-                       while (_objptr < _objptr_end) { \
-                               HANDLE_PTR (_objptr, (obj));    \
-                               _objptr++;      \
-                       }       \
-               }       \
-       } while (0)
-
-/* a bitmap desc means that there are pointer references or we'd have
- * choosen run-length, instead: add an assert to check.
- */
-#define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
-               /* there are pointers */        \
-               void **_objptr = (void**)(obj); \
-               gsize _bmap = (desc) >> 16;     \
-               _objptr += OBJECT_HEADER_WORDS; \
-               while (_bmap) { \
-                       if ((_bmap & 1)) {      \
-                               HANDLE_PTR (_objptr, (obj));    \
-                       }       \
-                       _bmap >>= 1;    \
-                       ++_objptr;      \
-               }       \
-       } while (0)
-
-#define OBJ_LARGE_BITMAP_FOREACH_PTR(vt,obj)   do {    \
-               /* there are pointers */        \
-               void **_objptr = (void**)(obj); \
-               gsize _bmap = (vt)->desc >> LOW_TYPE_BITS;      \
-               _objptr += OBJECT_HEADER_WORDS; \
-               while (_bmap) { \
-                       if ((_bmap & 1)) {      \
-                               HANDLE_PTR (_objptr, (obj));    \
-                       }       \
-                       _bmap >>= 1;    \
-                       ++_objptr;      \
-               }       \
-       } while (0)
-
-#define OBJ_COMPLEX_FOREACH_PTR(vt,obj)        do {    \
-               /* there are pointers */        \
-               void **_objptr = (void**)(obj); \
-               gsize *bitmap_data = complex_descriptors + ((vt)->desc >> LOW_TYPE_BITS);       \
-               int bwords = (*bitmap_data) - 1;        \
-               void **start_run = _objptr;     \
-               bitmap_data++;  \
-               if (0) {        \
-                       MonoObject *myobj = (MonoObject*)obj;   \
-                       g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, (obj), (vt)->desc, myobj->vtable->klass->name_space, myobj->vtable->klass->name);   \
-               }       \
-               while (bwords-- > 0) {  \
-                       gsize _bmap = *bitmap_data++;   \
-                       _objptr = start_run;    \
-                       /*g_print ("bitmap: 0x%x/%d at %p\n", _bmap, bwords, _objptr);*/        \
-                       while (_bmap) { \
-                               if ((_bmap & 1)) {      \
-                                       HANDLE_PTR (_objptr, (obj));    \
-                               }       \
-                               _bmap >>= 1;    \
-                               ++_objptr;      \
-                       }       \
-                       start_run += GC_BITS_PER_WORD;  \
-               }       \
-       } while (0)
-
-/* this one is untested */
-#define OBJ_COMPLEX_ARR_FOREACH_PTR(vt,obj)    do {    \
-               /* there are pointers */        \
-               gsize *mbitmap_data = complex_descriptors + ((vt)->desc >> LOW_TYPE_BITS);      \
-               int mbwords = (*mbitmap_data++) - 1;    \
-               int el_size = mono_array_element_size (vt->klass);      \
-               char *e_start = (char*)(obj) +  G_STRUCT_OFFSET (MonoArray, vector);    \
-               char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
-               if (0)                                                  \
-                        g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, (obj), (vt)->desc, vt->klass->name_space, vt->klass->name); \
-               while (e_start < e_end) {       \
-                       void **_objptr = (void**)e_start;       \
-                       gsize *bitmap_data = mbitmap_data;      \
-                       unsigned int bwords = mbwords;  \
-                       while (bwords-- > 0) {  \
-                               gsize _bmap = *bitmap_data++;   \
-                               void **start_run = _objptr;     \
-                               /*g_print ("bitmap: 0x%x\n", _bmap);*/  \
-                               while (_bmap) { \
-                                       if ((_bmap & 1)) {      \
-                                               HANDLE_PTR (_objptr, (obj));    \
-                                       }       \
-                                       _bmap >>= 1;    \
-                                       ++_objptr;      \
-                               }       \
-                               _objptr = start_run + GC_BITS_PER_WORD; \
-                       }       \
-                       e_start += el_size;     \
-               }       \
-       } while (0)
-
-#define OBJ_VECTOR_FOREACH_PTR(vt,obj) do {    \
-               /* note: 0xffffc000 excludes DESC_TYPE_V_PTRFREE */     \
-               if ((vt)->desc & 0xffffc000) {  \
-                       int el_size = ((vt)->desc >> 3) & MAX_ELEMENT_SIZE;     \
-                       /* there are pointers */        \
-                       int etype = (vt)->desc & 0xc000;        \
-                       if (etype == (DESC_TYPE_V_REFS << 14)) {        \
-                               void **p = (void**)((char*)(obj) + G_STRUCT_OFFSET (MonoArray, vector));        \
-                               void **end_refs = (void**)((char*)p + el_size * mono_array_length_fast ((MonoArray*)(obj)));    \
-                               /* Note: this code can handle also arrays of struct with only references in them */     \
-                               while (p < end_refs) {  \
-                                       HANDLE_PTR (p, (obj));  \
-                                       ++p;    \
-                               }       \
-                       } else if (etype == DESC_TYPE_V_RUN_LEN << 14) {        \
-                               int offset = ((vt)->desc >> 16) & 0xff; \
-                               int num_refs = ((vt)->desc >> 24) & 0xff;       \
-                               char *e_start = (char*)(obj) + G_STRUCT_OFFSET (MonoArray, vector);     \
-                               char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
-                               while (e_start < e_end) {       \
-                                       void **p = (void**)e_start;     \
-                                       int i;  \
-                                       p += offset;    \
-                                       for (i = 0; i < num_refs; ++i) {        \
-                                               HANDLE_PTR (p + i, (obj));      \
-                                       }       \
-                                       e_start += el_size;     \
-                               }       \
-                       } else if (etype == DESC_TYPE_V_BITMAP << 14) { \
-                               char *e_start = (char*)(obj) +  G_STRUCT_OFFSET (MonoArray, vector);    \
-                               char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
-                               while (e_start < e_end) {       \
-                                       void **p = (void**)e_start;     \
-                                       gsize _bmap = (vt)->desc >> 16; \
-                                       /* Note: there is no object header here to skip */      \
-                                       while (_bmap) { \
-                                               if ((_bmap & 1)) {      \
-                                                       HANDLE_PTR (p, (obj));  \
-                                               }       \
-                                               _bmap >>= 1;    \
-                                               ++p;    \
-                                       }       \
-                                       e_start += el_size;     \
-                               }       \
-                       }       \
-               }       \
-       } while (0)
-
-//#include "sgen-major-copying.c"
-#include "sgen-marksweep.c"
-
 static gboolean
 is_xdomain_ref_allowed (gpointer *ptr, char *obj, MonoDomain *domain)
 {
@@ -1449,8 +1115,8 @@ scan_object_for_specific_ref (char *start, MonoObject *key)
        #include "sgen-scan-object.h"
 }
 
-static void
-scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc callback, void *data)
+void
+mono_sgen_scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc callback, void *data)
 {
        while (start < end) {
                size_t size;
@@ -1554,10 +1220,10 @@ mono_gc_scan_for_specific_ref (MonoObject *key)
        RootRecord *root;
        int i;
 
-       scan_area_with_callback (nursery_section->data, nursery_section->end_data,
+       mono_sgen_scan_area_with_callback (nursery_section->data, nursery_section->end_data,
                        (IterateObjectCallbackFunc)scan_object_for_specific_ref_callback, key);
 
-       major_iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)scan_object_for_specific_ref_callback, key);
+       major.iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)scan_object_for_specific_ref_callback, key);
 
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
                scan_object_for_specific_ref (bigobj->data, key);
@@ -1695,9 +1361,10 @@ check_for_xdomain_refs (void)
 {
        LOSObject *bigobj;
 
-       scan_area_with_callback (nursery_section->data, nursery_section->end_data, (IterateObjectCallbackFunc)scan_object_for_xdomain_refs, NULL);
+       mono_sgen_scan_area_with_callback (nursery_section->data, nursery_section->end_data,
+                       (IterateObjectCallbackFunc)scan_object_for_xdomain_refs, NULL);
 
-       major_iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)scan_object_for_xdomain_refs, NULL);
+       major.iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)scan_object_for_xdomain_refs, NULL);
 
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
                scan_object_for_xdomain_refs (bigobj->data, bigobj->size, NULL);
@@ -1737,14 +1404,14 @@ static void
 clear_domain_free_major_non_pinned_object_callback (char *obj, size_t size, MonoDomain *domain)
 {
        if (need_remove_object_for_domain (obj, domain))
-               major_free_non_pinned_object (obj, size);
+               major.free_non_pinned_object (obj, size);
 }
 
 static void
 clear_domain_free_major_pinned_object_callback (char *obj, size_t size, MonoDomain *domain)
 {
        if (need_remove_object_for_domain (obj, domain))
-               free_pinned_object (obj, size);
+               major.free_pinned_object (obj, size);
 }
 
 /*
@@ -1772,7 +1439,7 @@ mono_gc_clear_domain (MonoDomain * domain)
                check_for_xdomain_refs ();
        }
 
-       scan_area_with_callback (nursery_section->data, nursery_section->end_data,
+       mono_sgen_scan_area_with_callback (nursery_section->data, nursery_section->end_data,
                        (IterateObjectCallbackFunc)clear_domain_process_minor_object_callback, domain);
 
        /*Ephemerons and dislinks must be processed before LOS since they might end up pointing
@@ -1789,7 +1456,7 @@ mono_gc_clear_domain (MonoDomain * domain)
           objects with major-mark&sweep), but we might need to
           dereference a pointer from an object to another object if
           the first object is a proxy. */
-       major_iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)clear_domain_process_major_object_callback, domain);
+       major.iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)clear_domain_process_major_object_callback, domain);
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
                clear_domain_process_object (bigobj->data, domain);
 
@@ -1810,8 +1477,8 @@ mono_gc_clear_domain (MonoDomain * domain)
                prev = bigobj;
                bigobj = bigobj->next;
        }
-       major_iterate_objects (TRUE, FALSE, (IterateObjectCallbackFunc)clear_domain_free_major_non_pinned_object_callback, domain);
-       major_iterate_objects (FALSE, TRUE, (IterateObjectCallbackFunc)clear_domain_free_major_pinned_object_callback, domain);
+       major.iterate_objects (TRUE, FALSE, (IterateObjectCallbackFunc)clear_domain_free_major_non_pinned_object_callback, domain);
+       major.iterate_objects (FALSE, TRUE, (IterateObjectCallbackFunc)clear_domain_free_major_pinned_object_callback, domain);
 
        UNLOCK_GC;
 }
@@ -1859,20 +1526,33 @@ global_remset_location_was_not_added (gpointer ptr)
 }
 
 /*
- * add_to_global_remset:
+ * mono_sgen_add_to_global_remset:
  *
  *   The global remset contains locations which point into newspace after
  * a minor collection. This can happen if the objects they point to are pinned.
+ *
+ * LOCKING: If called from a parallel collector, the global remset
+ * lock must be held.  For serial collectors that is not necessary.
  */
-static void
-add_to_global_remset (gpointer ptr)
+void
+mono_sgen_add_to_global_remset (gpointer ptr)
 {
        RememberedSet *rs;
+       gboolean lock;
+
+       if (use_cardtable) {
+               sgen_card_table_mark_address ((mword)ptr);
+               return;
+       }
 
        g_assert (!ptr_in_nursery (ptr) && ptr_in_nursery (*(gpointer*)ptr));
 
+       lock = (current_collection_generation == GENERATION_OLD && major.is_parallel);
+       if (lock)
+               LOCK_GLOBAL_REMSET;
+
        if (!global_remset_location_was_not_added (ptr))
-               return;
+               goto done;
 
        DEBUG (8, fprintf (gc_debug_file, "Adding global remset for %p\n", ptr));
        binary_protocol_global_remset (ptr, *(gpointer*)ptr, (gpointer)LOAD_VTABLE (*(gpointer*)ptr));
@@ -1885,7 +1565,7 @@ add_to_global_remset (gpointer ptr)
         */
        if (global_remset->store_next + 3 < global_remset->end_set) {
                *(global_remset->store_next++) = (mword)ptr;
-               return;
+               goto done;
        }
        rs = alloc_remset (global_remset->end_set - global_remset->data, NULL);
        rs->next = global_remset;
@@ -1900,235 +1580,10 @@ add_to_global_remset (gpointer ptr)
                }
                DEBUG (4, fprintf (gc_debug_file, "Global remset now has size %d\n", global_rs_size));
        }
-}
-
-/*
- * This function can be used even if the vtable of obj is not valid
- * anymore, which is the case in the parallel collector.
- */
-static void
-par_copy_object_no_checks (char *destination, MonoVTable *vt, void *obj, mword objsize, GrayQueue *queue)
-{
-       static const void *copy_labels [] = { &&LAB_0, &&LAB_1, &&LAB_2, &&LAB_3, &&LAB_4, &&LAB_5, &&LAB_6, &&LAB_7, &&LAB_8 };
-
-       DEBUG (9, g_assert (vt->klass->inited));
-       DEBUG (9, fprintf (gc_debug_file, " (to %p, %s size: %lu)\n", destination, ((MonoObject*)obj)->vtable->klass->name, (unsigned long)objsize));
-       binary_protocol_copy (obj, destination, vt, objsize);
-
-       *(MonoVTable**)destination = vt;
-       if (objsize <= sizeof (gpointer) * 8) {
-               mword *dest = (mword*)destination;
-               goto *copy_labels [objsize / sizeof (gpointer)];
-       LAB_8:
-               (dest) [7] = ((mword*)obj) [7];
-       LAB_7:
-               (dest) [6] = ((mword*)obj) [6];
-       LAB_6:
-               (dest) [5] = ((mword*)obj) [5];
-       LAB_5:
-               (dest) [4] = ((mword*)obj) [4];
-       LAB_4:
-               (dest) [3] = ((mword*)obj) [3];
-       LAB_3:
-               (dest) [2] = ((mword*)obj) [2];
-       LAB_2:
-               (dest) [1] = ((mword*)obj) [1];
-       LAB_1:
-               ;
-       LAB_0:
-               ;
-       } else {
-               memcpy (destination + sizeof (mword), (char*)obj + sizeof (mword), objsize - sizeof (mword));
-       }
-       /* adjust array->bounds */
-       DEBUG (9, g_assert (vt->gc_descr));
-       if (G_UNLIKELY (vt->rank && ((MonoArray*)obj)->bounds)) {
-               MonoArray *array = (MonoArray*)destination;
-               array->bounds = (MonoArrayBounds*)((char*)destination + ((char*)((MonoArray*)obj)->bounds - (char*)obj));
-               DEBUG (9, fprintf (gc_debug_file, "Array instance %p: size: %lu, rank: %d, length: %lu\n", array, (unsigned long)objsize, vt->rank, (unsigned long)mono_array_length (array)));
-       }
-       if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_GC_MOVES)) {
-               /* FIXME: handle this for parallel collector */
-#ifdef SGEN_PARALLEL_MARK
-               g_assert_not_reached ();
-#endif
-               if (moved_objects_idx == MOVED_OBJECTS_NUM) {
-                       mono_profiler_gc_moves (moved_objects, moved_objects_idx);
-                       moved_objects_idx = 0;
-               }
-               moved_objects [moved_objects_idx++] = obj;
-               moved_objects [moved_objects_idx++] = destination;
-       }
-       obj = destination;
-       if (queue) {
-               DEBUG (9, fprintf (gc_debug_file, "Enqueuing gray object %p (%s)\n", obj, safe_name (obj)));
-               GRAY_OBJECT_ENQUEUE (queue, obj);
-       }
-}
-
-static void*
-copy_object_no_checks (void *obj, GrayQueue *queue)
-{
-       MonoVTable *vt = ((MonoObject*)obj)->vtable;
-       gboolean has_references = VTABLE_HAS_REFERENCES (vt);
-       mword objsize = ALIGN_UP (par_object_get_size (vt, (MonoObject*)obj));
-       char *destination;
-
-       MAJOR_GET_COPY_OBJECT_SPACE (destination, objsize, has_references);
-
-       par_copy_object_no_checks (destination, vt, obj, objsize, has_references ? queue : NULL);
-
-       /* set the forwarding pointer */
-       forward_object (obj, destination);
-
-       return destination;
-}
-
-/*
- * This is how the copying happens from the nursery to the old generation.
- * We assume that at this time all the pinned objects have been identified and
- * marked as such.
- * We run scan_object() for each pinned object so that each referenced
- * objects if possible are copied. The new gray objects created can have
- * scan_object() run on them right away, too.
- * Then we run copy_object() for the precisely tracked roots. At this point
- * all the roots are either gray or black. We run scan_object() on the gray
- * objects until no more gray objects are created.
- * At the end of the process we walk again the pinned list and we unmark
- * the pinned flag. As we go we also create the list of free space for use
- * in the next allocation runs.
- *
- * We need to remember objects from the old generation that point to the new one
- * (or just addresses?).
- *
- * copy_object could be made into a macro once debugged (use inline for now).
- */
-
-static void __attribute__((noinline))
-copy_object (void **obj_slot, GrayQueue *queue)
-{
-       char *forwarded;
-       char *obj = *obj_slot;
-
-       DEBUG (9, g_assert (current_collection_generation == GENERATION_NURSERY));
-
-       HEAVY_STAT (++stat_copy_object_called_nursery);
-
-       if (!ptr_in_nursery (obj)) {
-               HEAVY_STAT (++stat_nursery_copy_object_failed_from_space);
-               return;
-       }
-
-       DEBUG (9, fprintf (gc_debug_file, "Precise copy of %p from %p", obj, obj_slot));
-
-       /*
-        * Before we can copy the object we must make sure that we are
-        * allowed to, i.e. that the object not pinned or not already
-        * forwarded.
-        */
-
-       if ((forwarded = object_is_forwarded (obj))) {
-               DEBUG (9, g_assert (((MonoVTable*)LOAD_VTABLE(obj))->gc_descr));
-               DEBUG (9, fprintf (gc_debug_file, " (already forwarded to %p)\n", forwarded));
-               HEAVY_STAT (++stat_nursery_copy_object_failed_forwarded);
-               *obj_slot = forwarded;
-               return;
-       }
-       if (object_is_pinned (obj)) {
-               DEBUG (9, g_assert (((MonoVTable*)LOAD_VTABLE(obj))->gc_descr));
-               DEBUG (9, fprintf (gc_debug_file, " (pinned, no change)\n"));
-               HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
-               return;
-       }
 
-       HEAVY_STAT (++stat_objects_copied_nursery);
-
-       *obj_slot = copy_object_no_checks (obj, queue);
-}
-
-#undef HANDLE_PTR
-#define HANDLE_PTR(ptr,obj)    do {    \
-               void *__old = *(ptr);   \
-               void *__copy;           \
-               if (__old) {    \
-                       copy_object ((ptr), queue);     \
-                       __copy = *(ptr);        \
-                       DEBUG (9, if (__old != __copy) fprintf (gc_debug_file, "Overwrote field at %p with %p (was: %p)\n", (ptr), *(ptr), __old));     \
-                       if (G_UNLIKELY (ptr_in_nursery (__copy) && !ptr_in_nursery ((ptr)))) \
-                               add_to_global_remset ((ptr));           \
-               }       \
-       } while (0)
-
-/*
- * Scan the object pointed to by @start for references to
- * other objects between @from_start and @from_end and copy
- * them to the gray_objects area.
- */
-static void
-scan_object (char *start, GrayQueue *queue)
-{
-#include "sgen-scan-object.h"
-
-       HEAVY_STAT (++stat_scan_object_called_nursery);
-}
-
-/*
- * scan_vtype:
- *
- * Scan the valuetype pointed to by START, described by DESC for references to
- * other objects between @from_start and @from_end and copy them to the gray_objects area.
- * Returns a pointer to the end of the object.
- */
-static char*
-scan_vtype (char *start, mword desc, char* from_start, char* from_end, GrayQueue *queue)
-{
-       size_t skip_size;
-
-       /* The descriptors include info about the MonoObject header as well */
-       start -= sizeof (MonoObject);
-
-       switch (desc & 0x7) {
-       case DESC_TYPE_RUN_LENGTH:
-               OBJ_RUN_LEN_FOREACH_PTR (desc,start);
-               OBJ_RUN_LEN_SIZE (skip_size, desc, start);
-               g_assert (skip_size);
-               return start + skip_size;
-       case DESC_TYPE_SMALL_BITMAP:
-               OBJ_BITMAP_FOREACH_PTR (desc,start);
-               OBJ_BITMAP_SIZE (skip_size, desc, start);
-               return start + skip_size;
-       case DESC_TYPE_LARGE_BITMAP:
-       case DESC_TYPE_COMPLEX:
-               // FIXME:
-               g_assert_not_reached ();
-               break;
-       default:
-               // The other descriptors can't happen with vtypes
-               g_assert_not_reached ();
-               break;
-       }
-       return NULL;
-}
-
-#undef HANDLE_PTR
-#define HANDLE_PTR(ptr,obj)    do {    \
-               void *__old = *(ptr);   \
-               void *__copy;           \
-               if (__old) {    \
-                       major_copy_or_mark_object ((ptr), queue);       \
-                       __copy = *(ptr);        \
-                       DEBUG (9, if (__old != __copy) fprintf (gc_debug_file, "Overwrote field at %p with %p (was: %p)\n", (ptr), *(ptr), __old));     \
-                       if (G_UNLIKELY (ptr_in_nursery (__copy) && !ptr_in_nursery ((ptr)))) \
-                               add_to_global_remset ((ptr));           \
-               }       \
-       } while (0)
-
-static void
-major_scan_object (char *start, GrayQueue *queue)
-{
-#include "sgen-scan-object.h"
-
-       HEAVY_STAT (++stat_scan_object_called_major);
+ done:
+       if (lock)
+               UNLOCK_GLOBAL_REMSET;
 }
 
 /*
@@ -2138,7 +1593,7 @@ major_scan_object (char *start, GrayQueue *queue)
  * frequently after each object is copied, to achieve better locality and cache
  * usage.
  */
-static void inline
+static void
 drain_gray_stack (GrayQueue *queue)
 {
        char *obj;
@@ -2149,15 +1604,18 @@ drain_gray_stack (GrayQueue *queue)
                        if (!obj)
                                break;
                        DEBUG (9, fprintf (gc_debug_file, "Precise gray object scan %p (%s)\n", obj, safe_name (obj)));
-                       scan_object (obj, queue);
+                       major.minor_scan_object (obj, queue);
                }
        } else {
+               if (major.is_parallel && queue == &workers_distribute_gray_queue)
+                       return;
+
                for (;;) {
                        GRAY_OBJECT_DEQUEUE (queue, obj);
                        if (!obj)
                                break;
                        DEBUG (9, fprintf (gc_debug_file, "Precise gray object scan %p (%s)\n", obj, safe_name (obj)));
-                       major_scan_object (obj, queue);
+                       major.major_scan_object (obj, queue);
                }
        }
 }
@@ -2222,7 +1680,7 @@ pin_objects_from_addresses (GCMemSection *section, void **start, void **end, voi
                                        pin_object (search_start);
                                        GRAY_OBJECT_ENQUEUE (queue, search_start);
                                        if (heap_dump_file)
-                                               pin_stats_register_object (search_start, last_obj_size);
+                                               mono_sgen_pin_stats_register_object (search_start, last_obj_size);
                                        definitely_pinned [count] = search_start;
                                        count++;
                                        break;
@@ -2241,17 +1699,18 @@ pin_objects_from_addresses (GCMemSection *section, void **start, void **end, voi
        return count;
 }
 
-static void
-pin_objects_in_section (GCMemSection *section, GrayQueue *queue)
+void
+mono_sgen_pin_objects_in_section (GCMemSection *section, GrayQueue *queue)
 {
-       int start = section->pin_queue_start;
-       int end = section->pin_queue_end;
-       if (start != end) {
+       int num_entries = section->pin_queue_num_entries;
+       if (num_entries) {
+               void **start = section->pin_queue_start;
                int reduced_to;
-               reduced_to = pin_objects_from_addresses (section, pin_queue + start, pin_queue + end,
+               reduced_to = pin_objects_from_addresses (section, start, start + num_entries,
                                section->data, section->next_data, queue);
-               section->pin_queue_start = start;
-               section->pin_queue_end = start + reduced_to;
+               section->pin_queue_num_entries = reduced_to;
+               if (!reduced_to)
+                       section->pin_queue_start = NULL;
        }
 }
 
@@ -2591,10 +2050,10 @@ alloc_nursery (void)
 
        g_assert (nursery_size == DEFAULT_NURSERY_SIZE);
        alloc_size = nursery_size;
-#ifdef ALIGN_NURSERY
-       data = mono_sgen_alloc_os_memory_aligned (alloc_size, alloc_size, TRUE);
+#ifdef SGEN_ALIGN_NURSERY
+       data = major.alloc_heap (alloc_size, alloc_size, DEFAULT_NURSERY_BITS);
 #else
-       data = mono_sgen_alloc_os_memory (alloc_size, TRUE);
+       data = major.alloc_heap (alloc_size, 0, DEFAULT_NURSERY_BITS);
 #endif
        nursery_start = data;
        nursery_real_end = nursery_start + nursery_size;
@@ -2621,6 +2080,18 @@ alloc_nursery (void)
        /* FIXME: frag here is lost */
 }
 
+void*
+mono_gc_get_nursery (int *shift_bits, size_t *size)
+{
+       *size = nursery_size;
+#ifdef SGEN_ALIGN_NURSERY
+       *shift_bits = DEFAULT_NURSERY_BITS;
+#else
+       *shift_bits = -1;
+#endif
+       return nursery_start;
+}
+
 static void
 scan_finalizer_entries (CopyOrMarkObjectFunc copy_func, FinalizeEntry *list, GrayQueue *queue)
 {
@@ -2702,7 +2173,7 @@ finish_gray_stack (char *start_addr, char *end_addr, int generation, GrayQueue *
        TV_DECLARE (btv);
        int fin_ready;
        int ephemeron_rounds = 0;
-       CopyOrMarkObjectFunc copy_func = current_collection_generation == GENERATION_NURSERY ? copy_object : major_copy_or_mark_object;
+       CopyOrMarkObjectFunc copy_func = current_collection_generation == GENERATION_NURSERY ? major.copy_object : major.copy_or_mark_object;
 
        /*
         * We copied all the reachable objects. Now it's the time to copy
@@ -2782,8 +2253,8 @@ finish_gray_stack (char *start_addr, char *end_addr, int generation, GrayQueue *
        g_assert (gray_object_queue_is_empty (queue));
 }
 
-static void
-check_section_scan_starts (GCMemSection *section)
+void
+mono_sgen_check_section_scan_starts (GCMemSection *section)
 {
        int i;
        for (i = 0; i < section->num_scan_start; ++i) {
@@ -2799,14 +2270,14 @@ check_scan_starts (void)
 {
        if (!do_scan_starts_check)
                return;
-       check_section_scan_starts (nursery_section);
-       major_check_scan_starts ();
+       mono_sgen_check_section_scan_starts (nursery_section);
+       major.check_scan_starts ();
 }
 
 static int last_num_pinned = 0;
 
 static void
-build_nursery_fragments (int start_pin, int end_pin)
+build_nursery_fragments (void **start, int num_entries)
 {
        char *frag_start, *frag_end;
        size_t frag_size;
@@ -2822,16 +2293,16 @@ build_nursery_fragments (int start_pin, int end_pin)
        fragment_total = 0;
        /* clear scan starts */
        memset (nursery_section->scan_starts, 0, nursery_section->num_scan_start * sizeof (gpointer));
-       for (i = start_pin; i < end_pin; ++i) {
-               frag_end = pin_queue [i];
+       for (i = 0; i < num_entries; ++i) {
+               frag_end = start [i];
                /* remove the pin bit from pinned objects */
                unpin_object (frag_end);
                nursery_section->scan_starts [((char*)frag_end - (char*)nursery_section->data)/SCAN_START_SIZE] = frag_end;
                frag_size = frag_end - frag_start;
                if (frag_size)
                        add_nursery_frag (frag_size, frag_start, frag_end);
-               frag_size = ALIGN_UP (safe_object_get_size ((MonoObject*)pin_queue [i]));
-               frag_start = (char*)pin_queue [i] + frag_size;
+               frag_size = ALIGN_UP (safe_object_get_size ((MonoObject*)start [i]));
+               frag_start = (char*)start [i] + frag_size;
        }
        nursery_last_pinned_end = frag_start;
        frag_end = nursery_real_end;
@@ -2839,9 +2310,9 @@ build_nursery_fragments (int start_pin, int end_pin)
        if (frag_size)
                add_nursery_frag (frag_size, frag_start, frag_end);
        if (!nursery_fragments) {
-               DEBUG (1, fprintf (gc_debug_file, "Nursery fully pinned (%d)\n", end_pin - start_pin));
-               for (i = start_pin; i < end_pin; ++i) {
-                       DEBUG (3, fprintf (gc_debug_file, "Bastard pinning obj %p (%s), size: %d\n", pin_queue [i], safe_name (pin_queue [i]), safe_object_get_size (pin_queue [i])));
+               DEBUG (1, fprintf (gc_debug_file, "Nursery fully pinned (%d)\n", num_entries));
+               for (i = 0; i < num_entries; ++i) {
+                       DEBUG (3, fprintf (gc_debug_file, "Bastard pinning obj %p (%s), size: %d\n", start [i], safe_name (start [i]), safe_object_get_size (start [i])));
                }
                degraded_mode = 1;
        }
@@ -2865,14 +2336,14 @@ scan_from_registered_roots (CopyOrMarkObjectFunc copy_func, char *addr_start, ch
        }
 }
 
-static void
-dump_occupied (char *start, char *end, char *section_start)
+void
+mono_sgen_dump_occupied (char *start, char *end, char *section_start)
 {
        fprintf (heap_dump_file, "<occupied offset=\"%td\" size=\"%td\"/>\n", start - section_start, end - start);
 }
 
-static void
-dump_section (GCMemSection *section, const char *type)
+void
+mono_sgen_dump_section (GCMemSection *section, const char *type)
 {
        char *start = section->data;
        char *end = section->data + section->size;
@@ -2888,7 +2359,7 @@ dump_section (GCMemSection *section, const char *type)
 
                if (!*(void**)start) {
                        if (occ_start) {
-                               dump_occupied (occ_start, start, section->data);
+                               mono_sgen_dump_occupied (occ_start, start, section->data);
                                occ_start = NULL;
                        }
                        start += sizeof (void*); /* should be ALLOC_ALIGN, really */
@@ -2915,7 +2386,7 @@ dump_section (GCMemSection *section, const char *type)
                start += size;
        }
        if (occ_start)
-               dump_occupied (occ_start, start, section->data);
+               mono_sgen_dump_occupied (occ_start, start, section->data);
 
        fprintf (heap_dump_file, "</section>\n");
 }
@@ -2978,9 +2449,9 @@ dump_heap (const char *type, int num, const char *reason)
                dump_object (list->obj, TRUE);
        fprintf (heap_dump_file, "</pinned-objects>\n");
 
-       dump_section (nursery_section, "nursery");
+       mono_sgen_dump_section (nursery_section, "nursery");
 
-       major_dump_heap ();
+       major.dump_heap (heap_dump_file);
 
        fprintf (heap_dump_file, "<los>\n");
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
@@ -2990,6 +2461,22 @@ dump_heap (const char *type, int num, const char *reason)
        fprintf (heap_dump_file, "</collection>\n");
 }
 
+void
+mono_sgen_register_moved_object (void *obj, void *destination)
+{
+       g_assert (mono_profiler_events & MONO_PROFILE_GC_MOVES);
+
+       /* FIXME: handle this for parallel collector */
+       g_assert (!major.is_parallel);
+
+       if (moved_objects_idx == MOVED_OBJECTS_NUM) {
+               mono_profiler_gc_moves (moved_objects, moved_objects_idx);
+               moved_objects_idx = 0;
+       }
+       moved_objects [moved_objects_idx++] = obj;
+       moved_objects [moved_objects_idx++] = destination;
+}
+
 static void
 init_stats (void)
 {
@@ -3001,6 +2488,7 @@ init_stats (void)
        mono_counters_register ("Minor fragment clear", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_pre_collection_fragment_clear);
        mono_counters_register ("Minor pinning", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_pinning);
        mono_counters_register ("Minor scan remsets", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_scan_remsets);
+       mono_counters_register ("Minor scan cardtables", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_scan_card_table);
        mono_counters_register ("Minor scan pinned", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_scan_pinned);
        mono_counters_register ("Minor scan registered roots", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_scan_registered_roots);
        mono_counters_register ("Minor scan thread data", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_minor_scan_thread_data);
@@ -3021,6 +2509,7 @@ init_stats (void)
        mono_counters_register ("Major sweep", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_major_sweep);
        mono_counters_register ("Major fragment creation", MONO_COUNTER_GC | MONO_COUNTER_LONG, &time_major_fragment_creation);
 
+
 #ifdef HEAVY_STATISTICS
        mono_counters_register ("WBarrier set field", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_set_field);
        mono_counters_register ("WBarrier set arrayref", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_set_arrayref);
@@ -3056,6 +2545,7 @@ init_stats (void)
        mono_counters_register ("Unique store remsets", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_store_remsets_unique);
        mono_counters_register ("Saved remsets 1", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_saved_remsets_1);
        mono_counters_register ("Saved remsets 2", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_saved_remsets_2);
+       mono_counters_register ("Non-global remsets processed", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_local_remsets_processed);
        mono_counters_register ("Global remsets added", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_global_remsets_added);
        mono_counters_register ("Global remsets re-added", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_global_remsets_readded);
        mono_counters_register ("Global remsets processed", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_global_remsets_processed);
@@ -3069,7 +2559,7 @@ static gboolean
 need_major_collection (void)
 {
        mword los_alloced = los_memory_usage - MIN (last_los_memory_usage, los_memory_usage);
-       return minor_collection_sections_alloced * MAJOR_SECTION_SIZE + los_alloced > minor_collection_allowance;
+       return minor_collection_sections_alloced * major.section_size + los_alloced > minor_collection_allowance;
 }
 
 /*
@@ -3116,9 +2606,9 @@ collect_nursery (size_t requested_size)
 
        nursery_section->next_data = nursery_next;
 
-       major_start_nursery_collection ();
+       major.start_nursery_collection ();
 
-       gray_object_queue_init (&gray_queue);
+       gray_object_queue_init (&gray_queue, mono_sgen_get_unmanaged_allocator ());
 
        num_minor_gcs++;
        mono_stats.minor_gc_count ++;
@@ -3131,8 +2621,8 @@ collect_nursery (size_t requested_size)
        /* identify pinned objects */
        optimize_pin_queue (0);
        next_pin_slot = pin_objects_from_addresses (nursery_section, pin_queue, pin_queue + next_pin_slot, nursery_start, nursery_next, &gray_queue);
-       nursery_section->pin_queue_start = 0;
-       nursery_section->pin_queue_end = next_pin_slot;
+       nursery_section->pin_queue_start = pin_queue;
+       nursery_section->pin_queue_num_entries = next_pin_slot;
        TV_GETTIME (atv);
        time_minor_pinning += TV_ELAPSED_MS (btv, atv);
        DEBUG (2, fprintf (gc_debug_file, "Finding pinned pointers: %d in %d usecs\n", next_pin_slot, TV_ELAPSED (btv, atv)));
@@ -3152,13 +2642,21 @@ collect_nursery (size_t requested_size)
        time_minor_scan_remsets += TV_ELAPSED_MS (atv, btv);
        DEBUG (2, fprintf (gc_debug_file, "Old generation scan: %d usecs\n", TV_ELAPSED (atv, btv)));
 
+       if (use_cardtable) {
+               card_tables_collect_starts (TRUE);
+               TV_GETTIME (atv);
+               scan_from_card_tables (nursery_start, nursery_next, &gray_queue);
+               TV_GETTIME (btv);
+               time_minor_scan_card_table += TV_ELAPSED_MS (atv, btv);
+       }
+
        drain_gray_stack (&gray_queue);
 
        TV_GETTIME (atv);
        time_minor_scan_pinned += TV_ELAPSED_MS (btv, atv);
        /* registered roots, this includes static fields */
-       scan_from_registered_roots (copy_object, nursery_start, nursery_next, ROOT_TYPE_NORMAL, &gray_queue);
-       scan_from_registered_roots (copy_object, nursery_start, nursery_next, ROOT_TYPE_WBARRIER, &gray_queue);
+       scan_from_registered_roots (major.copy_object, nursery_start, nursery_next, ROOT_TYPE_NORMAL, &gray_queue);
+       scan_from_registered_roots (major.copy_object, nursery_start, nursery_next, ROOT_TYPE_WBARRIER, &gray_queue);
        TV_GETTIME (btv);
        time_minor_scan_registered_roots += TV_ELAPSED_MS (atv, btv);
        /* thread data */
@@ -3175,7 +2673,7 @@ collect_nursery (size_t requested_size)
         * pinned objects as we go, memzero() the empty fragments so they are ready for the
         * next allocations.
         */
-       build_nursery_fragments (0, next_pin_slot);
+       build_nursery_fragments (pin_queue, next_pin_slot);
        TV_GETTIME (btv);
        time_minor_fragment_creation += TV_ELAPSED_MS (atv, btv);
        DEBUG (2, fprintf (gc_debug_file, "Fragment creation: %d usecs, %lu bytes available\n", TV_ELAPSED (atv, btv), (unsigned long)fragment_total));
@@ -3183,7 +2681,7 @@ collect_nursery (size_t requested_size)
        if (consistency_check_at_minor_collection)
                check_major_refs ();
 
-       major_finish_nursery_collection ();
+       major.finish_nursery_collection ();
 
        TV_GETTIME (all_btv);
        mono_stats.minor_gc_time_usecs += TV_ELAPSED (all_atv, all_btv);
@@ -3202,9 +2700,12 @@ collect_nursery (size_t requested_size)
 
        g_assert (gray_object_queue_is_empty (&gray_queue));
 
+       if (use_cardtable)
+               card_tables_collect_starts (FALSE);
+
        check_scan_starts ();
 
-       binary_protocol_flush_buffers ();
+       binary_protocol_flush_buffers (FALSE);
 
        current_collection_generation = -1;
 
@@ -3224,8 +2725,8 @@ major_do_collection (const char *reason)
         */
        char *heap_start = NULL;
        char *heap_end = (char*)-1;
-       int old_num_major_sections = num_major_sections;
-       int num_major_sections_saved, save_target, allowance_target;
+       int old_num_major_sections = major.get_num_major_sections ();
+       int num_major_sections, num_major_sections_saved, save_target, allowance_target;
        mword los_memory_saved, los_memory_alloced, old_los_memory_usage;
 
        /*
@@ -3240,7 +2741,9 @@ major_do_collection (const char *reason)
 
        binary_protocol_collection (GENERATION_OLD);
        check_scan_starts ();
-       gray_object_queue_init (&gray_queue);
+       gray_object_queue_init (&gray_queue, mono_sgen_get_unmanaged_allocator ());
+       if (major.is_parallel)
+               gray_object_queue_init (&workers_distribute_gray_queue, mono_sgen_get_unmanaged_allocator ());
 
        degraded_mode = 0;
        DEBUG (1, fprintf (gc_debug_file, "Start major collection %d\n", num_major_gcs));
@@ -3267,6 +2770,8 @@ major_do_collection (const char *reason)
        /* The remsets are not useful for a major collection */
        clear_remsets ();
        global_remset_cache_clear ();
+       if (use_cardtable)
+               card_table_clear ();
 
        TV_GETTIME (atv);
        init_pinning ();
@@ -3288,41 +2793,40 @@ major_do_collection (const char *reason)
         */
        DEBUG (6, fprintf (gc_debug_file, "Pinning from sections\n"));
        /* first pass for the sections */
-       find_section_pin_queue_start_end (nursery_section);
-       major_find_pin_queue_start_ends (&gray_queue);
+       mono_sgen_find_section_pin_queue_start_end (nursery_section);
+       major.find_pin_queue_start_ends (WORKERS_DISTRIBUTE_GRAY_QUEUE);
        /* identify possible pointers to the insize of large objects */
        DEBUG (6, fprintf (gc_debug_file, "Pinning from large objects\n"));
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next) {
-               int start, end;
-               find_optimized_pin_queue_area (bigobj->data, (char*)bigobj->data + bigobj->size, &start, &end);
-               if (start != end) {
+               int dummy;
+               if (mono_sgen_find_optimized_pin_queue_area (bigobj->data, (char*)bigobj->data + bigobj->size, &dummy)) {
                        pin_object (bigobj->data);
                        /* FIXME: only enqueue if object has references */
-                       GRAY_OBJECT_ENQUEUE (&gray_queue, bigobj->data);
+                       GRAY_OBJECT_ENQUEUE (WORKERS_DISTRIBUTE_GRAY_QUEUE, bigobj->data);
                        if (heap_dump_file)
-                               pin_stats_register_object ((char*) bigobj->data, safe_object_get_size ((MonoObject*) bigobj->data));
+                               mono_sgen_pin_stats_register_object ((char*) bigobj->data, safe_object_get_size ((MonoObject*) bigobj->data));
                        DEBUG (6, fprintf (gc_debug_file, "Marked large object %p (%s) size: %lu from roots\n", bigobj->data, safe_name (bigobj->data), (unsigned long)bigobj->size));
                }
        }
        /* second pass for the sections */
-       pin_objects_in_section (nursery_section, &gray_queue);
-       major_pin_objects (&gray_queue);
+       mono_sgen_pin_objects_in_section (nursery_section, WORKERS_DISTRIBUTE_GRAY_QUEUE);
+       major.pin_objects (WORKERS_DISTRIBUTE_GRAY_QUEUE);
 
        TV_GETTIME (btv);
        time_major_pinning += TV_ELAPSED_MS (atv, btv);
        DEBUG (2, fprintf (gc_debug_file, "Finding pinned pointers: %d in %d usecs\n", next_pin_slot, TV_ELAPSED (atv, btv)));
        DEBUG (4, fprintf (gc_debug_file, "Start scan with %d pinned objects\n", next_pin_slot));
 
-       major_init_to_space ();
+       major.init_to_space ();
 
-       drain_gray_stack (&gray_queue);
+       workers_start_all_workers (1);
 
        TV_GETTIME (atv);
        time_major_scan_pinned += TV_ELAPSED_MS (btv, atv);
 
        /* registered roots, this includes static fields */
-       scan_from_registered_roots (major_copy_or_mark_object, heap_start, heap_end, ROOT_TYPE_NORMAL, &gray_queue);
-       scan_from_registered_roots (major_copy_or_mark_object, heap_start, heap_end, ROOT_TYPE_WBARRIER, &gray_queue);
+       scan_from_registered_roots (major.copy_or_mark_object, heap_start, heap_end, ROOT_TYPE_NORMAL, WORKERS_DISTRIBUTE_GRAY_QUEUE);
+       scan_from_registered_roots (major.copy_or_mark_object, heap_start, heap_end, ROOT_TYPE_WBARRIER, WORKERS_DISTRIBUTE_GRAY_QUEUE);
        TV_GETTIME (btv);
        time_major_scan_registered_roots += TV_ELAPSED_MS (atv, btv);
 
@@ -3337,8 +2841,8 @@ major_do_collection (const char *reason)
        time_major_scan_alloc_pinned += TV_ELAPSED_MS (atv, btv);
 
        /* scan the list of objects ready for finalization */
-       scan_finalizer_entries (major_copy_or_mark_object, fin_ready_list, &gray_queue);
-       scan_finalizer_entries (major_copy_or_mark_object, critical_fin_list, &gray_queue);
+       scan_finalizer_entries (major.copy_or_mark_object, fin_ready_list, WORKERS_DISTRIBUTE_GRAY_QUEUE);
+       scan_finalizer_entries (major.copy_or_mark_object, critical_fin_list, WORKERS_DISTRIBUTE_GRAY_QUEUE);
        TV_GETTIME (atv);
        time_major_scan_finalized += TV_ELAPSED_MS (btv, atv);
        DEBUG (2, fprintf (gc_debug_file, "Root scan: %d usecs\n", TV_ELAPSED (btv, atv)));
@@ -3346,6 +2850,18 @@ major_do_collection (const char *reason)
        TV_GETTIME (btv);
        time_major_scan_big_objects += TV_ELAPSED_MS (atv, btv);
 
+       if (major.is_parallel) {
+               while (!gray_object_queue_is_empty (WORKERS_DISTRIBUTE_GRAY_QUEUE)) {
+                       workers_distribute_gray_queue_sections ();
+                       usleep (2000);
+               }
+       }
+       workers_change_num_working (-1);
+       workers_join ();
+
+       if (major.is_parallel)
+               g_assert (gray_object_queue_is_empty (&gray_queue));
+
        /* all the objects in the heap */
        finish_gray_stack (heap_start, heap_end, GENERATION_OLD, &gray_queue);
        TV_GETTIME (atv);
@@ -3380,7 +2896,7 @@ major_do_collection (const char *reason)
        TV_GETTIME (atv);
        time_major_los_sweep += TV_ELAPSED_MS (btv, atv);
 
-       major_sweep ();
+       major.sweep ();
 
        TV_GETTIME (btv);
        time_major_sweep += TV_ELAPSED_MS (atv, btv);
@@ -3389,7 +2905,7 @@ major_do_collection (const char *reason)
         * pinned objects as we go, memzero() the empty fragments so they are ready for the
         * next allocations.
         */
-       build_nursery_fragments (nursery_section->pin_queue_start, nursery_section->pin_queue_end);
+       build_nursery_fragments (nursery_section->pin_queue_start, nursery_section->pin_queue_num_entries);
 
        TV_GETTIME (atv);
        time_major_fragment_creation += TV_ELAPSED_MS (btv, atv);
@@ -3410,10 +2926,12 @@ major_do_collection (const char *reason)
 
        g_assert (gray_object_queue_is_empty (&gray_queue));
 
+       num_major_sections = major.get_num_major_sections ();
+
        num_major_sections_saved = MAX (old_num_major_sections - num_major_sections, 0);
        los_memory_saved = MAX (old_los_memory_usage - los_memory_usage, 1);
 
-       save_target = ((num_major_sections * MAJOR_SECTION_SIZE) + los_memory_saved) / 2;
+       save_target = ((num_major_sections * major.section_size) + los_memory_saved) / 2;
        /*
         * We aim to allow the allocation of as many sections as is
         * necessary to reclaim save_target sections in the next
@@ -3429,18 +2947,18 @@ major_do_collection (const char *reason)
         *
         * hence:
         */
-       allowance_target = (mword)((double)save_target * (double)(minor_collection_sections_alloced * MAJOR_SECTION_SIZE + los_memory_alloced) / (double)(num_major_sections_saved * MAJOR_SECTION_SIZE + los_memory_saved));
+       allowance_target = (mword)((double)save_target * (double)(minor_collection_sections_alloced * major.section_size + los_memory_alloced) / (double)(num_major_sections_saved * major.section_size + los_memory_saved));
 
-       minor_collection_allowance = MAX (MIN (allowance_target, num_major_sections * MAJOR_SECTION_SIZE + los_memory_usage), MIN_MINOR_COLLECTION_ALLOWANCE);
+       minor_collection_allowance = MAX (MIN (allowance_target, num_major_sections * major.section_size + los_memory_usage), MIN_MINOR_COLLECTION_ALLOWANCE);
 
        minor_collection_sections_alloced = 0;
        last_los_memory_usage = los_memory_usage;
 
-       major_finish_major_collection ();
+       major.finish_major_collection ();
 
        check_scan_starts ();
 
-       binary_protocol_flush_buffers ();
+       binary_protocol_flush_buffers (FALSE);
 
        //consistency_check ();
 }
@@ -3469,10 +2987,7 @@ minor_collect_or_expand_inner (size_t size)
 {
        int do_minor_collection = 1;
 
-       if (!nursery_section) {
-               alloc_nursery ();
-               return;
-       }
+       g_assert (nursery_section);
        if (do_minor_collection) {
                stop_world ();
                if (collect_nursery (size))
@@ -3511,7 +3026,7 @@ report_internal_mem_usage (void)
        printf ("Internal memory usage:\n");
        mono_sgen_report_internal_mem_usage ();
        printf ("Pinned memory usage:\n");
-       major_report_pinned_memory_usage ();
+       major.report_pinned_memory_usage ();
 }
 
 /*
@@ -3656,7 +3171,8 @@ alloc_degraded (MonoVTable *vtable, size_t size)
                restart_world ();
        }
 
-       return major_alloc_degraded (vtable, size);
+       degraded_mode += size;
+       return major.alloc_degraded (vtable, size);
 }
 
 /*
@@ -3996,7 +3512,7 @@ mono_gc_alloc_pinned_obj (MonoVTable *vtable, size_t size)
                p = alloc_large_inner (vtable, size);
        } else {
                DEBUG (9, g_assert (vtable->klass->inited));
-               p = major_alloc_small_pinned_obj (size, vtable->klass->has_references);
+               p = major.alloc_small_pinned_obj (size, vtable->klass->has_references);
        }
        DEBUG (6, fprintf (gc_debug_file, "Allocated pinned object %p, vtable: %p (%s), size: %zd\n", p, vtable, vtable->klass->name, size));
        binary_protocol_alloc_pinned (p, vtable, size);
@@ -4093,7 +3609,7 @@ finalize_in_range (CopyOrMarkObjectFunc copy_func, char *start, char *end, int g
        for (i = 0; i < finalizable_hash_size; ++i) {
                prev = NULL;
                for (entry = finalizable_hash [i]; entry;) {
-                       if ((char*)entry->object >= start && (char*)entry->object < end && !major_is_object_live (entry->object)) {
+                       if ((char*)entry->object >= start && (char*)entry->object < end && !major.is_object_live (entry->object)) {
                                gboolean is_fin_ready = object_is_fin_ready (entry->object);
                                char *copy = entry->object;
                                copy_func ((void**)&copy, queue);
@@ -4160,7 +3676,7 @@ object_is_reachable (char *object, char *start, char *end)
        /*This happens for non nursery objects during minor collections. We just treat all objects as alive.*/
        if (object < start || object >= end)
                return TRUE;
-       return !object_is_fin_ready (object) || major_is_object_live (object);
+       return !object_is_fin_ready (object) || major.is_object_live (object);
 }
 
 /* LOCKING: requires that the GC lock is held */
@@ -4251,11 +3767,11 @@ clear_unreachable_ephemerons (CopyOrMarkObjectFunc copy_func, char *start, char
                        if (was_promoted) {
                                if (ptr_in_nursery (key)) {/*key was not promoted*/
                                        DEBUG (5, fprintf (gc_debug_file, "\tAdded remset to key %p\n", key));
-                                       add_to_global_remset (&cur->key);
+                                       mono_sgen_add_to_global_remset (&cur->key);
                                }
                                if (ptr_in_nursery (cur->value)) {/*value was not promoted*/
                                        DEBUG (5, fprintf (gc_debug_file, "\tAdded remset to value %p\n", cur->value));
-                                       add_to_global_remset (&cur->value);
+                                       mono_sgen_add_to_global_remset (&cur->value);
                                }
                        }
                }
@@ -4337,7 +3853,7 @@ null_link_in_range (CopyOrMarkObjectFunc copy_func, char *start, char *end, int
                prev = NULL;
                for (entry = disappearing_link_hash [i]; entry;) {
                        char *object = DISLINK_OBJECT (entry);
-                       if (object >= start && object < end && !major_is_object_live (object)) {
+                       if (object >= start && object < end && !major.is_object_live (object)) {
                                gboolean track = DISLINK_TRACK (entry);
                                if (!track && object_is_fin_ready (object)) {
                                        void **p = entry->link;
@@ -4736,6 +4252,18 @@ mono_gc_add_memory_pressure (gint64 value)
        UNLOCK_GC;
 }
 
+void
+mono_sgen_register_major_sections_alloced (int num_sections)
+{
+       minor_collection_sections_alloced += num_sections;
+}
+
+mword
+mono_sgen_get_minor_collection_allowance (void)
+{
+       return minor_collection_allowance;
+}
+
 /*
  * ######################################################################
  * ########  registered roots support
@@ -4933,7 +4461,7 @@ update_current_thread_stack (void *start)
  */
 //#define XDOMAIN_CHECKS_IN_WBARRIER
 
-#ifndef BINARY_PROTOCOL
+#ifndef SGEN_BINARY_PROTOCOL
 #ifndef HEAVY_STATISTICS
 #define MANAGED_ALLOCATION
 #ifndef XDOMAIN_CHECKS_IN_WBARRIER
@@ -5058,11 +4586,12 @@ suspend_handler (int sig, siginfo_t *siginfo, void *context)
        int old_errno = errno;
        gpointer regs [ARCH_NUM_REGS];
        gpointer stack_start;
+       ucontext_t *ctx = (ucontext_t*)context;
 
        id = pthread_self ();
        info = mono_sgen_thread_info_lookup (id);
        info->stopped_domain = mono_domain_get ();
-       info->stopped_ip = (gpointer) ARCH_SIGCTX_IP (context);
+       info->stopped_ip = (gpointer) ARCH_SIGCTX_IP (ctx);
        stop_count = global_stop_count;
        /* duplicate signal */
        if (0 && info->stop_count == stop_count) {
@@ -5073,13 +4602,13 @@ suspend_handler (int sig, siginfo_t *siginfo, void *context)
        /* update the remset info in the thread data structure */
        info->remset = remembered_set;
 #endif
-       stack_start = (char*) ARCH_SIGCTX_SP (context) - REDZONE_SIZE;
+       stack_start = (char*) ARCH_SIGCTX_SP (ctx) - REDZONE_SIZE;
        /* If stack_start is not within the limits, then don't set it
           in info and we will be restarted. */
        if (stack_start >= info->stack_start_limit && info->stack_start <= info->stack_end) {
                info->stack_start = stack_start;
 
-               ARCH_COPY_SIGCTX_REGS (regs, context);
+               ARCH_COPY_SIGCTX_REGS (regs, ctx);
                info->stopped_regs = regs;
        } else {
                g_assert (!info->stack_start);
@@ -5087,7 +4616,7 @@ suspend_handler (int sig, siginfo_t *siginfo, void *context)
 
        /* Notify the JIT */
        if (gc_callbacks.thread_suspend_func)
-               gc_callbacks.thread_suspend_func (info->runtime_data, context);
+               gc_callbacks.thread_suspend_func (info->runtime_data, ctx);
 
        DEBUG (4, fprintf (gc_debug_file, "Posting suspend_ack_semaphore for suspend from %p %p\n", info, (gpointer)ARCH_GET_THREAD ()));
        /* notify the waiting thread */
@@ -5214,10 +4743,11 @@ mono_gc_conservatively_scan_area (void *start, void *end)
 void*
 mono_gc_scan_object (void *obj)
 {
+       g_assert_not_reached ();
        if (current_collection_generation == GENERATION_NURSERY)
-               copy_object (&obj, &gray_queue);
+               major.copy_object (&obj, &gray_queue);
        else
-               major_copy_or_mark_object (&obj, &gray_queue);
+               major.copy_or_mark_object (&obj, &gray_queue);
        return obj;
 }
 
@@ -5296,6 +4826,8 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
 
        if (global)
                HEAVY_STAT (++stat_global_remsets_processed);
+       else
+               HEAVY_STAT (++stat_local_remsets_processed);
 
        /* FIXME: exclude stack locations */
        switch ((*p) & REMSET_TYPE_MASK) {
@@ -5304,7 +4836,7 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
                //__builtin_prefetch (ptr);
                if (((void*)ptr < start_nursery || (void*)ptr >= end_nursery)) {
                        gpointer old = *ptr;
-                       copy_object (ptr, queue);
+                       major.copy_object (ptr, queue);
                        DEBUG (9, fprintf (gc_debug_file, "Overwrote remset at %p with %p\n", ptr, *ptr));
                        if (old)
                                binary_protocol_ptr_update (ptr, old, *ptr, (gpointer)LOAD_VTABLE (*ptr), safe_object_get_size (*ptr));
@@ -5314,7 +4846,7 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
                                 * becomes part of the global remset, which can grow very large.
                                 */
                                DEBUG (9, fprintf (gc_debug_file, "Add to global remset because of pinning %p (%p %s)\n", ptr, *ptr, safe_name (*ptr)));
-                               add_to_global_remset (ptr);
+                               mono_sgen_add_to_global_remset (ptr);
                        }
                } else {
                        DEBUG (9, fprintf (gc_debug_file, "Skipping remset at %p holding %p\n", ptr, *ptr));
@@ -5326,10 +4858,10 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
                        return p + 2;
                count = p [1];
                while (count-- > 0) {
-                       copy_object (ptr, queue);
+                       major.copy_object (ptr, queue);
                        DEBUG (9, fprintf (gc_debug_file, "Overwrote remset at %p with %p (count: %d)\n", ptr, *ptr, (int)count));
                        if (!global && *ptr >= start_nursery && *ptr < end_nursery)
-                               add_to_global_remset (ptr);
+                               mono_sgen_add_to_global_remset (ptr);
                        ++ptr;
                }
                return p + 2;
@@ -5337,7 +4869,7 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
                ptr = (void**)(*p & ~REMSET_TYPE_MASK);
                if (((void*)ptr >= start_nursery && (void*)ptr < end_nursery))
                        return p + 1;
-               scan_object ((char*)ptr, queue);
+               major.minor_scan_object ((char*)ptr, queue);
                return p + 1;
        case REMSET_VTYPE: {
                ptr = (void**)(*p & ~REMSET_TYPE_MASK);
@@ -5346,7 +4878,7 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
                desc = p [1];
                count = p [2];
                while (count-- > 0)
-                       ptr = (void**) scan_vtype ((char*)ptr, desc, start_nursery, end_nursery, queue);
+                       ptr = (void**) major.minor_scan_vtype ((char*)ptr, desc, start_nursery, end_nursery, queue);
                return p + 3;
        }
        default:
@@ -5530,9 +5062,8 @@ scan_from_remsets (void *start_nursery, void *end_nursery, GrayQueue *queue)
                        int j;
                        for (remset = info->remset; remset; remset = next) {
                                DEBUG (4, fprintf (gc_debug_file, "Scanning remset for thread %p, range: %p-%p, size: %td\n", info, remset->data, remset->store_next, remset->store_next - remset->data));
-                               for (p = remset->data; p < remset->store_next;) {
+                               for (p = remset->data; p < remset->store_next;)
                                        p = handle_remset (p, start_nursery, end_nursery, FALSE, queue);
-                               }
                                remset->store_next = remset->data;
                                next = remset->next;
                                remset->next = NULL;
@@ -5552,9 +5083,8 @@ scan_from_remsets (void *start_nursery, void *end_nursery, GrayQueue *queue)
                RememberedSet *next;
                remset = freed_thread_remsets;
                DEBUG (4, fprintf (gc_debug_file, "Scanning remset for freed thread, range: %p-%p, size: %td\n", remset->data, remset->store_next, remset->store_next - remset->data));
-               for (p = remset->data; p < remset->store_next;) {
+               for (p = remset->data; p < remset->store_next;)
                        p = handle_remset (p, start_nursery, end_nursery, FALSE, queue);
-               }
                next = remset->next;
                DEBUG (4, fprintf (gc_debug_file, "Freed remset at %p\n", remset->data));
                mono_sgen_free_internal_dynamic (remset, remset_byte_size (remset), INTERNAL_MEM_REMSET);
@@ -5883,6 +5413,15 @@ mono_gc_pthread_detach (pthread_t thread)
  * ######################################################################
  */
 
+/*
+ * This causes the compile to extend the liveness of 'v' till the call to dummy_use
+ */
+static void
+dummy_use (gpointer v) {
+       __asm__ volatile ("" : "=r"(v) : "r"(v));
+}
+
+
 static RememberedSet*
 alloc_remset (int size, gpointer id) {
        RememberedSet* res = mono_sgen_alloc_internal_dynamic (sizeof (RememberedSet) + (size * sizeof (gpointer)), INTERNAL_MEM_REMSET);
@@ -5902,92 +5441,141 @@ alloc_remset (int size, gpointer id) {
 void
 mono_gc_wbarrier_set_field (MonoObject *obj, gpointer field_ptr, MonoObject* value)
 {
-       RememberedSet *rs;
-       TLAB_ACCESS_INIT;
        HEAVY_STAT (++stat_wbarrier_set_field);
        if (ptr_in_nursery (field_ptr)) {
                *(void**)field_ptr = value;
                return;
        }
        DEBUG (8, fprintf (gc_debug_file, "Adding remset at %p\n", field_ptr));
-       LOCK_GC;
-       rs = REMEMBERED_SET;
-       if (rs->store_next < rs->end_set) {
+       if (use_cardtable) {
+               *(void**)field_ptr = value;
+               if (ptr_in_nursery (value))
+                       sgen_card_table_mark_address ((mword)field_ptr);
+               dummy_use (value);
+       } else {
+               RememberedSet *rs;
+               TLAB_ACCESS_INIT;
+
+               LOCK_GC;
+               rs = REMEMBERED_SET;
+               if (rs->store_next < rs->end_set) {
+                       *(rs->store_next++) = (mword)field_ptr;
+                       *(void**)field_ptr = value;
+                       UNLOCK_GC;
+                       return;
+               }
+               rs = alloc_remset (rs->end_set - rs->data, (void*)1);
+               rs->next = REMEMBERED_SET;
+               REMEMBERED_SET = rs;
+#ifdef HAVE_KW_THREAD
+               mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
+#endif
                *(rs->store_next++) = (mword)field_ptr;
                *(void**)field_ptr = value;
                UNLOCK_GC;
-               return;
        }
-       rs = alloc_remset (rs->end_set - rs->data, (void*)1);
-       rs->next = REMEMBERED_SET;
-       REMEMBERED_SET = rs;
-#ifdef HAVE_KW_THREAD
-       mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
-#endif
-       *(rs->store_next++) = (mword)field_ptr;
-       *(void**)field_ptr = value;
-       UNLOCK_GC;
 }
 
 void
 mono_gc_wbarrier_set_arrayref (MonoArray *arr, gpointer slot_ptr, MonoObject* value)
 {
-       RememberedSet *rs;
-       TLAB_ACCESS_INIT;
        HEAVY_STAT (++stat_wbarrier_set_arrayref);
        if (ptr_in_nursery (slot_ptr)) {
                *(void**)slot_ptr = value;
                return;
        }
        DEBUG (8, fprintf (gc_debug_file, "Adding remset at %p\n", slot_ptr));
-       LOCK_GC;
-       rs = REMEMBERED_SET;
-       if (rs->store_next < rs->end_set) {
+       if (use_cardtable) {
+               *(void**)slot_ptr = value;
+               if (ptr_in_nursery (value))
+                       sgen_card_table_mark_address ((mword)slot_ptr);
+               dummy_use (value);
+       } else {
+               RememberedSet *rs;
+               TLAB_ACCESS_INIT;
+
+               LOCK_GC;
+               rs = REMEMBERED_SET;
+               if (rs->store_next < rs->end_set) {
+                       *(rs->store_next++) = (mword)slot_ptr;
+                       *(void**)slot_ptr = value;
+                       UNLOCK_GC;
+                       return;
+               }
+               rs = alloc_remset (rs->end_set - rs->data, (void*)1);
+               rs->next = REMEMBERED_SET;
+               REMEMBERED_SET = rs;
+#ifdef HAVE_KW_THREAD
+               mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
+#endif
                *(rs->store_next++) = (mword)slot_ptr;
                *(void**)slot_ptr = value;
                UNLOCK_GC;
-               return;
        }
-       rs = alloc_remset (rs->end_set - rs->data, (void*)1);
-       rs->next = REMEMBERED_SET;
-       REMEMBERED_SET = rs;
-#ifdef HAVE_KW_THREAD
-       mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
-#endif
-       *(rs->store_next++) = (mword)slot_ptr;
-       *(void**)slot_ptr = value;
-       UNLOCK_GC;
 }
 
 void
 mono_gc_wbarrier_arrayref_copy (gpointer dest_ptr, gpointer src_ptr, int count)
 {
-       RememberedSet *rs;
-       TLAB_ACCESS_INIT;
        HEAVY_STAT (++stat_wbarrier_arrayref_copy);
-       LOCK_GC;
-       memmove (dest_ptr, src_ptr, count * sizeof (gpointer));
-       if (ptr_in_nursery (dest_ptr)) {
-               UNLOCK_GC;
+       /*This check can be done without taking a lock since dest_ptr array is pinned*/
+       if (ptr_in_nursery (dest_ptr) || count <= 0) {
+               memmove (dest_ptr, src_ptr, count * sizeof (gpointer));
                return;
        }
-       rs = REMEMBERED_SET;
-       DEBUG (8, fprintf (gc_debug_file, "Adding remset at %p, %d\n", dest_ptr, count));
-       if (rs->store_next + 1 < rs->end_set) {
+
+       if (use_cardtable) {
+               gpointer *dest = dest_ptr;
+               gpointer *src = src_ptr;
+
+               /*overlapping that required backward copying*/
+               if (src < dest && (src + count) > dest) {
+                       gpointer *start = dest;
+                       dest += count - 1;
+                       src += count - 1;
+
+                       for (; dest >= start; --src, --dest) {
+                               gpointer value = *src;
+                               *dest = value;
+                               if (ptr_in_nursery (value))
+                                       sgen_card_table_mark_address ((mword)dest);
+                               dummy_use (value);
+                       }
+               } else {
+                       gpointer *end = dest + count;
+                       for (; dest < end; ++src, ++dest) {
+                               gpointer value = *src;
+                               *dest = value;
+                               if (ptr_in_nursery (value))
+                                       sgen_card_table_mark_address ((mword)dest);
+                               dummy_use (value);
+                       }
+               }
+       } else {
+               RememberedSet *rs;
+               TLAB_ACCESS_INIT;
+               LOCK_GC;
+               memmove (dest_ptr, src_ptr, count * sizeof (gpointer));
+
+               rs = REMEMBERED_SET;
+               DEBUG (8, fprintf (gc_debug_file, "Adding remset at %p, %d\n", dest_ptr, count));
+               if (rs->store_next + 1 < rs->end_set) {
+                       *(rs->store_next++) = (mword)dest_ptr | REMSET_RANGE;
+                       *(rs->store_next++) = count;
+                       UNLOCK_GC;
+                       return;
+               }
+               rs = alloc_remset (rs->end_set - rs->data, (void*)1);
+               rs->next = REMEMBERED_SET;
+               REMEMBERED_SET = rs;
+#ifdef HAVE_KW_THREAD
+               mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
+#endif
                *(rs->store_next++) = (mword)dest_ptr | REMSET_RANGE;
                *(rs->store_next++) = count;
+
                UNLOCK_GC;
-               return;
        }
-       rs = alloc_remset (rs->end_set - rs->data, (void*)1);
-       rs->next = REMEMBERED_SET;
-       REMEMBERED_SET = rs;
-#ifdef HAVE_KW_THREAD
-       mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
-#endif
-       *(rs->store_next++) = (mword)dest_ptr | REMSET_RANGE;
-       *(rs->store_next++) = count;
-       UNLOCK_GC;
 }
 
 static char *found_obj;
@@ -6010,7 +5598,7 @@ find_object_for_ptr (char *ptr)
 
        if (ptr >= nursery_section->data && ptr < nursery_section->end_data) {
                found_obj = NULL;
-               scan_area_with_callback (nursery_section->data, nursery_section->end_data,
+               mono_sgen_scan_area_with_callback (nursery_section->data, nursery_section->end_data,
                                (IterateObjectCallbackFunc)find_object_for_ptr_callback, ptr);
                if (found_obj)
                        return found_obj;
@@ -6026,7 +5614,7 @@ find_object_for_ptr (char *ptr)
         * be called from gdb, so we don't care.
         */
        found_obj = NULL;
-       major_iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)find_object_for_ptr_callback, ptr);
+       major.iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)find_object_for_ptr_callback, ptr);
        return found_obj;
 }
 
@@ -6069,17 +5657,22 @@ mono_gc_wbarrier_generic_nostore (gpointer ptr)
        }
 #endif
 
-       LOCK_GC;
-
        if (*(gpointer*)ptr)
                binary_protocol_wbarrier (ptr, *(gpointer*)ptr, (gpointer)LOAD_VTABLE (*(gpointer*)ptr));
 
        if (ptr_in_nursery (ptr) || ptr_on_stack (ptr) || !ptr_in_nursery (*(gpointer*)ptr)) {
                DEBUG (8, fprintf (gc_debug_file, "Skipping remset at %p\n", ptr));
-               UNLOCK_GC;
                return;
        }
 
+       if (use_cardtable) {
+               if (ptr_in_nursery(*(gpointer*)ptr))
+                       sgen_card_table_mark_address ((mword)ptr);
+               return;
+       }
+
+       LOCK_GC;
+
        buffer = STORE_REMSET_BUFFER;
        index = STORE_REMSET_BUFFER_INDEX;
        /* This simple optimization eliminates a sizable portion of
@@ -6113,6 +5706,7 @@ mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value)
        *(void**)ptr = value;
        if (ptr_in_nursery (value))
                mono_gc_wbarrier_generic_nostore (ptr);
+       dummy_use (value);
 }
 
 void mono_gc_wbarrier_value_copy_bitmap (gpointer _dest, gpointer _src, int size, unsigned bitmap)
@@ -6137,35 +5731,40 @@ void
 mono_gc_wbarrier_value_copy (gpointer dest, gpointer src, int count, MonoClass *klass)
 {
        RememberedSet *rs;
+       size_t size = count * mono_class_value_size (klass, NULL);
        TLAB_ACCESS_INIT;
        HEAVY_STAT (++stat_wbarrier_value_copy);
        g_assert (klass->valuetype);
        LOCK_GC;
-       memmove (dest, src, count * mono_class_value_size (klass, NULL));
-       rs = REMEMBERED_SET;
-       if (ptr_in_nursery (dest) || ptr_on_stack (dest) || !klass->has_references) {
-               UNLOCK_GC;
-               return;
-       }
-       g_assert (klass->gc_descr_inited);
-       DEBUG (8, fprintf (gc_debug_file, "Adding value remset at %p, count %d, descr %p for class %s (%p)\n", dest, count, klass->gc_descr, klass->name, klass));
+       memmove (dest, src, size);
+       if (use_cardtable) {
+               sgen_card_table_mark_range ((mword)dest, size);
+       } else {
+               rs = REMEMBERED_SET;
+               if (ptr_in_nursery (dest) || ptr_on_stack (dest) || !klass->has_references) {
+                       UNLOCK_GC;
+                       return;
+               }
+               g_assert (klass->gc_descr_inited);
+               DEBUG (8, fprintf (gc_debug_file, "Adding value remset at %p, count %d, descr %p for class %s (%p)\n", dest, count, klass->gc_descr, klass->name, klass));
 
-       if (rs->store_next + 3 < rs->end_set) {
+               if (rs->store_next + 3 < rs->end_set) {
+                       *(rs->store_next++) = (mword)dest | REMSET_VTYPE;
+                       *(rs->store_next++) = (mword)klass->gc_descr;
+                       *(rs->store_next++) = (mword)count;
+                       UNLOCK_GC;
+                       return;
+               }
+               rs = alloc_remset (rs->end_set - rs->data, (void*)1);
+               rs->next = REMEMBERED_SET;
+               REMEMBERED_SET = rs;
+#ifdef HAVE_KW_THREAD
+               mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
+#endif
                *(rs->store_next++) = (mword)dest | REMSET_VTYPE;
                *(rs->store_next++) = (mword)klass->gc_descr;
                *(rs->store_next++) = (mword)count;
-               UNLOCK_GC;
-               return;
        }
-       rs = alloc_remset (rs->end_set - rs->data, (void*)1);
-       rs->next = REMEMBERED_SET;
-       REMEMBERED_SET = rs;
-#ifdef HAVE_KW_THREAD
-       mono_sgen_thread_info_lookup (ARCH_GET_THREAD ())->remset = rs;
-#endif
-       *(rs->store_next++) = (mword)dest | REMSET_VTYPE;
-       *(rs->store_next++) = (mword)klass->gc_descr;
-       *(rs->store_next++) = (mword)count;
        UNLOCK_GC;
 }
 
@@ -6235,9 +5834,9 @@ describe_ptr (char *ptr)
        if (ptr_in_nursery (ptr)) {
                printf ("Pointer inside nursery.\n");
        } else {
-               if (major_ptr_is_in_non_pinned_space (ptr)) {
+               if (major.ptr_is_in_non_pinned_space (ptr)) {
                        printf ("Pointer inside oldspace.\n");
-               } else if (obj_is_from_pinned_alloc (ptr)) {
+               } else if (major.obj_is_from_pinned_alloc (ptr)) {
                        printf ("Pointer is inside a pinned chunk.\n");
                } else {
                        printf ("Pointer unknown.\n");
@@ -6402,7 +6001,7 @@ static gboolean missing_remsets;
 #undef HANDLE_PTR
 #define HANDLE_PTR(ptr,obj)    do {    \
                if (*(ptr) && (char*)*(ptr) >= nursery_start && (char*)*(ptr) < nursery_next) { \
-               if (!find_in_remsets ((char*)(ptr))) { \
+               if (!find_in_remsets ((char*)(ptr)) && (!use_cardtable || !sgen_card_table_address_is_marked ((mword)ptr))) { \
                 fprintf (gc_debug_file, "Oldspace->newspace reference %p at offset %td in object %p (%s.%s) not found in remsets.\n", *(ptr), (char*)(ptr) - (char*)(obj), (obj), ((MonoObject*)(obj))->vtable->klass->name_space, ((MonoObject*)(obj))->vtable->klass->name); \
                binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (char*)(ptr) - (char*)(obj), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
                if (!object_is_pinned (*(ptr)))                         \
@@ -6442,14 +6041,14 @@ check_consistency (void)
        DEBUG (1, fprintf (gc_debug_file, "Begin heap consistency check...\n"));
 
        // Check that oldspace->newspace pointers are registered with the collector
-       major_iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)check_consistency_callback, NULL);
+       major.iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)check_consistency_callback, NULL);
 
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
                check_consistency_callback (bigobj->data, bigobj->size, NULL);
 
        DEBUG (1, fprintf (gc_debug_file, "Heap consistency check done.\n"));
 
-#ifdef BINARY_PROTOCOL
+#ifdef SGEN_BINARY_PROTOCOL
        if (!binary_protocol_file)
 #endif
                g_assert (!missing_remsets);
@@ -6458,8 +6057,8 @@ check_consistency (void)
 
 #undef HANDLE_PTR
 #define HANDLE_PTR(ptr,obj)    do {                                    \
-               if (*(ptr)                                            \
-                       g_assert (LOAD_VTABLE (*(ptr)));                \
+               if (*(ptr) && !LOAD_VTABLE (*(ptr)))                                            \
+                       g_error ("Could not load vtable for obj %p slot %d (size %d)", obj, (char*)ptr - (char*)obj, safe_object_get_size ((MonoObject*)obj));          \
        } while (0)
 
 static void
@@ -6474,7 +6073,7 @@ check_major_refs (void)
 {
        LOSObject *bigobj;
 
-       major_iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)check_major_refs_callback, NULL);
+       major.iterate_objects (TRUE, TRUE, (IterateObjectCallbackFunc)check_major_refs_callback, NULL);
 
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
                check_major_refs_callback (bigobj->data, bigobj->size, NULL);
@@ -6544,7 +6143,7 @@ mono_gc_get_used_size (void)
        LOCK_GC;
        tot = los_memory_usage;
        tot += nursery_section->next_data - nursery_section->data;
-       tot += major_get_used_size ();
+       tot += major.get_used_size ();
        /* FIXME: account for pinned objects */
        UNLOCK_GC;
        return tot;
@@ -6707,12 +6306,10 @@ mono_gc_is_gc_thread (void)
        return result;
 }
 
-#ifdef USER_CONFIG
-
 /* Tries to extract a number from the passed string, taking in to account m, k
  * and g suffixes */
-static gboolean
-parse_environment_string_extract_number (gchar *str, glong *out)
+gboolean
+mono_sgen_parse_environment_string_extract_number (const char *str, glong *out)
 {
        char *endptr;
        int len = strlen (str), shift = 0;
@@ -6752,13 +6349,12 @@ parse_environment_string_extract_number (gchar *str, glong *out)
        return TRUE;
 }
 
-#endif 
-
 void
 mono_gc_base_init (void)
 {
        char *env;
        char **opts, **ptr;
+       char *major_collector = NULL;
        struct sigaction sinfo;
 
        LOCK_INIT (gc_mutex);
@@ -6770,48 +6366,27 @@ mono_gc_base_init (void)
        pagesize = mono_pagesize ();
        gc_debug_file = stderr;
 
-#ifdef USER_CONFIG
+       LOCK_INIT (interruption_mutex);
+       LOCK_INIT (global_remset_mutex);
 
        if ((env = getenv ("MONO_GC_PARAMS"))) {
-               if (g_str_has_prefix (env, "nursery-size")) {
-                       int index = 0;
-                       long val;
-                       while (env [index] && env [index++] != '=')
-                               ;
-                       if (env [index] && parse_environment_string_extract_number (env
-                                       + index, &val)) {
-                               default_nursery_size = val;
-#ifdef ALIGN_NURSERY
-                               if ((val & (val - 1))) {
-                                       fprintf (stderr, "The nursery size must be a power of two.\n");
-                                       exit (1);
-                               }
-
-                               default_nursery_bits = 0;
-                               while (1 << (++ default_nursery_bits) != default_nursery_size)
-                                       ;
-#endif
-                       } else {
-                               fprintf (stderr, "nursery-size must be an integer.\n");
-                               exit (1);
+               opts = g_strsplit (env, ",", -1);
+               for (ptr = opts; *ptr; ++ptr) {
+                       char *opt = *ptr;
+                       if (g_str_has_prefix (opt, "major=")) {
+                               opt = strchr (opt, '=') + 1;
+                               major_collector = g_strdup (opt);
                        }
-               } else {
-                       fprintf (stderr, "MONO_GC_PARAMS must be of the form 'nursery-size=N' (where N is an integer, possibly with a k, m or a g suffix).\n");
-                       exit (1);
                }
+       } else {
+               opts = NULL;
        }
 
-#endif
-
-       nursery_size = DEFAULT_NURSERY_SIZE;
-       minor_collection_allowance = MIN_MINOR_COLLECTION_ALLOWANCE;
-
        init_stats ();
        mono_sgen_init_internal_allocator ();
-       major_init ();
 
        mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_FRAGMENT, sizeof (Fragment));
-       mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_SECTION, SIZEOF_GC_MEM_SECTION);
+       mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_SECTION, SGEN_SIZEOF_GC_MEM_SECTION);
        mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_FINALIZE_ENTRY, sizeof (FinalizeEntry));
        mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_DISLINK, sizeof (DisappearingLink));
        mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_ROOT_RECORD, sizeof (RootRecord));
@@ -6820,6 +6395,93 @@ mono_gc_base_init (void)
        mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_STORE_REMSET, sizeof (GenericStoreRememberedSet));
        mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_EPHEMERON_LINK, sizeof (EphemeronLinkNode));
 
+       if (!major_collector || !strcmp (major_collector, "marksweep")) {
+               mono_sgen_marksweep_init (&major);
+       } else if (!major_collector || !strcmp (major_collector, "marksweep-fixed")) {
+               mono_sgen_marksweep_fixed_init (&major);
+       } else if (!major_collector || !strcmp (major_collector, "marksweep-par")) {
+               mono_sgen_marksweep_par_init (&major);
+               workers_init (mono_cpu_count ());
+       } else if (!major_collector || !strcmp (major_collector, "marksweep-fixed-par")) {
+               mono_sgen_marksweep_fixed_par_init (&major);
+               workers_init (mono_cpu_count ());
+       } else if (!strcmp (major_collector, "copying")) {
+               mono_sgen_copying_init (&major);
+       } else {
+               fprintf (stderr, "Unknown major collector `%s'.\n", major_collector);
+               exit (1);
+       }
+
+#ifdef SGEN_HAVE_CARDTABLE
+       use_cardtable = major.supports_cardtable;
+#else
+       use_cardtable = FALSE;
+#endif
+
+       if (opts) {
+               for (ptr = opts; *ptr; ++ptr) {
+                       char *opt = *ptr;
+                       if (g_str_has_prefix (opt, "major="))
+                               continue;
+                       if (g_str_has_prefix (opt, "wbarrier=")) {
+                               opt = strchr (opt, '=') + 1;
+                               if (strcmp (opt, "remset") == 0) {
+                                       use_cardtable = FALSE;
+                               } else if (strcmp (opt, "cardtable") == 0) {
+                                       if (!use_cardtable) {
+                                               if (major.supports_cardtable)
+                                                       fprintf (stderr, "The cardtable write barrier is not supported on this platform.\n");
+                                               else
+                                                       fprintf (stderr, "The major collector does not support the cardtable write barrier.\n");
+                                               exit (1);
+                                       }
+                               }
+                               continue;
+                       }
+#ifdef USER_CONFIG
+                       if (g_str_has_prefix (opt, "nursery-size=")) {
+                               long val;
+                               opt = strchr (opt, '=') + 1;
+                               if (*opt && mono_sgen_parse_environment_string_extract_number (opt, &val)) {
+                                       default_nursery_size = val;
+#ifdef SGEN_ALIGN_NURSERY
+                                       if ((val & (val - 1))) {
+                                               fprintf (stderr, "The nursery size must be a power of two.\n");
+                                               exit (1);
+                                       }
+
+                                       default_nursery_bits = 0;
+                                       while (1 << (++ default_nursery_bits) != default_nursery_size)
+                                               ;
+#endif
+                               } else {
+                                       fprintf (stderr, "nursery-size must be an integer.\n");
+                                       exit (1);
+                               }
+                               continue;
+                       }
+#endif
+                       if (!(major.handle_gc_param && major.handle_gc_param (opt))) {
+                               fprintf (stderr, "MONO_GC_PARAMS must be a comma-delimited list of one or more of the following:\n");
+                               fprintf (stderr, "  nursery-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
+                               fprintf (stderr, "  major=COLLECTOR (where COLLECTOR is `marksweep', `marksweep-par' or `copying')\n");
+                               fprintf (stderr, "  wbarrier=WBARRIER (where WBARRIER is `remset' or `cardtable')\n");
+                               if (major.print_gc_param_usage)
+                                       major.print_gc_param_usage ();
+                               exit (1);
+                       }
+               }
+               g_strfreev (opts);
+       }
+
+       if (major_collector)
+               g_free (major_collector);
+
+       nursery_size = DEFAULT_NURSERY_SIZE;
+       minor_collection_allowance = MIN_MINOR_COLLECTION_ALLOWANCE;
+
+       alloc_nursery ();
+
        if ((env = getenv ("MONO_GC_DEBUG"))) {
                opts = g_strsplit (env, ",", -1);
                for (ptr = opts; ptr && *ptr; ptr ++) {
@@ -6855,7 +6517,7 @@ mono_gc_base_init (void)
                                heap_dump_file = fopen (filename, "w");
                                if (heap_dump_file)
                                        fprintf (heap_dump_file, "<sgen-dump>\n");
-#ifdef BINARY_PROTOCOL
+#ifdef SGEN_BINARY_PROTOCOL
                        } else if (g_str_has_prefix (opt, "binary-protocol=")) {
                                char *filename = strchr (opt, '=') + 1;
                                binary_protocol_file = fopen (filename, "w");
@@ -6897,6 +6559,9 @@ mono_gc_base_init (void)
        pthread_key_create (&thread_info_key, NULL);
 #endif
 
+       if (use_cardtable)
+               card_table_init ();
+
        gc_initialized = TRUE;
        UNLOCK_GC;
        mono_gc_register_thread (&sinfo);
@@ -7161,6 +6826,7 @@ create_allocator (int atype)
        mono_method_get_header (res)->init_locals = FALSE;
 
        info = mono_image_alloc0 (mono_defaults.corlib, sizeof (AllocatorWrapperInfo));
+       info->gc_name = "sgen";
        info->alloc_type = atype;
        mono_marshal_set_wrapper_info (res, info);
 
@@ -7168,6 +6834,12 @@ create_allocator (int atype)
 }
 #endif
 
+const char *
+mono_gc_get_gc_name (void)
+{
+       return "sgen";
+}
+
 static MonoMethod* alloc_method_cache [ATYPE_NUM];
 static MonoMethod *write_barrier_method;
 
@@ -7303,7 +6975,7 @@ mono_gc_get_write_barrier (void)
        MonoMethodSignature *sig;
 #ifdef MANAGED_WBARRIER
        int label_no_wb_1, label_no_wb_2, label_no_wb_3, label_no_wb_4, label_need_wb, label_slow_path;
-#ifndef ALIGN_NURSERY
+#ifndef SGEN_ALIGN_NURSERY
        int label_continue_1, label_continue_2, label_no_wb_5;
        int dereferenced_var;
 #endif
@@ -7324,6 +6996,8 @@ mono_gc_get_write_barrier (void)
 #endif
 #endif
 
+       g_assert (!use_cardtable);
+
        // FIXME: Maybe create a separate version for ctors (the branch would be
        // correctly predicted more times)
        if (write_barrier_method)
@@ -7338,7 +7012,7 @@ mono_gc_get_write_barrier (void)
 
 #ifdef MANAGED_WBARRIER
        if (mono_runtime_has_tls_get ()) {
-#ifdef ALIGN_NURSERY
+#ifdef SGEN_ALIGN_NURSERY
                // if (ptr_in_nursery (ptr)) return;
                /*
                 * Masking out the bits might be faster, but we would have to use 64 bit
@@ -7459,7 +7133,7 @@ mono_gc_get_write_barrier (void)
                mono_mb_patch_branch (mb, label_no_wb_2);
                mono_mb_patch_branch (mb, label_no_wb_3);
                mono_mb_patch_branch (mb, label_no_wb_4);
-#ifndef ALIGN_NURSERY
+#ifndef SGEN_ALIGN_NURSERY
                mono_mb_patch_branch (mb, label_no_wb_5);
 #endif
                mono_mb_emit_byte (mb, CEE_RET);
@@ -7513,12 +7187,6 @@ mono_gc_is_disabled (void)
        return FALSE;
 }
 
-gboolean
-mono_sgen_is_worker_thread (pthread_t thread)
-{
-       return FALSE;
-}
-
 void
 mono_sgen_debug_printf (int level, const char *format, ...)
 {
index 732db1ef0a2b55537b0d7935288241047182f72e..d41bf3271a529d459d73c625b14aff04f6a0ff81 100644 (file)
@@ -31,8 +31,7 @@
 #include <signal.h>
 #include <mono/utils/mono-compiler.h>
 #include <mono/metadata/class-internals.h>
-
-/* #define SGEN_PARALLEL_MARK */
+#include <mono/metadata/object-internals.h>
 
 /*
  * Turning on heavy statistics will turn off the managed allocator and
  */
 //#define HEAVY_STATISTICS
 
+/*
+ * If this is set, the nursery is aligned to an address aligned to its size, ie.
+ * a 1MB nursery will be aligned to an address divisible by 1MB. This allows us to
+ * speed up ptr_in_nursery () checks which are very frequent. This requires the
+ * nursery size to be a compile time constant.
+ */
+#define SGEN_ALIGN_NURSERY 1
+
+//#define SGEN_BINARY_PROTOCOL
+
+#define SGEN_MAX_DEBUG_LEVEL 2
+
 #define THREAD_HASH_SIZE 11
 
+#define GC_BITS_PER_WORD (sizeof (mword) * 8)
+
 #define ARCH_THREAD_TYPE pthread_t
 #define ARCH_GET_THREAD pthread_self
 #define ARCH_THREAD_EQUALS(a,b) pthread_equal (a, b)
@@ -108,6 +121,51 @@ struct _SgenBlock {
        unsigned char role;
 };
 
+/*
+ * The nursery section and the major copying collector's sections use
+ * this struct.
+ */
+typedef struct _GCMemSection GCMemSection;
+struct _GCMemSection {
+       SgenBlock block;
+       char *data;
+       mword size;
+       /* pointer where more data could be allocated if it fits */
+       char *next_data;
+       char *end_data;
+       /*
+        * scan starts is an array of pointers to objects equally spaced in the allocation area
+        * They let use quickly find pinned objects from pinning pointers.
+        */
+       char **scan_starts;
+       /* in major collections indexes in the pin_queue for objects that pin this section */
+       void **pin_queue_start;
+       int pin_queue_num_entries;
+       unsigned short num_scan_start;
+       gboolean is_to_space;
+};
+
+#define SGEN_SIZEOF_GC_MEM_SECTION     ((sizeof (GCMemSection) + 7) & ~7)
+
+/*
+ * to quickly find the head of an object pinned by a conservative
+ * address we keep track of the objects allocated for each
+ * SGEN_SCAN_START_SIZE memory chunk in the nursery or other memory
+ * sections. Larger values have less memory overhead and bigger
+ * runtime cost. 4-8 KB are reasonable values.
+ */
+#define SGEN_SCAN_START_SIZE (4096*2)
+
+/*
+ * Objects bigger then this go into the large object space.  This size
+ * has a few constraints.  It must fit into the major heap, which in
+ * the case of the copying collector means that it must fit into a
+ * pinned chunk.  It must also play well with the GC descriptors, some
+ * of which (DESC_TYPE_RUN_LENGTH, DESC_TYPE_SMALL_BITMAP) encode the
+ * object size.
+ */
+#define SGEN_MAX_SMALL_OBJ_SIZE 8000
+
 /* This is also the MAJOR_SECTION_SIZE for the copying major
    collector */
 #define SGEN_PINNED_CHUNK_SIZE (128 * 1024)
@@ -116,7 +174,7 @@ struct _SgenBlock {
 
 typedef struct _SgenPinnedChunk SgenPinnedChunk;
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__OpenBSD__)
 const static int suspend_signal_num = SIGXFSZ;
 #else
 const static int suspend_signal_num = SIGPWR;
@@ -133,18 +191,13 @@ const static int restart_signal_num = SIGXCPU;
 #define LOCK_INTERRUPTION pthread_mutex_lock (&interruption_mutex)
 #define UNLOCK_INTERRUPTION pthread_mutex_unlock (&interruption_mutex)
 
-#ifdef SGEN_PARALLEL_MARK
 #define SGEN_CAS_PTR   InterlockedCompareExchangePointer
 #define SGEN_ATOMIC_ADD(x,i)   do {                                    \
                int __old_x;                                            \
                do {                                                    \
                        __old_x = (x);                                  \
-               } while (InterlockedCompareExchange (&(x), __old_x, __old_x + (i)) != __old_x); \
+               } while (InterlockedCompareExchange (&(x), __old_x + (i), __old_x) != __old_x); \
        } while (0)
-#else
-#define SGEN_CAS_PTR(p,n,c)    ((*(void**)(p) == (void*)(c)) ? (*(void**)(p) = (void*)(n), (void*)(c)) : (*(void**)(p)))
-#define SGEN_ATOMIC_ADD(x,i)   ((x) += (i))
-#endif
 
 /* non-pthread will need to provide their own version of start/stop */
 #define USE_SIGNAL_BASED_START_STOP_WORLD 1
@@ -153,6 +206,11 @@ const static int restart_signal_num = SIGXCPU;
 
 #ifdef HEAVY_STATISTICS
 #define HEAVY_STAT(x)  x
+
+extern long long stat_objects_alloced_degraded;
+extern long long stat_bytes_alloced_degraded;
+extern long long stat_copy_object_called_major;
+extern long long stat_objects_copied_major;
 #else
 #define HEAVY_STAT(x)
 #endif
@@ -162,6 +220,336 @@ const static int restart_signal_num = SIGXCPU;
 
 #define SGEN_ALIGN_UP(s)               (((s)+(SGEN_ALLOC_ALIGN-1)) & ~(SGEN_ALLOC_ALIGN-1))
 
+#ifdef SGEN_ALIGN_NURSERY
+#define SGEN_PTR_IN_NURSERY(p,bits,start,end)  (((mword)(p) & ~((1 << (bits)) - 1)) == (mword)(start))
+#else
+#define SGEN_PTR_IN_NURSERY(p,bits,start,end)  ((char*)(p) >= (start) && (char*)(p) < (end))
+#endif
+
+/* Structure that corresponds to a MonoVTable: desc is a mword so requires
+ * no cast from a pointer to an integer
+ */
+typedef struct {
+       MonoClass *klass;
+       mword desc;
+} GCVTable;
+
+/* these bits are set in the object vtable: we could merge them since an object can be
+ * either pinned or forwarded but not both.
+ * We store them in the vtable slot because the bits are used in the sync block for
+ * other purposes: if we merge them and alloc the sync blocks aligned to 8 bytes, we can change
+ * this and use bit 3 in the syncblock (with the lower two bits both set for forwarded, that
+ * would be an invalid combination for the monitor and hash code).
+ * The values are already shifted.
+ * The forwarding address is stored in the sync block.
+ */
+#define SGEN_FORWARDED_BIT 1
+#define SGEN_PINNED_BIT 2
+#define SGEN_VTABLE_BITS_MASK 0x3
+
+/* returns NULL if not forwarded, or the forwarded address */
+#define SGEN_OBJECT_IS_FORWARDED(obj) (((mword*)(obj))[0] & SGEN_FORWARDED_BIT ? (void*)(((mword*)(obj))[0] & ~SGEN_VTABLE_BITS_MASK) : NULL)
+#define SGEN_OBJECT_IS_PINNED(obj) (((mword*)(obj))[0] & SGEN_PINNED_BIT)
+
+/* set the forwarded address fw_addr for object obj */
+#define SGEN_FORWARD_OBJECT(obj,fw_addr) do {                          \
+               ((mword*)(obj))[0] = (mword)(fw_addr) | SGEN_FORWARDED_BIT; \
+       } while (0)
+#define SGEN_PIN_OBJECT(obj) do {      \
+               ((mword*)(obj))[0] |= SGEN_PINNED_BIT;  \
+       } while (0)
+#define SGEN_UNPIN_OBJECT(obj) do {    \
+               ((mword*)(obj))[0] &= ~SGEN_PINNED_BIT; \
+       } while (0)
+
+/*
+ * Since we set bits in the vtable, use the macro to load it from the pointer to
+ * an object that is potentially pinned.
+ */
+#define SGEN_LOAD_VTABLE(addr) ((*(mword*)(addr)) & ~SGEN_VTABLE_BITS_MASK)
+
+/*
+ * ######################################################################
+ * ########  GC descriptors
+ * ######################################################################
+ * Used to quickly get the info the GC needs about an object: size and
+ * where the references are held.
+ */
+#define OBJECT_HEADER_WORDS (sizeof(MonoObject)/sizeof(gpointer))
+#define LOW_TYPE_BITS 3
+#define SMALL_BITMAP_SHIFT 16
+#define SMALL_BITMAP_SIZE (GC_BITS_PER_WORD - SMALL_BITMAP_SHIFT)
+#define VECTOR_INFO_SHIFT 14
+#define VECTOR_ELSIZE_SHIFT 3
+#define LARGE_BITMAP_SIZE (GC_BITS_PER_WORD - LOW_TYPE_BITS)
+#define MAX_ELEMENT_SIZE 0x3ff
+#define VECTOR_SUBTYPE_PTRFREE (DESC_TYPE_V_PTRFREE << VECTOR_INFO_SHIFT)
+#define VECTOR_SUBTYPE_REFS    (DESC_TYPE_V_REFS << VECTOR_INFO_SHIFT)
+#define VECTOR_SUBTYPE_RUN_LEN (DESC_TYPE_V_RUN_LEN << VECTOR_INFO_SHIFT)
+#define VECTOR_SUBTYPE_BITMAP  (DESC_TYPE_V_BITMAP << VECTOR_INFO_SHIFT)
+
+/* objects are aligned to 8 bytes boundaries
+ * A descriptor is a pointer in MonoVTable, so 32 or 64 bits of size.
+ * The low 3 bits define the type of the descriptor. The other bits
+ * depend on the type.
+ * As a general rule the 13 remaining low bits define the size, either
+ * of the whole object or of the elements in the arrays. While for objects
+ * the size is already in bytes, for arrays we need to shift, because
+ * array elements might be smaller than 8 bytes. In case of arrays, we
+ * use two bits to describe what the additional high bits represents,
+ * so the default behaviour can handle element sizes less than 2048 bytes.
+ * The high 16 bits, if 0 it means the object is pointer-free.
+ * This design should make it easy and fast to skip over ptr-free data.
+ * The first 4 types should cover >95% of the objects.
+ * Note that since the size of objects is limited to 64K, larger objects
+ * will be allocated in the large object heap.
+ * If we want 4-bytes alignment, we need to put vector and small bitmap
+ * inside complex.
+ */
+enum {
+       /*
+        * We don't use 0 so that 0 isn't a valid GC descriptor.  No
+        * deep reason for this other than to be able to identify a
+        * non-inited descriptor for debugging.
+        *
+        * If an object contains no references, its GC descriptor is
+        * always DESC_TYPE_RUN_LENGTH, without a size, no exceptions.
+        * This is so that we can quickly check for that in
+        * copy_object_no_checks(), without having to fetch the
+        * object's class.
+        */
+       DESC_TYPE_RUN_LENGTH = 1, /* 15 bits aligned byte size | 1-3 (offset, numptr) bytes tuples */
+       DESC_TYPE_SMALL_BITMAP, /* 15 bits aligned byte size | 16-48 bit bitmap */
+       DESC_TYPE_COMPLEX,      /* index for bitmap into complex_descriptors */
+       DESC_TYPE_VECTOR,       /* 10 bits element size | 1 bit array | 2 bits desc | element desc */
+       DESC_TYPE_ARRAY,        /* 10 bits element size | 1 bit array | 2 bits desc | element desc */
+       DESC_TYPE_LARGE_BITMAP, /* | 29-61 bitmap bits */
+       DESC_TYPE_COMPLEX_ARR,  /* index for bitmap into complex_descriptors */
+       /* subtypes for arrays and vectors */
+       DESC_TYPE_V_PTRFREE = 0,/* there are no refs: keep first so it has a zero value  */
+       DESC_TYPE_V_REFS,       /* all the array elements are refs */
+       DESC_TYPE_V_RUN_LEN,    /* elements are run-length encoded as DESC_TYPE_RUN_LENGTH */
+       DESC_TYPE_V_BITMAP      /* elements are as the bitmap in DESC_TYPE_SMALL_BITMAP */
+};
+
+#define SGEN_VTABLE_HAS_REFERENCES(vt) (((MonoVTable*)(vt))->gc_descr != (void*)DESC_TYPE_RUN_LENGTH)
+
+/* helper macros to scan and traverse objects, macros because we resue them in many functions */
+#define OBJ_RUN_LEN_SIZE(size,desc,obj) do { \
+               (size) = ((desc) & 0xfff8) >> 1;        \
+    } while (0)
+
+#define OBJ_BITMAP_SIZE(size,desc,obj) do { \
+               (size) = ((desc) & 0xfff8) >> 1;        \
+    } while (0)
+
+//#define PREFETCH(addr) __asm__ __volatile__ ("     prefetchnta     %0": : "m"(*(char *)(addr)))
+#define PREFETCH(addr)
+
+/* code using these macros must define a HANDLE_PTR(ptr) macro that does the work */
+#define OBJ_RUN_LEN_FOREACH_PTR(desc,obj)      do {    \
+               if ((desc) & 0xffff0000) {      \
+                       /* there are pointers */        \
+                       void **_objptr_end;     \
+                       void **_objptr = (void**)(obj); \
+                       _objptr += ((desc) >> 16) & 0xff;       \
+                       _objptr_end = _objptr + (((desc) >> 24) & 0xff);        \
+                       while (_objptr < _objptr_end) { \
+                               HANDLE_PTR (_objptr, (obj));    \
+                               _objptr++;      \
+                       }       \
+               }       \
+       } while (0)
+
+/* a bitmap desc means that there are pointer references or we'd have
+ * choosen run-length, instead: add an assert to check.
+ */
+#define OBJ_BITMAP_FOREACH_PTR(desc,obj)       do {    \
+               /* there are pointers */        \
+               void **_objptr = (void**)(obj); \
+               gsize _bmap = (desc) >> 16;     \
+               _objptr += OBJECT_HEADER_WORDS; \
+               while (_bmap) { \
+                       if ((_bmap & 1)) {      \
+                               HANDLE_PTR (_objptr, (obj));    \
+                       }       \
+                       _bmap >>= 1;    \
+                       ++_objptr;      \
+               }       \
+       } while (0)
+
+#define OBJ_LARGE_BITMAP_FOREACH_PTR(vt,obj)   do {    \
+               /* there are pointers */        \
+               void **_objptr = (void**)(obj); \
+               gsize _bmap = (vt)->desc >> LOW_TYPE_BITS;      \
+               _objptr += OBJECT_HEADER_WORDS; \
+               while (_bmap) { \
+                       if ((_bmap & 1)) {      \
+                               HANDLE_PTR (_objptr, (obj));    \
+                       }       \
+                       _bmap >>= 1;    \
+                       ++_objptr;      \
+               }       \
+       } while (0)
+
+gsize* mono_sgen_get_complex_descriptor (GCVTable *vt) MONO_INTERNAL;
+
+#define OBJ_COMPLEX_FOREACH_PTR(vt,obj)        do {    \
+               /* there are pointers */        \
+               void **_objptr = (void**)(obj); \
+               gsize *bitmap_data = mono_sgen_get_complex_descriptor ((vt)); \
+               int bwords = (*bitmap_data) - 1;        \
+               void **start_run = _objptr;     \
+               bitmap_data++;  \
+               if (0) {        \
+                       MonoObject *myobj = (MonoObject*)obj;   \
+                       g_print ("found %d at %p (0x%zx): %s.%s\n", bwords, (obj), (vt)->desc, myobj->vtable->klass->name_space, myobj->vtable->klass->name);   \
+               }       \
+               while (bwords-- > 0) {  \
+                       gsize _bmap = *bitmap_data++;   \
+                       _objptr = start_run;    \
+                       /*g_print ("bitmap: 0x%x/%d at %p\n", _bmap, bwords, _objptr);*/        \
+                       while (_bmap) { \
+                               if ((_bmap & 1)) {      \
+                                       HANDLE_PTR (_objptr, (obj));    \
+                               }       \
+                               _bmap >>= 1;    \
+                               ++_objptr;      \
+                       }       \
+                       start_run += GC_BITS_PER_WORD;  \
+               }       \
+       } while (0)
+
+/* this one is untested */
+#define OBJ_COMPLEX_ARR_FOREACH_PTR(vt,obj)    do {    \
+               /* there are pointers */        \
+               gsize *mbitmap_data = mono_sgen_get_complex_descriptor ((vt)); \
+               int mbwords = (*mbitmap_data++) - 1;    \
+               int el_size = mono_array_element_size (vt->klass);      \
+               char *e_start = (char*)(obj) +  G_STRUCT_OFFSET (MonoArray, vector);    \
+               char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
+               if (0)                                                  \
+                        g_print ("found %d at %p (0x%zx): %s.%s\n", mbwords, (obj), (vt)->desc, vt->klass->name_space, vt->klass->name); \
+               while (e_start < e_end) {       \
+                       void **_objptr = (void**)e_start;       \
+                       gsize *bitmap_data = mbitmap_data;      \
+                       unsigned int bwords = mbwords;  \
+                       while (bwords-- > 0) {  \
+                               gsize _bmap = *bitmap_data++;   \
+                               void **start_run = _objptr;     \
+                               /*g_print ("bitmap: 0x%x\n", _bmap);*/  \
+                               while (_bmap) { \
+                                       if ((_bmap & 1)) {      \
+                                               HANDLE_PTR (_objptr, (obj));    \
+                                       }       \
+                                       _bmap >>= 1;    \
+                                       ++_objptr;      \
+                               }       \
+                               _objptr = start_run + GC_BITS_PER_WORD; \
+                       }       \
+                       e_start += el_size;     \
+               }       \
+       } while (0)
+
+#define OBJ_VECTOR_FOREACH_PTR(vt,obj) do {    \
+               /* note: 0xffffc000 excludes DESC_TYPE_V_PTRFREE */     \
+               if ((vt)->desc & 0xffffc000) {  \
+                       int el_size = ((vt)->desc >> 3) & MAX_ELEMENT_SIZE;     \
+                       /* there are pointers */        \
+                       int etype = (vt)->desc & 0xc000;        \
+                       if (etype == (DESC_TYPE_V_REFS << 14)) {        \
+                               void **p = (void**)((char*)(obj) + G_STRUCT_OFFSET (MonoArray, vector));        \
+                               void **end_refs = (void**)((char*)p + el_size * mono_array_length_fast ((MonoArray*)(obj)));    \
+                               /* Note: this code can handle also arrays of struct with only references in them */     \
+                               while (p < end_refs) {  \
+                                       HANDLE_PTR (p, (obj));  \
+                                       ++p;    \
+                               }       \
+                       } else if (etype == DESC_TYPE_V_RUN_LEN << 14) {        \
+                               int offset = ((vt)->desc >> 16) & 0xff; \
+                               int num_refs = ((vt)->desc >> 24) & 0xff;       \
+                               char *e_start = (char*)(obj) + G_STRUCT_OFFSET (MonoArray, vector);     \
+                               char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
+                               while (e_start < e_end) {       \
+                                       void **p = (void**)e_start;     \
+                                       int i;  \
+                                       p += offset;    \
+                                       for (i = 0; i < num_refs; ++i) {        \
+                                               HANDLE_PTR (p + i, (obj));      \
+                                       }       \
+                                       e_start += el_size;     \
+                               }       \
+                       } else if (etype == DESC_TYPE_V_BITMAP << 14) { \
+                               char *e_start = (char*)(obj) +  G_STRUCT_OFFSET (MonoArray, vector);    \
+                               char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
+                               while (e_start < e_end) {       \
+                                       void **p = (void**)e_start;     \
+                                       gsize _bmap = (vt)->desc >> 16; \
+                                       /* Note: there is no object header here to skip */      \
+                                       while (_bmap) { \
+                                               if ((_bmap & 1)) {      \
+                                                       HANDLE_PTR (p, (obj));  \
+                                               }       \
+                                               _bmap >>= 1;    \
+                                               ++p;    \
+                                       }       \
+                                       e_start += el_size;     \
+                               }       \
+                       }       \
+               }       \
+       } while (0)
+
+typedef struct _SgenInternalAllocator SgenInternalAllocator;
+
+#define SGEN_GRAY_QUEUE_SECTION_SIZE   (128 - 3)
+
+/*
+ * This is a stack now instead of a queue, so the most recently added items are removed
+ * first, improving cache locality, and keeping the stack size manageable.
+ */
+typedef struct _GrayQueueSection GrayQueueSection;
+struct _GrayQueueSection {
+       int end;
+       GrayQueueSection *next;
+       char *objects [SGEN_GRAY_QUEUE_SECTION_SIZE];
+};
+
+typedef struct _SgenGrayQueue SgenGrayQueue;
+
+typedef void (*GrayQueueAllocPrepareFunc) (SgenGrayQueue*);
+
+struct _SgenGrayQueue {
+       SgenInternalAllocator *allocator;
+       GrayQueueSection *first;
+       GrayQueueSection *free_list;
+       int balance;
+       GrayQueueAllocPrepareFunc alloc_prepare_func;
+       void *alloc_prepare_data;
+};
+
+#if SGEN_MAX_DEBUG_LEVEL >= 9
+#define GRAY_OBJECT_ENQUEUE gray_object_enqueue
+#define GRAY_OBJECT_DEQUEUE(queue,o) ((o) = gray_object_dequeue ((queue)))
+#else
+#define GRAY_OBJECT_ENQUEUE(queue,o) do {                              \
+               if (G_UNLIKELY (!(queue)->first || (queue)->first->end == SGEN_GRAY_QUEUE_SECTION_SIZE)) \
+                       mono_sgen_gray_object_enqueue ((queue), (o));   \
+               else                                                    \
+                       (queue)->first->objects [(queue)->first->end++] = (o); \
+       } while (0)
+#define GRAY_OBJECT_DEQUEUE(queue,o) do {                              \
+               if (!(queue)->first)                                    \
+                       (o) = NULL;                                     \
+               else if (G_UNLIKELY ((queue)->first->end == 1))         \
+                       (o) = mono_sgen_gray_object_dequeue ((queue));          \
+               else                                                    \
+                       (o) = (queue)->first->objects [--(queue)->first->end]; \
+       } while (0)
+#endif
+
+void mono_sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj) MONO_INTERNAL;
+char* mono_sgen_gray_object_dequeue (SgenGrayQueue *queue) MONO_INTERNAL;
+
 typedef void (*IterateObjectCallbackFunc) (char*, size_t, void*);
 
 void* mono_sgen_alloc_os_memory (size_t size, int activate) MONO_INTERNAL;
@@ -177,6 +565,12 @@ gboolean mono_sgen_is_worker_thread (pthread_t thread) MONO_INTERNAL;
 
 void mono_sgen_update_heap_boundaries (mword low, mword high) MONO_INTERNAL;
 
+void mono_sgen_register_major_sections_alloced (int num_sections) MONO_INTERNAL;
+mword mono_sgen_get_minor_collection_allowance (void) MONO_INTERNAL;
+
+void mono_sgen_scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc callback, void *data) MONO_INTERNAL;
+void mono_sgen_check_section_scan_starts (GCMemSection *section) MONO_INTERNAL;
+
 /* Keep in sync with mono_sgen_dump_internal_mem_usage() in dump_heap()! */
 enum {
        INTERNAL_MEM_MANAGED,
@@ -197,24 +591,31 @@ enum {
        INTERNAL_MEM_MS_TABLES,
        INTERNAL_MEM_MS_BLOCK_INFO,
        INTERNAL_MEM_EPHEMERON_LINK,
+       INTERNAL_MEM_WORKER_DATA,
        INTERNAL_MEM_MAX
 };
 
 #define SGEN_INTERNAL_FREELIST_NUM_SLOTS       30
 
-typedef struct _SgenInternalAllocator SgenInternalAllocator;
 struct _SgenInternalAllocator {
        SgenPinnedChunk *chunk_list;
        SgenPinnedChunk *free_lists [SGEN_INTERNAL_FREELIST_NUM_SLOTS];
+       void *delayed_free_lists [SGEN_INTERNAL_FREELIST_NUM_SLOTS];
        long small_internal_mem_bytes [INTERNAL_MEM_MAX];
 };
 
 void mono_sgen_init_internal_allocator (void) MONO_INTERNAL;
 
+SgenInternalAllocator* mono_sgen_get_unmanaged_allocator (void) MONO_INTERNAL;
+
 const char* mono_sgen_internal_mem_type_name (int type) MONO_INTERNAL;
 void mono_sgen_report_internal_mem_usage (void) MONO_INTERNAL;
 void mono_sgen_report_internal_mem_usage_full (SgenInternalAllocator *alc) MONO_INTERNAL;
 void mono_sgen_dump_internal_mem_usage (FILE *heap_dump_file) MONO_INTERNAL;
+void mono_sgen_dump_section (GCMemSection *section, const char *type) MONO_INTERNAL;
+void mono_sgen_dump_occupied (char *start, char *end, char *section_start) MONO_INTERNAL;
+
+void mono_sgen_register_moved_object (void *obj, void *destination) MONO_INTERNAL;
 
 void mono_sgen_register_fixed_internal_mem_type (int type, size_t size) MONO_INTERNAL;
 
@@ -224,14 +625,105 @@ void mono_sgen_free_internal (void *addr, int type) MONO_INTERNAL;
 void* mono_sgen_alloc_internal_dynamic (size_t size, int type) MONO_INTERNAL;
 void mono_sgen_free_internal_dynamic (void *addr, size_t size, int type) MONO_INTERNAL;
 
+void* mono_sgen_alloc_internal_fixed (SgenInternalAllocator *allocator, int type) MONO_INTERNAL;
+void mono_sgen_free_internal_fixed (SgenInternalAllocator *allocator, void *addr, int type) MONO_INTERNAL;
+
 void* mono_sgen_alloc_internal_full (SgenInternalAllocator *allocator, size_t size, int type) MONO_INTERNAL;
 void mono_sgen_free_internal_full (SgenInternalAllocator *allocator, void *addr, size_t size, int type) MONO_INTERNAL;
 
+void mono_sgen_free_internal_delayed (void *addr, int type, SgenInternalAllocator *thread_allocator) MONO_INTERNAL;
+
 void mono_sgen_debug_printf (int level, const char *format, ...) MONO_INTERNAL;
 
+gboolean mono_sgen_parse_environment_string_extract_number (const char *str, glong *out) MONO_INTERNAL;
+
 void mono_sgen_internal_scan_objects (SgenInternalAllocator *alc, IterateObjectCallbackFunc callback, void *callback_data) MONO_INTERNAL;
 void mono_sgen_internal_scan_pinned_objects (SgenInternalAllocator *alc, IterateObjectCallbackFunc callback, void *callback_data) MONO_INTERNAL;
 
 void** mono_sgen_find_optimized_pin_queue_area (void *start, void *end, int *num) MONO_INTERNAL;
+void mono_sgen_find_section_pin_queue_start_end (GCMemSection *section) MONO_INTERNAL;
+void mono_sgen_pin_objects_in_section (GCMemSection *section, SgenGrayQueue *queue) MONO_INTERNAL;
+
+void mono_sgen_pin_stats_register_object (char *obj, size_t size);
+
+void mono_sgen_add_to_global_remset (gpointer ptr) MONO_INTERNAL;
+
+
+typedef struct _SgenMajorCollector SgenMajorCollector;
+struct _SgenMajorCollector {
+       size_t section_size;
+       gboolean is_parallel;
+       gboolean supports_cardtable;
+
+       void* (*alloc_heap) (mword nursery_size, mword nursery_align, int nursery_bits);
+       gboolean (*is_object_live) (char *obj);
+       void* (*alloc_small_pinned_obj) (size_t size, gboolean has_references);
+       void* (*alloc_degraded) (MonoVTable *vtable, size_t size);
+       void (*copy_or_mark_object) (void **obj_slot, SgenGrayQueue *queue);
+       void (*minor_scan_object) (char *start, SgenGrayQueue *queue);
+       char* (*minor_scan_vtype) (char *start, mword desc, char* from_start, char* from_end, SgenGrayQueue *queue);
+       void (*major_scan_object) (char *start, SgenGrayQueue *queue);
+       void (*copy_object) (void **obj_slot, SgenGrayQueue *queue);
+       void* (*alloc_object) (int size, gboolean has_references);
+       void (*free_pinned_object) (char *obj, size_t size);
+       void (*iterate_objects) (gboolean non_pinned, gboolean pinned, IterateObjectCallbackFunc callback, void *data);
+       void (*free_non_pinned_object) (char *obj, size_t size);
+       void (*find_pin_queue_start_ends) (SgenGrayQueue *queue);
+       void (*pin_objects) (SgenGrayQueue *queue);
+       void (*scan_card_table) (SgenGrayQueue *queue);
+       void (*iterate_live_block_ranges) (void *callback);
+       void (*init_to_space) (void);
+       void (*sweep) (void);
+       void (*check_scan_starts) (void);
+       void (*dump_heap) (FILE *heap_dump_file);
+       gint64 (*get_used_size) (void);
+       void (*start_nursery_collection) (void);
+       void (*finish_nursery_collection) (void);
+       void (*finish_major_collection) (void);
+       gboolean (*ptr_is_in_non_pinned_space) (char *ptr);
+       gboolean (*obj_is_from_pinned_alloc) (char *obj);
+       void (*report_pinned_memory_usage) (void);
+       int (*get_num_major_sections) (void);
+       gboolean (*handle_gc_param) (const char *opt);
+       void (*print_gc_param_usage) (void);
+};
+
+void mono_sgen_marksweep_init (SgenMajorCollector *collector) MONO_INTERNAL;
+void mono_sgen_marksweep_fixed_init (SgenMajorCollector *collector) MONO_INTERNAL;
+void mono_sgen_marksweep_par_init (SgenMajorCollector *collector) MONO_INTERNAL;
+void mono_sgen_marksweep_fixed_par_init (SgenMajorCollector *collector) MONO_INTERNAL;
+void mono_sgen_copying_init (SgenMajorCollector *collector) MONO_INTERNAL;
+
+/*
+ * This function can be called on an object whose first word, the
+ * vtable field, is not intact.  This is necessary for the parallel
+ * collector.
+ */
+static inline guint
+mono_sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o)
+{
+       MonoClass *klass = vtable->klass;
+       /*
+        * We depend on mono_string_length_fast and
+        * mono_array_length_fast not using the object's vtable.
+        */
+       if (klass == mono_defaults.string_class) {
+               return sizeof (MonoString) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
+       } else if (klass->rank) {
+               MonoArray *array = (MonoArray*)o;
+               size_t size = sizeof (MonoArray) + klass->sizes.element_size * mono_array_length_fast (array);
+               if (G_UNLIKELY (array->bounds)) {
+                       size += sizeof (mono_array_size_t) - 1;
+                       size &= ~(sizeof (mono_array_size_t) - 1);
+                       size += sizeof (MonoArrayBounds) * klass->rank;
+               }
+               return size;
+       } else {
+               /* from a created object: the class must be inited already */
+               return klass->instance_size;
+       }
+}
+
+#define mono_sgen_safe_object_get_size(o)              mono_sgen_par_object_get_size ((MonoVTable*)SGEN_LOAD_VTABLE ((o)), (o))
 
 #endif /* __MONO_SGENGC_H__ */
index cccb996800c05eeeaec10055663b8f406d29e975..5c57fb42551bd72b0258d3a36dc7987318023986 100644 (file)
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-#define GRAY_QUEUE_SECTION_SIZE        (128 - 3)
 #define GRAY_QUEUE_LENGTH_LIMIT        64
 
-/*
- * This is a stack now instead of a queue, so the most recently added items are removed
- * first, improving cache locality, and keeping the stack size manageable.
- */
-typedef struct _GrayQueueSection GrayQueueSection;
-struct _GrayQueueSection {
-       int end;
-       GrayQueueSection *next;
-       char *objects [GRAY_QUEUE_SECTION_SIZE];
-};
-
-struct _GrayQueue {
-       GrayQueueSection *first;
-       GrayQueueSection *free_list;
-       int balance;
-};
-
 static GrayQueue gray_queue;
 
 static void
@@ -48,13 +30,16 @@ gray_object_alloc_queue_section (GrayQueue *queue)
 {
        GrayQueueSection *section;
 
+       if (queue->alloc_prepare_func)
+               queue->alloc_prepare_func (queue);
+
        if (queue->free_list) {
                /* Use the previously allocated queue sections if possible */
                section = queue->free_list;
                queue->free_list = section->next;
        } else {
                /* Allocate a new section */
-               section = mono_sgen_alloc_internal (INTERNAL_MEM_GRAY_QUEUE);
+               section = mono_sgen_alloc_internal_fixed (queue->allocator, INTERNAL_MEM_GRAY_QUEUE);
        }
 
        section->end = 0;
@@ -65,9 +50,9 @@ gray_object_alloc_queue_section (GrayQueue *queue)
 }
 
 static void
-gray_object_free_queue_section (GrayQueueSection *section)
+gray_object_free_queue_section (GrayQueueSection *section, SgenInternalAllocator *thread_allocator)
 {
-       mono_sgen_free_internal (section, INTERNAL_MEM_GRAY_QUEUE);
+       mono_sgen_free_internal_delayed (section, INTERNAL_MEM_GRAY_QUEUE, thread_allocator);
 }
 
 static inline gboolean
@@ -79,23 +64,23 @@ gray_object_queue_is_empty (GrayQueue *queue)
 /*
  * The following two functions are called in the inner loops of the
  * collector, so they need to be as fast as possible.  We have macros
- * for them below.
+ * for them in sgen-gc.h.
  */
 
-static inline void
-gray_object_enqueue (GrayQueue *queue, char *obj)
+void
+mono_sgen_gray_object_enqueue (GrayQueue *queue, char *obj)
 {
        DEBUG (9, g_assert (obj));
-       if (G_UNLIKELY (!queue->first || queue->first->end == GRAY_QUEUE_SECTION_SIZE))
+       if (G_UNLIKELY (!queue->first || queue->first->end == SGEN_GRAY_QUEUE_SECTION_SIZE))
                gray_object_alloc_queue_section (queue);
-       DEBUG (9, g_assert (queue->first && queue->first->end < GRAY_QUEUE_SECTION_SIZE));
+       DEBUG (9, g_assert (queue->first && queue->first->end < SGEN_GRAY_QUEUE_SECTION_SIZE));
        queue->first->objects [queue->first->end++] = obj;
 
        DEBUG (9, ++queue->balance);
 }
 
-static inline char*
-gray_object_dequeue (GrayQueue *queue)
+char*
+mono_sgen_gray_object_dequeue (GrayQueue *queue)
 {
        char *obj;
 
@@ -118,27 +103,31 @@ gray_object_dequeue (GrayQueue *queue)
        return obj;
 }
 
-#if MAX_DEBUG_LEVEL >= 9
-#define GRAY_OBJECT_ENQUEUE gray_object_enqueue
-#define GRAY_OBJECT_DEQUEUE(queue,o) ((o) = gray_object_dequeue ((queue)))
-#else
-#define GRAY_OBJECT_ENQUEUE(queue,o) do {                              \
-               if (G_UNLIKELY (!(queue)->first || (queue)->first->end == GRAY_QUEUE_SECTION_SIZE)) \
-                       gray_object_alloc_queue_section ((queue));      \
-               (queue)->first->objects [(queue)->first->end++] = (o);  \
-       } while (0)
-#define GRAY_OBJECT_DEQUEUE(queue,o) do {                              \
-               if (!(queue)->first)                                    \
-                       (o) = NULL;                                     \
-               else if (G_UNLIKELY ((queue)->first->end == 1))         \
-                       (o) = gray_object_dequeue ((queue));            \
-               else                                                    \
-                       (o) = (queue)->first->objects [--(queue)->first->end]; \
-       } while (0)
-#endif
+static GrayQueueSection*
+gray_object_dequeue_section (GrayQueue *queue)
+{
+       GrayQueueSection *section;
+
+       if (!queue->first)
+               return NULL;
+
+       section = queue->first;
+       queue->first = section->next;
+
+       section->next = NULL;
+
+       return section;
+}
 
 static void
-gray_object_queue_init (GrayQueue *queue)
+gray_object_enqueue_section (GrayQueue *queue, GrayQueueSection *section)
+{
+       section->next = queue->first;
+       queue->first = section;
+}
+
+static void
+gray_object_queue_init (GrayQueue *queue, SgenInternalAllocator *allocator)
 {
        GrayQueueSection *section, *next;
        int i;
@@ -146,6 +135,8 @@ gray_object_queue_init (GrayQueue *queue)
        g_assert (gray_object_queue_is_empty (queue));
        DEBUG (9, g_assert (queue->balance == 0));
 
+       queue->allocator = allocator;
+
        /* Free the extra sections allocated during the last collection */
        i = 0;
        for (section = queue->free_list; section && i < GRAY_QUEUE_LENGTH_LIMIT - 1; section = section->next)
@@ -155,6 +146,14 @@ gray_object_queue_init (GrayQueue *queue)
        while (section->next) {
                next = section->next;
                section->next = next->next;
-               gray_object_free_queue_section (next);
+               gray_object_free_queue_section (next, allocator);
        }
 }
+
+static void
+gray_object_queue_init_with_alloc_prepare (GrayQueue *queue, SgenInternalAllocator *allocator, GrayQueueAllocPrepareFunc func, void *data)
+{
+       gray_object_queue_init (queue, allocator);
+       queue->alloc_prepare_func = func;
+       queue->alloc_prepare_data = data;
+}
index 0957bfbaaec3e866ab3169245547de2df0000e19..624a9d09a4ee14b4fe8ceb53689920822a8d9078 100644 (file)
@@ -47,6 +47,7 @@
 
 #ifdef HAVE_SGEN_GC
 
+#include "utils/mono-counters.h"
 #include "metadata/sgen-gc.h"
 
 /* Pinned objects are allocated in the LOS space if bigger than half a page
@@ -83,6 +84,7 @@
 struct _SgenPinnedChunk {
        SgenBlock block;
        int num_pages;
+       SgenInternalAllocator *allocator;
        int *page_sizes; /* a 0 means the page is still unused */
        void **free_list;
        SgenPinnedChunk *free_list_nexts [SGEN_INTERNAL_FREELIST_NUM_SLOTS];
@@ -121,15 +123,6 @@ struct _LargeInternalMemHeader {
        double data[0];
 };
 
-#ifdef SGEN_PARALLEL_MARK
-static LOCK_DECLARE (internal_allocator_mutex);
-#define LOCK_INTERNAL_ALLOCATOR pthread_mutex_lock (&internal_allocator_mutex)
-#define UNLOCK_INTERNAL_ALLOCATOR pthread_mutex_unlock (&internal_allocator_mutex)
-#else
-#define LOCK_INTERNAL_ALLOCATOR
-#define UNLOCK_INTERNAL_ALLOCATOR
-#endif
-
 static long long pinned_chunk_bytes_alloced = 0;
 static long long large_internal_bytes_alloced = 0;
 
@@ -242,7 +235,6 @@ build_freelist (SgenInternalAllocator *alc, SgenPinnedChunk *chunk, int slot, in
        alc->free_lists [slot] = chunk;
 }
 
-/* LOCKING: if !managed, requires the internal allocator lock to be held */
 static SgenPinnedChunk*
 alloc_pinned_chunk (SgenInternalAllocator *alc, gboolean managed)
 {
@@ -250,9 +242,6 @@ alloc_pinned_chunk (SgenInternalAllocator *alc, gboolean managed)
        int offset;
        int size = SGEN_PINNED_CHUNK_SIZE;
 
-       if (managed)
-               LOCK_INTERNAL_ALLOCATOR;
-
        chunk = mono_sgen_alloc_os_memory_aligned (size, size, TRUE);
        chunk->block.role = managed ? MEMORY_ROLE_PINNED : MEMORY_ROLE_INTERNAL;
 
@@ -281,8 +270,7 @@ alloc_pinned_chunk (SgenInternalAllocator *alc, gboolean managed)
        chunk->block.next = alc->chunk_list;
        alc->chunk_list = chunk;
 
-       if (managed)
-               UNLOCK_INTERNAL_ALLOCATOR;
+       chunk->allocator = alc;
 
        return chunk;
 }
@@ -305,7 +293,6 @@ populate_chunk_page (SgenInternalAllocator *alc, SgenPinnedChunk *chunk, int slo
        return FALSE;
 }
 
-/* LOCKING: assumes the internal allocator lock is held */
 static void*
 alloc_from_slot (SgenInternalAllocator *alc, int slot, int type)
 {
@@ -314,6 +301,15 @@ alloc_from_slot (SgenInternalAllocator *alc, int slot, int type)
 
        alc->small_internal_mem_bytes [type] += size;
 
+       if (alc->delayed_free_lists [slot]) {
+               void **p;
+               do {
+                       p = alc->delayed_free_lists [slot];
+               } while (SGEN_CAS_PTR (&alc->delayed_free_lists [slot], *p, p) != p);
+               memset (p, 0, size);
+               return p;
+       }
+
  restart:
        pchunk = alc->free_lists [slot];
        if (pchunk) {
@@ -357,15 +353,11 @@ mono_sgen_alloc_internal_full (SgenInternalAllocator *alc, size_t size, int type
 
        g_assert (fixed_type_freelist_slots [type] == -1);
 
-       LOCK_INTERNAL_ALLOCATOR;
-
        HEAVY_STAT (++stat_internal_alloc);
 
        if (size > freelist_sizes [SGEN_INTERNAL_FREELIST_NUM_SLOTS - 1]) {
                LargeInternalMemHeader *mh;
 
-               UNLOCK_INTERNAL_ALLOCATOR;
-
                size += sizeof (LargeInternalMemHeader);
                mh = mono_sgen_alloc_os_memory (size, TRUE);
                mh->magic = LARGE_INTERNAL_MEM_HEADER_MAGIC;
@@ -379,23 +371,21 @@ mono_sgen_alloc_internal_full (SgenInternalAllocator *alc, size_t size, int type
        g_assert (size <= freelist_sizes [slot]);
        res = alloc_from_slot (alc, slot, type);
 
-       UNLOCK_INTERNAL_ALLOCATOR;
-
        return res;
 }
 
 void*
-mono_sgen_alloc_internal (int type)
+mono_sgen_alloc_internal_fixed (SgenInternalAllocator *allocator, int type)
 {
-       void *res;
        int slot = fixed_type_freelist_slots [type];
        g_assert (slot >= 0);
+       return alloc_from_slot (allocator, slot, type);
+}
 
-       LOCK_INTERNAL_ALLOCATOR;
-       res = alloc_from_slot (&unmanaged_allocator, slot, type);
-       UNLOCK_INTERNAL_ALLOCATOR;
-
-       return res;
+void*
+mono_sgen_alloc_internal (int type)
+{
+       return mono_sgen_alloc_internal_fixed (&unmanaged_allocator, type);
 }
 
 void*
@@ -411,8 +401,6 @@ free_from_slot (SgenInternalAllocator *alc, void *addr, int slot, int type)
        void **p = addr;
        void *next;
 
-       LOCK_INTERNAL_ALLOCATOR;
-
        g_assert (addr >= (void*)pchunk && (char*)addr < (char*)pchunk + pchunk->num_pages * FREELIST_PAGESIZE);
        if (type == INTERNAL_MEM_MANAGED)
                g_assert (pchunk->block.role == MEMORY_ROLE_PINNED);
@@ -430,8 +418,6 @@ free_from_slot (SgenInternalAllocator *alc, void *addr, int slot, int type)
        }
 
        alc->small_internal_mem_bytes [type] -= freelist_sizes [slot];
-
-       UNLOCK_INTERNAL_ALLOCATOR;
 }
 
 void
@@ -459,12 +445,18 @@ mono_sgen_free_internal_full (SgenInternalAllocator *alc, void *addr, size_t siz
 }
 
 void
-mono_sgen_free_internal (void *addr, int type)
+mono_sgen_free_internal_fixed (SgenInternalAllocator *allocator, void *addr, int type)
 {
        int slot = fixed_type_freelist_slots [type];
        g_assert (slot >= 0);
 
-       free_from_slot (&unmanaged_allocator, addr, slot, type);
+       free_from_slot (allocator, addr, slot, type);
+}
+
+void
+mono_sgen_free_internal (void *addr, int type)
+{
+       mono_sgen_free_internal_fixed (&unmanaged_allocator, addr, type);
 }
 
 void
@@ -473,6 +465,28 @@ mono_sgen_free_internal_dynamic (void *addr, size_t size, int type)
        mono_sgen_free_internal_full (&unmanaged_allocator, addr, size, type);
 }
 
+void
+mono_sgen_free_internal_delayed (void *addr, int type, SgenInternalAllocator *thread_allocator)
+{
+       SgenPinnedChunk *pchunk = (SgenPinnedChunk*)SGEN_PINNED_CHUNK_FOR_PTR (addr);
+       SgenInternalAllocator *alc = pchunk->allocator;
+       int slot;
+       void *next;
+
+       if (alc == thread_allocator) {
+               mono_sgen_free_internal_fixed (alc, addr, type);
+               return;
+       }
+
+       slot = fixed_type_freelist_slots [type];
+       g_assert (slot >= 0);
+
+       do {
+               next = alc->delayed_free_lists [slot];
+               *(void**)addr = next;
+       } while (SGEN_CAS_PTR (&alc->delayed_free_lists [slot], addr, next) != next);
+}
+
 void
 mono_sgen_dump_internal_mem_usage (FILE *heap_dump_file)
 {
@@ -507,6 +521,12 @@ mono_sgen_init_internal_allocator (void)
 #endif
 }
 
+SgenInternalAllocator*
+mono_sgen_get_unmanaged_allocator (void)
+{
+       return &unmanaged_allocator;
+}
+
 void
 mono_sgen_internal_scan_objects (SgenInternalAllocator *alc, IterateObjectCallbackFunc callback, void *callback_data)
 {
index 6ff9364a1fd8fbb25c8465d991394a4c86f634bf..b73a99d03235eafe67a8dfec09316bbc90dab221 100644 (file)
@@ -68,7 +68,7 @@ typedef struct _LOSObject LOSObject;
 struct _LOSObject {
        LOSObject *next;
        mword size; /* this is the object size */
-       guint16 role;
+       guint16 huge_object;
        int dummy; /* to have a sizeof (LOSObject) a multiple of ALLOC_ALIGN  and data starting at same alignment */
        char data [MONO_ZERO_LEN_ARRAY];
 };
@@ -365,6 +365,7 @@ alloc_large_inner (MonoVTable *vtable, size_t size)
                alloc_size &= ~(pagesize - 1);
                /* FIXME: handle OOM */
                obj = mono_sgen_alloc_os_memory (alloc_size, TRUE);
+               obj->huge_object = TRUE;
        } else {
                obj = get_los_section_memory (size + sizeof (LOSObject));
                memset (obj, 0, size + sizeof (LOSObject));
@@ -449,3 +450,30 @@ los_sweep (void)
 
        g_assert (los_num_sections == num_sections);
 }
+
+#ifdef SGEN_HAVE_CARDTABLE
+
+static void
+los_iterate_live_block_ranges (sgen_cardtable_block_callback callback)
+{
+       LOSObject *obj;
+       for (obj = los_object_list; obj; obj = obj->next) {
+               MonoVTable *vt = (MonoVTable*)LOAD_VTABLE (obj->data);
+               if (vt->klass->has_references)
+                       callback ((mword)obj->data, (mword)obj->size);
+       }
+}
+
+#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size))
+
+static void __attribute__((noinline))
+los_scan_card_table (GrayQueue *queue)
+{
+       LOSObject *obj;
+
+       for (obj = los_object_list; obj; obj = obj->next) {
+               sgen_cardtable_scan_object (obj->data, obj->size, NULL, queue);
+       }
+}
+
+#endif
diff --git a/mono/metadata/sgen-major-copy-object.h b/mono/metadata/sgen-major-copy-object.h
new file mode 100644 (file)
index 0000000..a23b2dd
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2001-2003 Ximian, Inc
+ * Copyright 2003-2010 Novell, Inc.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern long long stat_copy_object_called_nursery;
+extern long long stat_objects_copied_nursery;
+
+extern long long stat_nursery_copy_object_failed_from_space;
+extern long long stat_nursery_copy_object_failed_forwarded;
+extern long long stat_nursery_copy_object_failed_pinned;
+
+/*
+ * This function can be used even if the vtable of obj is not valid
+ * anymore, which is the case in the parallel collector.
+ */
+static void
+par_copy_object_no_checks (char *destination, MonoVTable *vt, void *obj, mword objsize, SgenGrayQueue *queue)
+{
+       static const void *copy_labels [] = { &&LAB_0, &&LAB_1, &&LAB_2, &&LAB_3, &&LAB_4, &&LAB_5, &&LAB_6, &&LAB_7, &&LAB_8 };
+
+       DEBUG (9, g_assert (vt->klass->inited));
+       DEBUG (9, fprintf (gc_debug_file, " (to %p, %s size: %lu)\n", destination, ((MonoObject*)obj)->vtable->klass->name, (unsigned long)objsize));
+       binary_protocol_copy (obj, destination, vt, objsize);
+
+       *(MonoVTable**)destination = vt;
+       if (objsize <= sizeof (gpointer) * 8) {
+               mword *dest = (mword*)destination;
+               goto *copy_labels [objsize / sizeof (gpointer)];
+       LAB_8:
+               (dest) [7] = ((mword*)obj) [7];
+       LAB_7:
+               (dest) [6] = ((mword*)obj) [6];
+       LAB_6:
+               (dest) [5] = ((mword*)obj) [5];
+       LAB_5:
+               (dest) [4] = ((mword*)obj) [4];
+       LAB_4:
+               (dest) [3] = ((mword*)obj) [3];
+       LAB_3:
+               (dest) [2] = ((mword*)obj) [2];
+       LAB_2:
+               (dest) [1] = ((mword*)obj) [1];
+       LAB_1:
+               ;
+       LAB_0:
+               ;
+       } else {
+               memcpy (destination + sizeof (mword), (char*)obj + sizeof (mword), objsize - sizeof (mword));
+       }
+       /* adjust array->bounds */
+       DEBUG (9, g_assert (vt->gc_descr));
+       if (G_UNLIKELY (vt->rank && ((MonoArray*)obj)->bounds)) {
+               MonoArray *array = (MonoArray*)destination;
+               array->bounds = (MonoArrayBounds*)((char*)destination + ((char*)((MonoArray*)obj)->bounds - (char*)obj));
+               DEBUG (9, fprintf (gc_debug_file, "Array instance %p: size: %lu, rank: %d, length: %lu\n", array, (unsigned long)objsize, vt->rank, (unsigned long)mono_array_length (array)));
+       }
+       if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_GC_MOVES))
+               mono_sgen_register_moved_object (obj, destination);
+       obj = destination;
+       if (queue) {
+               DEBUG (9, fprintf (gc_debug_file, "Enqueuing gray object %p (%s)\n", obj, safe_name (obj)));
+               GRAY_OBJECT_ENQUEUE (queue, obj);
+       }
+}
+
+static void*
+copy_object_no_checks (void *obj, SgenGrayQueue *queue)
+{
+       MonoVTable *vt = ((MonoObject*)obj)->vtable;
+       gboolean has_references = SGEN_VTABLE_HAS_REFERENCES (vt);
+       mword objsize = SGEN_ALIGN_UP (mono_sgen_par_object_get_size (vt, (MonoObject*)obj));
+       char *destination = major_alloc_object (objsize, has_references);
+
+       par_copy_object_no_checks (destination, vt, obj, objsize, has_references ? queue : NULL);
+
+       /* set the forwarding pointer */
+       SGEN_FORWARD_OBJECT (obj, destination);
+
+       return destination;
+}
+
+/*
+ * This is how the copying happens from the nursery to the old generation.
+ * We assume that at this time all the pinned objects have been identified and
+ * marked as such.
+ * We run scan_object() for each pinned object so that each referenced
+ * objects if possible are copied. The new gray objects created can have
+ * scan_object() run on them right away, too.
+ * Then we run copy_object() for the precisely tracked roots. At this point
+ * all the roots are either gray or black. We run scan_object() on the gray
+ * objects until no more gray objects are created.
+ * At the end of the process we walk again the pinned list and we unmark
+ * the pinned flag. As we go we also create the list of free space for use
+ * in the next allocation runs.
+ *
+ * We need to remember objects from the old generation that point to the new one
+ * (or just addresses?).
+ *
+ * copy_object could be made into a macro once debugged (use inline for now).
+ */
+
+static void
+copy_object (void **obj_slot, SgenGrayQueue *queue)
+{
+       char *forwarded;
+       char *obj = *obj_slot;
+
+       DEBUG (9, g_assert (current_collection_generation == GENERATION_NURSERY));
+
+       HEAVY_STAT (++stat_copy_object_called_nursery);
+
+       if (!ptr_in_nursery (obj)) {
+               HEAVY_STAT (++stat_nursery_copy_object_failed_from_space);
+               return;
+       }
+
+       DEBUG (9, fprintf (gc_debug_file, "Precise copy of %p from %p", obj, obj_slot));
+
+       /*
+        * Before we can copy the object we must make sure that we are
+        * allowed to, i.e. that the object not pinned or not already
+        * forwarded.
+        */
+
+       if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj))) {
+               DEBUG (9, g_assert (((MonoVTable*)LOAD_VTABLE(obj))->gc_descr));
+               DEBUG (9, fprintf (gc_debug_file, " (already forwarded to %p)\n", forwarded));
+               HEAVY_STAT (++stat_nursery_copy_object_failed_forwarded);
+               *obj_slot = forwarded;
+               return;
+       }
+       if (SGEN_OBJECT_IS_PINNED (obj)) {
+               DEBUG (9, g_assert (((MonoVTable*)LOAD_VTABLE(obj))->gc_descr));
+               DEBUG (9, fprintf (gc_debug_file, " (pinned, no change)\n"));
+               HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
+               return;
+       }
+
+       HEAVY_STAT (++stat_objects_copied_nursery);
+
+       *obj_slot = copy_object_no_checks (obj, queue);
+}
+
+#define FILL_COLLECTOR_COPY_OBJECT(collector)  do {                    \
+               (collector)->copy_object = copy_object;                 \
+       } while (0)
index f7769fcac7c15b814bac062c618e8a56750245df..426b760d7eda4a9488b0ecb40efe0adde19b2a29 100644 (file)
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef SGEN_PARALLEL_MARK
-#error Parallel mark not supported in copying major collector
-#endif
+#ifdef HAVE_SGEN_GC
+
+#include "utils/mono-counters.h"
+#include "metadata/object-internals.h"
+#include "metadata/profiler-private.h"
+
+#include "metadata/sgen-gc.h"
+#include "metadata/sgen-protocol.h"
+
+#define DEBUG(l,x)
 
 #define MAJOR_SECTION_SIZE             SGEN_PINNED_CHUNK_SIZE
 #define BLOCK_FOR_OBJECT(o)            SGEN_PINNED_CHUNK_FOR_PTR ((o))
@@ -68,6 +75,13 @@ static char *to_space_bumper = NULL;
 static char *to_space_top = NULL;
 static GCMemSection *to_space_section = NULL;
 
+/* we get this at init */
+static int nursery_bits;
+static char *nursery_start;
+static char *nursery_end;
+
+#define ptr_in_nursery(p)      (SGEN_PTR_IN_NURSERY ((p), nursery_bits, nursery_start, nursery_end))
+
 #ifdef HEAVY_STATISTICS
 static long stat_major_copy_object_failed_forwarded = 0;
 static long stat_major_copy_object_failed_pinned = 0;
@@ -75,6 +89,20 @@ static long stat_major_copy_object_failed_large_pinned = 0;
 static long stat_major_copy_object_failed_to_space = 0;
 #endif
 
+static void*
+major_alloc_heap (mword nursery_size, mword nursery_align, int the_nursery_bits)
+{
+       if (nursery_align)
+               nursery_start = mono_sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE);
+       else
+               nursery_start = mono_sgen_alloc_os_memory (nursery_size, TRUE);
+
+       nursery_end = nursery_start + nursery_size;
+       nursery_bits = the_nursery_bits;
+
+       return nursery_start;
+}
+
 static gboolean
 obj_is_from_pinned_alloc (char *p)
 {
@@ -97,13 +125,13 @@ alloc_major_section (void)
        int scan_starts;
 
        section = mono_sgen_alloc_os_memory_aligned (MAJOR_SECTION_SIZE, MAJOR_SECTION_SIZE, TRUE);
-       section->next_data = section->data = (char*)section + SIZEOF_GC_MEM_SECTION;
+       section->next_data = section->data = (char*)section + SGEN_SIZEOF_GC_MEM_SECTION;
        g_assert (!((mword)section->data & 7));
-       section->size = MAJOR_SECTION_SIZE - SIZEOF_GC_MEM_SECTION;
+       section->size = MAJOR_SECTION_SIZE - SGEN_SIZEOF_GC_MEM_SECTION;
        section->end_data = section->data + section->size;
        mono_sgen_update_heap_boundaries ((mword)section->data, (mword)section->end_data);
        DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %zd\n", section->data, section->end_data, total_alloc));
-       scan_starts = (section->size + SCAN_START_SIZE - 1) / SCAN_START_SIZE;
+       scan_starts = (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE;
        section->scan_starts = mono_sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS);
        section->num_scan_start = scan_starts;
        section->block.role = MEMORY_ROLE_GEN1;
@@ -123,7 +151,7 @@ free_major_section (GCMemSection *section)
 {
        DEBUG (3, fprintf (gc_debug_file, "Freed major section %p (%p-%p)\n", section, section->data, section->end_data));
        mono_sgen_free_internal_dynamic (section->scan_starts,
-                       (section->size + SCAN_START_SIZE - 1) / SCAN_START_SIZE * sizeof (char*), INTERNAL_MEM_SCAN_STARTS);
+                       (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE * sizeof (char*), INTERNAL_MEM_SCAN_STARTS);
        mono_sgen_free_os_memory (section, MAJOR_SECTION_SIZE);
 
        --num_major_sections;
@@ -158,18 +186,21 @@ to_space_expand (void)
        new_to_space_section ();
 }
 
-#define MAJOR_GET_COPY_OBJECT_SPACE(dest, size, refs) do {             \
-               (dest) = to_space_bumper;                               \
-               /* Make sure we have enough space available */          \
-               if ((dest) + (size) > to_space_top) {                   \
-                       to_space_expand ();                             \
-                       (dest) = to_space_bumper;                       \
-                       DEBUG (8, g_assert ((dest) + (objsize) <= to_space_top)); \
-               }                                                       \
-               to_space_bumper += objsize;                             \
-               DEBUG (8, g_assert (to_space_bumper <= to_space_top));  \
-               to_space_section->scan_starts [((dest) - (char*)to_space_section->data)/SCAN_START_SIZE] = (dest); \
-       } while (0)
+static void*
+major_alloc_object (int size, gboolean has_references)
+{
+       char *dest = to_space_bumper;
+       /* Make sure we have enough space available */
+       if (dest + size > to_space_top) {
+               to_space_expand ();
+               (dest) = to_space_bumper;
+               DEBUG (8, g_assert (dest + size <= to_space_top));
+       }
+       to_space_bumper += size;
+       DEBUG (8, g_assert (to_space_bumper <= to_space_top));
+       to_space_section->scan_starts [(dest - (char*)to_space_section->data)/SGEN_SCAN_START_SIZE] = dest;
+       return dest;
+}
 
 static void
 unset_to_space (void)
@@ -193,10 +224,10 @@ major_is_object_live (char *obj)
        if (ptr_in_nursery (obj))
                return FALSE;
 
-       objsize = SGEN_ALIGN_UP (safe_object_get_size ((MonoObject*)obj));
+       objsize = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)obj));
 
        /* LOS */
-       if (objsize > MAX_SMALL_OBJ_SIZE)
+       if (objsize > SGEN_MAX_SMALL_OBJ_SIZE)
                return FALSE;
 
        /* pinned chunk */
@@ -222,7 +253,7 @@ major_alloc_degraded (MonoVTable *vtable, size_t size)
 {
        GCMemSection *section;
        void **p = NULL;
-       g_assert (size <= MAX_SMALL_OBJ_SIZE);
+       g_assert (size <= SGEN_MAX_SMALL_OBJ_SIZE);
        HEAVY_STAT (++stat_objects_alloced_degraded);
        HEAVY_STAT (stat_bytes_alloced_degraded += size);
        for (section = section_list; section; section = section->block.next) {
@@ -236,17 +267,18 @@ major_alloc_degraded (MonoVTable *vtable, size_t size)
                section->is_to_space = FALSE;
                /* FIXME: handle OOM */
                p = (void**)section->next_data;
-               ++minor_collection_sections_alloced;
+               mono_sgen_register_major_sections_alloced (1);
        }
        section->next_data += size;
-       degraded_mode += size;
        DEBUG (3, fprintf (gc_debug_file, "Allocated (degraded) object %p, vtable: %p (%s), size: %zd in section %p\n", p, vtable, vtable->klass->name, size, section));
        *p = vtable;
        return p;
 }
 
+#include "sgen-major-copy-object.h"
+
 static void
-major_copy_or_mark_object (void **obj_slot, GrayQueue *queue)
+major_copy_or_mark_object (void **obj_slot, SgenGrayQueue *queue)
 {
        char *forwarded;
        char *obj = *obj_slot;
@@ -283,15 +315,15 @@ major_copy_or_mark_object (void **obj_slot, GrayQueue *queue)
         * get to-space objects.
         */
 
-       if ((forwarded = object_is_forwarded (obj))) {
-               DEBUG (9, g_assert (((MonoVTable*)LOAD_VTABLE(obj))->gc_descr));
+       if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj))) {
+               DEBUG (9, g_assert (((MonoVTable*)SGEN_LOAD_VTABLE(obj))->gc_descr));
                DEBUG (9, fprintf (gc_debug_file, " (already forwarded to %p)\n", forwarded));
                HEAVY_STAT (++stat_major_copy_object_failed_forwarded);
                *obj_slot = forwarded;
                return;
        }
-       if (object_is_pinned (obj)) {
-               DEBUG (9, g_assert (((MonoVTable*)LOAD_VTABLE(obj))->gc_descr));
+       if (SGEN_OBJECT_IS_PINNED (obj)) {
+               DEBUG (9, g_assert (((MonoVTable*)SGEN_LOAD_VTABLE(obj))->gc_descr));
                DEBUG (9, fprintf (gc_debug_file, " (pinned, no change)\n"));
                HEAVY_STAT (++stat_major_copy_object_failed_pinned);
                return;
@@ -305,10 +337,10 @@ major_copy_or_mark_object (void **obj_slot, GrayQueue *queue)
         * belongs to 2, 3, 4, or 5.
         *
         * LOS object (2) are simple, at least until we always follow
-        * the rule: if objsize > MAX_SMALL_OBJ_SIZE, pin the object
-        * and return it.  At the end of major collections, we walk
-        * the los list and if the object is pinned, it is marked,
-        * otherwise it can be freed.
+        * the rule: if objsize > SGEN_MAX_SMALL_OBJ_SIZE, pin the
+        * object and return it.  At the end of major collections, we
+        * walk the los list and if the object is pinned, it is
+        * marked, otherwise it can be freed.
         *
         * Pinned chunks (3) and major heap sections (4, 5) both
         * reside in blocks, which are always aligned, so once we've
@@ -316,14 +348,14 @@ major_copy_or_mark_object (void **obj_slot, GrayQueue *queue)
         * see whether it's a pinned chunk or a major heap section.
         */
 
-       objsize = SGEN_ALIGN_UP (safe_object_get_size ((MonoObject*)obj));
+       objsize = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)obj));
 
-       if (G_UNLIKELY (objsize > MAX_SMALL_OBJ_SIZE || obj_is_from_pinned_alloc (obj))) {
-               if (object_is_pinned (obj))
+       if (G_UNLIKELY (objsize > SGEN_MAX_SMALL_OBJ_SIZE || obj_is_from_pinned_alloc (obj))) {
+               if (SGEN_OBJECT_IS_PINNED (obj))
                        return;
                DEBUG (9, fprintf (gc_debug_file, " (marked LOS/Pinned %p (%s), size: %zd)\n", obj, safe_name (obj), objsize));
-               binary_protocol_pin (obj, (gpointer)LOAD_VTABLE (obj), safe_object_get_size ((MonoObject*)obj));
-               pin_object (obj);
+               binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), mono_sgen_safe_object_get_size ((MonoObject*)obj));
+               SGEN_PIN_OBJECT (obj);
                GRAY_OBJECT_ENQUEUE (queue, obj);
                HEAVY_STAT (++stat_major_copy_object_failed_large_pinned);
                return;
@@ -335,7 +367,7 @@ major_copy_or_mark_object (void **obj_slot, GrayQueue *queue)
         * not (4).
         */
        if (MAJOR_OBJ_IS_IN_TO_SPACE (obj)) {
-               DEBUG (9, g_assert (objsize <= MAX_SMALL_OBJ_SIZE));
+               DEBUG (9, g_assert (objsize <= SGEN_MAX_SMALL_OBJ_SIZE));
                DEBUG (9, fprintf (gc_debug_file, " (already copied)\n"));
                HEAVY_STAT (++stat_major_copy_object_failed_to_space);
                return;
@@ -347,6 +379,8 @@ major_copy_or_mark_object (void **obj_slot, GrayQueue *queue)
        *obj_slot = copy_object_no_checks (obj, queue);
 }
 
+#include "sgen-major-scan-object.h"
+
 /* FIXME: later reduce code duplication here with build_nursery_fragments().
  * We don't keep track of section fragments for non-nursery sections yet, so
  * just memset to 0.
@@ -362,22 +396,22 @@ build_section_fragments (GCMemSection *section)
        memset (section->scan_starts, 0, section->num_scan_start * sizeof (gpointer));
        frag_start = section->data;
        section->next_data = section->data;
-       for (i = section->pin_queue_start; i < section->pin_queue_end; ++i) {
-               frag_end = pin_queue [i];
+       for (i = 0; i < section->pin_queue_num_entries; ++i) {
+               frag_end = section->pin_queue_start [i];
                /* remove the pin bit from pinned objects */
-               unpin_object (frag_end);
+               SGEN_UNPIN_OBJECT (frag_end);
                if (frag_end >= section->data + section->size) {
                        frag_end = section->data + section->size;
                } else {
-                       section->scan_starts [((char*)frag_end - (char*)section->data)/SCAN_START_SIZE] = frag_end;
+                       section->scan_starts [((char*)frag_end - (char*)section->data)/SGEN_SCAN_START_SIZE] = frag_end;
                }
                frag_size = frag_end - frag_start;
                if (frag_size) {
                        binary_protocol_empty (frag_start, frag_size);
                        memset (frag_start, 0, frag_size);
                }
-               frag_size = SGEN_ALIGN_UP (safe_object_get_size ((MonoObject*)pin_queue [i]));
-               frag_start = (char*)pin_queue [i] + frag_size;
+               frag_size = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)section->pin_queue_start [i]));
+               frag_start = (char*)section->pin_queue_start [i] + frag_size;
                section->next_data = MAX (section->next_data, frag_start);
        }
        frag_end = section->end_data;
@@ -391,8 +425,8 @@ build_section_fragments (GCMemSection *section)
 static void
 sweep_pinned_objects_callback (char *ptr, size_t size, void *data)
 {
-       if (object_is_pinned (ptr)) {
-               unpin_object (ptr);
+       if (SGEN_OBJECT_IS_PINNED (ptr)) {
+               SGEN_UNPIN_OBJECT (ptr);
                DEBUG (6, fprintf (gc_debug_file, "Unmarked pinned object %p (%s)\n", ptr, safe_name (ptr)));
        } else {
                DEBUG (6, fprintf (gc_debug_file, "Freeing unmarked pinned object %p (%s)\n", ptr, safe_name (ptr)));
@@ -412,7 +446,7 @@ major_iterate_objects (gboolean non_pinned, gboolean pinned, IterateObjectCallba
        if (non_pinned) {
                GCMemSection *section;
                for (section = section_list; section; section = section->block.next)
-                       scan_area_with_callback (section->data, section->end_data, callback, data);
+                       mono_sgen_scan_area_with_callback (section->data, section->end_data, callback, data);
        }
        if (pinned)
                mono_sgen_internal_scan_objects (&pinned_allocator, callback, data);
@@ -425,33 +459,33 @@ major_free_non_pinned_object (char *obj, size_t size)
 }
 
 static void
-pin_pinned_object_callback (void *addr, size_t slot_size, GrayQueue *queue)
+pin_pinned_object_callback (void *addr, size_t slot_size, SgenGrayQueue *queue)
 {
-       binary_protocol_pin (addr, (gpointer)LOAD_VTABLE (addr), safe_object_get_size ((MonoObject*)addr));
-       if (heap_dump_file && !object_is_pinned (addr))
-               pin_stats_register_object ((char*) addr, safe_object_get_size ((MonoObject*) addr));
-       pin_object (addr);
+       binary_protocol_pin (addr, (gpointer)SGEN_LOAD_VTABLE (addr), mono_sgen_safe_object_get_size ((MonoObject*)addr));
+       if (!SGEN_OBJECT_IS_PINNED (addr))
+               mono_sgen_pin_stats_register_object ((char*) addr, mono_sgen_safe_object_get_size ((MonoObject*) addr));
+       SGEN_PIN_OBJECT (addr);
        GRAY_OBJECT_ENQUEUE (queue, addr);
        DEBUG (6, fprintf (gc_debug_file, "Marked pinned object %p (%s) from roots\n", addr, safe_name (addr)));
 }
 
 static void
-major_find_pin_queue_start_ends (GrayQueue *queue)
+major_find_pin_queue_start_ends (SgenGrayQueue *queue)
 {
        GCMemSection *section;
 
        for (section = section_list; section; section = section->block.next)
-               find_section_pin_queue_start_end (section);
+               mono_sgen_find_section_pin_queue_start_end (section);
        mono_sgen_internal_scan_pinned_objects (&pinned_allocator, (IterateObjectCallbackFunc)pin_pinned_object_callback, queue);
 }
 
 static void
-major_pin_objects (GrayQueue *queue)
+major_pin_objects (SgenGrayQueue *queue)
 {
        GCMemSection *section;
 
        for (section = section_list; section; section = section->block.next)
-               pin_objects_in_section (section, queue);
+               mono_sgen_pin_objects_in_section (section, queue);
 }
 
 static void
@@ -482,8 +516,9 @@ major_sweep (void)
                        continue;
                }
                /* no pinning object, so the section is free */
-               if (section->pin_queue_start == section->pin_queue_end) {
+               if (!section->pin_queue_num_entries) {
                        GCMemSection *to_free;
+                       g_assert (!section->pin_queue_start);
                        if (prev_section)
                                prev_section->block.next = section->block.next;
                        else
@@ -493,7 +528,7 @@ major_sweep (void)
                        free_major_section (to_free);
                        continue;
                } else {
-                       DEBUG (6, fprintf (gc_debug_file, "Section %p has still pinned objects (%d)\n", section, section->pin_queue_end - section->pin_queue_start));
+                       DEBUG (6, fprintf (gc_debug_file, "Section %p has still pinned objects (%d)\n", section, section->pin_queue_num_entries));
                        build_section_fragments (section);
                }
                prev_section = section;
@@ -506,15 +541,15 @@ major_check_scan_starts (void)
 {
        GCMemSection *section;
        for (section = section_list; section; section = section->block.next)
-               check_section_scan_starts (section);
+               mono_sgen_check_section_scan_starts (section);
 }
 
 static void
-major_dump_heap (void)
+major_dump_heap (FILE *heap_dump_file)
 {
        GCMemSection *section;
        for (section = section_list; section; section = section->block.next)
-               dump_section (section, "old");
+               mono_sgen_dump_section (section, "old");
        /* FIXME: dump pinned sections, too */
 }
 
@@ -530,17 +565,6 @@ major_get_used_size (void)
        return tot;
 }
 
-static void
-major_init (void)
-{
-#ifdef HEAVY_STATISTICS
-       mono_counters_register ("# major copy_object() failed forwarded", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_forwarded);
-       mono_counters_register ("# major copy_object() failed pinned", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_pinned);
-       mono_counters_register ("# major copy_object() failed large or pinned chunk", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_large_pinned);
-       mono_counters_register ("# major copy_object() failed to space", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_to_space);
-#endif
-}
-
 /* only valid during minor collections */
 static int old_num_major_sections;
 
@@ -573,7 +597,7 @@ major_finish_nursery_collection (void)
                section->is_to_space = FALSE;
 
        sections_alloced = num_major_sections - old_num_major_sections;
-       minor_collection_sections_alloced += sections_alloced;
+       mono_sgen_register_major_sections_alloced (sections_alloced);
 }
 
 static void
@@ -598,3 +622,55 @@ major_report_pinned_memory_usage (void)
 {
        mono_sgen_report_internal_mem_usage_full (&pinned_allocator);
 }
+
+static int
+get_num_major_sections (void)
+{
+       return num_major_sections;
+}
+
+void
+mono_sgen_copying_init (SgenMajorCollector *collector)
+{
+#ifdef HEAVY_STATISTICS
+       mono_counters_register ("# major copy_object() failed forwarded", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_forwarded);
+       mono_counters_register ("# major copy_object() failed pinned", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_pinned);
+       mono_counters_register ("# major copy_object() failed large or pinned chunk", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_large_pinned);
+       mono_counters_register ("# major copy_object() failed to space", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_copy_object_failed_to_space);
+#endif
+
+       collector->section_size = MAJOR_SECTION_SIZE;
+       collector->supports_cardtable = FALSE;
+       collector->is_parallel = FALSE;
+
+       collector->alloc_heap = major_alloc_heap;
+       collector->is_object_live = major_is_object_live;
+       collector->alloc_small_pinned_obj = major_alloc_small_pinned_obj;
+       collector->alloc_degraded = major_alloc_degraded;
+       collector->copy_or_mark_object = major_copy_or_mark_object;
+       collector->alloc_object = major_alloc_object;
+       collector->free_pinned_object = free_pinned_object;
+       collector->iterate_objects = major_iterate_objects;
+       collector->free_non_pinned_object = major_free_non_pinned_object;
+       collector->find_pin_queue_start_ends = major_find_pin_queue_start_ends;
+       collector->pin_objects = major_pin_objects;
+       collector->init_to_space = major_init_to_space;
+       collector->sweep = major_sweep;
+       collector->check_scan_starts = major_check_scan_starts;
+       collector->dump_heap = major_dump_heap;
+       collector->get_used_size = major_get_used_size;
+       collector->start_nursery_collection = major_start_nursery_collection;
+       collector->finish_nursery_collection = major_finish_nursery_collection;
+       collector->finish_major_collection = major_finish_major_collection;
+       collector->ptr_is_in_non_pinned_space = major_ptr_is_in_non_pinned_space;
+       collector->obj_is_from_pinned_alloc = obj_is_from_pinned_alloc;
+       collector->report_pinned_memory_usage = major_report_pinned_memory_usage;
+       collector->get_num_major_sections = get_num_major_sections;
+       collector->handle_gc_param = NULL;
+       collector->print_gc_param_usage = NULL;
+
+       FILL_COLLECTOR_COPY_OBJECT (collector);
+       FILL_COLLECTOR_SCAN_OBJECT (collector);
+}
+
+#endif
diff --git a/mono/metadata/sgen-major-scan-object.h b/mono/metadata/sgen-major-scan-object.h
new file mode 100644 (file)
index 0000000..ec79a1c
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2001-2003 Ximian, Inc
+ * Copyright 2003-2010 Novell, Inc.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+extern long long stat_scan_object_called_nursery;
+extern long long stat_scan_object_called_major;
+
+#undef HANDLE_PTR
+#define HANDLE_PTR(ptr,obj)    do {    \
+               void *__old = *(ptr);   \
+               void *__copy;           \
+               if (__old) {    \
+                       copy_object ((ptr), queue);     \
+                       __copy = *(ptr);        \
+                       DEBUG (9, if (__old != __copy) fprintf (gc_debug_file, "Overwrote field at %p with %p (was: %p)\n", (ptr), *(ptr), __old));     \
+                       if (G_UNLIKELY (ptr_in_nursery (__copy) && !ptr_in_nursery ((ptr)))) \
+                               mono_sgen_add_to_global_remset ((ptr)); \
+               }       \
+       } while (0)
+
+/*
+ * Scan the object pointed to by @start for references to
+ * other objects between @from_start and @from_end and copy
+ * them to the gray_objects area.
+ */
+static void
+minor_scan_object (char *start, SgenGrayQueue *queue)
+{
+#include "sgen-scan-object.h"
+
+       HEAVY_STAT (++stat_scan_object_called_nursery);
+}
+
+/*
+ * scan_vtype:
+ *
+ * Scan the valuetype pointed to by START, described by DESC for references to
+ * other objects between @from_start and @from_end and copy them to the gray_objects area.
+ * Returns a pointer to the end of the object.
+ */
+static char*
+minor_scan_vtype (char *start, mword desc, char* from_start, char* from_end, SgenGrayQueue *queue)
+{
+       size_t skip_size;
+
+       /* The descriptors include info about the MonoObject header as well */
+       start -= sizeof (MonoObject);
+
+       switch (desc & 0x7) {
+       case DESC_TYPE_RUN_LENGTH:
+               OBJ_RUN_LEN_FOREACH_PTR (desc,start);
+               OBJ_RUN_LEN_SIZE (skip_size, desc, start);
+               g_assert (skip_size);
+               return start + skip_size;
+       case DESC_TYPE_SMALL_BITMAP:
+               OBJ_BITMAP_FOREACH_PTR (desc,start);
+               OBJ_BITMAP_SIZE (skip_size, desc, start);
+               return start + skip_size;
+       case DESC_TYPE_LARGE_BITMAP:
+       case DESC_TYPE_COMPLEX:
+               // FIXME:
+               g_assert_not_reached ();
+               break;
+       default:
+               // The other descriptors can't happen with vtypes
+               g_assert_not_reached ();
+               break;
+       }
+       return NULL;
+}
+
+#undef HANDLE_PTR
+#define HANDLE_PTR(ptr,obj)    do {                                    \
+               void *__old = *(ptr);                                   \
+               void *__copy;                                           \
+               if (__old) {                                            \
+                       major_copy_or_mark_object ((ptr), queue);       \
+                       __copy = *(ptr);                                \
+                       DEBUG (9, if (__old != __copy) mono_sgen_debug_printf (9, "Overwrote field at %p with %p (was: %p)\n", (ptr), *(ptr), __old)); \
+                       if (G_UNLIKELY (ptr_in_nursery (__copy) && !ptr_in_nursery ((ptr)))) \
+                               mono_sgen_add_to_global_remset ((ptr)); \
+               }                                                       \
+       } while (0)
+
+static void
+major_scan_object (char *start, SgenGrayQueue *queue)
+{
+#include "sgen-scan-object.h"
+
+       HEAVY_STAT (++stat_scan_object_called_major);
+}
+
+#define FILL_COLLECTOR_SCAN_OBJECT(collector)  do {                    \
+               (collector)->major_scan_object = major_scan_object;     \
+               (collector)->minor_scan_object = minor_scan_object;     \
+               (collector)->minor_scan_vtype = minor_scan_vtype;       \
+       } while (0)
diff --git a/mono/metadata/sgen-marksweep-fixed-par.c b/mono/metadata/sgen-marksweep-fixed-par.c
new file mode 100644 (file)
index 0000000..b023a61
--- /dev/null
@@ -0,0 +1,4 @@
+#define SGEN_PARALLEL_MARK
+#define FIXED_HEAP
+
+#include "sgen-marksweep.c"
diff --git a/mono/metadata/sgen-marksweep-fixed.c b/mono/metadata/sgen-marksweep-fixed.c
new file mode 100644 (file)
index 0000000..875a18a
--- /dev/null
@@ -0,0 +1,3 @@
+#define FIXED_HEAP
+
+#include "sgen-marksweep.c"
diff --git a/mono/metadata/sgen-marksweep-par.c b/mono/metadata/sgen-marksweep-par.c
new file mode 100644 (file)
index 0000000..e728ee3
--- /dev/null
@@ -0,0 +1,3 @@
+#define SGEN_PARALLEL_MARK
+
+#include "sgen-marksweep.c"
index 557a3c0a5c744f9ef7717083f7de8132048c8fd2..e4fffc9228699da9666ba753f936adfe1c21b276 100644 (file)
@@ -1,7 +1,54 @@
+/*
+ * sgen-marksweep.c: Simple generational GC.
+ *
+ * Author:
+ *     Mark Probst <mark.probst@gmail.com>
+ *
+ * Copyright 2009-2010 Novell, Inc.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_SGEN_GC
+
 #include <math.h>
 
+#include "utils/mono-counters.h"
+#include "metadata/object-internals.h"
+#include "metadata/profiler-private.h"
+
+#include "metadata/sgen-gc.h"
+#include "metadata/sgen-protocol.h"
+#include "metadata/sgen-cardtable.h"
+
+
+#define DEBUG(l,x)
+
 #define MS_BLOCK_SIZE  (16*1024)
+#define MS_BLOCK_SIZE_SHIFT    14
 #define MAJOR_SECTION_SIZE     MS_BLOCK_SIZE
+#define CARDS_PER_BLOCK (MS_BLOCK_SIZE / CARD_SIZE_IN_BYTES)
+
+#ifdef FIXED_HEAP
+#define MS_DEFAULT_HEAP_NUM_BLOCKS     (32 * 1024) /* 512 MB */
+#endif
 
 /*
  * Don't allocate single blocks, but alloc a contingent of this many
  * of a block is the MSBlockHeader, then opional padding, then come
  * the objects, so this must be >= sizeof (MSBlockHeader).
  */
+#ifdef FIXED_HEAP
+#define MS_BLOCK_SKIP  0
+#else
 #define MS_BLOCK_SKIP  16
+#endif
 
 #define MS_BLOCK_FREE  (MS_BLOCK_SIZE - MS_BLOCK_SKIP)
 
-#define MS_NUM_MARK_WORDS      ((MS_BLOCK_SIZE / ALLOC_ALIGN + sizeof (mword) * 8 - 1) / (sizeof (mword) * 8))
+#define MS_NUM_MARK_WORDS      ((MS_BLOCK_SIZE / SGEN_ALLOC_ALIGN + sizeof (mword) * 8 - 1) / (sizeof (mword) * 8))
 
-#if MAX_SMALL_OBJ_SIZE > MS_BLOCK_FREE / 2
-#error MAX_SMALL_OBJ_SIZE must be at most (MS_BLOCK_SIZE - MS_BLOCK_SKIP) / 2
+#if SGEN_MAX_SMALL_OBJ_SIZE > MS_BLOCK_FREE / 2
+#error MAX_SMALL_OBJ_SIZE must be at most MS_BLOCK_FREE / 2
 #endif
 
 typedef struct _MSBlockInfo MSBlockInfo;
@@ -29,27 +80,48 @@ struct _MSBlockInfo {
        int obj_size;
        gboolean pinned;
        gboolean has_references;
+#ifdef FIXED_HEAP
+       gboolean used;
+#else
+       MSBlockInfo *next;
+#endif
        char *block;
        void **free_list;
        MSBlockInfo *next_free;
-       MSBlockInfo *next;
-       int pin_queue_start;
-       int pin_queue_end;
+       void **pin_queue_start;
+       int pin_queue_num_entries;
        mword mark_words [MS_NUM_MARK_WORDS];
 };
 
-#define MS_BLOCK_OBJ(b,i)      ((b)->block + MS_BLOCK_SKIP + (b)->obj_size * (i))
+#ifdef FIXED_HEAP
+static int ms_heap_num_blocks = MS_DEFAULT_HEAP_NUM_BLOCKS;
 
+#define ms_heap_start  nursery_end
+static char *ms_heap_end;
+
+#define MS_PTR_IN_SMALL_MAJOR_HEAP(p)  ((char*)(p) >= ms_heap_start && (char*)(p) < ms_heap_end)
+
+/* array of all all block infos in the system */
+static MSBlockInfo *block_infos;
+#endif
+
+#define MS_BLOCK_OBJ(b,i)              ((b)->block + MS_BLOCK_SKIP + (b)->obj_size * (i))
+#define MS_BLOCK_DATA_FOR_OBJ(o)       ((char*)((mword)(o) & ~(mword)(MS_BLOCK_SIZE - 1)))
+
+#ifdef FIXED_HEAP
+#define MS_BLOCK_FOR_OBJ(o)            (&block_infos [(mword)((char*)(o) - ms_heap_start) >> MS_BLOCK_SIZE_SHIFT])
+#else
 typedef struct {
        MSBlockInfo *info;
 } MSBlockHeader;
 
-#define MS_BLOCK_FOR_OBJ(o)    (((MSBlockHeader*)((mword)(o) & ~(MS_BLOCK_SIZE-1)))->info)
+#define MS_BLOCK_FOR_OBJ(o)            (((MSBlockHeader*)MS_BLOCK_DATA_FOR_OBJ ((o)))->info)
+#endif
 
 #define MS_BLOCK_OBJ_INDEX(o,b)        (((char*)(o) - ((b)->block + MS_BLOCK_SKIP)) / (b)->obj_size)
 
-#define MS_CALC_MARK_BIT(w,b,o,bl)     do {                            \
-               int i = ((char*)(o) - (bl)->block) >> ALLOC_ALIGN_BITS; \
+#define MS_CALC_MARK_BIT(w,b,o)        do {                            \
+               int i = ((char*)(o) - MS_BLOCK_DATA_FOR_OBJ ((o))) >> SGEN_ALLOC_ALIGN_BITS; \
                if (sizeof (mword) == 4) {                              \
                        (w) = i >> 5;                                   \
                        (b) = i & 31;                                   \
@@ -105,11 +177,36 @@ static LOCK_DECLARE (ms_block_list_mutex);
 #define UNLOCK_MS_BLOCK_LIST
 #endif
 
+/* we get this at init */
+static int nursery_bits;
+static char *nursery_start;
+static char *nursery_end;
+
+#define ptr_in_nursery(p)      (SGEN_PTR_IN_NURSERY ((p), nursery_bits, nursery_start, nursery_end))
+
+#ifdef FIXED_HEAP
+/* non-allocated block free-list */
+static MSBlockInfo *empty_blocks = NULL;
+#else
 /* non-allocated block free-list */
 static void *empty_blocks = NULL;
-static int num_empty_blocks = 0;
 /* all allocated blocks in the system */
 static MSBlockInfo *all_blocks;
+static int num_empty_blocks = 0;
+#endif
+
+#ifdef FIXED_HEAP
+#define FOREACH_BLOCK(bl)      {                                       \
+               int __block_i;                                          \
+               for (__block_i = 0; __block_i < ms_heap_num_blocks; ++__block_i) { \
+                       (bl) = &block_infos [__block_i];                \
+                       if (!(bl)->used) continue;
+#define END_FOREACH_BLOCK      }}
+#else
+#define FOREACH_BLOCK(bl)      for ((bl) = all_blocks; (bl); (bl) = (bl)->next) {
+#define END_FOREACH_BLOCK      }
+#endif
+
 static int num_major_sections = 0;
 /* one free block list for each block object size */
 static MSBlockInfo **free_block_lists [MS_BLOCK_TYPE_MAX];
@@ -121,7 +218,7 @@ static int
 ms_find_block_obj_size_index (int size)
 {
        int i;
-       DEBUG (9, g_assert (size <= MAX_SMALL_OBJ_SIZE));
+       DEBUG (9, g_assert (size <= SGEN_MAX_SMALL_OBJ_SIZE));
        for (i = 0; i < num_block_obj_sizes; ++i)
                if (block_obj_sizes [i] >= size)
                        return i;
@@ -135,6 +232,82 @@ ms_find_block_obj_size_index (int size)
         fast_block_obj_size_indexes [((s)+7)>>3] :             \
         ms_find_block_obj_size_index ((s)))
 
+#ifdef FIXED_HEAP
+static void*
+major_alloc_heap (mword nursery_size, mword nursery_align, int the_nursery_bits)
+{
+       char *heap_start;
+       mword major_heap_size = ms_heap_num_blocks * MS_BLOCK_SIZE;
+       mword alloc_size = nursery_size + major_heap_size;
+       int i;
+
+       g_assert (ms_heap_num_blocks > 0);
+       g_assert (nursery_size % MS_BLOCK_SIZE == 0);
+       if (nursery_align)
+               g_assert (nursery_align % MS_BLOCK_SIZE == 0);
+
+       nursery_start = mono_sgen_alloc_os_memory_aligned (alloc_size, nursery_align ? nursery_align : MS_BLOCK_SIZE, TRUE);
+       nursery_end = heap_start = nursery_start + nursery_size;
+       nursery_bits = the_nursery_bits;
+
+       ms_heap_end = heap_start + major_heap_size;
+
+       block_infos = mono_sgen_alloc_internal_dynamic (sizeof (MSBlockInfo) * ms_heap_num_blocks, INTERNAL_MEM_MS_BLOCK_INFO);
+
+       for (i = 0; i < ms_heap_num_blocks; ++i) {
+               block_infos [i].block = heap_start + i * MS_BLOCK_SIZE;
+               if (i < ms_heap_num_blocks - 1)
+                       block_infos [i].next_free = &block_infos [i + 1];
+               else
+                       block_infos [i].next_free = NULL;
+       }
+
+       empty_blocks = &block_infos [0];
+
+       return nursery_start;
+}
+#else
+static void*
+major_alloc_heap (mword nursery_size, mword nursery_align, int the_nursery_bits)
+{
+       if (nursery_align)
+               nursery_start = mono_sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE);
+       else
+               nursery_start = mono_sgen_alloc_os_memory (nursery_size, TRUE);
+
+       nursery_end = nursery_start + nursery_size;
+       nursery_bits = the_nursery_bits;
+
+       return nursery_start;
+}
+#endif
+
+#ifdef FIXED_HEAP
+static MSBlockInfo*
+ms_get_empty_block (void)
+{
+       MSBlockInfo *block;
+
+       g_assert (empty_blocks);
+
+       block = empty_blocks;
+       empty_blocks = empty_blocks->next_free;
+
+       block->used = TRUE;
+
+       mono_sgen_update_heap_boundaries ((mword)block->block, (mword)block->block + MS_BLOCK_SIZE);
+
+       return block;
+}
+
+static void
+ms_free_block (MSBlockInfo *block)
+{
+       block->next_free = empty_blocks;
+       empty_blocks = block;
+       block->used = FALSE;
+}
+#else
 static void*
 ms_get_empty_block (void)
 {
@@ -198,6 +371,7 @@ ms_free_block (void *block)
 
        SGEN_ATOMIC_ADD (num_empty_blocks, 1);
 }
+#endif
 
 //#define MARKSWEEP_CONSISTENCY_CHECK
 
@@ -215,23 +389,31 @@ check_block_free_list (MSBlockInfo *block, int size, gboolean pinned)
                   one free slot */
                g_assert (block->free_list);
 
+#ifdef FIXED_HEAP
+               /* the block must not be in the empty_blocks list */
+               for (b = empty_blocks; b; b = b->next_free)
+                       g_assert (b != block);
+#else
                /* the block must be in the all_blocks list */
                for (b = all_blocks; b; b = b->next) {
                        if (b == block)
                                break;
                }
                g_assert (b == block);
+#endif
        }
 }
 
 static void
 check_empty_blocks (void)
 {
+#ifndef FIXED_HEAP
        void *p;
        int i = 0;
        for (p = empty_blocks; p; p = *(void**)p)
                ++i;
        g_assert (i == num_empty_blocks);
+#endif
 }
 
 static void
@@ -241,13 +423,15 @@ consistency_check (void)
        int i;
 
        /* check all blocks */
-       for (block = all_blocks; block; block = block->next) {
+       FOREACH_BLOCK (block) {
                int count = MS_BLOCK_FREE / block->obj_size;
                int num_free = 0;
                void **free;
 
+#ifndef FIXED_HEAP
                /* check block header */
                g_assert (((MSBlockHeader*)block->block)->info == block);
+#endif
 
                /* count number of free slots */
                for (i = 0; i < count; ++i) {
@@ -266,7 +450,7 @@ consistency_check (void)
                /* check all mark words are zero */
                for (i = 0; i < MS_NUM_MARK_WORDS; ++i)
                        g_assert (block->mark_words [i] == 0);
-       }
+       } END_FOREACH_BLOCK;
 
        /* check free blocks */
        for (i = 0; i < num_block_obj_sizes; ++i) {
@@ -284,8 +468,12 @@ ms_alloc_block (int size_index, gboolean pinned, gboolean has_references)
 {
        int size = block_obj_sizes [size_index];
        int count = MS_BLOCK_FREE / size;
+#ifdef FIXED_HEAP
+       MSBlockInfo *info = ms_get_empty_block ();
+#else
        MSBlockInfo *info = mono_sgen_alloc_internal (INTERNAL_MEM_MS_BLOCK_INFO);
        MSBlockHeader *header;
+#endif
        MSBlockInfo **free_blocks = FREE_BLOCKS (pinned, has_references);
        char *obj_start;
        int i;
@@ -295,26 +483,32 @@ ms_alloc_block (int size_index, gboolean pinned, gboolean has_references)
        info->obj_size = size;
        info->pinned = pinned;
        info->has_references = has_references;
+#ifndef FIXED_HEAP
        info->block = ms_get_empty_block ();
 
        header = (MSBlockHeader*) info->block;
        header->info = info;
+#endif
 
        /* build free list */
        obj_start = info->block + MS_BLOCK_SKIP;
        info->free_list = (void**)obj_start;
-       /* we're skipping the last one - it's already NULL */
+       /* we're skipping the last one - it must be nulled */
        for (i = 0; i < count - 1; ++i) {
                char *next_obj_start = obj_start + size;
                *(void**)obj_start = next_obj_start;
                obj_start = next_obj_start;
        }
+       /* the last one */
+       *(void**)obj_start = NULL;
 
        info->next_free = free_blocks [size_index];
        free_blocks [size_index] = info;
 
+#ifndef FIXED_HEAP
        info->next = all_blocks;
        all_blocks = info;
+#endif
 
        ++num_major_sections;
 }
@@ -365,16 +559,11 @@ alloc_obj (int size, gboolean pinned, gboolean has_references)
 }
 
 static void*
-ms_alloc_obj (int size, gboolean has_references)
+major_alloc_object (int size, gboolean has_references)
 {
        return alloc_obj (size, FALSE, has_references);
 }
 
-/* FIXME: inline fast path */
-#define MAJOR_GET_COPY_OBJECT_SPACE(dest, size, refs) do {     \
-               (dest) = ms_alloc_obj ((size), (refs));         \
-       } while (0)
-
 /*
  * We're not freeing the block if it's empty.  We leave that work for
  * the next major collection.
@@ -389,7 +578,7 @@ free_object (char *obj, size_t size, gboolean pinned)
        int word, bit;
        DEBUG (9, g_assert ((pinned && block->pinned) || (!pinned && !block->pinned)));
        DEBUG (9, g_assert (MS_OBJ_ALLOCED (obj, block)));
-       MS_CALC_MARK_BIT (word, bit, obj, block);
+       MS_CALC_MARK_BIT (word, bit, obj);
        DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
        if (!block->free_list) {
                MSBlockInfo **free_blocks = FREE_BLOCKS (pinned, block->has_references);
@@ -409,7 +598,7 @@ major_free_non_pinned_object (char *obj, size_t size)
        free_object (obj, size, FALSE);
 }
 
-/* size is a multiple of ALLOC_ALIGN */
+/* size is a multiple of SGEN_ALLOC_ALIGN */
 static void*
 major_alloc_small_pinned_obj (size_t size, gboolean has_references)
 {
@@ -435,7 +624,7 @@ major_alloc_degraded (MonoVTable *vtable, size_t size)
        HEAVY_STAT (++stat_objects_alloced_degraded);
        HEAVY_STAT (stat_bytes_alloced_degraded += size);
        g_assert (num_major_sections >= old_num_sections);
-       minor_collection_sections_alloced += num_major_sections - old_num_sections;
+       mono_sgen_register_major_sections_alloced (num_major_sections - old_num_sections);
        return obj;
 }
 
@@ -451,21 +640,29 @@ major_is_object_live (char *obj)
 {
        MSBlockInfo *block;
        int word, bit;
+#ifndef FIXED_HEAP
        mword objsize;
+#endif
 
        if (ptr_in_nursery (obj))
                return FALSE;
 
-       objsize = ALIGN_UP (safe_object_get_size ((MonoObject*)obj));
+#ifdef FIXED_HEAP
+       /* LOS */
+       if (!MS_PTR_IN_SMALL_MAJOR_HEAP (obj))
+               return FALSE;
+#else
+       objsize = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)obj));
 
        /* LOS */
-       if (objsize > MAX_SMALL_OBJ_SIZE)
+       if (objsize > SGEN_MAX_SMALL_OBJ_SIZE)
                return FALSE;
+#endif
 
        /* now we know it's in a major block */
        block = MS_BLOCK_FOR_OBJ (obj);
        DEBUG (9, g_assert (!block->pinned));
-       MS_CALC_MARK_BIT (word, bit, obj, block);
+       MS_CALC_MARK_BIT (word, bit, obj);
        return MS_MARK_BIT (block, word, bit) ? TRUE : FALSE;
 }
 
@@ -480,7 +677,7 @@ major_iterate_objects (gboolean non_pinned, gboolean pinned, IterateObjectCallba
 {
        MSBlockInfo *block;
 
-       for (block = all_blocks; block; block = block->next) {
+       FOREACH_BLOCK (block) {
                int count = MS_BLOCK_FREE / block->obj_size;
                int i;
 
@@ -494,17 +691,20 @@ major_iterate_objects (gboolean non_pinned, gboolean pinned, IterateObjectCallba
                        if (MS_OBJ_ALLOCED (obj, block))
                                callback ((char*)obj, block->obj_size, data);
                }
-       }
+       } END_FOREACH_BLOCK;
 }
 
-#define major_check_scan_starts()
+static void
+major_check_scan_starts (void)
+{
+}
 
 static void
-major_dump_heap (void)
+major_dump_heap (FILE *heap_dump_file)
 {
        MSBlockInfo *block;
 
-       for (block = all_blocks; block; block = block->next) {
+       FOREACH_BLOCK (block) {
                int count = MS_BLOCK_FREE / block->obj_size;
                int i;
                int start = -1;
@@ -517,45 +717,61 @@ major_dump_heap (void)
                                        start = i;
                        } else {
                                if (start >= 0) {
-                                       dump_occupied (MS_BLOCK_OBJ (block, start), MS_BLOCK_OBJ (block, i), block->block);
+                                       mono_sgen_dump_occupied (MS_BLOCK_OBJ (block, start), MS_BLOCK_OBJ (block, i), block->block);
                                        start = -1;
                                }
                        }
                }
 
                fprintf (heap_dump_file, "</section>\n");
-       }
+       } END_FOREACH_BLOCK;
 }
 
+#define LOAD_VTABLE    SGEN_LOAD_VTABLE
+
 #define MS_MARK_OBJECT_AND_ENQUEUE_CHECKED(obj,block,queue) do {       \
                int __word, __bit;                                      \
-               MS_CALC_MARK_BIT (__word, __bit, (obj), (block));       \
+               MS_CALC_MARK_BIT (__word, __bit, (obj));                \
                if (!MS_MARK_BIT ((block), __word, __bit) && MS_OBJ_ALLOCED ((obj), (block))) { \
                        MS_SET_MARK_BIT ((block), __word, __bit);       \
                        if ((block)->has_references)                    \
                                GRAY_OBJECT_ENQUEUE ((queue), (obj));   \
-                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), safe_object_get_size ((MonoObject*)(obj))); \
+                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), mono_sgen_safe_object_get_size ((MonoObject*)(obj))); \
                }                                                       \
        } while (0)
 #define MS_MARK_OBJECT_AND_ENQUEUE(obj,block,queue) do {               \
+               int __word, __bit;                                      \
+               MS_CALC_MARK_BIT (__word, __bit, (obj));                \
+               DEBUG (9, g_assert (MS_OBJ_ALLOCED ((obj), (block))));  \
+               if (!MS_MARK_BIT ((block), __word, __bit)) {            \
+                       MS_SET_MARK_BIT ((block), __word, __bit);       \
+                       if ((block)->has_references)                    \
+                               GRAY_OBJECT_ENQUEUE ((queue), (obj));   \
+                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), mono_sgen_safe_object_get_size ((MonoObject*)(obj))); \
+               }                                                       \
+       } while (0)
+#define MS_PAR_MARK_OBJECT_AND_ENQUEUE(obj,block,queue) do {           \
                int __word, __bit;                                      \
                gboolean __was_marked;                                  \
                DEBUG (9, g_assert (MS_OBJ_ALLOCED ((obj), (block))));  \
-               MS_CALC_MARK_BIT (__word, __bit, (obj), (block));       \
+               MS_CALC_MARK_BIT (__word, __bit, (obj));                \
                MS_PAR_SET_MARK_BIT (__was_marked, (block), __word, __bit); \
                if (!__was_marked) {                                    \
                        if ((block)->has_references)                    \
                                GRAY_OBJECT_ENQUEUE ((queue), (obj));   \
-                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), safe_object_get_size ((MonoObject*)(obj))); \
+                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), mono_sgen_safe_object_get_size ((MonoObject*)(obj))); \
                }                                                       \
        } while (0)
 
+#include "sgen-major-copy-object.h"
+
+#ifdef SGEN_PARALLEL_MARK
 static void
-major_copy_or_mark_object (void **ptr, GrayQueue *queue)
+major_copy_or_mark_object (void **ptr, SgenGrayQueue *queue)
 {
        void *obj = *ptr;
        mword vtable_word = *(mword*)obj;
-       MonoVTable *vt = (MonoVTable*)(vtable_word & ~VTABLE_BITS_MASK);
+       MonoVTable *vt = (MonoVTable*)(vtable_word & ~SGEN_VTABLE_BITS_MASK);
        mword objsize;
        MSBlockInfo *block;
 
@@ -569,22 +785,22 @@ major_copy_or_mark_object (void **ptr, GrayQueue *queue)
                gboolean has_references;
                void *destination;
 
-               if (vtable_word & FORWARDED_BIT) {
+               if (vtable_word & SGEN_FORWARDED_BIT) {
                        *ptr = (void*)vt;
                        return;
                }
 
-               if (vtable_word & PINNED_BIT)
+               if (vtable_word & SGEN_PINNED_BIT)
                        return;
 
                HEAVY_STAT (++stat_objects_copied_major);
 
-               objsize = ALIGN_UP (par_object_get_size (vt, (MonoObject*)obj));
-               has_references = VTABLE_HAS_REFERENCES (vt);
+               objsize = SGEN_ALIGN_UP (mono_sgen_par_object_get_size (vt, (MonoObject*)obj));
+               has_references = SGEN_VTABLE_HAS_REFERENCES (vt);
 
-               destination = ms_alloc_obj (objsize, has_references);
+               destination = major_alloc_object (objsize, has_references);
 
-               if (SGEN_CAS_PTR (obj, (void*)((mword)destination | FORWARDED_BIT), vt) == vt) {
+               if (SGEN_CAS_PTR (obj, (void*)((mword)destination | SGEN_FORWARDED_BIT), vt) == vt) {
                        gboolean was_marked;
 
                        par_copy_object_no_checks (destination, vt, obj, objsize, has_references ? queue : NULL);
@@ -592,12 +808,12 @@ major_copy_or_mark_object (void **ptr, GrayQueue *queue)
                        *ptr = obj;
 
                        /*
-                        * FIXME: If we make ms_alloc_obj() give us
-                        * the block info, too, we won't have to
+                        * FIXME: If we make major_alloc_object() give
+                        * us the block info, too, we won't have to
                         * re-fetch it here.
                         */
                        block = MS_BLOCK_FOR_OBJ (obj);
-                       MS_CALC_MARK_BIT (word, bit, obj, block);
+                       MS_CALC_MARK_BIT (word, bit, obj);
                        DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
                        MS_PAR_SET_MARK_BIT (was_marked, block, word, bit);
                } else {
@@ -609,43 +825,109 @@ major_copy_or_mark_object (void **ptr, GrayQueue *queue)
                        *(void**)destination = NULL;
 
                        vtable_word = *(mword*)obj;
-                       g_assert (vtable_word & FORWARDED_BIT);
+                       g_assert (vtable_word & SGEN_FORWARDED_BIT);
 
-                       obj = (void*)(vtable_word & ~VTABLE_BITS_MASK);
+                       obj = (void*)(vtable_word & ~SGEN_VTABLE_BITS_MASK);
 
                        *ptr = obj;
                }
-               return;
+       } else {
+#ifdef FIXED_HEAP
+               if (MS_PTR_IN_SMALL_MAJOR_HEAP (obj))
+#else
+               objsize = SGEN_ALIGN_UP (mono_sgen_par_object_get_size (vt, (MonoObject*)obj));
+
+               if (objsize <= SGEN_MAX_SMALL_OBJ_SIZE)
+#endif
+               {
+                       block = MS_BLOCK_FOR_OBJ (obj);
+                       MS_PAR_MARK_OBJECT_AND_ENQUEUE (obj, block, queue);
+               } else {
+                       if (vtable_word & SGEN_PINNED_BIT)
+                               return;
+                       binary_protocol_pin (obj, vt, mono_sgen_safe_object_get_size ((MonoObject*)obj));
+                       if (SGEN_CAS_PTR (obj, (void*)(vtable_word | SGEN_PINNED_BIT), (void*)vtable_word) == (void*)vtable_word) {
+                               if (SGEN_VTABLE_HAS_REFERENCES (vt))
+                                       GRAY_OBJECT_ENQUEUE (queue, obj);
+                       } else {
+                               g_assert (SGEN_OBJECT_IS_PINNED (obj));
+                       }
+               }
        }
+}
+#else
+static void
+major_copy_or_mark_object (void **ptr, SgenGrayQueue *queue)
+{
+       void *obj = *ptr;
+       mword objsize;
+       MSBlockInfo *block;
+
+       HEAVY_STAT (++stat_copy_object_called_major);
 
-       objsize = ALIGN_UP (par_object_get_size (vt, (MonoObject*)obj));
+       DEBUG (9, g_assert (obj));
+       DEBUG (9, g_assert (current_collection_generation == GENERATION_OLD));
+
+       if (ptr_in_nursery (obj)) {
+               int word, bit;
+               char *forwarded;
 
-       if (objsize > MAX_SMALL_OBJ_SIZE) {
-               if (vtable_word & PINNED_BIT)
+               if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj))) {
+                       *ptr = forwarded;
+                       return;
+               }
+               if (SGEN_OBJECT_IS_PINNED (obj))
                        return;
-               binary_protocol_pin (obj, vt, safe_object_get_size ((MonoObject*)obj));
-               if (SGEN_CAS_PTR (obj, (void*)(vtable_word | PINNED_BIT), (void*)vtable_word) == (void*)vtable_word) {
-                       if (VTABLE_HAS_REFERENCES (vt))
-                               GRAY_OBJECT_ENQUEUE (queue, obj);
+
+               HEAVY_STAT (++stat_objects_copied_major);
+
+               obj = copy_object_no_checks (obj, queue);
+               *ptr = obj;
+
+               /*
+                * FIXME: See comment for copy_object_no_checks().  If
+                * we have that, we can let the allocation function
+                * give us the block info, too, and we won't have to
+                * re-fetch it.
+                */
+               block = MS_BLOCK_FOR_OBJ (obj);
+               MS_CALC_MARK_BIT (word, bit, obj);
+               DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
+               MS_SET_MARK_BIT (block, word, bit);
+       } else {
+#ifdef FIXED_HEAP
+               if (MS_PTR_IN_SMALL_MAJOR_HEAP (obj))
+#else
+               objsize = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)obj));
+
+               if (objsize <= SGEN_MAX_SMALL_OBJ_SIZE)
+#endif
+               {
+                       block = MS_BLOCK_FOR_OBJ (obj);
+                       MS_MARK_OBJECT_AND_ENQUEUE (obj, block, queue);
                } else {
-                       g_assert (object_is_pinned (obj));
+                       if (SGEN_OBJECT_IS_PINNED (obj))
+                               return;
+                       binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), mono_sgen_safe_object_get_size ((MonoObject*)obj));
+                       SGEN_PIN_OBJECT (obj);
+                       /* FIXME: only enqueue if object has references */
+                       GRAY_OBJECT_ENQUEUE (queue, obj);
                }
-               return;
        }
-
-       block = MS_BLOCK_FOR_OBJ (obj);
-       MS_MARK_OBJECT_AND_ENQUEUE (obj, block, queue);
 }
+#endif
+
+#include "sgen-major-scan-object.h"
 
 static void
-mark_pinned_objects_in_block (MSBlockInfo *block, GrayQueue *queue)
+mark_pinned_objects_in_block (MSBlockInfo *block, SgenGrayQueue *queue)
 {
        int i;
        int last_index = -1;
        int count = MS_BLOCK_FREE / block->obj_size;
 
-       for (i = block->pin_queue_start; i < block->pin_queue_end; ++i) {
-               int index = MS_BLOCK_OBJ_INDEX (pin_queue [i], block);
+       for (i = 0; i < block->pin_queue_num_entries; ++i) {
+               int index = MS_BLOCK_OBJ_INDEX (block->pin_queue_start [i], block);
                DEBUG (9, g_assert (index >= 0 && index < count));
                if (index == last_index)
                        continue;
@@ -657,8 +939,12 @@ mark_pinned_objects_in_block (MSBlockInfo *block, GrayQueue *queue)
 static void
 major_sweep (void)
 {
-       MSBlockInfo **iter;
        int i;
+#ifdef FIXED_HEAP
+       int j;
+#else
+       MSBlockInfo **iter;
+#endif
 
        /* clear all the free lists */
        for (i = 0; i < MS_BLOCK_TYPE_MAX; ++i) {
@@ -669,20 +955,31 @@ major_sweep (void)
        }
 
        /* traverse all blocks, free and zero unmarked objects */
+#ifdef FIXED_HEAP
+       for (j = 0; j < ms_heap_num_blocks; ++j) {
+               MSBlockInfo *block = &block_infos [j];
+#else
        iter = &all_blocks;
        while (*iter) {
                MSBlockInfo *block = *iter;
-               int count = MS_BLOCK_FREE / block->obj_size;
+#endif
+               int count;
                gboolean have_live = FALSE;
                int obj_index;
 
+#ifdef FIXED_HEAP
+               if (!block->used)
+                       continue;
+#endif
+
+               count = MS_BLOCK_FREE / block->obj_size;
                block->free_list = NULL;
 
                for (obj_index = 0; obj_index < count; ++obj_index) {
                        int word, bit;
                        void *obj = MS_BLOCK_OBJ (block, obj_index);
 
-                       MS_CALC_MARK_BIT (word, bit, obj, block);
+                       MS_CALC_MARK_BIT (word, bit, obj);
                        if (MS_MARK_BIT (block, word, bit)) {
                                DEBUG (9, g_assert (MS_OBJ_ALLOCED (obj, block)));
                                have_live = TRUE;
@@ -706,7 +1003,9 @@ major_sweep (void)
                 */
 
                if (have_live) {
+#ifndef FIXED_HEAP
                        iter = &block->next;
+#endif
 
                        /*
                         * If there are free slots in the block, add
@@ -723,10 +1022,14 @@ major_sweep (void)
                         * Blocks without live objects are removed from the
                         * block list and freed.
                         */
+#ifdef FIXED_HEAP
+                       ms_free_block (block);
+#else
                        *iter = block->next;
 
                        ms_free_block (block->block);
                        mono_sgen_free_internal (block, INTERNAL_MEM_MS_BLOCK_INFO);
+#endif
 
                        --num_major_sections;
                }
@@ -790,7 +1093,7 @@ ms_calculate_block_obj_sizes (double factor, int *arr)
 
        do {
                int target_count = ceil (MS_BLOCK_FREE / target_size);
-               int size = MIN ((MS_BLOCK_FREE / target_count) & ~(ALLOC_ALIGN - 1), MAX_SMALL_OBJ_SIZE);
+               int size = MIN ((MS_BLOCK_FREE / target_count) & ~(SGEN_ALLOC_ALIGN - 1), SGEN_MAX_SMALL_OBJ_SIZE);
 
                if (size != last_size) {
                        if (arr)
@@ -800,45 +1103,11 @@ ms_calculate_block_obj_sizes (double factor, int *arr)
                }
 
                target_size *= factor;
-       } while (last_size < MAX_SMALL_OBJ_SIZE);
+       } while (last_size < SGEN_MAX_SMALL_OBJ_SIZE);
 
        return num_sizes;
 }
 
-static void
-major_init (void)
-{
-       int i;
-
-       mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_MS_BLOCK_INFO, sizeof (MSBlockInfo));
-
-       num_block_obj_sizes = ms_calculate_block_obj_sizes (MS_BLOCK_OBJ_SIZE_FACTOR, NULL);
-       block_obj_sizes = mono_sgen_alloc_internal_dynamic (sizeof (int) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
-       ms_calculate_block_obj_sizes (MS_BLOCK_OBJ_SIZE_FACTOR, block_obj_sizes);
-
-       /*
-       {
-               int i;
-               g_print ("block object sizes:\n");
-               for (i = 0; i < num_block_obj_sizes; ++i)
-                       g_print ("%d\n", block_obj_sizes [i]);
-       }
-       */
-
-       for (i = 0; i < MS_BLOCK_TYPE_MAX; ++i)
-               free_block_lists [i] = mono_sgen_alloc_internal_dynamic (sizeof (MSBlockInfo*) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
-
-       for (i = 0; i < MS_NUM_FAST_BLOCK_OBJ_SIZE_INDEXES; ++i)
-               fast_block_obj_size_indexes [i] = ms_find_block_obj_size_index (i * 8);
-       for (i = 0; i < MS_NUM_FAST_BLOCK_OBJ_SIZE_INDEXES * 8; ++i)
-               g_assert (MS_BLOCK_OBJ_SIZE_INDEX (i) == ms_find_block_obj_size_index (i));
-
-       LOCK_INIT (ms_block_list_mutex);
-
-       mono_counters_register ("# major blocks allocated", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_blocks_alloced);
-       mono_counters_register ("# major blocks freed", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_blocks_freed);
-}
-
 /* only valid during minor collections */
 static int old_num_major_sections;
 
@@ -855,20 +1124,17 @@ major_start_nursery_collection (void)
 static void
 major_finish_nursery_collection (void)
 {
-       int sections_alloced;
-
 #ifdef MARKSWEEP_CONSISTENCY_CHECK
        consistency_check ();
 #endif
-
-       sections_alloced = num_major_sections - old_num_major_sections;
-       minor_collection_sections_alloced += sections_alloced;
+       mono_sgen_register_major_sections_alloced (num_major_sections - old_num_major_sections);
 }
 
 static void
 major_finish_major_collection (void)
 {
-       int section_reserve = minor_collection_allowance / MS_BLOCK_SIZE;
+#ifndef FIXED_HEAP
+       int section_reserve = mono_sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE;
 
        /*
         * FIXME: We don't free blocks on 32 bit platforms because it
@@ -890,26 +1156,28 @@ major_finish_major_collection (void)
 
                ++stat_major_blocks_freed;
        }
+#endif
 }
 
 static void
-major_find_pin_queue_start_ends (GrayQueue *queue)
+major_find_pin_queue_start_ends (SgenGrayQueue *queue)
 {
        MSBlockInfo *block;
 
-       for (block = all_blocks; block; block = block->next) {
-               find_optimized_pin_queue_area (block->block + MS_BLOCK_SKIP, block->block + MS_BLOCK_SIZE,
-                               &block->pin_queue_start, &block->pin_queue_end);
-       }
+       FOREACH_BLOCK (block) {
+               block->pin_queue_start = mono_sgen_find_optimized_pin_queue_area (block->block + MS_BLOCK_SKIP, block->block + MS_BLOCK_SIZE,
+                               &block->pin_queue_num_entries);
+       } END_FOREACH_BLOCK;
 }
 
 static void
-major_pin_objects (GrayQueue *queue)
+major_pin_objects (SgenGrayQueue *queue)
 {
        MSBlockInfo *block;
 
-       for (block = all_blocks; block; block = block->next)
+       FOREACH_BLOCK (block) {
                mark_pinned_objects_in_block (block, queue);
+       } END_FOREACH_BLOCK;
 }
 
 static void
@@ -929,13 +1197,213 @@ major_get_used_size (void)
        gint64 size = 0;
        MSBlockInfo *block;
 
-       for (block = all_blocks; block; block = block->next) {
+       FOREACH_BLOCK (block) {
                int count = MS_BLOCK_FREE / block->obj_size;
                void **iter;
                size += count * block->obj_size;
                for (iter = block->free_list; iter; iter = (void**)*iter)
                        size -= block->obj_size;
-       }
+       } END_FOREACH_BLOCK;
 
        return size;
 }
+
+static int
+get_num_major_sections (void)
+{
+       return num_major_sections;
+}
+
+#ifdef FIXED_HEAP
+static gboolean
+major_handle_gc_param (const char *opt)
+{
+       if (g_str_has_prefix (opt, "major-heap-size=")) {
+               const char *arg = strchr (opt, '=') + 1;
+               glong size;
+               if (!mono_sgen_parse_environment_string_extract_number (arg, &size))
+                       return FALSE;
+               ms_heap_num_blocks = (size + MS_BLOCK_SIZE - 1) / MS_BLOCK_SIZE;
+               g_assert (ms_heap_num_blocks > 0);
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+static void
+major_print_gc_param_usage (void)
+{
+       fprintf (stderr, "  major-heap-size=N (where N is an integer, possibly with a k, m or a g suffix)\n");
+}
+#endif
+
+#ifdef SGEN_HAVE_CARDTABLE
+static void
+major_iterate_live_block_ranges (sgen_cardtable_block_callback callback)
+{
+       MSBlockInfo *block;
+
+       FOREACH_BLOCK (block) {
+               if (block->has_references)
+                       callback ((mword)block->block, MS_BLOCK_SIZE);
+       } END_FOREACH_BLOCK;
+}
+
+#define MS_BLOCK_OBJ_INDEX_FAST(o,b,os)        (((char*)(o) - ((b) + MS_BLOCK_SKIP)) / (os))
+#define MS_BLOCK_OBJ_FAST(b,os,i)                      ((b) + MS_BLOCK_SKIP + (os) * (i))
+#define MS_OBJ_ALLOCED_FAST(o,b)               (*(void**)(o) && (*(char**)(o) < (b) || *(char**)(o) >= (b) + MS_BLOCK_SIZE))
+
+static void
+major_scan_card_table (SgenGrayQueue *queue)
+{
+       MSBlockInfo *block;
+
+       FOREACH_BLOCK (block) {
+               int i;
+               int block_obj_size;
+               char *start, *block_start;
+
+               if (!block->has_references)
+                       continue;
+
+               block_obj_size = block->obj_size;
+               start = block_start = block->block;
+
+               if (block_obj_size >= CARD_SIZE_IN_BYTES) {
+                       guint8 cards [CARDS_PER_BLOCK];
+                       char *obj = (char*)MS_BLOCK_OBJ_FAST (block_start, block_obj_size, 0);
+                       char *end = start + MS_BLOCK_SIZE;
+                       char *base = sgen_card_table_align_pointer (obj);
+
+                       sgen_card_table_get_card_data (cards, (mword)start, CARDS_PER_BLOCK);
+
+                       while (obj < end) {
+                               if (MS_OBJ_ALLOCED_FAST (obj, block_start)) {
+                                       int card_offset = (obj - base) >> CARD_BITS;
+                                       sgen_cardtable_scan_object (obj, block_obj_size, cards + card_offset, queue);
+                               }
+                               obj += block_obj_size;
+                       }
+               } else {
+                       for (i = 0; i < CARDS_PER_BLOCK; ++i, start += CARD_SIZE_IN_BYTES) {
+                               int index;
+                               char *obj, *end;
+
+                               if (!sgen_card_table_card_begin_scanning ((mword)start))
+                                       continue;
+
+                               end = start + CARD_SIZE_IN_BYTES;
+                               if (i == 0)
+                                       index = 0;
+                               else
+                                       index = MS_BLOCK_OBJ_INDEX_FAST (start, block_start, block_obj_size);
+
+                               obj = (char*)MS_BLOCK_OBJ_FAST (block_start, block_obj_size, index);
+                               while (obj < end) {
+                                       if (MS_OBJ_ALLOCED_FAST (obj, block_start))
+                                               minor_scan_object (obj, queue);
+                                       obj += block_obj_size;
+                               }
+                       }
+               }
+       } END_FOREACH_BLOCK;
+}
+#endif
+
+void
+#ifdef SGEN_PARALLEL_MARK
+#ifdef FIXED_HEAP
+mono_sgen_marksweep_fixed_par_init
+#else
+mono_sgen_marksweep_par_init
+#endif
+#else
+#ifdef FIXED_HEAP
+mono_sgen_marksweep_fixed_init
+#else
+mono_sgen_marksweep_init
+#endif
+#endif
+       (SgenMajorCollector *collector)
+{
+       int i;
+
+#ifndef FIXED_HEAP
+       mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_MS_BLOCK_INFO, sizeof (MSBlockInfo));
+#endif
+
+       num_block_obj_sizes = ms_calculate_block_obj_sizes (MS_BLOCK_OBJ_SIZE_FACTOR, NULL);
+       block_obj_sizes = mono_sgen_alloc_internal_dynamic (sizeof (int) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
+       ms_calculate_block_obj_sizes (MS_BLOCK_OBJ_SIZE_FACTOR, block_obj_sizes);
+
+       /*
+       {
+               int i;
+               g_print ("block object sizes:\n");
+               for (i = 0; i < num_block_obj_sizes; ++i)
+                       g_print ("%d\n", block_obj_sizes [i]);
+       }
+       */
+
+       for (i = 0; i < MS_BLOCK_TYPE_MAX; ++i)
+               free_block_lists [i] = mono_sgen_alloc_internal_dynamic (sizeof (MSBlockInfo*) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
+
+       for (i = 0; i < MS_NUM_FAST_BLOCK_OBJ_SIZE_INDEXES; ++i)
+               fast_block_obj_size_indexes [i] = ms_find_block_obj_size_index (i * 8);
+       for (i = 0; i < MS_NUM_FAST_BLOCK_OBJ_SIZE_INDEXES * 8; ++i)
+               g_assert (MS_BLOCK_OBJ_SIZE_INDEX (i) == ms_find_block_obj_size_index (i));
+
+       LOCK_INIT (ms_block_list_mutex);
+
+       mono_counters_register ("# major blocks allocated", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_blocks_alloced);
+       mono_counters_register ("# major blocks freed", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_blocks_freed);
+
+       collector->section_size = MAJOR_SECTION_SIZE;
+#ifdef SGEN_PARALLEL_MARK
+       collector->is_parallel = TRUE;
+#else
+       collector->is_parallel = FALSE;
+#endif
+       collector->supports_cardtable = !collector->is_parallel;
+
+       collector->alloc_heap = major_alloc_heap;
+       collector->is_object_live = major_is_object_live;
+       collector->alloc_small_pinned_obj = major_alloc_small_pinned_obj;
+       collector->alloc_degraded = major_alloc_degraded;
+       collector->copy_or_mark_object = major_copy_or_mark_object;
+       collector->alloc_object = major_alloc_object;
+       collector->free_pinned_object = free_pinned_object;
+       collector->iterate_objects = major_iterate_objects;
+       collector->free_non_pinned_object = major_free_non_pinned_object;
+       collector->find_pin_queue_start_ends = major_find_pin_queue_start_ends;
+       collector->pin_objects = major_pin_objects;
+#ifdef SGEN_HAVE_CARDTABLE
+       collector->scan_card_table = major_scan_card_table;
+       collector->iterate_live_block_ranges = (void*)(void*) major_iterate_live_block_ranges;
+#endif
+       collector->init_to_space = major_init_to_space;
+       collector->sweep = major_sweep;
+       collector->check_scan_starts = major_check_scan_starts;
+       collector->dump_heap = major_dump_heap;
+       collector->get_used_size = major_get_used_size;
+       collector->start_nursery_collection = major_start_nursery_collection;
+       collector->finish_nursery_collection = major_finish_nursery_collection;
+       collector->finish_major_collection = major_finish_major_collection;
+       collector->ptr_is_in_non_pinned_space = major_ptr_is_in_non_pinned_space;
+       collector->obj_is_from_pinned_alloc = obj_is_from_pinned_alloc;
+       collector->report_pinned_memory_usage = major_report_pinned_memory_usage;
+       collector->get_num_major_sections = get_num_major_sections;
+#ifdef FIXED_HEAP
+       collector->handle_gc_param = major_handle_gc_param;
+       collector->print_gc_param_usage = major_print_gc_param_usage;
+#else
+       collector->handle_gc_param = NULL;
+       collector->print_gc_param_usage = NULL;
+#endif
+
+       FILL_COLLECTOR_COPY_OBJECT (collector);
+       FILL_COLLECTOR_SCAN_OBJECT (collector);
+}
+
+#endif
index 166d1f93380baf3669a82bd34af1a78ce4cd5d26..4170f4177d5ceecb041986e10b8805cf84e4e0d4 100644 (file)
@@ -120,11 +120,16 @@ pin_stats_count_object_from_tree (char *obj, size_t size, PinStatAddress *node,
                pin_stats_count_object_from_tree (obj, size, node->right, pin_types);
 }
 
-static void
-pin_stats_register_object (char *obj, size_t size)
+void
+mono_sgen_pin_stats_register_object (char *obj, size_t size)
 {
        int pin_types = 0;
-       ObjectList *list = mono_sgen_alloc_internal_dynamic (sizeof (ObjectList), INTERNAL_MEM_STATISTICS);
+       ObjectList *list;
+
+       if (!heap_dump_file)
+               return;
+
+       list = mono_sgen_alloc_internal_dynamic (sizeof (ObjectList), INTERNAL_MEM_STATISTICS);
        pin_stats_count_object_from_tree (obj, size, pin_stat_addresses, &pin_types);
        list->obj = (MonoObject*)obj;
        list->next = pinned_objects;
index cef6396d0f9e776e381a411e021a99b529913759..a90cf3d71ad2500ac3a88fb57ecf63f925ca3ec4 100644 (file)
@@ -106,32 +106,22 @@ optimized_pin_queue_search (void *addr)
        return first;
 }
 
-static void
-find_optimized_pin_queue_area (void *start, void *end, int *first, int *last)
-{
-       *first = optimized_pin_queue_search (start);
-       *last = optimized_pin_queue_search (end);
-}
-
 void**
 mono_sgen_find_optimized_pin_queue_area (void *start, void *end, int *num)
 {
        int first, last;
-       find_optimized_pin_queue_area (start, end, &first, &last);
+       first = optimized_pin_queue_search (start);
+       last = optimized_pin_queue_search (end);
        *num = last - first;
        if (first == last)
                return NULL;
        return pin_queue + first;
 }
 
-static void
-find_section_pin_queue_start_end (GCMemSection *section)
+void
+mono_sgen_find_section_pin_queue_start_end (GCMemSection *section)
 {
-       int start, end;
        DEBUG (6, fprintf (gc_debug_file, "Pinning from section %p (%p-%p)\n", section, section->data, section->end_data));
-       find_optimized_pin_queue_area (section->data, section->end_data, &start, &end);
-       DEBUG (6, fprintf (gc_debug_file, "Found %d pinning addresses in section %p (%d-%d)\n",
-                                       end - start, section, start, end));
-       section->pin_queue_start = start;
-       section->pin_queue_end = end;
+       section->pin_queue_start = mono_sgen_find_optimized_pin_queue_area (section->data, section->end_data, &section->pin_queue_num_entries);
+       DEBUG (6, fprintf (gc_debug_file, "Found %d pinning addresses in section %p\n", section->pin_queue_num_entries, section));
 }
index 31905fe389969cdbba573a4a904d1692edec550c..f82486de24c04b8a290bf23d025acd5e4156009d 100644 (file)
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-#ifdef BINARY_PROTOCOL
 
 #include "sgen-protocol.h"
 
+#ifdef SGEN_BINARY_PROTOCOL
+
 /* If not null, dump binary protocol to this file */
 static FILE *binary_protocol_file = NULL;
 
+static int binary_protocol_use_count = 0;
+
 #define BINARY_PROTOCOL_BUFFER_SIZE    (65536 - 2 * 8)
 
 typedef struct _BinaryProtocolBuffer BinaryProtocolBuffer;
@@ -51,15 +54,18 @@ binary_protocol_flush_buffers_rec (BinaryProtocolBuffer *buffer)
        g_assert (buffer->index > 0);
        fwrite (buffer->buffer, 1, buffer->index, binary_protocol_file);
 
-       free_os_memory (buffer, sizeof (BinaryProtocolBuffer));
+       mono_sgen_free_os_memory (buffer, sizeof (BinaryProtocolBuffer));
 }
 
 static void
-binary_protocol_flush_buffers (void)
+binary_protocol_flush_buffers (gboolean force)
 {
        if (!binary_protocol_file)
                return;
 
+       if (!force && binary_protocol_use_count != 0)
+               return;
+
        binary_protocol_flush_buffers_rec (binary_protocol_buffers);
        binary_protocol_buffers = NULL;
 }
@@ -74,12 +80,12 @@ binary_protocol_get_buffer (int length)
        if (buffer && buffer->index + length <= BINARY_PROTOCOL_BUFFER_SIZE)
                return buffer;
 
-       new_buffer = get_os_memory (sizeof (BinaryProtocolBuffer), TRUE);
+       new_buffer = mono_sgen_alloc_os_memory (sizeof (BinaryProtocolBuffer), TRUE);
        new_buffer->next = buffer;
        new_buffer->index = 0;
 
        if (InterlockedCompareExchangePointer ((void**)&binary_protocol_buffers, new_buffer, buffer) != buffer) {
-               free_os_memory (new_buffer, sizeof (BinaryProtocolBuffer));
+               mono_sgen_free_os_memory (new_buffer, sizeof (BinaryProtocolBuffer));
                goto retry;
        }
 
@@ -92,10 +98,16 @@ protocol_entry (unsigned char type, gpointer data, int size)
 {
        int index;
        BinaryProtocolBuffer *buffer;
+       int old_count;
 
        if (!binary_protocol_file)
                return;
 
+       do {
+               old_count = binary_protocol_use_count;
+               g_assert (old_count >= 0);
+       } while (InterlockedCompareExchange (&binary_protocol_use_count, old_count + 1, old_count) != old_count);
+
  retry:
        buffer = binary_protocol_get_buffer (size + 1);
  retry_same_buffer:
@@ -111,94 +123,99 @@ protocol_entry (unsigned char type, gpointer data, int size)
        index += size;
 
        g_assert (index <= BINARY_PROTOCOL_BUFFER_SIZE);
+
+       do {
+               old_count = binary_protocol_use_count;
+               g_assert (old_count > 0);
+       } while (InterlockedCompareExchange (&binary_protocol_use_count, old_count - 1, old_count) != old_count);
 }
 
-static void
+void
 binary_protocol_collection (int generation)
 {
        SGenProtocolCollection entry = { generation };
-       binary_protocol_flush_buffers ();
+       binary_protocol_flush_buffers (FALSE);
        protocol_entry (SGEN_PROTOCOL_COLLECTION, &entry, sizeof (SGenProtocolCollection));
 }
 
-static void
+void
 binary_protocol_alloc (gpointer obj, gpointer vtable, int size)
 {
        SGenProtocolAlloc entry = { obj, vtable, size };
        protocol_entry (SGEN_PROTOCOL_ALLOC, &entry, sizeof (SGenProtocolAlloc));
 }
 
-static void
+void
 binary_protocol_alloc_pinned (gpointer obj, gpointer vtable, int size)
 {
        SGenProtocolAlloc entry = { obj, vtable, size };
        protocol_entry (SGEN_PROTOCOL_ALLOC_PINNED, &entry, sizeof (SGenProtocolAlloc));
 }
 
-static void
+void
 binary_protocol_alloc_degraded (gpointer obj, gpointer vtable, int size)
 {
        SGenProtocolAlloc entry = { obj, vtable, size };
        protocol_entry (SGEN_PROTOCOL_ALLOC_DEGRADED, &entry, sizeof (SGenProtocolAlloc));
 }
 
-static void
+void
 binary_protocol_copy (gpointer from, gpointer to, gpointer vtable, int size)
 {
        SGenProtocolCopy entry = { from, to, vtable, size };
        protocol_entry (SGEN_PROTOCOL_COPY, &entry, sizeof (SGenProtocolCopy));
 }
 
-static void
+void
 binary_protocol_pin (gpointer obj, gpointer vtable, int size)
 {
        SGenProtocolPin entry = { obj, vtable, size };
        protocol_entry (SGEN_PROTOCOL_PIN, &entry, sizeof (SGenProtocolPin));
 }
 
-static void
+void
 binary_protocol_mark (gpointer obj, gpointer vtable, int size)
 {
        SGenProtocolMark entry = { obj, vtable, size };
        protocol_entry (SGEN_PROTOCOL_MARK, &entry, sizeof (SGenProtocolMark));
 }
 
-static void
+void
 binary_protocol_wbarrier (gpointer ptr, gpointer value, gpointer value_vtable)
 {
        SGenProtocolWBarrier entry = { ptr, value, value_vtable };
        protocol_entry (SGEN_PROTOCOL_WBARRIER, &entry, sizeof (SGenProtocolWBarrier));
 }
 
-static void
+void
 binary_protocol_global_remset (gpointer ptr, gpointer value, gpointer value_vtable)
 {
        SGenProtocolGlobalRemset entry = { ptr, value, value_vtable };
        protocol_entry (SGEN_PROTOCOL_GLOBAL_REMSET, &entry, sizeof (SGenProtocolGlobalRemset));
 }
 
-static void
+void
 binary_protocol_ptr_update (gpointer ptr, gpointer old_value, gpointer new_value, gpointer vtable, int size)
 {
        SGenProtocolPtrUpdate entry = { ptr, old_value, new_value, vtable, size };
        protocol_entry (SGEN_PROTOCOL_PTR_UPDATE, &entry, sizeof (SGenProtocolPtrUpdate));
 }
 
-static void
+void
 binary_protocol_cleanup (gpointer ptr, gpointer vtable, int size)
 {
        SGenProtocolCleanup entry = { ptr, vtable, size };
        protocol_entry (SGEN_PROTOCOL_CLEANUP, &entry, sizeof (SGenProtocolCleanup));
 }
 
-static void
+void
 binary_protocol_empty (gpointer start, int size)
 {
        SGenProtocolEmpty entry = { start, size };
        protocol_entry (SGEN_PROTOCOL_EMPTY, &entry, sizeof (SGenProtocolEmpty));
 }
 
-static void
+void
 binary_protocol_thread_restart (gpointer thread)
 {
        SGenProtocolThreadRestart entry = { thread };
@@ -206,7 +223,7 @@ binary_protocol_thread_restart (gpointer thread)
 
 }
 
-static void
+void
 binary_protocol_thread_register (gpointer thread)
 {
        SGenProtocolThreadRegister entry = { thread };
@@ -214,7 +231,7 @@ binary_protocol_thread_register (gpointer thread)
 
 }
 
-static void
+void
 binary_protocol_thread_unregister (gpointer thread)
 {
        SGenProtocolThreadUnregister entry = { thread };
@@ -222,7 +239,7 @@ binary_protocol_thread_unregister (gpointer thread)
 
 }
 
-static void
+void
 binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offset, gpointer value, gpointer value_vtable, int value_pinned)
 {
        SGenProtocolMissingRemset entry = { obj, obj_vtable, offset, value, value_vtable, value_pinned };
@@ -230,24 +247,4 @@ binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offset, g
 
 }
 
-#else
-
-#define binary_protocol_flush_buffers()
-#define binary_protocol_collection(generation)
-#define binary_protocol_alloc(obj, vtable, size)
-#define binary_protocol_alloc_pinned(obj, vtable, size)
-#define binary_protocol_alloc_degraded(obj, vtable, size)
-#define binary_protocol_copy(from, to, vtable, size)
-#define binary_protocol_pin(obj, vtable, size)
-#define binary_protocol_mark(obj, vtable, size)
-#define binary_protocol_wbarrier(ptr, value, value_vtable)
-#define binary_protocol_global_remset(ptr, value, value_vtable)
-#define binary_protocol_ptr_update(ptr, old_value, new_value, vtable, size)
-#define binary_protocol_cleanup(ptr, vtable, size)
-#define binary_protocol_empty(start, size)
-#define binary_protocol_thread_restart(thread)
-#define binary_protocol_thread_register(thread)
-#define binary_protocol_thread_unregister(thread)
-#define binary_protocol_missing_remset(obj, obj_vtable, offset, value, value_vtable, value_pinned)
-
 #endif
index ae2dbc7ff56dfd44f2d6a0f8c34b70edfb1c375d..0501693c22a111a4b18d91f58591984344334960 100644 (file)
@@ -21,6 +21,9 @@
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
+
+#ifdef SGEN_BINARY_PROTOCOL
+
 enum {
        SGEN_PROTOCOL_COLLECTION,
        SGEN_PROTOCOL_ALLOC,
@@ -122,3 +125,43 @@ typedef struct {
 } SGenProtocolMissingRemset;
 
 /* missing: finalizers, dislinks, roots, non-store wbarriers */
+
+void binary_protocol_collection (int generation) MONO_INTERNAL;
+void binary_protocol_alloc (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_alloc_pinned (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_alloc_degraded (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_copy (gpointer from, gpointer to, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_pin (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_mark (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_wbarrier (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
+void binary_protocol_global_remset (gpointer ptr, gpointer value, gpointer value_vtable) MONO_INTERNAL;
+void binary_protocol_ptr_update (gpointer ptr, gpointer old_value, gpointer new_value, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_cleanup (gpointer ptr, gpointer vtable, int size) MONO_INTERNAL;
+void binary_protocol_empty (gpointer start, int size) MONO_INTERNAL;
+void binary_protocol_thread_restart (gpointer thread) MONO_INTERNAL;
+void binary_protocol_thread_register (gpointer thread) MONO_INTERNAL;
+void binary_protocol_thread_unregister (gpointer thread) MONO_INTERNAL;
+void binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offset,
+               gpointer value, gpointer value_vtable, int value_pinned) MONO_INTERNAL;
+
+#else
+
+#define binary_protocol_flush_buffers(force)
+#define binary_protocol_collection(generation)
+#define binary_protocol_alloc(obj, vtable, size)
+#define binary_protocol_alloc_pinned(obj, vtable, size)
+#define binary_protocol_alloc_degraded(obj, vtable, size)
+#define binary_protocol_copy(from, to, vtable, size)
+#define binary_protocol_pin(obj, vtable, size)
+#define binary_protocol_mark(obj, vtable, size)
+#define binary_protocol_wbarrier(ptr, value, value_vtable)
+#define binary_protocol_global_remset(ptr, value, value_vtable)
+#define binary_protocol_ptr_update(ptr, old_value, new_value, vtable, size)
+#define binary_protocol_cleanup(ptr, vtable, size)
+#define binary_protocol_empty(start, size)
+#define binary_protocol_thread_restart(thread)
+#define binary_protocol_thread_register(thread)
+#define binary_protocol_thread_unregister(thread)
+#define binary_protocol_missing_remset(obj, obj_vtable, offset, value, value_vtable, value_pinned)
+
+#endif
index 6f77d7a03534695beff8ce8c8e570baa0b2b9f9f..b10f5d6b92db5090b5927325d0a5290549303de9 100644 (file)
@@ -49,7 +49,7 @@
        size_t skip_size;
        mword desc;
 
-       vt = (GCVTable*)LOAD_VTABLE (start);
+       vt = (GCVTable*)SGEN_LOAD_VTABLE (start);
        //type = vt->desc & 0x7;
 
        /* gcc should be smart enough to remove the bounds check, but it isn't:( */
@@ -67,7 +67,7 @@
                break;
        case DESC_TYPE_ARRAY:
        case DESC_TYPE_VECTOR:
-               skip_size = ALIGN_UP (safe_object_get_size ((MonoObject*)start));
+               skip_size = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)start));
 #define SCAN OBJ_VECTOR_FOREACH_PTR (vt, start)
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
@@ -88,7 +88,7 @@
                start += skip_size;
                break;
        case DESC_TYPE_LARGE_BITMAP:
-               skip_size = ALIGN_UP (safe_object_get_size ((MonoObject*)start));
+               skip_size = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)start));
 #define SCAN OBJ_LARGE_BITMAP_FOREACH_PTR (vt,start)
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
@@ -99,7 +99,7 @@
                break;
        case DESC_TYPE_COMPLEX:
                /* this is a complex object */
-               skip_size = ALIGN_UP (safe_object_get_size ((MonoObject*)start));
+               skip_size = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)start));
 #define SCAN OBJ_COMPLEX_FOREACH_PTR (vt, start)
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
                break;
        case DESC_TYPE_COMPLEX_ARR:
                /* this is an array of complex structs */
-               skip_size = ALIGN_UP (safe_object_get_size ((MonoObject*)start));
+               skip_size = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)start));
 #define SCAN OBJ_COMPLEX_ARR_FOREACH_PTR (vt, start)
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
diff --git a/mono/metadata/sgen-workers.c b/mono/metadata/sgen-workers.c
new file mode 100644 (file)
index 0000000..1c56fba
--- /dev/null
@@ -0,0 +1,324 @@
+/*
+ * Copyright 2001-2003 Ximian, Inc
+ * Copyright 2003-2010 Novell, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+typedef struct _WorkerData WorkerData;
+struct _WorkerData {
+       pthread_t thread;
+       MonoSemType start_worker_sem;
+       gboolean is_working;
+       GrayQueue private_gray_queue; /* only read/written by worker thread */
+       int shared_buffer_increment;
+       int shared_buffer_index;
+};
+
+static int workers_num;
+static WorkerData *workers_data;
+static WorkerData workers_gc_thread_data;
+
+static int workers_num_working;
+
+static GrayQueue workers_distribute_gray_queue;
+
+#define WORKERS_DISTRIBUTE_GRAY_QUEUE (major.is_parallel ? &workers_distribute_gray_queue : &gray_queue)
+
+/*
+ * Must be a power of 2.  It seems that larger values don't help much.
+ * The main reason to make this larger would be to sustain a bigger
+ * number of worker threads.
+ */
+#define WORKERS_SHARED_BUFFER_SIZE     16
+static GrayQueueSection *workers_shared_buffer [WORKERS_SHARED_BUFFER_SIZE];
+static int workers_shared_buffer_used;
+
+static const int workers_primes [] = { 3, 5, 7, 11, 13, 17, 23, 29 };
+
+static MonoSemType workers_done_sem;
+
+static long long stat_shared_buffer_insert_tries;
+static long long stat_shared_buffer_insert_full;
+static long long stat_shared_buffer_insert_iterations;
+static long long stat_shared_buffer_insert_failures;
+static long long stat_shared_buffer_remove_tries;
+static long long stat_shared_buffer_remove_iterations;
+static long long stat_shared_buffer_remove_empty;
+
+static void
+workers_gray_queue_share_redirect (GrayQueue *queue)
+{
+       GrayQueueSection *section;
+       WorkerData *data = queue->alloc_prepare_data;
+       int increment = data->shared_buffer_increment;
+
+       while ((section = gray_object_dequeue_section (queue))) {
+               int i, index;
+
+               HEAVY_STAT (++stat_shared_buffer_insert_tries);
+
+               if (workers_shared_buffer_used == WORKERS_SHARED_BUFFER_SIZE) {
+                       HEAVY_STAT (++stat_shared_buffer_insert_full);
+                       gray_object_enqueue_section (queue, section);
+                       return;
+               }
+
+               index = data->shared_buffer_index;
+               for (i = 0; i < WORKERS_SHARED_BUFFER_SIZE; ++i) {
+                       GrayQueueSection *old = workers_shared_buffer [index];
+                       HEAVY_STAT (++stat_shared_buffer_insert_iterations);
+                       if (!old) {
+                               if (SGEN_CAS_PTR ((void**)&workers_shared_buffer [index], section, NULL) == NULL) {
+                                       SGEN_ATOMIC_ADD (workers_shared_buffer_used, 1);
+                                       //g_print ("thread %d put section %d\n", data - workers_data, index);
+                                       break;
+                               }
+                       }
+                       index = (index + increment) & (WORKERS_SHARED_BUFFER_SIZE - 1);
+               }
+               data->shared_buffer_index = index;
+
+               if (i == WORKERS_SHARED_BUFFER_SIZE) {
+                       /* unsuccessful */
+                       HEAVY_STAT (++stat_shared_buffer_insert_failures);
+                       gray_object_enqueue_section (queue, section);
+                       return;
+               }
+       }
+}
+
+static gboolean
+workers_get_work (WorkerData *data)
+{
+       int i, index;
+       int increment = data->shared_buffer_increment;
+
+       HEAVY_STAT (++stat_shared_buffer_remove_tries);
+
+       index = data->shared_buffer_index;
+       for (i = 0; i < WORKERS_SHARED_BUFFER_SIZE; ++i) {
+               GrayQueueSection *section;
+
+               HEAVY_STAT (++stat_shared_buffer_remove_iterations);
+
+               do {
+                       section = workers_shared_buffer [index];
+                       if (!section)
+                               break;
+               } while (SGEN_CAS_PTR ((void**)&workers_shared_buffer [index], NULL, section) != section);
+
+               if (section) {
+                       SGEN_ATOMIC_ADD (workers_shared_buffer_used, -1);
+                       gray_object_enqueue_section (&data->private_gray_queue, section);
+                       data->shared_buffer_index = index;
+                       //g_print ("thread %d popped section %d\n", data - workers_data, index);
+                       return TRUE;
+               }
+
+               index = (index + increment) & (WORKERS_SHARED_BUFFER_SIZE - 1);
+       }
+
+       HEAVY_STAT (++stat_shared_buffer_remove_empty);
+
+       data->shared_buffer_index = index;
+       return FALSE;
+}
+
+/* returns the new value */
+static int
+workers_change_num_working (int delta)
+{
+       int old, new;
+
+       if (!major.is_parallel)
+               return -1;
+
+       do {
+               old = workers_num_working;
+               new = old + delta;
+       } while (InterlockedCompareExchange (&workers_num_working, new, old) != old);
+       return new;
+}
+
+static void*
+workers_thread_func (void *data_untyped)
+{
+       WorkerData *data = data_untyped;
+       SgenInternalAllocator allocator;
+
+       memset (&allocator, 0, sizeof (allocator));
+
+       gray_object_queue_init_with_alloc_prepare (&data->private_gray_queue, &allocator,
+                       workers_gray_queue_share_redirect, data);
+
+       for (;;) {
+               //g_print ("worker waiting for start %d\n", data->start_worker_sem);
+
+               MONO_SEM_WAIT (&data->start_worker_sem);
+
+               //g_print ("worker starting\n");
+
+               for (;;) {
+                       do {
+                               drain_gray_stack (&data->private_gray_queue);
+                       } while (workers_get_work (data));
+
+                       /*
+                        * FIXME: This might never terminate with
+                        * multiple threads!
+                        */
+
+                       if (workers_change_num_working (-1) == 0)
+                               break;
+
+                       /* we weren't the last one working */
+                       //g_print ("sleeping\n");
+                       usleep (5000);
+                       workers_change_num_working (1);
+               }
+
+               gray_object_queue_init (&data->private_gray_queue, &allocator);
+
+               MONO_SEM_POST (&workers_done_sem);
+
+               //g_print ("worker done\n");
+       }
+
+       /* dummy return to make compilers happy */
+       return NULL;
+}
+
+static void
+workers_distribute_gray_queue_sections (void)
+{
+       if (!major.is_parallel)
+               return;
+
+       workers_gray_queue_share_redirect (&workers_distribute_gray_queue);
+}
+
+static void
+workers_init (int num_workers)
+{
+       int i;
+
+       if (!major.is_parallel)
+               return;
+
+       //g_print ("initing %d workers\n", num_workers);
+
+       workers_num = num_workers;
+       workers_data = mono_sgen_alloc_internal_dynamic (sizeof (WorkerData) * num_workers, INTERNAL_MEM_WORKER_DATA);
+       MONO_SEM_INIT (&workers_done_sem, 0);
+       workers_gc_thread_data.shared_buffer_increment = 1;
+       workers_gc_thread_data.shared_buffer_index = 0;
+       gray_object_queue_init_with_alloc_prepare (&workers_distribute_gray_queue, mono_sgen_get_unmanaged_allocator (),
+                       workers_gray_queue_share_redirect, &workers_gc_thread_data);
+
+       g_assert (num_workers <= sizeof (workers_primes) / sizeof (workers_primes [0]));
+       for (i = 0; i < workers_num; ++i) {
+               workers_data [i].shared_buffer_increment = workers_primes [i];
+               workers_data [i].shared_buffer_index = 0;
+       }
+
+       mono_counters_register ("Shared buffer insert tries", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_insert_tries);
+       mono_counters_register ("Shared buffer insert full", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_insert_full);
+       mono_counters_register ("Shared buffer insert iterations", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_insert_iterations);
+       mono_counters_register ("Shared buffer insert failures", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_insert_failures);
+       mono_counters_register ("Shared buffer remove tries", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_remove_tries);
+       mono_counters_register ("Shared buffer remove iterations", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_remove_iterations);
+       mono_counters_register ("Shared buffer remove empty", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_shared_buffer_remove_empty);
+}
+
+/* only the GC thread is allowed to start and join workers */
+
+static void
+workers_start_worker (int index)
+{
+       g_assert (index >= 0 && index < workers_num);
+
+       if (workers_data [index].is_working)
+               return;
+
+       if (!workers_data [index].thread) {
+               //g_print ("initing thread %d\n", index);
+               MONO_SEM_INIT (&workers_data [index].start_worker_sem, 0);
+               pthread_create (&workers_data [index].thread, NULL, workers_thread_func, &workers_data [index]);
+       }
+
+       workers_data [index].is_working = TRUE;
+       MONO_SEM_POST (&workers_data [index].start_worker_sem);
+       //g_print ("posted thread start %d %d\n", index, workers_data [index].start_worker_sem);
+}
+
+static void
+workers_start_all_workers (int num_additional_workers)
+{
+       int i;
+
+       if (!major.is_parallel)
+               return;
+
+       g_assert (workers_num_working == 0);
+       workers_num_working = workers_num + num_additional_workers;
+
+       for (i = 0; i < workers_num; ++i)
+               workers_start_worker (i);
+}
+
+static void
+workers_join (void)
+{
+       int i;
+
+       if (!major.is_parallel)
+               return;
+
+       //g_print ("joining\n");
+       for (i = 0; i < workers_num; ++i) {
+               if (workers_data [i].is_working)
+                       MONO_SEM_WAIT (&workers_done_sem);
+       }
+       for (i = 0; i < workers_num; ++i)
+               workers_data [i].is_working = FALSE;
+       //g_print ("joined\n");
+
+       g_assert (workers_num_working == 0);
+       g_assert (workers_shared_buffer_used == 0);
+
+       for (i = 0; i < WORKERS_SHARED_BUFFER_SIZE; ++i)
+               g_assert (!workers_shared_buffer [i]);
+}
+
+gboolean
+mono_sgen_is_worker_thread (pthread_t thread)
+{
+       int i;
+
+       if (!major.is_parallel)
+               return FALSE;
+
+       for (i = 0; i < workers_num; ++i) {
+               if (workers_data [i].thread == thread)
+                       return TRUE;
+       }
+       return FALSE;
+}
index 53dd0d8b13cb13f2c2bf9707771ac059a13b0102..822ca5efc350b105aa7e31f8c12676483a816ffa 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <config.h>
 
+#ifndef DISABLE_SOCKETS
+
 #include <glib.h>
 #include <string.h>
 #include <stdlib.h>
@@ -1772,7 +1774,11 @@ void ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal(SOCKET soc
        int time_ms = 0;
        socklen_t time_ms_size = sizeof (time_ms);
 #ifdef SO_PEERCRED
+#  if defined(__OpenBSD__)
+       struct sockpeercred cred;
+#  else
        struct ucred cred;
+#  endif
        socklen_t credsize = sizeof(cred);
 #endif
        MonoDomain *domain=mono_domain_get();
@@ -2777,7 +2783,7 @@ MonoBoolean ves_icall_System_Net_Dns_GetHostByName_internal(MonoString *host, Mo
        memset(&hints, 0, sizeof(hints));
        hints.ai_family = get_family_hint ();
        hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+       hints.ai_flags = AI_CANONNAME;
 
        if (*hostname && getaddrinfo(hostname, NULL, &hints, &info) == -1) {
                return(FALSE);
@@ -3075,3 +3081,5 @@ void mono_network_cleanup(void)
        WSACleanup();
 }
 
+
+#endif /* #ifndef DISABLE_SOCKETS */
old mode 100755 (executable)
new mode 100644 (file)
index 6626974..2420c3d
@@ -789,7 +789,8 @@ socket_io_init (SocketIOData *data)
        }
 
        stack_size = mono_threads_get_default_stacksize ();
-       mono_threads_set_default_stacksize (128 * 1024);
+       /* 128k stacks could lead to problems on 64 bit systems with large pagesizes+altstack */
+       mono_threads_set_default_stacksize (128 * (sizeof (gpointer) / 4) * 1024);
        if (data->epoll_disabled) {
                mono_thread_create_internal (mono_get_root_domain (), socket_io_poll_main, data, TRUE);
        }
@@ -1331,24 +1332,22 @@ threadpool_kill_idle_threads (ThreadPool *tp)
 void
 mono_thread_pool_cleanup (void)
 {
-       if (async_tp.pool_status == 0 || async_tp.pool_status == 2)
-               return;
-
-       if (async_tp.pool_status == 1 && InterlockedCompareExchange (&async_tp.pool_status, 2, 1) == 2)
-               return;
-
-       InterlockedExchange (&async_io_tp.pool_status, 2);
-       MONO_SEM_WAIT (&async_tp.lock);
-       threadpool_free_queue (&async_tp);
-       threadpool_kill_idle_threads (&async_tp);
-       MONO_SEM_POST (&async_tp.lock);
-
-       socket_io_cleanup (&socket_io_data); /* Empty when DISABLE_SOCKETS is defined */
-       MONO_SEM_WAIT (&async_io_tp.lock);
-       threadpool_free_queue (&async_io_tp);
-       threadpool_kill_idle_threads (&async_io_tp);
-       MONO_SEM_POST (&async_io_tp.lock);
-       MONO_SEM_DESTROY (&async_io_tp.new_job);
+       if (!(async_tp.pool_status == 0 || async_tp.pool_status == 2)) {
+               if (!(async_tp.pool_status == 1 && InterlockedCompareExchange (&async_tp.pool_status, 2, 1) == 2)) {
+                       InterlockedExchange (&async_io_tp.pool_status, 2);
+                       MONO_SEM_WAIT (&async_tp.lock);
+                       threadpool_free_queue (&async_tp);
+                       threadpool_kill_idle_threads (&async_tp);
+                       MONO_SEM_POST (&async_tp.lock);
+
+                       socket_io_cleanup (&socket_io_data); /* Empty when DISABLE_SOCKETS is defined */
+                       MONO_SEM_WAIT (&async_io_tp.lock);
+                       threadpool_free_queue (&async_io_tp);
+                       threadpool_kill_idle_threads (&async_io_tp);
+                       MONO_SEM_POST (&async_io_tp.lock);
+                       MONO_SEM_DESTROY (&async_io_tp.new_job);
+               }
+       }
 
        EnterCriticalSection (&wsqs_lock);
        mono_wsq_cleanup ();
@@ -1612,33 +1611,35 @@ mono_thread_pool_is_queue_array (MonoArray *o)
        return obj == async_tp.first || obj == async_io_tp.first;
 }
 
-static void
-add_wsq (MonoWSQ *wsq)
+static MonoWSQ *
+add_wsq (void)
 {
        int i;
-
-       if (wsq == NULL)
-               return;
+       MonoWSQ *wsq;
 
        EnterCriticalSection (&wsqs_lock);
+       wsq = mono_wsq_create ();
        if (wsqs == NULL) {
                LeaveCriticalSection (&wsqs_lock);
-               return;
+               return NULL;
        }
        for (i = 0; i < wsqs->len; i++) {
                if (g_ptr_array_index (wsqs, i) == NULL) {
                        wsqs->pdata [i] = wsq;
                        LeaveCriticalSection (&wsqs_lock);
-                       return;
+                       return wsq;
                }
        }
        g_ptr_array_add (wsqs, wsq);
        LeaveCriticalSection (&wsqs_lock);
+       return wsq;
 }
 
 static void
 remove_wsq (MonoWSQ *wsq)
 {
+       gpointer data;
+
        if (wsq == NULL)
                return;
 
@@ -1648,6 +1649,12 @@ remove_wsq (MonoWSQ *wsq)
                return;
        }
        g_ptr_array_remove_fast (wsqs, wsq);
+       data = NULL;
+       while (mono_wsq_local_pop (&data)) {
+               threadpool_jobs_dec (data);
+               data = NULL;
+       }
+       mono_wsq_destroy (wsq);
        LeaveCriticalSection (&wsqs_lock);
 }
 
@@ -1789,10 +1796,8 @@ async_invoke_thread (gpointer data)
   
        tp = data;
        wsq = NULL;
-       if (!tp->is_io) {
-               wsq = mono_wsq_create ();
-               add_wsq (wsq);
-       }
+       if (!tp->is_io)
+               wsq = add_wsq ();
 
        thread = mono_thread_internal_current ();
        if (tp_start_func)
@@ -1854,8 +1859,20 @@ async_invoke_thread (gpointer data)
                                        if (tp_item_end_func)
                                                tp_item_end_func (tp_item_user_data);
                                        if (exc && mono_runtime_unhandled_exception_policy_get () == MONO_UNHANDLED_POLICY_CURRENT) {
-                                               mono_unhandled_exception (exc);
-                                               exit (255);
+                                               gboolean unloaded;
+                                               MonoClass *klass;
+
+                                               klass = exc->vtable->klass;
+                                               unloaded = (klass->image == mono_defaults.corlib);
+                                               if (unloaded) {
+                                                       unloaded = (!strcmp ("System", klass->name_space) &&
+                                                               !strcmp ("AppDomainUnloadedException", klass->name));
+                                               }
+
+                                               if (!unloaded && klass != mono_defaults.threadabortexception_class) {
+                                                       mono_unhandled_exception (exc);
+                                                       exit (255);
+                                               }
                                        }
                                        mono_domain_set (mono_get_root_domain (), TRUE);
                                }
@@ -1921,11 +1938,6 @@ async_invoke_thread (gpointer data)
                                        TP_DEBUG ("DIE");
                                        if (!tp->is_io) {
                                                remove_wsq (wsq);
-                                               while (mono_wsq_local_pop (&data)) {
-                                                       threadpool_jobs_dec (data);
-                                                       data = NULL;
-                                               }
-                                               mono_wsq_destroy (wsq);
                                        }
                                        if (tp_finish_func)
                                                tp_finish_func (tp_hooks_user_data);
index b6116d57fbb2af32d7f18fadd94c10b770029940..edbc22173be928392253ec9ece0e6c9570f8cd70 100644 (file)
@@ -1602,6 +1602,7 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_ha
        guint32 i;
        MonoObject *waitHandle;
        MonoInternalThread *thread = mono_thread_internal_current ();
+       guint32 start;
 
        /* Do this WaitSleepJoin check before creating objects */
        mono_thread_current_check_pending_interrupt ();
@@ -1619,8 +1620,21 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_ha
        }
 
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
-       
-       ret=WaitForMultipleObjectsEx(numhandles, handles, FALSE, ms, TRUE);
+
+       start = (ms == -1) ? 0 : mono_msec_ticks ();
+       do {
+               ret = WaitForMultipleObjectsEx (numhandles, handles, FALSE, ms, TRUE);
+               if (ret != WAIT_IO_COMPLETION)
+                       break;
+               if (ms != -1) {
+                       guint32 diff;
+
+                       diff = mono_msec_ticks () - start;
+                       ms -= diff;
+                       if (ms <= 0)
+                               break;
+               }
+       } while (ms == -1 || ms > 0);
 
        mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
        
@@ -3808,8 +3822,14 @@ do_free_special (gpointer key, gpointer value, gpointer data)
                        mono_g_hash_table_foreach (threads, free_thread_static_data_helper, &data);
                item->offset = offset;
                item->size = size;
-               item->next = thread_static_info.freelist;
-               thread_static_info.freelist = item;
+
+               if (!mono_runtime_is_shutting_down ()) {
+                       item->next = thread_static_info.freelist;
+                       thread_static_info.freelist = item;
+               } else {
+                       /* We could be called during shutdown after mono_thread_cleanup () is called */
+                       g_free (item);
+               }
        } else {
                /* FIXME: free context static data as well */
        }
index 348792da4553d3234574d289f2f2ad79a78c86d4..413cecae5d7bf16546238d6b908cacee7de0e056 100644 (file)
@@ -34,7 +34,7 @@ gboolean mono_verifier_verify_full_table_data (MonoImage *image, GSList **error_
 
 gboolean mono_verifier_verify_field_signature (MonoImage *image, guint32 offset, GSList **error_list) MONO_INTERNAL;
 gboolean mono_verifier_verify_method_header (MonoImage *image, guint32 offset, GSList **error_list) MONO_INTERNAL;
-gboolean mono_verifier_verify_method_signature (MonoImage *image, guint32 offset, GSList **error_list) MONO_INTERNAL;
+gboolean mono_verifier_verify_method_signature (MonoImage *image, guint32 offset, MonoError *error) MONO_INTERNAL;
 gboolean mono_verifier_verify_memberref_signature (MonoImage *image, guint32 offset, GSList **error_list) MONO_INTERNAL;
 gboolean mono_verifier_verify_standalone_signature (MonoImage *image, guint32 offset, GSList **error_list) MONO_INTERNAL;
 gboolean mono_verifier_verify_typespec_signature (MonoImage *image, guint32 offset, guint32 token, GSList **error_list) MONO_INTERNAL;
index cd33c1385605cdce266f8b26b3aed6757ed7531b..e344637b2cde3e759d37fc603f045623496a4634 100644 (file)
@@ -30,7 +30,6 @@
 #include <signal.h>
 #include <ctype.h>
 
-
 static MiniVerifierMode verifier_mode = MONO_VERIFIER_MODE_OFF;
 static gboolean verify_all = FALSE;
 
@@ -788,6 +787,7 @@ mono_type_is_valid_in_context (VerifyContext *ctx, MonoType *type)
                        ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid generic instantiation of type %s.%s at 0x%04x", klass->name_space, klass->name, ctx->ip_offset), MONO_EXCEPTION_TYPE_LOAD);
                else
                        ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Could not load type %s.%s at 0x%04x", klass->name_space, klass->name, ctx->ip_offset), MONO_EXCEPTION_TYPE_LOAD);
+               mono_loader_clear_error ();
                return FALSE;
        }
 
@@ -845,8 +845,9 @@ verifier_load_field (VerifyContext *ctx, int token, MonoClass **out_klass, const
        }
 
        field = mono_field_from_token (ctx->image, token, &klass, ctx->generic_context);
-       if (!field || !field->parent || !klass) {
+       if (!field || !field->parent || !klass || mono_loader_get_last_error ()) {
                ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Cannot load field from token 0x%08x for %s at 0x%04x", token, opcode, ctx->ip_offset), MONO_EXCEPTION_BAD_IMAGE);
+               mono_loader_clear_error ();
                return NULL;
        }
 
@@ -868,8 +869,9 @@ verifier_load_method (VerifyContext *ctx, int token, const char *opcode) {
 
        method = mono_get_method_full (ctx->image, token, NULL, ctx->generic_context);
 
-       if (!method) {
+       if (!method || mono_loader_get_last_error ()) {
                ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Cannot load method from token 0x%08x for %s at 0x%04x", token, opcode, ctx->ip_offset), MONO_EXCEPTION_BAD_IMAGE);
+               mono_loader_clear_error ();
                return NULL;
        }
        
@@ -890,8 +892,9 @@ verifier_load_type (VerifyContext *ctx, int token, const char *opcode) {
 
        type = mono_type_get_full (ctx->image, token, ctx->generic_context);
 
-       if (!type) {
+       if (!type || mono_loader_get_last_error ()) {
                ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Cannot load type from token 0x%08x for %s at 0x%04x", token, opcode, ctx->ip_offset), MONO_EXCEPTION_BAD_IMAGE);
+               mono_loader_clear_error ();
                return NULL;
        }
 
@@ -3318,6 +3321,25 @@ do_load_token (VerifyContext *ctx, int token)
        MonoClass *handle_class;
        if (!check_overflow (ctx))
                return;
+
+       switch (token & 0xff000000) {
+       case MONO_TOKEN_TYPE_DEF:
+       case MONO_TOKEN_TYPE_REF:
+       case MONO_TOKEN_TYPE_SPEC:
+       case MONO_TOKEN_FIELD_DEF:
+       case MONO_TOKEN_METHOD_DEF:
+       case MONO_TOKEN_METHOD_SPEC:
+       case MONO_TOKEN_MEMBER_REF:
+               if (!token_bounds_check (ctx->image, token)) {
+                       ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Table index out of range 0x%x for token %x for ldtoken at 0x%04x", mono_metadata_token_index (token), token, ctx->ip_offset));
+                       return;
+               }
+               break;
+       default:
+               ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid table 0x%x for token 0x%x for ldtoken at 0x%04x", mono_metadata_token_table (token), token, ctx->ip_offset));
+               return;
+       }
+
        handle = mono_ldtoken (ctx->image, token, &handle_class, ctx->generic_context);
        if (!handle) {
                ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid token 0x%x for ldtoken at 0x%04x", token, ctx->ip_offset));
@@ -3948,6 +3970,7 @@ do_leave (VerifyContext *ctx, int delta)
        if (!is_correct_leave (ctx->header, ctx->ip_offset, target))
                CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Leave not allowed in finally block at 0x%04x", ctx->ip_offset));
        ctx->eval.size = 0;
+       ctx->target = target;
 }
 
 /* 
@@ -5348,6 +5371,7 @@ mono_method_verify (MonoMethod *method, int level)
                        do_leave (&ctx, read32 (ip + 1) + 5);
                        ip += 5;
                        start = 1;
+                       need_merge = 1;
                        break;
 
                case CEE_LEAVE_S:
@@ -5355,6 +5379,7 @@ mono_method_verify (MonoMethod *method, int level)
                        do_leave (&ctx, (signed char)ip [1] + 2);
                        ip += 2;
                        start = 1;
+                       need_merge = 1;
                        break;
 
                case CEE_PREFIX1:
index d6b54239edb56d7f96c8c9c3100d28eb7758e6e7..5f3ea84517ad2531339477f398ccaf67c8b1f5c1 100644 (file)
@@ -22,6 +22,7 @@
 /monow
 /cpu-sparc.h
 /cpu-s390.h
+/cpu-x86.h
 /.hidden
 /semantic.cache
 /.project
@@ -30,3 +31,5 @@
 /version.h
 /buildver.h
 /TAGS
+/mono-sgen
+
index 22be0fd677164c948dfefd61c9df9ef3b88652f5..5da9a678d006ed8155f6d9a59cbd6d818fd7b6a2 100755 (executable)
@@ -1,3 +1,10 @@
+2010-07-29  Mark Mason <glowingpurple@gmail.com>
+       
+       * mini-ops.h: Fix mips branch opcodes
+       * mini-mips.h: enable IMT for MIPS
+       * mini-mips.c: Use NULLIFY_INS(), fixup *_OVF expansions with extra move.
+       * tramp-mips.c: Some cleanups to trampoline handling
+       
 2010-07-27  Mark Mason <glowingpurple@gmail.com>
 
        * mini-mips.c: Fix compilation errors.
index b9644f7e7282ad9745aeac5c626cf1fac92a18ac..5bf3fe4375599a09afafd222a11c99213cf3cd1e 100644 (file)
@@ -348,7 +348,8 @@ common_sources = \
        debug-debugger.c        \
        debug-debugger.h        \
        xdebug.c                        \
-       mini-llvm.h
+       mini-llvm.h                     \
+       mini-llvm-cpp.h
 
 test_sources =                         \
        basic-calls.cs          \
@@ -368,6 +369,7 @@ test_sources =                      \
        basic-simd.cs
 
 regtests=basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe
+fsatests=basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe devirtualization.exe basic-simd.exe
 
 if X86
 if MONO_DEBUGGER_SUPPORTED
@@ -541,14 +543,20 @@ TestDriver.dll: $(srcdir)/TestDriver.cs
 generics-variant-types.dll: generics-variant-types.il
        $(ILASM) -dll -output=$@ $<
 
+if NACL_CODEGEN
+GENMDESC_OPTS=--nacl
+else !NACL_CODEGEN
+GENMDESC_OPTS=
+endif !NACL_CODEGEN
+
 # we don't always use the perl impl because it's an additional
 # build dependency for the poor windows users
 # $(arch_define) is the preprocessor symbol that enables all the opcodes
 # for the specific platform in mini-ops.h
 if CROSS_COMPILING
-GENMDESC_PRG=perl $(srcdir)/genmdesc.pl $(arch_define) $(srcdir)
+GENMDESC_PRG=perl $(srcdir)/genmdesc.pl $(arch_define) $(srcdir) $(GENMDESC_OPTS)
 else !CROSS_COMPILING
-GENMDESC_PRG=./genmdesc
+GENMDESC_PRG=./genmdesc $(GENMDESC_OPTS)
 endif !CROSS_COMPILING
 
 cpu-x86.h: cpu-x86.md genmdesc$(EXEEXT)
@@ -612,6 +620,20 @@ fullaotcheck: mono $(regtests)
        MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper --aot=full fullaot-tmp/* || exit 1
        for i in $(regtests); do echo $$i; MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper --full-aot fullaot-tmp/$$i --exclude '!FULLAOT' || exit 1; done
 
+fsacheck: mono $(fsatests) fsacheck.c generics.exe
+       rm -rf fsa-tmp
+       mkdir fsa-tmp
+       cp $(CLASS)/mscorlib.dll $(CLASS)/System.Core.dll $(CLASS)/System.dll $(CLASS)/Mono.Posix.dll $(CLASS)/System.Configuration.dll $(CLASS)/System.Security.dll $(CLASS)/System.Xml.dll $(CLASS)/Mono.Security.dll $(CLASS)/Mono.Simd.dll \
+       $(fsatests) generics-variant-types.dll TestDriver.dll fsa-tmp/
+       cp $(fsatests) fsa-tmp/
+       MONO_PATH=fsa-tmp $(top_builddir)/runtime/mono-wrapper --aot=full,static fsa-tmp/*.dll || exit 1
+       MONO_PATH=fsa-tmp $(top_builddir)/runtime/mono-wrapper --aot=full,static fsa-tmp/*.exe || exit 1
+       $(CC) -o $@.out -g -static $(VPATH)/fsacheck.c fsa-tmp/*.o \
+       -lmono-2.0 -lpthread -lm -ldl -lrt \
+       -DTARGET_X86 -L.libs -I${prefix}/include/mono-2.0 \
+       -I${prefix} -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
+       for i in $(fsatests); do echo $$i; MONO_PATH=fsa-tmp ./$@.out $$i || exit 1; done
+
 bench: mono test.exe
        time env $(RUNTIME) --ncompile $(count) --compile Test:$(mtest) test.exe
 
index 001611b5006e2c1f414af4cdebc09b3e5d7b093e..f412cb8bf79ce084755a44cb40e2e33de2fafb9b 100644 (file)
@@ -1127,6 +1127,13 @@ process_block (MonoCompile *cfg, MonoBasicBlock *bb, MonoVariableRelationsEvalua
                if (ins->opcode == OP_NOT_NULL)
                        add_non_null (area, cfg, ins->sreg1, &check_relations);
 
+               /* 
+                * This doesn't work because LLVM can move the non-faulting loads before the faulting
+                * ones (test_0_llvm_moving_faulting_loads ()).
+                * FIXME: This also doesn't work because abcrem equates an array with its length,
+                * so a = new int [100] implies a != null, but a = new int [0] doesn't.
+                */
+#if 0
                /*
                 * Eliminate MONO_INST_FAULT flags if possible.
                 */
@@ -1152,6 +1159,7 @@ process_block (MonoCompile *cfg, MonoBasicBlock *bb, MonoVariableRelationsEvalua
                                add_non_null (area, cfg, reg, &check_relations);
                        }
                }
+#endif
        }       
        
        if (TRACE_ABC_REMOVAL) {
index 9814b972d6d6f979058d6569bfaaf0d57b876165..dcc8da17072f5af7d3cf250a0e7f06391367eb14 100644 (file)
@@ -68,7 +68,7 @@
 
 #if !defined(DISABLE_AOT) && !defined(DISABLE_JIT)
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__native_client_codegen__)
 #define RODATA_SECT ".rodata"
 #else
 #define RODATA_SECT ".text"
@@ -330,6 +330,14 @@ emit_byte (MonoAotCompile *acfg, guint8 val)
        img_writer_emit_byte (acfg->w, val); 
 }
 
+#ifdef __native_client_codegen__
+static inline void
+emit_nacl_call_alignment (MonoAotCompile *acfg)
+{
+       img_writer_emit_nacl_call_alignment (acfg->w);
+}
+#endif
+
 static G_GNUC_UNUSED void
 emit_global_inner (MonoAotCompile *acfg, const char *name, gboolean func)
 {
@@ -460,6 +468,10 @@ encode_sleb128 (gint32 value, guint8 *buf, guint8 **endbuf)
 #else
 #define AOT_FUNC_ALIGNMENT 16
 #endif
+#if defined(TARGET_X86) && defined(__native_client_codegen__)
+#undef AOT_FUNC_ALIGNMENT
+#define AOT_FUNC_ALIGNMENT 32
+#endif
  
 #if defined(TARGET_POWERPC64) && !defined(__mono_ilp32__)
 #define PPC_LD_OP "ld"
@@ -654,12 +666,26 @@ arch_emit_plt_entry (MonoAotCompile *acfg, int index)
 #if defined(TARGET_X86)
                guint32 offset = (acfg->plt_got_offset_base + index) * sizeof (gpointer);
 
+#ifdef __native_client_codegen__
+               const guint8 kSizeOfNaClJmp = 11;
+               guint8 bytes[kSizeOfNaClJmp];
+               guint8 *pbytes = &bytes[0];
+               
+               x86_jump_membase32 (pbytes, X86_EBX, offset);
+               emit_bytes (acfg, bytes, kSizeOfNaClJmp);
+               /* four bytes of data, used by mono_arch_patch_plt_entry              */
+               /* For Native Client, make this work with data embedded in push.      */
+               emit_byte (acfg, 0x68);  /* hide data in a push */
+               emit_int32 (acfg, acfg->plt_got_info_offsets [index]);
+               emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
+#else
                /* jmp *<offset>(%ebx) */
                emit_byte (acfg, 0xff);
                emit_byte (acfg, 0xa3);
                emit_int32 (acfg, offset);
                /* Used by mono_aot_get_plt_info_offset */
                emit_int32 (acfg, acfg->plt_got_info_offsets [index]);
+#endif  /* __native_client_codegen__ */
 #elif defined(TARGET_AMD64)
                /*
                 * We can't emit jumps because they are 32 bits only so they can't be patched.
@@ -846,9 +872,16 @@ arch_emit_specific_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size
        /* Branch to generic trampoline */
        x86_jump_reg (code, X86_ECX);
 
+#ifdef __native_client_codegen__
+       {
+               /* emit nops to next 32 byte alignment */
+               int a = (~kNaClAlignmentMask) & ((code - buf) + kNaClAlignment - 1);
+               while (code < (buf + a)) x86_nop(code);
+       }
+#endif
        emit_bytes (acfg, buf, code - buf);
 
-       *tramp_size = 17;
+       *tramp_size = NACL_SIZE(17, kNaClAlignment);
        g_assert (code - buf == *tramp_size);
 #else
        g_assert_not_reached ();
@@ -1028,9 +1061,17 @@ arch_emit_static_rgctx_trampoline (MonoAotCompile *acfg, int offset, int *tramp_
        /* Branch to the target address */
        x86_jump_membase (code, X86_ECX, (offset + 1) * sizeof (gpointer));
 
+#ifdef __native_client_codegen__
+       {
+               /* emit nops to next 32 byte alignment */
+               int a = (~kNaClAlignmentMask) & ((code - buf) + kNaClAlignment - 1);
+               while (code < (buf + a)) x86_nop(code);
+       }
+#endif
+
        emit_bytes (acfg, buf, code - buf);
 
-       *tramp_size = 15;
+       *tramp_size = NACL_SIZE (15, kNaClAlignment);
        g_assert (code - buf == *tramp_size);
 #else
        g_assert_not_reached ();
@@ -1099,9 +1140,17 @@ arch_emit_imt_thunk (MonoAotCompile *acfg, int offset, int *tramp_size)
        *tramp_size = code - buf + 7;
 #elif defined(TARGET_X86)
        guint8 *buf, *code;
+#ifdef __native_client_codegen__
+       guint8 *buf_alloc;
+#endif
        guint8 *labels [3];
 
+#ifdef __native_client_codegen__
+       buf_alloc = g_malloc (256 + kNaClAlignment);
+       code = buf = ((guint)buf_alloc + kNaClAlignment) & ~kNaClAlignmentMask;
+#else
        code = buf = g_malloc (256);
+#endif
 
        /* Allocate a temporary stack slot */
        x86_push_reg (code, X86_EAX);
@@ -1143,6 +1192,13 @@ arch_emit_imt_thunk (MonoAotCompile *acfg, int offset, int *tramp_size)
        mono_x86_patch (labels [1], code);
        x86_breakpoint (code);
 
+#ifdef __native_client_codegen__
+       {
+               /* emit nops to next 32 byte alignment */
+               int a = (~kNaClAlignmentMask) & ((code - buf) + kNaClAlignment - 1);
+               while (code < (buf + a)) x86_nop(code);
+       }
+#endif
        emit_bytes (acfg, buf, code - buf);
        
        *tramp_size = code - buf;
@@ -1417,7 +1473,7 @@ add_stream_data (MonoDynamicStream *stream, const char *data, guint32 len)
  * blob where the data was stored.
  */
 static guint32
-add_to_blob (MonoAotCompile *acfg, guint8 *data, guint32 data_len)
+add_to_blob (MonoAotCompile *acfg, const guint8 *data, guint32 data_len)
 {
        if (acfg->blob.alloc_size == 0)
                stream_init (&acfg->blob);
@@ -1724,6 +1780,7 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
                case MONO_WRAPPER_ALLOC: {
                        AllocatorWrapperInfo *info = mono_marshal_get_wrapper_info (method);
 
+                       /* The GC name is saved once in MonoAotFileInfo */
                        g_assert (info->alloc_type != -1);
                        encode_value (info->alloc_type, p, &p);
                        break;
@@ -3136,6 +3193,7 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
                encode_value (get_image_index (acfg, patch_info->data.image), p, &p);
                break;
        case MONO_PATCH_INFO_MSCORLIB_GOT_ADDR:
+       case MONO_PATCH_INFO_GC_CARD_TABLE_ADDR:
                break;
        case MONO_PATCH_INFO_METHOD_REL:
                encode_value ((gint)patch_info->data.offset, p, &p);
@@ -3337,6 +3395,12 @@ emit_method_info (MonoAotCompile *acfg, MonoCompile *cfg)
                        continue;
                }
 
+               if (patch_info->type == MONO_PATCH_INFO_GC_CARD_TABLE_ADDR) {
+                       /* Stored in a GOT slot initialized at module load time */
+                       patch_info->type = MONO_PATCH_INFO_NONE;
+                       continue;
+               }
+
                if (is_plt_patch (patch_info)) {
                        /* Calls are made through the PLT */
                        patch_info->type = MONO_PATCH_INFO_NONE;
@@ -3805,13 +3869,17 @@ emit_trampoline (MonoAotCompile *acfg, int got_offset, MonoTrampInfo *info)
        ji = info->ji;
        unwind_ops = info->unwind_ops;
 
+#ifdef __native_client_codegen__
+       mono_nacl_fix_patches (code, ji);
+#endif
+
        /* Emit code */
 
        sprintf (start_symbol, "%s", name);
 
        emit_section_change (acfg, ".text", 0);
        emit_global (acfg, start_symbol, TRUE);
-       emit_alignment (acfg, 16);
+       emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
        emit_label (acfg, start_symbol);
 
        sprintf (symbol, "%snamed_%s", acfg->temp_prefix, name);
@@ -4010,7 +4078,7 @@ emit_trampolines (MonoAotCompile *acfg)
                        }
 
                        emit_global (acfg, symbol, TRUE);
-                       emit_alignment (acfg, 16);
+                       emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
                        emit_label (acfg, symbol);
 
                        acfg->trampoline_got_offset_base [ntype] = tramp_got_offset;
@@ -4034,6 +4102,10 @@ emit_trampolines (MonoAotCompile *acfg)
                                default:
                                        g_assert_not_reached ();
                                }
+#ifdef __native_client_codegen__
+                               /* align to avoid 32-byte boundary crossings */
+                               emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
+#endif
 
                                if (!acfg->trampoline_size [ntype]) {
                                        g_assert (tramp_size);
@@ -4396,6 +4468,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                switch (patch_info->type) {
                case MONO_PATCH_INFO_GOT_OFFSET:
                case MONO_PATCH_INFO_NONE:
+               case MONO_PATCH_INFO_GC_CARD_TABLE_ADDR:
                        break;
                case MONO_PATCH_INFO_IMAGE:
                        /* The assembly is stored in GOT slot 0 */
@@ -4810,6 +4883,9 @@ emit_code (MonoAotCompile *acfg)
                        }
 
                        emit_section_change (acfg, ".text", 0);
+#ifdef __native_client_codegen__
+                       emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
+#endif
                        emit_global (acfg, symbol, TRUE);
                        emit_label (acfg, symbol);
 
@@ -5116,7 +5192,7 @@ emit_extra_methods (MonoAotCompile *acfg)
                if (!cfg)
                        continue;
 
-               buf_size = 1024;
+               buf_size = 10240;
                p = buf = g_malloc (buf_size);
 
                nmethods ++;
@@ -5682,7 +5758,7 @@ emit_globals (MonoAotCompile *acfg)
                 * Emit a global symbol which can be passed by an embedding app to
                 * mono_aot_register_module ().
                 */
-#if defined(__MACH__)
+#if defined(__MACH__) && !defined(__native_client_codegen__)
                sprintf (symbol, "_mono_aot_module_%s_info", acfg->image->assembly->aname.name);
 #else
                sprintf (symbol, "mono_aot_module_%s_info", acfg->image->assembly->aname.name);
@@ -5742,6 +5818,15 @@ emit_file_info (MonoAotCompile *acfg)
 {
        char symbol [128];
        int i;
+       int gc_name_offset;
+       const char *gc_name;
+
+       /*
+        * The managed allocators are GC specific, so can't use an AOT image created by one GC
+        * in another.
+        */
+       gc_name = mono_gc_get_gc_name ();
+       gc_name_offset = add_to_blob (acfg, (guint8*)gc_name, strlen (gc_name) + 1);
 
        sprintf (symbol, "mono_aot_file_info");
        emit_section_change (acfg, ".data", 0);
@@ -5749,13 +5834,14 @@ emit_file_info (MonoAotCompile *acfg)
        emit_label (acfg, symbol);
        emit_global (acfg, symbol, FALSE);
 
-       /* The data emitted here must match MonoAotFileInfo in aot-runtime.c. */
+       /* The data emitted here must match MonoAotFileInfo. */
        emit_int32 (acfg, acfg->plt_got_offset_base);
        emit_int32 (acfg, (int)(acfg->got_offset * sizeof (gpointer)));
        emit_int32 (acfg, acfg->plt_offset);
        emit_int32 (acfg, acfg->nmethods);
        emit_int32 (acfg, acfg->flags);
        emit_int32 (acfg, acfg->opts);
+       emit_int32 (acfg, gc_name_offset);
 
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
                emit_int32 (acfg, acfg->num_trampolines [i]);
@@ -5938,6 +6024,12 @@ compile_asm (MonoAotCompile *acfg)
 #define AS_OPTIONS ""
 #endif
 
+#ifdef __native_client_codegen__
+#define AS_NAME "nacl-as"
+#else
+#define AS_NAME "as"
+#endif
+
 #ifndef LD_OPTIONS
 #define LD_OPTIONS ""
 #endif
@@ -5963,7 +6055,7 @@ compile_asm (MonoAotCompile *acfg)
        } else {
                objfile = g_strdup_printf ("%s.o", acfg->tmpfname);
        }
-       command = g_strdup_printf ("%sas %s %s -o %s", tool_prefix, AS_OPTIONS, acfg->tmpfname, objfile);
+       command = g_strdup_printf ("%s%s %s %s -o %s", tool_prefix, AS_NAME, AS_OPTIONS, acfg->tmpfname, objfile);
        printf ("Executing the native assembler: %s\n", command);
        if (system (command) != 0) {
                g_free (command);
@@ -6232,6 +6324,11 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                ji = mono_mempool_alloc0 (acfg->mempool, sizeof (MonoAotCompile));
                ji->type = MONO_PATCH_INFO_MSCORLIB_GOT_ADDR;
                get_got_offset (acfg, ji);
+
+               /* This is very common */
+               ji = mono_mempool_alloc0 (acfg->mempool, sizeof (MonoAotCompile));
+               ji->type = MONO_PATCH_INFO_GC_CARD_TABLE_ADDR;
+               get_got_offset (acfg, ji);
        }
 
        TV_GETTIME (atv);
index 7a7d4530b1ef305dd657a2dbffb857196d60fcd8..40587fa14cdb55787a2be85f4ecdd61083880fc3 100644 (file)
@@ -165,6 +165,8 @@ static guint32 n_pagefaults = 0;
 static gsize aot_code_low_addr = (gssize)-1;
 static gsize aot_code_high_addr = 0;
 
+static GHashTable *aot_jit_icall_hash;
+
 static void
 init_plt (MonoAotModule *info);
 
@@ -963,6 +965,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        MonoAotFileInfo *file_info = NULL;
        int i;
        gpointer *got_addr;
+       guint8 *blob;
 
        if (mono_compile_aot)
                return;
@@ -1055,15 +1058,31 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                usable = FALSE;
        }
 
+       /* This is no longer needed, LLVM and non-LLVM runtimes should be compatible.
        if ((((MonoAotFileInfo*)file_info)->flags & MONO_AOT_FILE_FLAG_WITH_LLVM) && !mono_use_llvm) {
                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module %s is compiled with LLVM.\n", aot_name);
                usable = FALSE;
        }
+       */
+
+       find_symbol (sofile, globals, "blob", (gpointer*)&blob);
+
+       if (((MonoAotFileInfo*)file_info)->gc_name_index != -1) {
+               char *gc_name = (char*)&blob [((MonoAotFileInfo*)file_info)->gc_name_index];
+               const char *current_gc_name = mono_gc_get_gc_name ();
+
+               if (strcmp (current_gc_name, gc_name) != 0) {
+                       mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module %s is compiled against GC %s, while the current runtime uses GC %s.\n", aot_name, gc_name, current_gc_name);
+                       usable = FALSE;
+               }
+       }
 
        if (!usable) {
                if (mono_aot_only) {
                        fprintf (stderr, "Failed to load AOT module '%s' while running in aot-only mode.\n", aot_name);
                        exit (1);
+               } else {
+                       mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module %s is unusable.\n", aot_name);
                }
                g_free (aot_name);
                if (sofile)
@@ -1083,6 +1102,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        amodule->globals = globals;
        amodule->sofile = sofile;
        amodule->method_to_code = g_hash_table_new (mono_aligned_addr_hash, NULL);
+       amodule->blob = blob;
 
        /* Read image table */
        {
@@ -1131,7 +1151,6 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        find_symbol (sofile, globals, "methods_end", (gpointer*)&amodule->code_end);
        find_symbol (sofile, globals, "method_info_offsets", (gpointer*)&amodule->method_info_offsets);
        find_symbol (sofile, globals, "ex_info_offsets", (gpointer*)&amodule->ex_info_offsets);
-       find_symbol (sofile, globals, "blob", (gpointer*)&amodule->blob);
        find_symbol (sofile, globals, "class_info_offsets", (gpointer*)&amodule->class_info_offsets);
        find_symbol (sofile, globals, "class_name_table", (gpointer *)&amodule->class_name_table);
        find_symbol (sofile, globals, "extra_method_table", (gpointer *)&amodule->extra_method_table);
@@ -1195,6 +1214,17 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                }
        }
 
+#ifdef HAVE_SGEN_GC
+       {
+               MonoJumpInfo ji;
+
+               memset (&ji, 0, sizeof (ji));
+               ji.type = MONO_PATCH_INFO_GC_CARD_TABLE_ADDR;
+
+               amodule->got [2] = mono_resolve_patch_target (NULL, mono_get_root_domain (), NULL, &ji, FALSE);
+       }
+#endif
+
        /*
         * Since we store methoddef and classdef tokens when referring to methods/classes in
         * referenced assemblies, we depend on the exact versions of the referenced assemblies.
@@ -1275,6 +1305,15 @@ mono_aot_init (void)
                use_aot_cache = TRUE;
 }
 
+void
+mono_aot_cleanup (void)
+{
+       if (aot_jit_icall_hash)
+               g_hash_table_destroy (aot_jit_icall_hash);
+       if (aot_modules)
+               g_hash_table_destroy (aot_modules);
+}
+
 static gboolean
 decode_cached_class_info (MonoAotModule *module, MonoCachedClassInfo *info, guint8 *buf, guint8 **endbuf)
 {
@@ -1321,7 +1360,7 @@ mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int sl
 {
        int i;
        MonoClass *klass = vtable->klass;
-       MonoAotModule *aot_module = klass->image->aot_module;
+       MonoAotModule *amodule = klass->image->aot_module;
        guint8 *info, *p;
        MonoCachedClassInfo class_info;
        gboolean err;
@@ -1329,20 +1368,20 @@ mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int sl
        MonoImage *image;
        gboolean no_aot_trampoline;
 
-       if (MONO_CLASS_IS_INTERFACE (klass) || klass->rank || !aot_module)
+       if (MONO_CLASS_IS_INTERFACE (klass) || klass->rank || !amodule)
                return NULL;
 
-       info = &aot_module->blob [mono_aot_get_offset (aot_module->class_info_offsets, mono_metadata_token_index (klass->type_token) - 1)];
+       info = &amodule->blob [mono_aot_get_offset (amodule->class_info_offsets, mono_metadata_token_index (klass->type_token) - 1)];
        p = info;
 
-       err = decode_cached_class_info (aot_module, &class_info, p, &p);
+       err = decode_cached_class_info (amodule, &class_info, p, &p);
        if (!err)
                return NULL;
 
        for (i = 0; i < slot; ++i)
-               decode_method_ref (aot_module, &token, NULL, NULL, p, &p);
+               decode_method_ref (amodule, &token, NULL, NULL, p, &p);
 
-       image = decode_method_ref (aot_module, &token, NULL, &no_aot_trampoline, p, &p);
+       image = decode_method_ref (amodule, &token, NULL, &no_aot_trampoline, p, &p);
        if (!image)
                return NULL;
        if (no_aot_trampoline)
@@ -1357,16 +1396,16 @@ mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int sl
 gboolean
 mono_aot_get_cached_class_info (MonoClass *klass, MonoCachedClassInfo *res)
 {
-       MonoAotModule *aot_module = klass->image->aot_module;
+       MonoAotModule *amodule = klass->image->aot_module;
        guint8 *p;
        gboolean err;
 
-       if (klass->rank || !aot_module)
+       if (klass->rank || !amodule)
                return FALSE;
 
-       p = (guint8*)&aot_module->blob [mono_aot_get_offset (aot_module->class_info_offsets, mono_metadata_token_index (klass->type_token) - 1)];
+       p = (guint8*)&amodule->blob [mono_aot_get_offset (amodule->class_info_offsets, mono_metadata_token_index (klass->type_token) - 1)];
 
-       err = decode_cached_class_info (aot_module, res, p, &p);
+       err = decode_cached_class_info (amodule, res, p, &p);
        if (!err)
                return FALSE;
 
@@ -1386,7 +1425,7 @@ mono_aot_get_cached_class_info (MonoClass *klass, MonoCachedClassInfo *res)
 gboolean
 mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const char *name, MonoClass **klass)
 {
-       MonoAotModule *aot_module = image->aot_module;
+       MonoAotModule *amodule = image->aot_module;
        guint16 *table, *entry;
        guint16 table_size;
        guint32 hash;
@@ -1397,7 +1436,7 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
        guint32 cols [MONO_TYPEDEF_SIZE];
        GHashTable *nspace_table;
 
-       if (!aot_module || !aot_module->class_name_table)
+       if (!amodule || !amodule->class_name_table)
                return FALSE;
 
        mono_aot_lock ();
@@ -1405,9 +1444,9 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
        *klass = NULL;
 
        /* First look in the cache */
-       if (!aot_module->name_cache)
-               aot_module->name_cache = g_hash_table_new (g_str_hash, g_str_equal);
-       nspace_table = g_hash_table_lookup (aot_module->name_cache, name_space);
+       if (!amodule->name_cache)
+               amodule->name_cache = g_hash_table_new (g_str_hash, g_str_equal);
+       nspace_table = g_hash_table_lookup (amodule->name_cache, name_space);
        if (nspace_table) {
                *klass = g_hash_table_lookup (nspace_table, name);
                if (*klass) {
@@ -1416,8 +1455,8 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
                }
        }
 
-       table_size = aot_module->class_name_table [0];
-       table = aot_module->class_name_table + 1;
+       table_size = amodule->class_name_table [0];
+       table = amodule->class_name_table + 1;
 
        if (name_space [0] == '\0')
                full_name = g_strdup_printf ("%s", name);
@@ -1457,10 +1496,10 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
                                /* Add to cache */
                                if (*klass) {
                                        mono_aot_lock ();
-                                       nspace_table = g_hash_table_lookup (aot_module->name_cache, name_space);
+                                       nspace_table = g_hash_table_lookup (amodule->name_cache, name_space);
                                        if (!nspace_table) {
                                                nspace_table = g_hash_table_new (g_str_hash, g_str_equal);
-                                               g_hash_table_insert (aot_module->name_cache, (char*)name_space2, nspace_table);
+                                               g_hash_table_insert (amodule->name_cache, (char*)name_space2, nspace_table);
                                        }
                                        g_hash_table_insert (nspace_table, (char*)name2, *klass);
                                        mono_aot_unlock ();
@@ -2248,6 +2287,7 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
        case MONO_PATCH_INFO_GENERIC_CLASS_INIT:
        case MONO_PATCH_INFO_MONITOR_ENTER:
        case MONO_PATCH_INFO_MONITOR_EXIT:
+       case MONO_PATCH_INFO_GC_CARD_TABLE_ADDR:
                break;
        case MONO_PATCH_INFO_RGCTX_FETCH: {
                gboolean res;
@@ -3110,8 +3150,6 @@ mono_create_ftnptr_malloc (guint8 *code)
 #endif
 }
 
-static GHashTable *aot_jit_icall_hash;
-
 /*
  * mono_aot_register_jit_icall:
  *
index 70a1bed8ded92761220bbbe2f9491c890614e3a3..6a027ca5f2b2d5a1afd051ff9134aeb1d2b07169 100644 (file)
@@ -289,8 +289,8 @@ atomic_exchange_i4: src1:b src2:i dest:a len:32
 atomic_add_i8: src1:b src2:i dest:i len:32
 atomic_add_new_i8: src1:b src2:i dest:i len:32
 atomic_exchange_i8: src1:b src2:i dest:a len:32
-atomic_cas_i4: src1:b src2:i src3:a dest:i len:24
-atomic_cas_i8: src1:b src2:i src3:a dest:i len:24
+atomic_cas_i4: src1:b src2:i src3:a dest:a len:24
+atomic_cas_i8: src1:b src2:i src3:a dest:a len:24
 memory_barrier: len:16
 adc: dest:i src1:i src2:i len:3 clob:1
 addcc: dest:i src1:i src2:i len:3 clob:1
index ce44e629f2822763b4727da5b3176fa453f7ba46..485a634390751a668f1aaea1fdbe02a09c6ba054 100644 (file)
@@ -111,27 +111,42 @@ r4const: dest:f len:20
 r8const: dest:f len:28
 label: len:0
 store_membase_imm: dest:b len:20
-store_membase_reg: dest:b src1:i len:16
+store_membase_reg: dest:b src1:i len:20
 storei1_membase_imm: dest:b len:20
-storei1_membase_reg: dest:b src1:i len:16
+storei1_membase_reg: dest:b src1:i len:20
 storei2_membase_imm: dest:b len:20
-storei2_membase_reg: dest:b src1:i len:16
+storei2_membase_reg: dest:b src1:i len:20
 storei4_membase_imm: dest:b len:20
-storei4_membase_reg: dest:b src1:i len:16
+storei4_membase_reg: dest:b src1:i len:20
 storei8_membase_imm: dest:b 
-storei8_membase_reg: dest:b src1:i len:16
-storer4_membase_reg: dest:b src1:f len:16
-storer8_membase_reg: dest:b src1:f len:16
-load_membase: dest:i src1:b len:16
-loadi1_membase: dest:i src1:b len:16
-loadu1_membase: dest:i src1:b len:16
-loadi2_membase: dest:i src1:b len:16
-loadu2_membase: dest:i src1:b len:16
-loadi4_membase: dest:i src1:b len:16
-loadu4_membase: dest:i src1:b len:16
-loadi8_membase: dest:i src1:b len:16
-loadr4_membase: dest:f src1:b len:16
-loadr8_membase: dest:f src1:b len:16
+storei8_membase_reg: dest:b src1:i len:20
+storer4_membase_reg: dest:b src1:f len:20
+storer8_membase_reg: dest:b src1:f len:20
+load_membase: dest:i src1:b len:20
+loadi1_membase: dest:i src1:b len:20
+loadu1_membase: dest:i src1:b len:20
+loadi2_membase: dest:i src1:b len:20
+loadu2_membase: dest:i src1:b len:20
+loadi4_membase: dest:i src1:b len:20
+loadu4_membase: dest:i src1:b len:20
+loadi8_membase: dest:i src1:b len:20
+loadr4_membase: dest:f src1:b len:20
+loadr8_membase: dest:f src1:b len:20
+load_memindex: dest:i src1:b src2:i len:4
+loadi1_memindex: dest:i src1:b src2:i len:12
+loadu1_memindex: dest:i src1:b src2:i len:12
+loadi2_memindex: dest:i src1:b src2:i len:12
+loadu2_memindex: dest:i src1:b src2:i len:12
+loadi4_memindex: dest:i src1:b src2:i len:12
+loadu4_memindex: dest:i src1:b src2:i len:12
+loadr4_memindex: dest:f src1:b src2:i len:12
+loadr8_memindex: dest:f src1:b src2:i len:12
+store_memindex: dest:b src1:i src2:i len:12
+storei1_memindex: dest:b src1:i src2:i len:12
+storei2_memindex: dest:b src1:i src2:i len:12
+storei4_memindex: dest:b src1:i src2:i len:12
+storer4_memindex: dest:b src1:f src2:i len:12
+storer8_memindex: dest:b src1:f src2:i len:12
 loadu4_mem: dest:i len:8
 move: dest:i src1:i len:4
 fmove: dest:f src1:f len:8
index 50060a2a3c8da3b70bba3069a09b624b3c7a0d0c..4bf27a306eeb686ea491db234ee474803a2a92cc 100644 (file)
@@ -48,7 +48,7 @@
 memory_barrier: len:4
 nop: len:4
 relaxed_nop: len:4
-break: len:4
+break: len:40
 seq_point: len:48
 jmp: len:96
 call: dest:a clob:c len:36
index 1bf85881928b64d361914b9c30ee36843c5d3401..381fd0d76deaac365144fbc097b44ef898274d31 100644 (file)
 # See the code in mini-x86.c for more details on how the specifiers are used.
 #
 break: len:1
-jmp: len:32
+jmp: len:32 clob:c
 call: dest:a clob:c len:17
 br: len:5
 seq_point: len:16
 
-int_beq: len:6 nacl:28
+int_beq: len:6
 int_bge: len:6
 int_bgt: len:6
 int_ble: len:6
@@ -117,8 +117,8 @@ int_mul_ovf_un: dest:i src1:i src2:i len:16
 throw: src1:i len:13
 rethrow: src1:i len:13
 start_handler: len:16
-endfinally: len:16
-endfilter: src1:a len:16
+endfinally: len:16 nacl:21
+endfilter: src1:a len:16 nacl:21
 
 ckfinite: dest:f src1:f len:32
 ceq: dest:y len:6
@@ -134,18 +134,18 @@ oparglist: src1:b len:10
 checkthis: src1:b len:3
 voidcall: len:17 clob:c
 voidcall_reg: src1:i len:11 clob:c
-voidcall_membase: src1:b len:16 clob:c
+voidcall_membase: src1:b len:16 nacl:17 clob:c
 fcall: dest:f len:17 clob:c
 fcall_reg: dest:f src1:i len:11 clob:c
-fcall_membase: dest:f src1:b len:16 clob:c
+fcall_membase: dest:f src1:b len:16 nacl:17 clob:c
 lcall: dest:l len:17 clob:c
 lcall_reg: dest:l src1:i len:11 clob:c
-lcall_membase: dest:l src1:b len:16 clob:c
+lcall_membase: dest:l src1:b len:16 nacl:17 clob:c
 vcall: len:17 clob:c
 vcall_reg: src1:i len:11 clob:c
-vcall_membase: src1:b len:16 clob:c
-call_reg: dest:a src1:i len:11 clob:c
-call_membase: dest:a src1:b len:16 clob:c
+vcall_membase: src1:b len:16 nacl:17 clob:c
+call_reg: dest:a src1:i len:11 nacl:14 clob:c
+call_membase: dest:a src1:b len:16 nacl:18 clob:c
 iconst: dest:i len:5
 r4const: dest:f len:15
 r8const: dest:f len:16
@@ -284,7 +284,7 @@ subcc: dest:i src1:i src2:i len:2 clob:1
 adc_imm: dest:i src1:i len:6 clob:1
 sbb: dest:i src1:i src2:i len:2 clob:1
 sbb_imm: dest:i src1:i len:6 clob:1
-br_reg: src1:i len:2
+br_reg: src1:i len:2 nacl:5
 sin: dest:f src1:f len:6
 cos: dest:f src1:f len:6
 abs: dest:f src1:f len:2
@@ -300,9 +300,11 @@ tls_get: dest:i len:20
 atomic_add_i4: src1:b src2:i dest:i len:16
 atomic_add_new_i4: src1:b src2:i dest:i len:16
 atomic_exchange_i4: src1:b src2:i dest:a len:24
-atomic_cas_i4: src1:b src2:i src3:a dest:i len:24
+atomic_cas_i4: src1:b src2:i src3:a dest:a len:24
 memory_barrier: len:16
 
+card_table_wbarrier: src1:a src2:i clob:d len:28
+
 relaxed_nop: len:2
 hard_nop: len:1
 
@@ -386,7 +388,7 @@ loadu2_mem: dest:i len:9
 
 vcall2: len:17 clob:c
 vcall2_reg: src1:i len:11 clob:c
-vcall2_membase: src1:b len:16 clob:c
+vcall2_membase: src1:b len:16 nacl:17 clob:c
 
 localloc_imm: dest:i len:120
 
index adb89d7b291e8ab0d61e3a7b01101d7835ea182b..a103595c0bf72426da06cef43e283fb219b22e1a 100644 (file)
@@ -64,6 +64,8 @@ static guint8 *debugger_executable_code_buffer = NULL;
 
 static GCThreadFunctions debugger_thread_vtable;
 
+static guint32 debugger_thread_abort_signal = 0;
+
 static MonoDebuggerMetadataInfo debugger_metadata_info = {
        sizeof (MonoDebuggerMetadataInfo),
        sizeof (MonoDefaults),
@@ -178,7 +180,9 @@ MonoDebuggerInfo MONO_DEBUGGER__debugger_info = {
        &_mono_debug_using_mono_debugger,
        (gint32*)&_mono_debugger_interruption_request,
 
-       &debugger_abort_runtime_invoke
+       &debugger_abort_runtime_invoke,
+
+       &debugger_thread_abort_signal
 };
 
 static guint64
@@ -514,6 +518,8 @@ mini_debugger_init (void)
        debugger_executable_code_buffer = mono_global_codeman_reserve (EXECUTABLE_CODE_BUFFER_SIZE);
        mono_debugger_event_handler = debugger_event_handler;
 
+       debugger_thread_abort_signal = mono_thread_get_abort_signal ();
+
        /*
         * Use an indirect call so gcc can't optimize it away.
         */
@@ -535,6 +541,7 @@ mini_debugger_init (void)
 void
 mini_debugger_set_attach_ok (void)
 {
+       debugger_thread_abort_signal = mono_thread_get_abort_signal ();
        MONO_DEBUGGER__debugger_info.runtime_flags |= DEBUGGER_RUNTIME_FLAGS_ATTACH_OK;
 }
 
index 0a8e8a2a5bc73ee5f1c3dd87a45a1a7dbaf9f3f8..b7c5b43e6df38ec3999d531b53e8d8c47e738b31 100644 (file)
@@ -92,6 +92,8 @@ struct _MonoDebuggerInfo {
        gint32 *interruption_request;
 
        guint64 (*abort_runtime_invoke) (G_GNUC_UNUSED guint64 dummy1, G_GNUC_UNUSED guint64 dummy2);
+
+       guint32 *thread_abort_signal;
 };
 
 struct _MonoDebuggerMetadataInfo {
index 345acf79650ace9deadde37eba2d9ecef63abc82..fa38cb7a04d370ce1fafb2e95ca72e842b766b9a 100644 (file)
@@ -114,6 +114,9 @@ opt_funcs [sizeof (int) * 8] = {
        NULL
 };
 
+#ifdef __native_client_codegen__
+extern guint8 nacl_align_byte;
+#endif
 
 #define DEFAULT_OPTIMIZATIONS (        \
        MONO_OPT_PEEPHOLE |     \
@@ -1118,6 +1121,9 @@ mini_usage (void)
                "    --trace[=EXPR]         Enable tracing, use --help-trace for details\n"
                "    --jitmap               Output a jit method map to /tmp/perf-PID.map\n"
                "    --help-devel           Shows more options available to developers\n"
+#ifdef __native_client_codegen__
+               "    --nacl-align-mask-off  Turn off Native Client 32-byte alignment mask (for debug only)\n"
+#endif
                "\n"
                "Runtime:\n"
                "    --config FILE          Loads FILE as the Mono config\n"
@@ -1427,24 +1433,24 @@ mono_main (int argc, char* argv[])
                } else if (strncmp (argv [i], "-O=", 3) == 0) {
                        opt = parse_optimizations (argv [i] + 3);
                } else if (strcmp (argv [i], "--gc=sgen") == 0) {
-#if HAVE_BOEHM_GC
-                       GString *path = g_string_new (argv [0]);
-                       g_string_append (path, "-sgen");
-                       argv [0] = path->str;
-                       execvp (path->str, argv);
-#endif
+                       if (!strcmp (mono_gc_get_gc_name (), "boehm")) {
+                               GString *path = g_string_new (argv [0]);
+                               g_string_append (path, "-sgen");
+                               argv [0] = path->str;
+                               execvp (path->str, argv);
+                       }
                } else if (strcmp (argv [i], "--gc=boehm") == 0) {
-#if HAVE_SGEN_GC
-                       char *copy = g_strdup (argv [0]);
-                       char *p = strstr (copy, "-sgen");
-                       if (p == NULL){
-                               fprintf (stderr, "Error, this process is not named mono-sgen and the command line option --boehm was passed");
-                               exit (1);
+                       if (!strcmp (mono_gc_get_gc_name (), "sgen")) {
+                               char *copy = g_strdup (argv [0]);
+                               char *p = strstr (copy, "-sgen");
+                               if (p == NULL){
+                                       fprintf (stderr, "Error, this process is not named mono-sgen and the command line option --boehm was passed");
+                                       exit (1);
+                               }
+                               *p = 0;
+                               argv [0] = p;
+                               execvp (p, argv);
                        }
-                       *p = 0;
-                       argv [0] = p;
-                       execvp (p, argv);
-#endif
                } else if (strcmp (argv [i], "--config") == 0) {
                        if (i +1 >= argc){
                                fprintf (stderr, "error: --config requires a filename argument\n");
@@ -1627,12 +1633,23 @@ mono_main (int argc, char* argv[])
 #endif
                } else if (strcmp (argv [i], "--nollvm") == 0){
                        mono_use_llvm = FALSE;
+#ifdef __native_client_codegen__
+               } else if (strcmp (argv [i], "--nacl-align-mask-off") == 0){
+                       nacl_align_byte = 0xff; 
+#endif
                } else {
                        fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]);
                        return 1;
                }
        }
 
+#ifdef __native_client_codegen__
+       if (getenv ("MONO_NACL_ALIGN_MASK_OFF"))
+       {
+               nacl_align_byte = 0xff;
+       }
+#endif
+
        if (!argv [i]) {
                mini_usage ();
                return 1;
index 222b4a392db59daf5d3a8f506a50d170227a6e8b..b6057cdd1044658fe87cec4d0452caf98ac070ab 100644 (file)
@@ -81,6 +81,11 @@ mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_st
        w->fp = img_writer_get_fp (w->w);
        w->temp_prefix = img_writer_get_temp_label_prefix (w->w);
 
+       w->class_to_die = g_hash_table_new (NULL, NULL);
+       w->class_to_vtype_die = g_hash_table_new (NULL, NULL);
+       w->class_to_pointer_die = g_hash_table_new (NULL, NULL);
+       w->class_to_reference_die = g_hash_table_new (NULL, NULL);
+
        return w;
 }
 
@@ -794,7 +799,21 @@ mono_dwarf_writer_close (MonoDwarfWriter *w)
        }
 }
 
-static const char* emit_type (MonoDwarfWriter *w, MonoType *t);
+static void emit_type (MonoDwarfWriter *w, MonoType *t);
+static const char* get_type_die (MonoDwarfWriter *w, MonoType *t);
+
+static const char*
+get_class_die (MonoDwarfWriter *w, MonoClass *klass, gboolean vtype)
+{
+       GHashTable *cache;
+
+       if (vtype)
+               cache = w->class_to_vtype_die;
+       else
+               cache = w->class_to_die;
+
+       return g_hash_table_lookup (cache, klass);
+}
 
 /* Returns the local symbol pointing to the emitted debug info */
 static char*
@@ -809,16 +828,6 @@ emit_class_dwarf_info (MonoDwarfWriter *w, MonoClass *klass, gboolean vtype)
        gboolean emit_namespace = FALSE, has_children;
        GHashTable *cache;
 
-       // FIXME: Appdomains
-       if (!w->class_to_die)
-               w->class_to_die = g_hash_table_new (NULL, NULL);
-       if (!w->class_to_vtype_die)
-               w->class_to_vtype_die = g_hash_table_new (NULL, NULL);
-       if (!w->class_to_pointer_die)
-               w->class_to_pointer_die = g_hash_table_new (NULL, NULL);
-       if (!w->class_to_reference_die)
-               w->class_to_reference_die = g_hash_table_new (NULL, NULL);
-
        if (vtype)
                cache = w->class_to_vtype_die;
        else
@@ -828,7 +837,8 @@ emit_class_dwarf_info (MonoDwarfWriter *w, MonoClass *klass, gboolean vtype)
        if (die)
                return die;
 
-       if (!((klass->byval_arg.type == MONO_TYPE_CLASS) || (klass->byval_arg.type == MONO_TYPE_OBJECT) || klass->byval_arg.type == MONO_TYPE_GENERICINST || klass->enumtype || (klass->byval_arg.type == MONO_TYPE_VALUETYPE && vtype)))
+       if (!((klass->byval_arg.type == MONO_TYPE_CLASS) || (klass->byval_arg.type == MONO_TYPE_OBJECT) || klass->byval_arg.type == MONO_TYPE_GENERICINST || klass->enumtype || (klass->byval_arg.type == MONO_TYPE_VALUETYPE && vtype) ||
+                 (klass->byval_arg.type >= MONO_TYPE_BOOLEAN && klass->byval_arg.type <= MONO_TYPE_R8 && !vtype)))
                return NULL;
 
        /*
@@ -970,7 +980,7 @@ emit_class_dwarf_info (MonoDwarfWriter *w, MonoClass *klass, gboolean vtype)
                        if (field->type->attrs & FIELD_ATTRIBUTE_STATIC)
                                continue;
 
-                       fdie = emit_type (w, field->type);
+                       fdie = get_type_die (w, field->type);
                        if (fdie) {
                                emit_uleb128 (w, ABBREV_DATA_MEMBER);
                                emit_string (w, field->name);
@@ -1020,8 +1030,10 @@ emit_class_dwarf_info (MonoDwarfWriter *w, MonoClass *klass, gboolean vtype)
        return die;
 }
 
+static gboolean base_types_emitted [64];
+
 static const char*
-emit_type (MonoDwarfWriter *w, MonoType *t)
+get_type_die (MonoDwarfWriter *w, MonoType *t)
 {
        MonoClass *klass = mono_class_from_mono_type (t);
        int j;
@@ -1029,12 +1041,10 @@ emit_type (MonoDwarfWriter *w, MonoType *t)
 
        if (t->byref) {
                if (t->type == MONO_TYPE_VALUETYPE) {
-                       tdie = emit_class_dwarf_info (w, klass, TRUE);
-                       if (tdie)
-                               return g_hash_table_lookup (w->class_to_pointer_die, klass);
+                       tdie = g_hash_table_lookup (w->class_to_pointer_die, klass);
                }
                else {
-                       tdie = emit_class_dwarf_info (w, klass, FALSE);
+                       tdie = get_class_die (w, klass, FALSE);
                        /* Should return a pointer type to a reference */
                }
                // FIXME:
@@ -1043,12 +1053,11 @@ emit_type (MonoDwarfWriter *w, MonoType *t)
        for (j = 0; j < G_N_ELEMENTS (basic_types); ++j)
                if (basic_types [j].type == t->type)
                        break;
-       if (j < G_N_ELEMENTS (basic_types))
+       if (j < G_N_ELEMENTS (basic_types)) {
                tdie = basic_types [j].die_name;
-       else {
+       else {
                switch (t->type) {
                case MONO_TYPE_CLASS:
-                       emit_class_dwarf_info (w, klass, FALSE);
                        tdie = g_hash_table_lookup (w->class_to_reference_die, klass);
                        //tdie = ".LDIE_OBJECT";
                        break;
@@ -1057,13 +1066,12 @@ emit_type (MonoDwarfWriter *w, MonoType *t)
                        break;
                case MONO_TYPE_VALUETYPE:
                        if (klass->enumtype)
-                               tdie = emit_class_dwarf_info (w, klass, FALSE);
+                               tdie = get_class_die (w, klass, FALSE);
                        else
                                tdie = ".LDIE_I4";
                        break;
                case MONO_TYPE_GENERICINST:
                        if (!MONO_TYPE_ISSTRUCT (t)) {
-                               emit_class_dwarf_info (w, klass, FALSE);
                                tdie = g_hash_table_lookup (w->class_to_reference_die, klass);
                        } else {
                                tdie = ".LDIE_I4";
@@ -1078,15 +1086,68 @@ emit_type (MonoDwarfWriter *w, MonoType *t)
                }
        }
 
+       g_assert (tdie);
+
        return tdie;
 }
 
+static void
+emit_type (MonoDwarfWriter *w, MonoType *t)
+{
+       MonoClass *klass = mono_class_from_mono_type (t);
+       int j;
+       const char *tdie;
+
+       if (t->byref) {
+               if (t->type == MONO_TYPE_VALUETYPE) {
+                       tdie = emit_class_dwarf_info (w, klass, TRUE);
+                       if (tdie)
+                               return;
+               }
+               else {
+                       emit_class_dwarf_info (w, klass, FALSE);
+               }
+               // FIXME:
+               t = &mono_defaults.int_class->byval_arg;
+       }
+       for (j = 0; j < G_N_ELEMENTS (basic_types); ++j)
+               if (basic_types [j].type == t->type)
+                       break;
+       if (j < G_N_ELEMENTS (basic_types)) {
+               /* Emit a boxed version of base types */
+               if (j < 64 && !base_types_emitted [j]) {
+                       emit_class_dwarf_info (w, klass, FALSE);
+                       base_types_emitted [j] = TRUE;
+               }
+       } else {
+               switch (t->type) {
+               case MONO_TYPE_CLASS:
+                       emit_class_dwarf_info (w, klass, FALSE);
+                       break;
+               case MONO_TYPE_ARRAY:
+                       break;
+               case MONO_TYPE_VALUETYPE:
+                       if (klass->enumtype)
+                               emit_class_dwarf_info (w, klass, FALSE);
+                       break;
+               case MONO_TYPE_GENERICINST:
+                       if (!MONO_TYPE_ISSTRUCT (t))
+                               emit_class_dwarf_info (w, klass, FALSE);
+                       break;
+               case MONO_TYPE_PTR:
+                       break;
+               default:
+                       break;
+               }
+       }
+}
+
 static void
 emit_var_type (MonoDwarfWriter *w, MonoType *t)
 {
        const char *tdie;
 
-       tdie = emit_type (w, t);
+       tdie = get_type_die (w, t);
 
        emit_symbol_diff (w, tdie, ".Ldebug_info_start", 0);
 }
@@ -1611,6 +1672,7 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
 
                emit_type (w, t);
        }
+       //emit_type (w, &mono_defaults.int32_class->byval_arg);
 
        /* Local types */
        for (i = 0; i < header->num_locals; ++i) {
index ead2f7f54c1e113a78511f0632827c14676c0794..e41985a73ac6bf7801f2d8d17329294dff974d3e 100644 (file)
@@ -415,11 +415,13 @@ get_throw_trampoline (MonoTrampInfo **info, gboolean rethrow, gboolean corlib, g
 
        code = start;
 
-       unwind_ops = mono_arch_get_cie_program ();
+       if (info)
+               unwind_ops = mono_arch_get_cie_program ();
 
        /* Alloc frame */
        amd64_alu_reg_imm (code, X86_SUB, AMD64_RSP, stack_size);
-       mono_add_unwind_op_def_cfa_offset (unwind_ops, code, start, stack_size + 8);
+       if (info)
+               mono_add_unwind_op_def_cfa_offset (unwind_ops, code, start, stack_size + 8);
 
        /*
         * To hide linux/windows calling convention differences, we pass all arguments on
@@ -721,29 +723,31 @@ handle_signal_exception (gpointer obj, gboolean test_only)
 gboolean
 mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only)
 {
-#if defined(MONO_ARCH_USE_SIGACTION) && defined(UCONTEXT_GREGS)
+#if defined(MONO_ARCH_USE_SIGACTION)
+       ucontext_t *ctx = (ucontext_t*)sigctx;
+
        /*
         * Handling the exception in the signal handler is problematic, since the original
         * signal is disabled, and we could run arbitrary code though the debugger. So
         * resume into the normal stack and do most work there if possible.
         */
        MonoJitTlsData *jit_tls = TlsGetValue (mono_jit_tls_id);
-       guint64 sp = UCONTEXT_REG_RSP (sigctx);
+       guint64 sp = UCONTEXT_REG_RSP (ctx);
 
        /* Pass the ctx parameter in TLS */
-       mono_arch_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
+       mono_arch_sigctx_to_monoctx (ctx, &jit_tls->ex_ctx);
        /* The others in registers */
-       UCONTEXT_REG_RDI (sigctx) = (guint64)obj;
-       UCONTEXT_REG_RSI (sigctx) = test_only;
+       UCONTEXT_REG_RDI (ctx) = (guint64)obj;
+       UCONTEXT_REG_RSI (ctx) = test_only;
 
        /* Allocate a stack frame below the red zone */
        sp -= 128;
        /* The stack should be unaligned */
        if (sp % 8 == 0)
                sp -= 8;
-       UCONTEXT_REG_RSP (sigctx) = sp;
+       UCONTEXT_REG_RSP (ctx) = sp;
 
-       UCONTEXT_REG_RIP (sigctx) = (guint64)handle_signal_exception;
+       UCONTEXT_REG_RIP (ctx) = (guint64)handle_signal_exception;
 
        return TRUE;
 #else
index 6b12133ee062155da6ba85f6c92a2eec1bd50d31..a84bc1fb19f6572e4d60f6673635d3fef7214c69 100644 (file)
@@ -312,7 +312,7 @@ mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
        sparc_sll_imm (code, sparc_o1, 2, sparc_o1);
        sparc_sub (code, 0, sparc_o2, sparc_o1, sparc_o7);
 
-       sparc_set (code, mono_arch_get_throw_exception (), reg);
+       sparc_set (code, mono_arch_get_throw_exception (NULL, FALSE), reg);
        /* Use a jmp instead of a call so o7 is preserved */
        sparc_jmpl_imm (code, reg, 0, sparc_g0);
        sparc_nop (code);
index f3ebe864e9aa631f1e9864ddd206b5d0cddedc3e..6d0db6d0fd0029be8af89157d77022f4f71ad9e9 100644 (file)
@@ -324,9 +324,14 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
        guint8 *code;
        MonoJumpInfo *ji = NULL;
        GSList *unwind_ops = NULL;
+#ifdef __native_client_codegen__
+       guint kMaxCodeSize = 128;
+#else
+       guint kMaxCodeSize = 64;
+#endif  /* __native_client_codegen__ */
 
        /* call_filter (MonoContext *ctx, unsigned long eip) */
-       start = code = mono_global_codeman_reserve (64);
+       start = code = mono_global_codeman_reserve (kMaxCodeSize);
 
        x86_push_reg (code, X86_EBP);
        x86_mov_reg_reg (code, X86_EBP, X86_ESP, 4);
@@ -374,7 +379,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
        if (info)
                *info = mono_tramp_info_create (g_strdup_printf ("call_filter"), start, code - start, ji, unwind_ops);
 
-       g_assert ((code - start) < 64);
+       g_assert ((code - start) < kMaxCodeSize);
        return start;
 }
 
@@ -492,8 +497,12 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea
        int i, stack_size, stack_offset, arg_offsets [5], regs_offset;
        MonoJumpInfo *ji = NULL;
        GSList *unwind_ops = NULL;
-
-       start = code = mono_global_codeman_reserve (128);
+#ifdef __native_client_codegen__
+       guint kMaxCodeSize = 256;
+#else
+       guint kMaxCodeSize = 128;
+#endif
+       start = code = mono_global_codeman_reserve (kMaxCodeSize);
 
        stack_size = 128;
 
@@ -599,7 +608,7 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea
        }
        x86_breakpoint (code);
 
-       g_assert ((code - start) < 128);
+       g_assert ((code - start) < kMaxCodeSize);
 
        if (info)
                *info = mono_tramp_info_create (g_strdup (name), start, code - start, ji, unwind_ops);
@@ -628,7 +637,7 @@ mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
 gpointer 
 mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
 {
-       return get_throw_trampoline ("rethow_exception", TRUE, FALSE, FALSE, FALSE, FALSE, info, aot);
+       return get_throw_trampoline ("rethrow_exception", TRUE, FALSE, FALSE, FALSE, FALSE, info, aot);
 }
 
 /**
@@ -848,6 +857,18 @@ mono_arch_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
 void
 mono_arch_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
 {
+#if defined (__native_client__)
+       printf("WARNING: mono_arch_sigctx_to_monoctx() called!\n");
+       mctx->eax = 0xDEADBEEF;
+       mctx->ebx = 0xDEADBEEF;
+       mctx->ecx = 0xDEADBEEF;
+       mctx->edx = 0xDEADBEEF;
+       mctx->ebp = 0xDEADBEEF;
+       mctx->esp = 0xDEADBEEF;
+       mctx->esi = 0xDEADBEEF;
+       mctx->edi = 0xDEADBEEF;
+       mctx->eip = 0xDEADBEEF;
+#else
 #ifdef MONO_ARCH_USE_SIGACTION
        ucontext_t *ctx = (ucontext_t*)sigctx;
        
@@ -873,11 +894,15 @@ mono_arch_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
        mctx->edi = ctx->SC_EDI;
        mctx->eip = ctx->SC_EIP;
 #endif
+#endif /* if defined(__native_client__) */
 }
 
 void
 mono_arch_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
 {
+#if defined(__native_client__)
+       printf("WARNING: mono_arch_monoctx_to_sigctx() called!\n");
+#else
 #ifdef MONO_ARCH_USE_SIGACTION
        ucontext_t *ctx = (ucontext_t*)sigctx;
 
@@ -903,18 +928,24 @@ mono_arch_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
        ctx->SC_EDI = mctx->edi;
        ctx->SC_EIP = mctx->eip;
 #endif
+#endif /* __native_client__ */
 }      
 
 gpointer
 mono_arch_ip_from_context (void *sigctx)
 {
+#if defined(__native_client__)
+       printf("WARNING: mono_arch_ip_from_context() called!\n");
+       return (NULL);
+#else
 #ifdef MONO_ARCH_USE_SIGACTION
        ucontext_t *ctx = (ucontext_t*)sigctx;
        return (gpointer)UCONTEXT_REG_EIP (ctx);
 #else
        struct sigcontext *ctx = sigctx;
        return (gpointer)ctx->SC_EIP;
-#endif 
+#endif
+#endif /* __native_client__ */
 }
 
 /*
@@ -986,16 +1017,18 @@ gboolean
 mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only)
 {
 #if defined(MONO_ARCH_USE_SIGACTION)
+       ucontext_t *ctx = (ucontext_t*)sigctx;
+
        /*
         * Handling the exception in the signal handler is problematic, since the original
         * signal is disabled, and we could run arbitrary code though the debugger. So
         * resume into the normal stack and do most work there if possible.
         */
        MonoJitTlsData *jit_tls = TlsGetValue (mono_jit_tls_id);
-       guint64 sp = UCONTEXT_REG_ESP (sigctx);
+       guint64 sp = UCONTEXT_REG_ESP (ctx);
 
        /* Pass the ctx parameter in TLS */
-       mono_arch_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
+       mono_arch_sigctx_to_monoctx (ctx, &jit_tls->ex_ctx);
        /*
         * Can't pass the obj on the stack, since we are executing on the
         * same stack. Can't save it into MonoJitTlsData, since it needs GC tracking.
@@ -1003,16 +1036,16 @@ mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only)
         * pushes it.
         */
        g_assert (!test_only);
-       UCONTEXT_REG_EAX (sigctx) = (gsize)obj;
-       UCONTEXT_REG_ECX (sigctx) = UCONTEXT_REG_EIP (sigctx);
-       UCONTEXT_REG_EDX (sigctx) = (gsize)handle_signal_exception;
+       UCONTEXT_REG_EAX (ctx) = (gsize)obj;
+       UCONTEXT_REG_ECX (ctx) = UCONTEXT_REG_EIP (ctx);
+       UCONTEXT_REG_EDX (ctx) = (gsize)handle_signal_exception;
 
        /* Allocate a stack frame, align it to 16 bytes which is needed on apple */
        sp -= 16;
        sp &= ~15;
-       UCONTEXT_REG_ESP (sigctx) = sp;
+       UCONTEXT_REG_ESP (ctx) = sp;
 
-       UCONTEXT_REG_EIP (sigctx) = (gsize)signal_exception_trampoline;
+       UCONTEXT_REG_EIP (ctx) = (gsize)signal_exception_trampoline;
 
        return TRUE;
 #elif defined (TARGET_WIN32)
@@ -1166,6 +1199,9 @@ mono_tasklets_arch_restore (void)
        static guint8* saved = NULL;
        guint8 *code, *start;
 
+#ifdef __native_client_codegen__
+       g_print("mono_tasklets_arch_restore needs to be aligned for Native Client\n");
+#endif
        if (saved)
                return (MonoContinuationRestore)saved;
        code = start = mono_global_codeman_reserve (48);
index 3a32e5ba07d1f65aac86f05cc5804c837743e2b3..4f782c9be09c03e6a83260a2088124f0ef3b507c 100644 (file)
@@ -2587,5 +2587,38 @@ class Tests {
                catch {}
                return (int)value;
        }
+
+       class A {
+               public object AnObj;
+       }
+
+       public static void DoSomething (ref object o) {
+       }
+
+       public static int test_0_ldflda_null () {
+               A a = null;
+
+               try {
+                       DoSomething (ref a.AnObj);
+               } catch (NullReferenceException) {
+                       return 0;
+               }
+
+               return 1;
+       }
+
+       unsafe struct Foo
+       {
+               public int i;
+
+               public static Foo* pFoo;
+       }
+
+       /* MS.NET doesn't seem to throw in this case */
+       public unsafe static int test_0_ldflda_null_pointer () {
+               int* pi = &Foo.pFoo->i;
+
+               return 0;
+       }
 }
 
diff --git a/mono/mini/fsacheck.c b/mono/mini/fsacheck.c
new file mode 100644 (file)
index 0000000..e1d4160
--- /dev/null
@@ -0,0 +1,282 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <mono/metadata/appdomain.h>
+#include <mono/metadata/assembly.h>
+#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/object.h>
+#include <mono/jit/jit.h>
+
+extern void* mono_aot_module_mscorlib_info;
+extern void* mono_aot_module_System_Core_info;
+extern void* mono_aot_module_System_info;
+extern void* mono_aot_module_Mono_Posix_info;
+extern void* mono_aot_module_System_Configuration_info;
+extern void* mono_aot_module_System_Security_info;
+extern void* mono_aot_module_System_Xml_info;
+/* extern void* mono_aot_module_System_Threading_info; */
+extern void* mono_aot_module_Mono_Security_info;
+extern void* mono_aot_module_Mono_Simd_info;
+extern void* mono_aot_module_TestDriver_info;
+
+extern void* mono_aot_module_basic_info;
+extern void* mono_aot_module_basic_float_info;
+extern void* mono_aot_module_basic_long_info;
+extern void* mono_aot_module_basic_calls_info;
+extern void* mono_aot_module_basic_simd_info;
+extern void* mono_aot_module_objects_info;
+extern void* mono_aot_module_arrays_info;
+extern void* mono_aot_module_basic_math_info;
+extern void* mono_aot_module_exceptions_info;
+extern void* mono_aot_module_devirtualization_info;
+extern void* mono_aot_module_generics_info;
+extern void* mono_aot_module_generics_variant_types_info;
+extern void* mono_aot_module_basic_simd_info;
+/* extern void* mono_aot_module_thread_stress_info; */
+
+
+extern void mono_aot_register_module(void *aot_info);
+extern void mono_aot_init(void);
+extern void mono_jit_set_aot_only(mono_bool aot_only);
+extern MonoDomain * mini_init (const char *filename, const char *runtime_version);
+
+
+void try_one(char *mname) {
+  MonoDomain *domain;
+  MonoAssembly *ma;
+  MonoImage *mi;
+  MonoClass *mc;
+  MonoMethodDesc *mmd;
+  MonoMethod *mm;
+  MonoObject *mo;
+  MonoArray *arg_array;
+  void *args [1];
+  char *cstr_arg = "20";
+
+  mono_jit_set_aot_only(1);
+  domain = mono_jit_init(mname);
+  printf("mono domain: %p\n", domain);
+
+  ma = mono_domain_assembly_open(domain, mname);
+  if (0 == ma) {
+    printf("ERROR: could not open mono assembly\n");
+    exit(-1);
+  }
+  printf("opened mono assembly: %p\n", ma);
+
+  mi = mono_assembly_get_image(ma);
+  printf("mono image: %p\n", mi);
+
+  mo = mono_string_new(domain, cstr_arg);
+  mc = mono_class_from_name(mono_get_corlib(), "System", "String");
+  printf("string class: %p\n", mc);
+  arg_array = mono_array_new(domain, mc, 1);
+  mono_array_setref(arg_array, 0, mo);
+  args[0] = arg_array;
+
+  mmd = mono_method_desc_new("Tests:Main()", 1);
+  mm = mono_method_desc_search_in_image(mmd, mi);
+  if (0 == mm) {
+    mmd = mono_method_desc_new("Tests:Main(string[])", 1);
+    mm = mono_method_desc_search_in_image(mmd, mi);
+    if (0 == mm) {
+      mmd = mono_method_desc_new("SimdTests:Main(string[])", 1);
+      mm = mono_method_desc_search_in_image(mmd, mi);
+      if (0 == mm) {
+        printf("Couldn't find Tests:Main(), Tests:Main(string[]) or SimdTests:Main(string[])\n");
+        exit(-1);
+      }
+    }
+  }
+  printf("mono desc method: %p\n", mmd);
+  printf("mono method: %p\n", mm);
+
+  mo = mono_runtime_invoke(mm, NULL, args, NULL);
+  printf("mono object: %p\n", mo);
+
+  mono_jit_cleanup(domain);
+}
+
+int main(int argc, char *argv[]) {
+  mono_aot_register_module(mono_aot_module_mscorlib_info);
+  mono_aot_register_module(mono_aot_module_TestDriver_info);
+  mono_aot_register_module(mono_aot_module_System_Core_info);
+  mono_aot_register_module(mono_aot_module_System_info);
+  mono_aot_register_module(mono_aot_module_Mono_Posix_info);
+  mono_aot_register_module(mono_aot_module_System_Configuration_info);
+  mono_aot_register_module(mono_aot_module_System_Security_info);
+  mono_aot_register_module(mono_aot_module_System_Xml_info);
+  mono_aot_register_module(mono_aot_module_Mono_Security_info);
+  /*  mono_aot_register_module(mono_aot_module_System_Threading_info); */
+  mono_aot_register_module(mono_aot_module_Mono_Simd_info);
+
+  mono_aot_register_module(mono_aot_module_basic_info);
+  mono_aot_register_module(mono_aot_module_basic_float_info);
+  mono_aot_register_module(mono_aot_module_basic_long_info);
+  mono_aot_register_module(mono_aot_module_basic_calls_info);
+  mono_aot_register_module(mono_aot_module_basic_simd_info);
+  mono_aot_register_module(mono_aot_module_objects_info);
+  mono_aot_register_module(mono_aot_module_arrays_info);
+  mono_aot_register_module(mono_aot_module_basic_math_info);
+  mono_aot_register_module(mono_aot_module_exceptions_info);
+  mono_aot_register_module(mono_aot_module_devirtualization_info);
+  /*
+  mono_aot_register_module(mono_aot_module_generics_info);
+  mono_aot_register_module(mono_aot_module_generics_variant_types_info);
+  */
+
+  /*  mono_aot_register_module(mono_aot_module_thread_stress_info); */
+  if (argc < 2) {
+    printf("no test specified; running basic.exe\n");
+    printf("==========================\n");
+    try_one("basic.exe");
+    printf("==========================\n");
+  } else {
+    printf("\nProgram %s %s output:\n", argv[0], argv[1]);
+    printf("==========================\n\n");
+    try_one(argv[1]);
+  }
+
+  return 0;
+}
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <mono/metadata/appdomain.h>
+#include <mono/metadata/assembly.h>
+#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/object.h>
+#include <mono/jit/jit.h>
+
+extern void* mono_aot_module_mscorlib_info;
+extern void* mono_aot_module_System_Core_info;
+extern void* mono_aot_module_System_info;
+extern void* mono_aot_module_Mono_Posix_info;
+extern void* mono_aot_module_System_Configuration_info;
+extern void* mono_aot_module_System_Security_info;
+extern void* mono_aot_module_System_Xml_info;
+/* extern void* mono_aot_module_System_Threading_info; */
+extern void* mono_aot_module_Mono_Security_info;
+extern void* mono_aot_module_Mono_Simd_info;
+extern void* mono_aot_module_TestDriver_info;
+
+extern void* mono_aot_module_basic_info;
+extern void* mono_aot_module_basic_float_info;
+extern void* mono_aot_module_basic_long_info;
+extern void* mono_aot_module_basic_calls_info;
+extern void* mono_aot_module_basic_simd_info;
+extern void* mono_aot_module_objects_info;
+extern void* mono_aot_module_arrays_info;
+extern void* mono_aot_module_basic_math_info;
+extern void* mono_aot_module_exceptions_info;
+extern void* mono_aot_module_devirtualization_info;
+extern void* mono_aot_module_generics_info;
+extern void* mono_aot_module_generics_variant_types_info;
+extern void* mono_aot_module_basic_simd_info;
+/* extern void* mono_aot_module_thread_stress_info; */
+
+
+extern void mono_aot_register_module(void *aot_info);
+extern void mono_aot_init(void);
+extern void mono_jit_set_aot_only(mono_bool aot_only);
+extern MonoDomain * mini_init (const char *filename, const char *runtime_version);
+
+
+void try_one(char *mname) {
+  MonoDomain *domain;
+  MonoAssembly *ma;
+  MonoImage *mi;
+  MonoClass *mc;
+  MonoMethodDesc *mmd;
+  MonoMethod *mm;
+  MonoObject *mo;
+  MonoArray *arg_array;
+  void *args [1];
+  char *cstr_arg = "20";
+
+  mono_jit_set_aot_only(1);
+  domain = mono_jit_init(mname);
+  printf("mono domain: %p\n", domain);
+
+  ma = mono_domain_assembly_open(domain, mname);
+  if (0 == ma) {
+    printf("ERROR: could not open mono assembly\n");
+    exit(-1);
+  }
+  printf("opened mono assembly: %p\n", ma);
+
+  mi = mono_assembly_get_image(ma);
+  printf("mono image: %p\n", mi);
+
+  mo = mono_string_new(domain, cstr_arg);
+  mc = mono_class_from_name(mono_get_corlib(), "System", "String");
+  printf("string class: %p\n", mc);
+  arg_array = mono_array_new(domain, mc, 1);
+  mono_array_setref(arg_array, 0, mo);
+  args[0] = arg_array;
+
+  mmd = mono_method_desc_new("Tests:Main()", 1);
+  mm = mono_method_desc_search_in_image(mmd, mi);
+  if (0 == mm) {
+    mmd = mono_method_desc_new("Tests:Main(string[])", 1);
+    mm = mono_method_desc_search_in_image(mmd, mi);
+    if (0 == mm) {
+      mmd = mono_method_desc_new("SimdTests:Main(string[])", 1);
+      mm = mono_method_desc_search_in_image(mmd, mi);
+      if (0 == mm) {
+        printf("Couldn't find Tests:Main(), Tests:Main(string[]) or SimdTests:Main(string[])\n");
+        exit(-1);
+      }
+    }
+  }
+  printf("mono desc method: %p\n", mmd);
+  printf("mono method: %p\n", mm);
+
+  mo = mono_runtime_invoke(mm, NULL, args, NULL);
+  printf("mono object: %p\n", mo);
+
+  mono_jit_cleanup(domain);
+}
+
+int main(int argc, char *argv[]) {
+  mono_aot_register_module(mono_aot_module_mscorlib_info);
+  mono_aot_register_module(mono_aot_module_TestDriver_info);
+  mono_aot_register_module(mono_aot_module_System_Core_info);
+  mono_aot_register_module(mono_aot_module_System_info);
+  mono_aot_register_module(mono_aot_module_Mono_Posix_info);
+  mono_aot_register_module(mono_aot_module_System_Configuration_info);
+  mono_aot_register_module(mono_aot_module_System_Security_info);
+  mono_aot_register_module(mono_aot_module_System_Xml_info);
+  mono_aot_register_module(mono_aot_module_Mono_Security_info);
+  /*  mono_aot_register_module(mono_aot_module_System_Threading_info); */
+  mono_aot_register_module(mono_aot_module_Mono_Simd_info);
+
+  mono_aot_register_module(mono_aot_module_basic_info);
+  mono_aot_register_module(mono_aot_module_basic_float_info);
+  mono_aot_register_module(mono_aot_module_basic_long_info);
+  mono_aot_register_module(mono_aot_module_basic_calls_info);
+  mono_aot_register_module(mono_aot_module_basic_simd_info);
+  mono_aot_register_module(mono_aot_module_objects_info);
+  mono_aot_register_module(mono_aot_module_arrays_info);
+  mono_aot_register_module(mono_aot_module_basic_math_info);
+  mono_aot_register_module(mono_aot_module_exceptions_info);
+  mono_aot_register_module(mono_aot_module_devirtualization_info);
+  /*
+  mono_aot_register_module(mono_aot_module_generics_info);
+  mono_aot_register_module(mono_aot_module_generics_variant_types_info);
+  */
+
+  /*  mono_aot_register_module(mono_aot_module_thread_stress_info); */
+  if (argc < 2) {
+    printf("no test specified; running basic.exe\n");
+    printf("==========================\n");
+    try_one("basic.exe");
+    printf("==========================\n");
+  } else {
+    printf("\nProgram %s %s output:\n", argv[0], argv[1]);
+    printf("==========================\n\n");
+    try_one(argv[1]);
+  }
+
+  return 0;
+}
index c72b0056bbb7e2f93d5eed9231a114235cb1f29e..5fce0b601bbb5638f1a432319da4517141e80c48 100644 (file)
@@ -528,6 +528,29 @@ class Tests {
                return cctor_count;
        }
 
+       static int cctor_count2 = 0;
+
+       class ServiceController<T> {
+               static ServiceController () {
+                       cctor_count2 ++;
+               }
+
+               public ServiceController () {
+               }
+       }
+
+       static ServiceController<T> Create<T>() {
+               return new ServiceController<T>();
+       }
+
+       // #631409
+       public static int test_2_generic_class_init_gshared_ctor_from_gshared () {
+               Create<object> ();
+               Create<string> ();
+
+               return cctor_count2;
+       }
+
        public static Type get_type<T> () {
                return typeof (T);
        }
index 02e07bde6d5faffe88bb506b14c9dfdb185b31be..0c942afabafd3a8f47fb18c3352781254e16c441 100644 (file)
@@ -43,7 +43,7 @@ typedef struct {
        char spec [MONO_INST_MAX];
 } OpDesc;
 
-static int nacl;
+static int nacl = 0;
 static GHashTable *table;
 static GHashTable *template_table;
 
@@ -75,6 +75,8 @@ load_file (const char *name) {
        line = 0;
        while ((str = fgets (buf, sizeof (buf), f))) {
                gboolean is_template = FALSE;
+               gboolean nacl_length_set = FALSE;
+
                ++line;
                eat_whitespace (str);
                if (!str [0])
@@ -132,14 +134,20 @@ load_file (const char *name) {
                                p += 7;
                                */
                        } else if (strncmp (p, "len:", 4) == 0) {
+                               unsigned long size;
                                p += 4;
-                               desc->spec [MONO_INST_LEN] += strtoul (p, &p, 10);
-                       } else if (strncmp (p, "nacl:", 5) == 0){
+                               size = strtoul (p, &p, 10);
+                               if (!nacl_length_set) {
+                                       desc->spec [MONO_INST_LEN] = size;
+                               }
+                       } else if (strncmp (p, "nacl:", 5) == 0) {
                                unsigned long size;
                                p += 5;
                                size = strtoul (p, &p, 10);
-                               if (nacl)
-                                       desc->spec [MONO_INST_LEN] += size;
+                               if (nacl) {
+                                       desc->spec [MONO_INST_LEN] = size;
+                                       nacl_length_set = TRUE;
+                               }
                        } else if (strncmp (p, "template:", 9) == 0) {
                                char *tname;
                                int i;
@@ -298,7 +306,7 @@ main (int argc, char* argv [])
                return 1;
        } else {
                int i = 3;
-               if (strcmp (argv [1], "--nacl") == 0){
+               if (strcmp (argv [1], "--nacl") == 0) {
                        nacl = 1;
                        i++;
                }
index 2444d9be18c263e0904e1ab2b7260d196a3c7731..7d66e31d76193fdc3cc213a23c7cbd5cd60987c2 100644 (file)
@@ -13,6 +13,8 @@ sub INST_SRC2  () {return 2;}
 sub INST_SRC3  () {return 3;}
 sub INST_LEN   () {return 4;}
 sub INST_CLOB  () {return 5;}
+# making INST_NACL the same as INST_MAX is not a mistake,
+# INST_NACL writes over INST_LEN, it's not its own field
 sub INST_NACL  () {return 6;}
 sub INST_MAX   () {return 6;}
 
@@ -23,6 +25,8 @@ my %table =();
 my %template_table =();
 my @opcodes = ();
 
+my $nacl = 0;
+
 sub parse_file
 {
        my ($define, $file) = @_;
@@ -167,21 +171,22 @@ sub build_spec {
        my $res = "";
        my $n = 0;
        for (my $i = 0; $i < @vals; ++$i) {
+               next if $i == INST_NACL;
                if (defined $vals [$i]) {
                        if ($i == INST_LEN) {
                                $n = $vals [$i];
-                               if (defined $vals [INST_NACL]){
-                                   $n += $vals [INST_NACL];
+                               if ((defined $vals [INST_NACL]) and $nacl == 1){
+                                   $n = $vals [INST_NACL];
                                }
                                $res .= sprintf ("\\x%x\" \"", + $n);
-                       } elsif ($i != INST_NACL) {
+                       } else {
                                if ($vals [$i] =~ /^[a-zA-Z0-9]$/) {
                                        $res .= $vals [$i];
                                } else {
                                        $res .= sprintf ("\\x%x\" \"", $vals [$i]);
                                }
                        }
-               } elsif ($i != INST_NACL) {
+               } else {
                        $res .= "\\x0\" \"";
                }
        }
@@ -221,12 +226,17 @@ sub build_table {
 }
 
 sub usage {
-       die "genmdesc.pl arch srcdir output name desc [desc2 ...]\n";
+       die "genmdesc.pl arch srcdir [--nacl] output name desc [desc2 ...]\n";
 }
 
 my $arch = shift || usage ();
 my $srcdir = shift || usage ();
 my $output = shift || usage ();
+if ($output eq "--nacl")
+{
+  $nacl = 1;  
+  $output = shift || usage();
+}
 my $name = shift || usage ();
 usage () unless @ARGV;
 my @files = @ARGV;
index c5fecf91053629f70180d51dd555b9d0baf0e3ee..ff7e3d8d6f6c30801d6aa74a8b02f6471c360a22 100644 (file)
@@ -53,7 +53,7 @@
  * TARGET_ASM_GAS == GNU assembler
  */
 #if !defined(TARGET_ASM_APPLE) && !defined(TARGET_ASM_GAS)
-#ifdef __MACH__
+#if defined(__MACH__) && !defined(__native_client_codegen__)
 #define TARGET_ASM_APPLE
 #else
 #define TARGET_ASM_GAS
@@ -313,6 +313,11 @@ bin_writer_emit_ensure_buffer (BinSection *section, int size)
                while (new_size <= new_offset)
                        new_size *= 2;
                data = g_malloc0 (new_size);
+#ifdef __native_client_codegen__
+               /* for Native Client, fill empty space with HLT instruction */
+               /* instead of 00.                                           */
+               memset(data, 0xf4, new_size);
+#endif         
                memcpy (data, section->data, section->data_len);
                g_free (section->data);
                section->data = data;
@@ -355,6 +360,22 @@ bin_writer_emit_alignment (MonoImageWriter *acfg, int size)
        }
 }
 
+#ifdef __native_client_codegen__
+static void
+bin_writer_emit_nacl_call_alignment (MonoImageWriter *acfg) {
+  int offset = acfg->cur_section->cur_offset;
+  int padding = kNaClAlignment - (offset & kNaClAlignmentMask) - kNaClLengthOfCallImm;
+  guint8 padc = '\x90';
+
+  if (padding < 0) padding += kNaClAlignment;
+
+  while (padding > 0) {
+    bin_writer_emit_bytes(acfg, &padc, 1);
+    padding -= 1;
+  }
+}
+#endif  /* __native_client_codegen__ */
+
 static void
 bin_writer_emit_pointer_unaligned (MonoImageWriter *acfg, const char *target)
 {
@@ -468,9 +489,9 @@ enum {
        SECT_REL_DYN,
        SECT_RELA_DYN,
        SECT_TEXT,
+       SECT_RODATA,
        SECT_DYNAMIC,
        SECT_GOT_PLT,
-       SECT_RODATA,
        SECT_DATA,
        SECT_BSS,
        SECT_DEBUG_FRAME,
@@ -522,9 +543,9 @@ static SectInfo section_info [] = {
        {".rel.dyn", SHT_REL, sizeof (ElfReloc), 2, SIZEOF_VOID_P},
        {".rela.dyn", SHT_RELA, sizeof (ElfRelocA), 2, SIZEOF_VOID_P},
        {".text", SHT_PROGBITS, 0, 6, 4096},
+       {".rodata", SHT_PROGBITS, 0, SHF_ALLOC, 4096},
        {".dynamic", SHT_DYNAMIC, sizeof (ElfDynamic), 3, SIZEOF_VOID_P},
        {".got.plt", SHT_PROGBITS, SIZEOF_VOID_P, 3, SIZEOF_VOID_P},
-       {".rodata", SHT_PROGBITS, 0, 6, 4096},
        {".data", SHT_PROGBITS, 0, 3, 8},
        {".bss", SHT_NOBITS, 0, 3, 8},
        {".debug_frame", SHT_PROGBITS, 0, 0, 8},
@@ -1040,7 +1061,7 @@ bin_writer_fseek (MonoImageWriter *acfg, int offset)
                acfg->out_buf_pos = offset;
 }
 
-static int normal_sections [] = { SECT_RODATA, SECT_DATA, SECT_DEBUG_FRAME, SECT_DEBUG_INFO, SECT_DEBUG_ABBREV, SECT_DEBUG_LINE, SECT_DEBUG_LOC };
+static int normal_sections [] = { SECT_DATA, SECT_DEBUG_FRAME, SECT_DEBUG_INFO, SECT_DEBUG_ABBREV, SECT_DEBUG_LINE, SECT_DEBUG_LOC };
 
 static int
 bin_writer_emit_writeout (MonoImageWriter *acfg)
@@ -1165,6 +1186,17 @@ bin_writer_emit_writeout (MonoImageWriter *acfg)
                file_offset += size;
        }
 
+       file_offset = ALIGN_TO (file_offset, secth [SECT_RODATA].sh_addralign);
+       virt_offset = file_offset;
+       secth [SECT_RODATA].sh_addr = virt_offset;
+       secth [SECT_RODATA].sh_offset = file_offset;
+       if (sections [SECT_RODATA]) {
+               size = sections [SECT_RODATA]->cur_offset;
+               secth [SECT_RODATA].sh_size = size;
+               file_offset += size;
+               virt_offset += size;
+       }
+
        file_offset = ALIGN_TO (file_offset, secth [SECT_DYNAMIC].sh_addralign);
        virt_offset = file_offset;
 
@@ -1187,17 +1219,6 @@ bin_writer_emit_writeout (MonoImageWriter *acfg)
        file_offset += size;
        virt_offset += size;
 
-       file_offset = ALIGN_TO (file_offset, secth [SECT_RODATA].sh_addralign);
-       virt_offset = ALIGN_TO (virt_offset, secth [SECT_RODATA].sh_addralign);
-       secth [SECT_RODATA].sh_addr = virt_offset;
-       secth [SECT_RODATA].sh_offset = file_offset;
-       if (sections [SECT_RODATA]) {
-               size = sections [SECT_RODATA]->cur_offset;
-               secth [SECT_RODATA].sh_size = size;
-               file_offset += size;
-               virt_offset += size;
-       }
-
        file_offset = ALIGN_TO (file_offset, secth [SECT_DATA].sh_addralign);
        virt_offset = ALIGN_TO (virt_offset, secth [SECT_DATA].sh_addralign);
        secth [SECT_DATA].sh_addr = virt_offset;
@@ -1419,16 +1440,24 @@ bin_writer_emit_writeout (MonoImageWriter *acfg)
                bin_writer_fseek (acfg, secth [SECT_TEXT].sh_offset);
                bin_writer_fwrite (acfg, sections [SECT_TEXT]->data, sections [SECT_TEXT]->cur_offset, 1);
        }
+       /* .rodata */
+       if (sections [SECT_RODATA]) {
+               bin_writer_fseek (acfg, secth [SECT_RODATA].sh_offset);
+               bin_writer_fwrite (acfg, sections [SECT_RODATA]->data, sections [SECT_RODATA]->cur_offset, 1);
+       }
        /* .dynamic */
+       bin_writer_fseek (acfg, secth [SECT_DYNAMIC].sh_offset);
        bin_writer_fwrite (acfg, dynamic, sizeof (dynamic), 1);
 
        /* .got.plt */
        size = secth [SECT_DYNAMIC].sh_addr;
+       bin_writer_fseek (acfg, secth [SECT_GOT_PLT].sh_offset);
        bin_writer_fwrite (acfg, &size, sizeof (size), 1);
 
        /* normal sections */
        for (i = 0; i < sizeof (normal_sections) / sizeof (normal_sections [0]); ++i) {
                int sect = normal_sections [i];
+
                if (sections [sect]) {
                        bin_writer_fseek (acfg, secth [sect].sh_offset);
                        bin_writer_fwrite (acfg, sections [sect]->data, sections [sect]->cur_offset, 1);
@@ -1627,6 +1656,20 @@ asm_writer_emit_alignment (MonoImageWriter *acfg, int size)
 #endif
 }
 
+#ifdef __native_client_codegen__
+static void
+asm_writer_emit_nacl_call_alignment (MonoImageWriter *acfg) {
+  int padding = kNaClAlignment - kNaClLengthOfCallImm;
+  guint8 padc = '\x90';
+
+  fprintf (acfg->fp, "\n\t.align %d", kNaClAlignment);
+  while (padding > 0) {
+    fprintf (acfg->fp, "\n\t.byte %d", padc);
+    padding -= 1;
+  }
+}
+#endif  /* __native_client_codegen__ */
+
 static void
 asm_writer_emit_pointer_unaligned (MonoImageWriter *acfg, const char *target)
 {
@@ -1909,6 +1952,20 @@ img_writer_emit_alignment (MonoImageWriter *acfg, int size)
 #endif
 }
 
+#ifdef __native_client_codegen__
+void
+img_writer_emit_nacl_call_alignment (MonoImageWriter *acfg) {
+#ifdef USE_BIN_WRITER
+       if (acfg->use_bin_writer)
+               bin_writer_emit_nacl_call_alignment (acfg);
+       else
+               asm_writer_emit_nacl_call_alignment (acfg);
+#else
+       g_assert_not_reached();
+#endif
+}
+#endif  /* __native_client_codegen__ */
+
 void
 img_writer_emit_pointer_unaligned (MonoImageWriter *acfg, const char *target)
 {
index 6ad0067157464d1045964213d6631a402aebf2fa..720b95f97ada9c3572ac91578d350d7978234989 100644 (file)
@@ -62,6 +62,10 @@ void img_writer_emit_line (MonoImageWriter *w) MONO_INTERNAL;
 
 void img_writer_emit_alignment (MonoImageWriter *w, int size) MONO_INTERNAL;
 
+#ifdef __native_client_codegen__
+void img_writer_emit_nacl_call_alignment (MonoImageWriter *w) MONO_INTERNAL;
+#endif
+
 void img_writer_emit_pointer_unaligned (MonoImageWriter *w, const char *target) MONO_INTERNAL;
 
 void img_writer_emit_pointer (MonoImageWriter *w, const char *target) MONO_INTERNAL;
index fd1de882efff4dae1fadada00b49555dc741d9f9..81c04514b5abe301205e20bdc9d55a4f17ac1b1e 100644 (file)
@@ -1009,12 +1009,24 @@ mono_create_corlib_exception_2 (guint32 token, MonoString *arg1, MonoString *arg
 MonoObject*
 mono_object_castclass (MonoObject *obj, MonoClass *klass)
 {
+       MonoJitTlsData *jit_tls = NULL;
+
+       if (mini_get_debug_options ()->better_cast_details) {
+               jit_tls = TlsGetValue (mono_jit_tls_id);
+               jit_tls->class_cast_from = NULL;
+       }
+
        if (!obj)
                return NULL;
 
        if (mono_object_isinst (obj, klass))
                return obj;
 
+       if (mini_get_debug_options ()->better_cast_details) {
+               jit_tls->class_cast_from = obj->vtable->klass;
+               jit_tls->class_cast_to = klass;
+       }
+
        mono_raise_exception (mono_exception_from_name (mono_defaults.corlib,
                                        "System", "InvalidCastException"));
 
index 537480bee53afb7ed9bce8b97caf4a5e764c198d..e46bb852cd014837fe473a984438e1f2c61d6a9f 100644 (file)
@@ -2590,6 +2590,71 @@ create_write_barrier_bitmap (MonoClass *klass, unsigned *wb_bitmap, int offset)
        }
 }
 
+static void
+emit_write_barrier (MonoCompile *cfg, MonoInst *ptr, MonoInst *value, int value_reg)
+{
+#ifdef HAVE_SGEN_GC
+       int card_table_shift_bits;
+       gpointer card_table_mask;
+       guint8 *card_table = mono_gc_get_card_table (&card_table_shift_bits, &card_table_mask);
+       MonoInst *dummy_use;
+
+#ifdef MONO_ARCH_HAVE_CARD_TABLE_WBARRIER
+       int nursery_shift_bits;
+       size_t nursery_size;
+
+       mono_gc_get_nursery (&nursery_shift_bits, &nursery_size);
+
+       if (!cfg->compile_aot && card_table && nursery_shift_bits > 0) {
+               MonoInst *wbarrier;
+
+               MONO_INST_NEW (cfg, wbarrier, OP_CARD_TABLE_WBARRIER);
+               wbarrier->sreg1 = ptr->dreg;
+               if (value)
+                       wbarrier->sreg2 = value->dreg;
+               else
+                       wbarrier->sreg2 = value_reg;
+               MONO_ADD_INS (cfg->cbb, wbarrier);
+       } else
+#endif
+       if (card_table) {
+               int offset_reg = alloc_preg (cfg);
+               int card_reg  = alloc_preg (cfg);
+               MonoInst *ins;
+
+               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHR_UN_IMM, offset_reg, ptr->dreg, card_table_shift_bits);
+               if (card_table_mask)
+                       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_PAND_IMM, offset_reg, offset_reg, card_table_mask);
+
+               /*We can't use PADD_IMM since the cardtable might end up in high addresses and amd64 doesn't support
+                * IMM's larger than 32bits.
+                */
+               if (cfg->compile_aot) {
+                       MONO_EMIT_NEW_AOTCONST (cfg, card_reg, NULL, MONO_PATCH_INFO_GC_CARD_TABLE_ADDR);
+               } else {
+                       MONO_INST_NEW (cfg, ins, OP_PCONST);
+                       ins->inst_p0 = card_table;
+                       ins->dreg = card_reg;
+                       MONO_ADD_INS (cfg->cbb, ins);
+               }
+
+               MONO_EMIT_NEW_BIALU (cfg, OP_PADD, offset_reg, offset_reg, card_reg);
+               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREI1_MEMBASE_IMM, offset_reg, 0, 1);
+       } else {
+               MonoMethod *write_barrier = mono_gc_get_write_barrier ();
+               mono_emit_method_call (cfg, write_barrier, &ptr, NULL);
+       }
+
+       if (value) {
+               EMIT_NEW_DUMMY_USE (cfg, dummy_use, value);
+       } else {
+               MONO_INST_NEW (cfg, dummy_use, OP_DUMMY_USE);
+               dummy_use->sreg1 = value_reg;
+               MONO_ADD_INS (cfg->cbb, dummy_use);
+       }
+#endif
+}
+
 static gboolean
 mono_emit_wb_aware_memcpy (MonoCompile *cfg, MonoClass *klass, MonoInst *iargs[4], int size, int align)
 {
@@ -2635,17 +2700,8 @@ mono_emit_wb_aware_memcpy (MonoCompile *cfg, MonoClass *klass, MonoInst *iargs[4
                MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOAD_MEMBASE, tmp_reg, srcreg, offset);
                MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, dest_ptr_reg, 0, tmp_reg);
 
-               if (need_wb & 0x1) {
-                       MonoInst *dummy_use;
-
-                       MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                       mono_emit_method_call (cfg, write_barrier, &iargs [0], NULL);
-
-                       MONO_INST_NEW (cfg, dummy_use, OP_DUMMY_USE);
-                       dummy_use->sreg1 = dest_ptr_reg;
-                       MONO_ADD_INS (cfg->cbb, dummy_use);
-               }
-
+               if (need_wb & 0x1)
+                       emit_write_barrier (cfg, iargs [0], NULL, tmp_reg);
 
                offset += SIZEOF_VOID_P;
                size -= SIZEOF_VOID_P;
@@ -2958,7 +3014,7 @@ mini_emit_check_array_type (MonoCompile *cfg, MonoInst *obj, MonoClass *array_cl
        if (cfg->generic_sharing_context)
                context_used = mono_class_check_context_used (array_class);
 
-       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
+       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
                                       
        if (cfg->opt & MONO_OPT_SHARED) {
                int class_reg = alloc_preg (cfg);
@@ -4151,8 +4207,8 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        type_from_op (ins, NULL, NULL);
 
                        return ins;
-#if !defined(MONO_ARCH_EMULATE_MUL_DIV) && !defined(HAVE_MOVING_COLLECTOR)
-               } else if (strcmp (cmethod->name, "InternalGetHashCode") == 0) {
+#if !defined(MONO_ARCH_EMULATE_MUL_DIV)
+               } else if (strcmp (cmethod->name, "InternalGetHashCode") == 0 && !mono_gc_is_moving ()) {
                        int dreg = alloc_ireg (cfg);
                        int t1 = alloc_ireg (cfg);
        
@@ -4256,7 +4312,10 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                }
        } else if (cmethod->klass == mono_defaults.monitor_class) {
 #if defined(MONO_ARCH_MONITOR_OBJECT_REG)
-               if (strcmp (cmethod->name, "Enter") == 0 && fsig->param_count == 1) {
+               /* The trampolines don't work under SGEN */
+               gboolean is_moving_gc = mono_gc_is_moving ();
+
+               if (strcmp (cmethod->name, "Enter") == 0 && fsig->param_count == 1 && !is_moving_gc) {
                        MonoCallInst *call;
 
                        if (COMPILE_LLVM (cfg)) {
@@ -4273,7 +4332,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        }
 
                        return (MonoInst*)call;
-               } else if (strcmp (cmethod->name, "Exit") == 0) {
+               } else if (strcmp (cmethod->name, "Exit") == 0 && !is_moving_gc) {
                        MonoCallInst *call;
 
                        if (COMPILE_LLVM (cfg)) {
@@ -4431,12 +4490,8 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                g_assert_not_reached ();
                        }
 
-                       if (cfg->gen_write_barriers && is_ref) {
-                               MonoInst *dummy_use;
-                               MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                               mono_emit_method_call (cfg, write_barrier, &args [0], NULL);
-                               EMIT_NEW_DUMMY_USE (cfg, dummy_use, args [1]);
-                       }
+                       if (cfg->gen_write_barriers && is_ref)
+                               emit_write_barrier (cfg, args [0], args [1], -1);
                }
 #endif /* MONO_ARCH_HAVE_ATOMIC_EXCHANGE */
  
@@ -4469,12 +4524,8 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        } else {
                                /* g_assert_not_reached (); */
                        }
-                       if (cfg->gen_write_barriers && is_ref) {
-                               MonoInst *dummy_use;
-                               MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                               mono_emit_method_call (cfg, write_barrier, &args [0], NULL);
-                               EMIT_NEW_DUMMY_USE (cfg, dummy_use, args [1]);
-                       }
+                       if (cfg->gen_write_barriers && is_ref)
+                               emit_write_barrier (cfg, args [0], args [1], -1);
                }
 #endif /* MONO_ARCH_HAVE_ATOMIC_CAS */
 
@@ -4528,7 +4579,7 @@ mini_redirect_call (MonoCompile *cfg, MonoMethod *method,
 {
        if (method->klass == mono_defaults.string_class) {
                /* managed string allocation support */
-               if (strcmp (method->name, "InternalAllocateStr") == 0 && !(mono_profiler_events & MONO_PROFILE_ALLOCATIONS)) {
+               if (strcmp (method->name, "InternalAllocateStr") == 0 && !(mono_profiler_events & MONO_PROFILE_ALLOCATIONS) && !(cfg->opt & MONO_OPT_SHARED)) {
                        MonoInst *iargs [2];
                        MonoVTable *vtable = mono_class_vtable (cfg->domain, method->klass);
                        MonoMethod *managed_alloc = NULL;
@@ -4686,6 +4737,12 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
                return 0;
        }
 
+       /*Must verify before creating locals as it can cause the JIT to assert.*/
+       if (mono_compile_is_broken (cfg, cmethod, FALSE)) {
+               mono_metadata_free_mh (cheader);
+               return 0;
+       }
+
        /* allocate space to store the return value */
        if (!MONO_TYPE_IS_VOID (fsig->ret)) {
                rvar = mono_compile_create_var (cfg, fsig->ret, OP_LOCAL);
@@ -5386,9 +5443,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                dont_verify_stloc = TRUE;
        }
 
-       if (!dont_verify && mini_method_verify (cfg, method_definition))
-               goto exception_exit;
-
        if (mono_debug_using_mono_debugger ())
                cfg->keep_cil_nops = TRUE;
 
@@ -5446,6 +5500,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                cfg->bb_exit = end_bblock;
                end_bblock->cil_code = NULL;
                end_bblock->cil_length = 0;
+               end_bblock->flags |= BB_INDIRECT_JUMP_TARGET;
                g_assert (cfg->num_bblocks == 2);
 
                arg_array = cfg->args;
@@ -6130,7 +6185,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        /* FIXME: check the signature matches */
                        cmethod = mini_get_method (cfg, method, token, NULL, generic_context);
 
-                       if (!cmethod)
+                       if (!cmethod || mono_loader_get_last_error ())
                                goto load_error;
  
                        if (cfg->generic_sharing_context && mono_method_check_context_used (cmethod))
@@ -6244,7 +6299,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        cil_method = cmethod;
                                }
 
-                               if (!cmethod)
+                               if (!cmethod || mono_loader_get_last_error ())
                                        goto load_error;
                                if (!dont_verify && !cfg->skip_visibility) {
                                        MonoMethod *target_method = cil_method;
@@ -6454,8 +6509,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                vtable_arg = emit_get_rgctx_method (cfg, context_used, cmethod, MONO_RGCTX_INFO_METHOD_RGCTX);
 
-                               if (!(cmethod->flags & METHOD_ATTRIBUTE_VIRTUAL) ||
-                                               MONO_METHOD_IS_FINAL (cmethod)) {
+                               /* !marshalbyref is needed to properly handle generic methods + remoting */
+                               if ((!(cmethod->flags & METHOD_ATTRIBUTE_VIRTUAL) ||
+                                        MONO_METHOD_IS_FINAL (cmethod)) &&
+                                       !cmethod->klass->marshalbyref) {
                                        if (virtual)
                                                check_this = TRUE;
                                        virtual = 0;
@@ -7051,11 +7108,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        target = ip + n * sizeof (guint32);
 
                        GET_BBLOCK (cfg, default_bblock, target);
+                       default_bblock->flags |= BB_INDIRECT_JUMP_TARGET;
 
                        targets = mono_mempool_alloc (cfg->mempool, sizeof (MonoBasicBlock*) * n);
                        for (i = 0; i < n; ++i) {
                                GET_BBLOCK (cfg, tblock, target + (gint32)read32(ip));
                                targets [i] = tblock;
+                               targets [i]->flags |= BB_INDIRECT_JUMP_TARGET;
                                ip += 4;
                        }
 
@@ -7184,13 +7243,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        ins_flag = 0;
                        MONO_ADD_INS (bblock, ins);
 
-                       if (cfg->gen_write_barriers && *ip == CEE_STIND_REF && method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER && !((sp [1]->opcode == OP_PCONST) && (sp [1]->inst_p0 == 0))) {
-                               MonoInst *dummy_use;
-                               /* insert call to write barrier */
-                               MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                               mono_emit_method_call (cfg, write_barrier, sp, NULL);
-                               EMIT_NEW_DUMMY_USE (cfg, dummy_use, sp [1]);
-                       }
+                       if (cfg->gen_write_barriers && *ip == CEE_STIND_REF && method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER && !((sp [1]->opcode == OP_PCONST) && (sp [1]->inst_p0 == 0)))
+                               emit_write_barrier (cfg, sp [0], sp [1], -1);
 
                        inline_costs += 1;
                        ++ip;
@@ -7393,12 +7447,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                store->flags |= ins_flag;
                                MONO_ADD_INS (cfg->cbb, store);
 
-                               if (cfg->gen_write_barriers && cfg->method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER) {
-                                       MonoInst *dummy_use;
-                                       MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                                       mono_emit_method_call (cfg, write_barrier, sp, NULL);
-                                       EMIT_NEW_DUMMY_USE (cfg, dummy_use, sp [1]);
-                               }
+                               if (cfg->gen_write_barriers && cfg->method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER)
+                                       emit_write_barrier (cfg, sp [0], sp [1], -1);
                        } else {
                                mini_emit_stobj (cfg, sp [0], sp [1], klass, FALSE);
                        }
@@ -7539,7 +7589,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        CHECK_OPSIZE (5);
                        token = read32 (ip + 1);
                        cmethod = mini_get_method (cfg, method, token, NULL, generic_context);
-                       if (!cmethod)
+                       if (!cmethod || mono_loader_get_last_error ())
                                goto load_error;
                        fsig = mono_method_get_signature (cmethod, image, token);
                        if (!fsig)
@@ -7561,6 +7611,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ensure_method_is_allowed_to_call_method (cfg, method, cmethod, bblock, ip);
                        }
 
+                       if (cfg->generic_sharing_context && cmethod && cmethod->klass != method->klass && cmethod->klass->generic_class && mono_method_is_generic_sharable_impl (cmethod, TRUE) && mono_class_needs_cctor_run (cmethod->klass, method)) {
+                               emit_generic_class_init (cfg, cmethod->klass);
+                               CHECK_TYPELOAD (cmethod->klass);
+                       }
+
                        if (cmethod->klass->valuetype && mono_class_generic_sharing_enabled (cmethod->klass) &&
                                        mono_method_is_generic_sharable_impl (cmethod, TRUE)) {
                                if (cmethod->is_inflated && mono_method_get_context (cmethod)->method_inst) {
@@ -7963,40 +8018,75 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        if (target_type_is_incompatible (cfg, &klass->byval_arg, *sp))
                                UNVERIFIED;
                        /* frequent check in generic code: box (struct), brtrue */
+
+                       // FIXME: LLVM can't handle the inconsistent bb linking
                        if (!mono_class_is_nullable (klass) &&
-                               ip + 5 < end && ip_in_bb (cfg, bblock, ip + 5) && (ip [5] == CEE_BRTRUE || ip [5] == CEE_BRTRUE_S)) {
-                               /*printf ("box-brtrue opt at 0x%04x in %s\n", real_offset, method->name);*/
+                               ip + 5 < end && ip_in_bb (cfg, bblock, ip + 5) &&
+                               (ip [5] == CEE_BRTRUE || 
+                                ip [5] == CEE_BRTRUE_S ||
+                                ip [5] == CEE_BRFALSE ||
+                                ip [5] == CEE_BRFALSE_S)) {
+                               gboolean is_true = ip [5] == CEE_BRTRUE || ip [5] == CEE_BRTRUE_S;
+                               int dreg;
+                               MonoBasicBlock *true_bb, *false_bb;
+
                                ip += 5;
-                               MONO_INST_NEW (cfg, ins, OP_BR);
-                               if (*ip == CEE_BRTRUE_S) {
+
+                               if (cfg->verbose_level > 3) {
+                                       printf ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
+                                       printf ("<box+brtrue opt>\n");
+                               }
+
+                               switch (*ip) {
+                               case CEE_BRTRUE_S:
+                               case CEE_BRFALSE_S:
                                        CHECK_OPSIZE (2);
                                        ip++;
                                        target = ip + 1 + (signed char)(*ip);
                                        ip++;
-                               } else {
+                                       break;
+                               case CEE_BRTRUE:
+                               case CEE_BRFALSE:
                                        CHECK_OPSIZE (5);
                                        ip++;
                                        target = ip + 4 + (gint)(read32 (ip));
                                        ip += 4;
+                                       break;
+                               default:
+                                       g_assert_not_reached ();
                                }
-                               GET_BBLOCK (cfg, tblock, target);
-                               link_bblock (cfg, bblock, tblock);
-                               ins->inst_target_bb = tblock;
-                               GET_BBLOCK (cfg, tblock, ip);
+
                                /* 
-                                * This leads to some inconsistency, since the two bblocks are 
-                                * not really connected, but it is needed for handling stack 
+                                * We need to link both bblocks, since it is needed for handling stack
                                 * arguments correctly (See test_0_box_brtrue_opt_regress_81102).
-                                * FIXME: This should only be needed if sp != stack_start, but that
-                                * doesn't work for some reason (test failure in mcs/tests on x86).
+                                * Branching to only one of them would lead to inconsistencies, so
+                                * generate an ICONST+BRTRUE, the branch opts will get rid of them.
                                 */
-                               link_bblock (cfg, bblock, tblock);
+                               GET_BBLOCK (cfg, true_bb, target);
+                               GET_BBLOCK (cfg, false_bb, ip);
+
+                               mono_link_bblock (cfg, cfg->cbb, true_bb);
+                               mono_link_bblock (cfg, cfg->cbb, false_bb);
+
                                if (sp != stack_start) {
                                        handle_stack_args (cfg, stack_start, sp - stack_start);
                                        sp = stack_start;
                                        CHECK_UNVERIFIABLE (cfg);
                                }
-                               MONO_ADD_INS (bblock, ins);
+
+                               if (COMPILE_LLVM (cfg)) {
+                                       dreg = alloc_ireg (cfg);
+                                       MONO_EMIT_NEW_ICONST (cfg, dreg, 0);
+                                       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, dreg, is_true ? 0 : 1);
+
+                                       MONO_EMIT_NEW_BRANCH_BLOCK2 (cfg, OP_IBEQ, true_bb, false_bb);
+                               } else {
+                                       /* The JIT can't eliminate the iconst+compare */
+                                       MONO_INST_NEW (cfg, ins, OP_BR);
+                                       ins->inst_target_bb = is_true ? true_bb : false_bb;
+                                       MONO_ADD_INS (cfg->cbb, ins);
+                               }
+
                                start_new_bblock = 1;
                                break;
                        }
@@ -8113,16 +8203,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                if (cfg->gen_write_barriers && mini_type_to_stind (cfg, field->type) == CEE_STIND_REF && !(sp [1]->opcode == OP_PCONST && sp [1]->inst_c0 == 0)) {
                                        /* insert call to write barrier */
-                                       MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                                       MonoInst *iargs [2], *dummy_use;
+                                       MonoInst *ptr;
                                        int dreg;
 
                                        dreg = alloc_preg (cfg);
-                                       EMIT_NEW_BIALU_IMM (cfg, iargs [0], OP_PADD_IMM, dreg, sp [0]->dreg, foffset);
-                                       iargs [1] = sp [1];
-                                       mono_emit_method_call (cfg, write_barrier, iargs, NULL);
-
-                                       EMIT_NEW_DUMMY_USE (cfg, dummy_use, sp [1]);
+                                       EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, sp [0]->dreg, foffset);
+                                       emit_write_barrier (cfg, ptr, sp [1], -1);
                                }
 
                                        store->flags |= ins_flag;
@@ -8171,9 +8257,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        sp [0] = ins;
                                }
 
-                               MONO_EMIT_NULL_CHECK (cfg, sp [0]->dreg);
-
                                if (*ip == CEE_LDFLDA) {
+                                       if (sp [0]->type == STACK_OBJ) {
+                                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, sp [0]->dreg, 0);
+                                               MONO_EMIT_NEW_COND_EXC (cfg, EQ, "NullReferenceException");
+                                       }
+
                                        dreg = alloc_preg (cfg);
 
                                        EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, dreg, sp [0]->dreg, foffset);
@@ -8183,6 +8272,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                } else {
                                        MonoInst *load;
 
+                                       MONO_EMIT_NULL_CHECK (cfg, sp [0]->dreg);
+
                                        EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, load, field->type, sp [0]->dreg, foffset);
                                        load->flags |= ins_flag;
                                        if (sp [0]->opcode != OP_LDADDR)
@@ -8443,16 +8534,22 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        case MONO_TYPE_U:
                                        case MONO_TYPE_PTR:
                                        case MONO_TYPE_FNPTR:
-#ifndef HAVE_MOVING_COLLECTOR
+                                               EMIT_NEW_PCONST (cfg, *sp, *((gpointer *)addr));
+                                               type_to_eval_stack_type ((cfg), field->type, *sp);
+                                               sp++;
+                                               break;
                                        case MONO_TYPE_STRING:
                                        case MONO_TYPE_OBJECT:
                                        case MONO_TYPE_CLASS:
                                        case MONO_TYPE_SZARRAY:
                                        case MONO_TYPE_ARRAY:
-#endif
-                                               EMIT_NEW_PCONST (cfg, *sp, *((gpointer *)addr));
-                                               type_to_eval_stack_type ((cfg), field->type, *sp);
-                                               sp++;
+                                               if (!mono_gc_is_moving ()) {
+                                                       EMIT_NEW_PCONST (cfg, *sp, *((gpointer *)addr));
+                                                       type_to_eval_stack_type ((cfg), field->type, *sp);
+                                                       sp++;
+                                               } else {
+                                                       is_const = FALSE;
+                                               }
                                                break;
                                        case MONO_TYPE_I8:
                                        case MONO_TYPE_U8:
@@ -8494,11 +8591,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        EMIT_NEW_STORE_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, sp [0]->dreg, 0, sp [1]->dreg);
                        if (cfg->gen_write_barriers && cfg->method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER &&
                                        generic_class_is_reference_type (cfg, klass)) {
-                               MonoInst *dummy_use;
                                /* insert call to write barrier */
-                               MonoMethod *write_barrier = mono_gc_get_write_barrier ();
-                               mono_emit_method_call (cfg, write_barrier, sp, NULL);
-                               EMIT_NEW_DUMMY_USE (cfg, dummy_use, sp [1]);
+                               emit_write_barrier (cfg, sp [0], sp [1], -1);
                        }
                        ins_flag = 0;
                        ip += 5;
@@ -9521,7 +9615,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                CHECK_OPSIZE (6);
                                n = read32 (ip + 2);
                                cmethod = mini_get_method (cfg, method, n, NULL, generic_context);
-                               if (!cmethod)
+                               if (!cmethod || mono_loader_get_last_error ())
                                        goto load_error;
                                mono_class_init (cmethod->klass);
 
@@ -9595,7 +9689,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                CHECK_OPSIZE (6);
                                n = read32 (ip + 2);
                                cmethod = mini_get_method (cfg, method, n, NULL, generic_context);
-                               if (!cmethod)
+                               if (!cmethod || mono_loader_get_last_error ())
                                        goto load_error;
                                mono_class_init (cmethod->klass);
  
index 9fdbb505177fe2cd42f672f752f78fe049eb0576..40d6e4cec80977eaf908c262c4e1616439e632b2 100644 (file)
@@ -288,8 +288,6 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code);
 
 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS 1
 
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
-
 #define MONO_ARCH_EMULATE_CONV_R8_UN     1
 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
 //#define MONO_ARCH_EMULATE_LCONV_TO_R8    1
index 20fa9cd1d092a8915f6785954275e114e4edebbe..2dcd2d0e9d42a54c83208a55d130f65304b6d892 100644 (file)
@@ -6902,41 +6902,6 @@ mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guin
        return can_write;
 }
 
-gpointer
-mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
-{
-       guint8 buf [10];
-       gint32 disp;
-       MonoJitInfo *ji = NULL;
-
-#ifdef ENABLE_LLVM
-       /* code - 9 might be before the start of the method */
-       /* FIXME: Avoid this expensive call somehow */
-       ji = mono_jit_info_table_find (mono_domain_get (), (char*)code);
-#endif
-
-       mono_breakpoint_clean_code (ji ? ji->code_start : NULL, code, 9, buf, sizeof (buf));
-       code = buf + 9;
-
-       *displacement = 0;
-
-       code -= 7;
-
-       /*
-        * This function is no longer used, the only caller is
-        * mono_arch_nullify_class_init_trampoline ().
-        */
-       if ((code [0] == 0x41) && (code [1] == 0xff) && (code [2] == 0x15)) {
-               /* call OFFSET(%rip) */
-               g_assert_not_reached ();
-               *displacement = *(guint32*)(code + 3);
-               return (gpointer*)(code + disp + 7);
-       } else {
-               g_assert_not_reached ();
-               return NULL;
-       }
-}
-
 int
 mono_arch_get_this_arg_reg (MonoMethodSignature *sig, MonoGenericSharingContext *gsctx, guint8 *code)
 {
index 9c32c31256445c0a2af9e203012c242caed76f34..becdaaa39ec0a1883a48d8be6d9c04364c65c2d0 100644 (file)
@@ -334,7 +334,6 @@ typedef struct {
 #define MONO_ARCH_ENABLE_REGALLOC_IN_EH_BLOCKS 1
 #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_ATOMIC_ADD 1
 #define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
@@ -359,7 +358,7 @@ typedef struct {
 #define MONO_ARCH_HAVE_LIVERANGE_OPS 1
 #define MONO_ARCH_HAVE_XP_UNWIND 1
 #define MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX 1
-#if !defined(HOST_WIN32) && !defined(HAVE_MOVING_COLLECTOR)
+#if !defined(HOST_WIN32)
 #define MONO_ARCH_MONITOR_OBJECT_REG MONO_AMD64_ARG_REG1
 #endif
 #define MONO_ARCH_HAVE_STATIC_RGCTX_TRAMPOLINE 1
index 7ef17e2f23194f36e9d1489594c712da3f7e3ec4..085e8867a26456ae9dedc190feb5579472fc6836 100644 (file)
@@ -306,15 +306,6 @@ mono_arch_get_argument_info (MonoMethodSignature *csig, int param_count, MonoJit
        return frame_size;
 }
 
-gpointer
-mono_arch_get_vcall_slot (guint8 *code_ptr, mgreg_t *regs, int *displacement)
-{
-       /* Not used on ARM */
-       g_assert_not_reached ();
-
-       return NULL;
-}
-
 #define MAX_ARCH_DELEGATE_PARAMS 3
 
 static gpointer
index cd9e5057f07d98cefa1584366397788528448f93..eb270115373afa4e8ac7cd3611e9b576c2993509 100644 (file)
@@ -146,7 +146,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_USE_SIGACTION 1
 #define MONO_ARCH_NEED_DIV_CHECK 1
 
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
 #define MONO_ARCH_HAVE_XP_UNWIND 1
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
index 7a1476fbb5ded54194a8e9a24aac6dde608a6348..63374fae0b8a3e0632fe95cca3f260c22ec6f8dd 100644 (file)
@@ -670,10 +670,11 @@ insert_after_ins (MonoBasicBlock *bb, MonoInst *ins, MonoInst **last, MonoInst*
 }
 
 /*
- * Force the spilling of the variable in the symbolic register 'reg'.
+ * Force the spilling of the variable in the symbolic register 'reg', and free 
+ * the hreg it was assigned to.
  */
-static int
-get_register_force_spilling (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, MonoInst *ins, int reg, int bank)
+static void
+spill_vreg (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, MonoInst *ins, int reg, int bank)
 {
        MonoInst *load;
        int i, sel, spill;
@@ -708,7 +709,10 @@ get_register_force_spilling (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **la
                i = mono_regstate_alloc_int (rs, regmask (sel));
        g_assert (i == sel);
 
-       return sel;
+       if (G_UNLIKELY (bank))
+               mono_regstate_free_general (rs, sel, bank);
+       else
+               mono_regstate_free_int (rs, sel);
 }
 
 /* This isn't defined on older glib versions and on some platforms */
@@ -799,22 +803,25 @@ get_register_spilling (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, Mo
        return sel;
 }
 
+/*
+ * free_up_hreg:
+ *
+ *   Free up the hreg HREG by spilling the vreg allocated to it.
+ */
 static void
-free_up_reg (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, MonoInst *ins, int hreg, int bank)
+free_up_hreg (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, MonoInst *ins, int hreg, int bank)
 {
        if (G_UNLIKELY (bank)) {
                if (!(cfg->rs->free_mask [1] & (regmask (hreg)))) {
                        bank = translate_bank (cfg->rs, bank, hreg);
                        DEBUG (printf ("\tforced spill of R%d\n", cfg->rs->symbolic [bank] [hreg]));
-                       get_register_force_spilling (cfg, bb, last, ins, cfg->rs->symbolic [bank] [hreg], bank);
-                       mono_regstate_free_general (cfg->rs, hreg, bank);
+                       spill_vreg (cfg, bb, last, ins, cfg->rs->symbolic [bank] [hreg], bank);
                }
        }
        else {
                if (!(cfg->rs->ifree_mask & (regmask (hreg)))) {
                        DEBUG (printf ("\tforced spill of R%d\n", cfg->rs->isymbolic [hreg]));
-                       get_register_force_spilling (cfg, bb, last, ins, cfg->rs->isymbolic [hreg], bank);
-                       mono_regstate_free_int (cfg->rs, hreg);
+                       spill_vreg (cfg, bb, last, ins, cfg->rs->isymbolic [hreg], bank);
                }
        }
 }
@@ -1267,125 +1274,166 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                for (j = 1; j < num_sregs; ++j) {
                        int sreg = sregs [j];
                        int dest_sreg = dest_sregs [j];
-                       if (dest_sreg != -1) {
-                               if (rs->ifree_mask & (regmask (dest_sreg))) {
-                                       if (is_global_ireg (sreg)) {
-                                               int k;
+
+                       if (dest_sreg == -1)
+                               continue;
+
+                       if (j == 2) {
+                               int k;
+
+                               /*
+                                * CAS.
+                                * We need to special case this, since on x86, there are only 3
+                                * free registers, and the code below assigns one of them to
+                                * sreg, so we can run out of registers when trying to assign
+                                * dreg. Instead, we just set up the register masks, and let the
+                                * normal sreg2 assignment code handle this. It would be nice to
+                                * do this for all the fixed reg cases too, but there is too much
+                                * risk of breakage.
+                                */
+
+                               /* Make sure sreg will be assigned to dest_sreg, and the other sregs won't */
+                               sreg_masks [j] = regmask (dest_sreg);
+                               for (k = 0; k < num_sregs; ++k) {
+                                       if (k != j)
+                                               sreg_masks [k] &= ~ (regmask (dest_sreg));
+                               }                                               
+
+                               /*
+                                * Spill sreg1/2 if they are assigned to dest_sreg.
+                                */
+                               for (k = 0; k < num_sregs; ++k) {
+                                       if (k != j && is_soft_reg (sregs [k], 0) && rs->vassign [sregs [k]] == dest_sreg)
+                                               free_up_hreg (cfg, bb, tmp, ins, dest_sreg, 0);
+                               }
+
+                               /*
+                                * We can also run out of registers while processing sreg2 if sreg3 is
+                                * assigned to another hreg, so spill sreg3 now.
+                                */
+                               if (is_soft_reg (sreg, 0) && rs->vassign [sreg] >= 0 && rs->vassign [sreg] != dest_sreg) {
+                                       spill_vreg (cfg, bb, tmp, ins, sreg, 0);
+                               }
+                               continue;
+                       }
+
+                       if (rs->ifree_mask & (regmask (dest_sreg))) {
+                               if (is_global_ireg (sreg)) {
+                                       int k;
+                                       /* Argument already in hard reg, need to copy */
+                                       MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sreg, sreg, NULL, ip, 0);
+                                       insert_before_ins (bb, ins, copy);
+                                       for (k = 0; k < num_sregs; ++k) {
+                                               if (k != j)
+                                                       sreg_masks [k] &= ~ (regmask (dest_sreg));
+                                       }
+                               } else {
+                                       val = rs->vassign [sreg];
+                                       if (val == -1) {
+                                               DEBUG (printf ("\tshortcut assignment of R%d to %s\n", sreg, mono_arch_regname (dest_sreg)));
+                                               assign_reg (cfg, rs, sreg, dest_sreg, 0);
+                                       } else if (val < -1) {
+                                               /* FIXME: */
+                                               g_assert_not_reached ();
+                                       } else {
                                                /* Argument already in hard reg, need to copy */
-                                               MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sreg, sreg, NULL, ip, 0);
+                                               MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sreg, val, NULL, ip, 0);
+                                               int k;
+
                                                insert_before_ins (bb, ins, copy);
                                                for (k = 0; k < num_sregs; ++k) {
                                                        if (k != j)
                                                                sreg_masks [k] &= ~ (regmask (dest_sreg));
                                                }
+                                               /* 
+                                                * Prevent the dreg from being allocate to dest_sreg 
+                                                * too, since it could force sreg1 to be allocated to 
+                                                * the same reg on x86.
+                                                */
+                                               dreg_mask &= ~ (regmask (dest_sreg));
                                        }
-                                       else {
-                                               val = rs->vassign [sreg];
-                                               if (val == -1) {
-                                                       DEBUG (printf ("\tshortcut assignment of R%d to %s\n", sreg, mono_arch_regname (dest_sreg)));
-                                                       assign_reg (cfg, rs, sreg, dest_sreg, 0);
-                                               } else if (val < -1) {
-                                                       /* FIXME: */
-                                                       g_assert_not_reached ();
-                                               } else {
-                                                       /* Argument already in hard reg, need to copy */
-                                                       MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sreg, val, NULL, ip, 0);
-                                                       int k;
-
-                                                       insert_before_ins (bb, ins, copy);
-                                                       for (k = 0; k < num_sregs; ++k) {
-                                                               if (k != j)
-                                                                       sreg_masks [k] &= ~ (regmask (dest_sreg));
-                                                       }
-                                                       /* 
-                                                        * Prevent the dreg from being allocate to dest_sreg 
-                                                        * too, since it could force sreg1 to be allocated to 
-                                                        * the same reg on x86.
-                                                        */
-                                                       dreg_mask &= ~ (regmask (dest_sreg));
-                                               }
-                                       }
-                               } else {
-                                       gboolean need_spill = TRUE;
-                                       gboolean need_assign = TRUE;
-                                       int k;
-
-                                       dreg_mask &= ~ (regmask (dest_sreg));
-                                       for (k = 0; k < num_sregs; ++k) {
-                                               if (k != j)
-                                                       sreg_masks [k] &= ~ (regmask (dest_sreg));
-                                       }
+                               }
+                       } else {
+                               gboolean need_spill = TRUE;
+                               gboolean need_assign = TRUE;
+                               int k;
+
+                               dreg_mask &= ~ (regmask (dest_sreg));
+                               for (k = 0; k < num_sregs; ++k) {
+                                       if (k != j)
+                                               sreg_masks [k] &= ~ (regmask (dest_sreg));
+                               }
 
+                               /* 
+                                * First check if dreg is assigned to dest_sreg2, since we
+                                * can't spill a dreg.
+                                */
+                               if (spec [MONO_INST_DEST])
+                                       val = rs->vassign [ins->dreg];
+                               else
+                                       val = -1;
+                               if (val == dest_sreg && ins->dreg != sreg) {
                                        /* 
-                                        * First check if dreg is assigned to dest_sreg2, since we
-                                        * can't spill a dreg.
+                                        * the destination register is already assigned to 
+                                        * dest_sreg2: we need to allocate another register for it 
+                                        * and then copy from this to dest_sreg2.
                                         */
-                                       val = rs->vassign [ins->dreg];
-                                       if (val == dest_sreg && ins->dreg != sreg) {
-                                               /* 
-                                                * the destination register is already assigned to 
-                                                * dest_sreg2: we need to allocate another register for it 
-                                                * and then copy from this to dest_sreg2.
-                                                */
-                                               int new_dest;
-                                               new_dest = alloc_int_reg (cfg, bb, tmp, ins, dreg_mask, ins->dreg, &reginfo [ins->dreg]);
-                                               g_assert (new_dest >= 0);
-                                               DEBUG (printf ("\tchanging dreg R%d to %s from %s\n", ins->dreg, mono_arch_regname (new_dest), mono_arch_regname (dest_sreg)));
-
-                                               prev_dreg = ins->dreg;
-                                               assign_reg (cfg, rs, ins->dreg, new_dest, 0);
-                                               clob_dreg = ins->dreg;
-                                               create_copy_ins (cfg, bb, tmp, dest_sreg, new_dest, ins, ip, 0);
-                                               mono_regstate_free_int (rs, dest_sreg);
-                                               need_spill = FALSE;
-                                       }
+                                       int new_dest;
+                                       new_dest = alloc_int_reg (cfg, bb, tmp, ins, dreg_mask, ins->dreg, &reginfo [ins->dreg]);
+                                       g_assert (new_dest >= 0);
+                                       DEBUG (printf ("\tchanging dreg R%d to %s from %s\n", ins->dreg, mono_arch_regname (new_dest), mono_arch_regname (dest_sreg)));
+
+                                       prev_dreg = ins->dreg;
+                                       assign_reg (cfg, rs, ins->dreg, new_dest, 0);
+                                       clob_dreg = ins->dreg;
+                                       create_copy_ins (cfg, bb, tmp, dest_sreg, new_dest, ins, ip, 0);
+                                       mono_regstate_free_int (rs, dest_sreg);
+                                       need_spill = FALSE;
+                               }
 
-                                       if (is_global_ireg (sreg)) {
-                                               MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sreg, sreg, NULL, ip, 0);
-                                               insert_before_ins (bb, ins, copy);
-                                               need_assign = FALSE;
-                                       }
-                                       else {
-                                               val = rs->vassign [sreg];
-                                               if (val == dest_sreg) {
-                                                       /* sreg2 is already assigned to the correct register */
-                                                       need_spill = FALSE;
-                                               } else if (val < -1) {
-                                                       /* sreg2 is spilled, it can be assigned to dest_sreg2 */
-                                               } else if (val >= 0) {
-                                                       /* sreg2 already assigned to another register */
-                                                       /*
-                                                        * We couldn't emit a copy from val to dest_sreg2, because
-                                                        * val might be spilled later while processing this 
-                                                        * instruction. So we spill sreg2 so it can be allocated to
-                                                        * dest_sreg2.
-                                                        */
-                                                       DEBUG (printf ("\tforced spill of R%d\n", sreg));
-                                                       free_up_reg (cfg, bb, tmp, ins, val, 0);
-                                               }
+                               if (is_global_ireg (sreg)) {
+                                       MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sreg, sreg, NULL, ip, 0);
+                                       insert_before_ins (bb, ins, copy);
+                                       need_assign = FALSE;
+                               }
+                               else {
+                                       val = rs->vassign [sreg];
+                                       if (val == dest_sreg) {
+                                               /* sreg2 is already assigned to the correct register */
+                                               need_spill = FALSE;
+                                       } else if (val < -1) {
+                                               /* sreg2 is spilled, it can be assigned to dest_sreg2 */
+                                       } else if (val >= 0) {
+                                               /* sreg2 already assigned to another register */
+                                               /*
+                                                * We couldn't emit a copy from val to dest_sreg2, because
+                                                * val might be spilled later while processing this 
+                                                * instruction. So we spill sreg2 so it can be allocated to
+                                                * dest_sreg2.
+                                                */
+                                               free_up_hreg (cfg, bb, tmp, ins, val, 0);
                                        }
+                               }
 
-                                       if (need_spill) {
-                                               DEBUG (printf ("\tforced spill of R%d\n", rs->isymbolic [dest_sreg]));
-                                               free_up_reg (cfg, bb, tmp, ins, dest_sreg, 0);
-                                       }
+                               if (need_spill) {
+                                       free_up_hreg (cfg, bb, tmp, ins, dest_sreg, 0);
+                               }
 
-                                       if (need_assign) {
-                                               if (rs->vassign [sreg] < -1) {
-                                                       MonoInst *store;
-                                                       int spill;
+                               if (need_assign) {
+                                       if (rs->vassign [sreg] < -1) {
+                                               MonoInst *store;
+                                               int spill;
 
-                                                       /* Need to emit a spill store */
-                                                       spill = - rs->vassign [sreg] - 1;
-                                                       store = create_spilled_store (cfg, bb, spill, dest_sreg, sreg, tmp, NULL, bank);
-                                                       insert_before_ins (bb, ins, store);
-                                               }
-                                               /* force-set sreg2 */
-                                               assign_reg (cfg, rs, sregs [j], dest_sreg, 0);
+                                               /* Need to emit a spill store */
+                                               spill = - rs->vassign [sreg] - 1;
+                                               store = create_spilled_store (cfg, bb, spill, dest_sreg, sreg, tmp, NULL, bank);
+                                               insert_before_ins (bb, ins, store);
                                        }
+                                       /* force-set sreg2 */
+                                       assign_reg (cfg, rs, sregs [j], dest_sreg, 0);
                                }
-                               sregs [j] = dest_sreg;
                        }
+                       sregs [j] = dest_sreg;
                }
                mono_inst_set_src_registers (ins, sregs);
 
@@ -1412,8 +1460,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                        val = rs->vassign [ins->dreg];
                        if (is_soft_reg (ins->dreg, bank) && (val >= 0) && (!(regmask (val) & dreg_mask))) {
                                /* DREG is already allocated to a register needed for sreg1 */
-                               get_register_force_spilling (cfg, bb, tmp, ins, ins->dreg, 0);
-                               mono_regstate_free_int (rs, val);
+                           spill_vreg (cfg, bb, tmp, ins, ins->dreg, 0);
                        }
                }
 
@@ -1428,13 +1475,13 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
 
                        if (dest_dreg != -1) {
                                if (rs->vassign [ins->dreg] != dest_dreg)
-                                       free_up_reg (cfg, bb, tmp, ins, dest_dreg, 0);
+                                       free_up_hreg (cfg, bb, tmp, ins, dest_dreg, 0);
 
                                dreg2 = ins->dreg + 1;
                                dest_dreg2 = MONO_ARCH_INST_REGPAIR_REG2 (spec_dest, dest_dreg);
                                if (dest_dreg2 != -1) {
                                        if (rs->vassign [dreg2] != dest_dreg2)
-                                               free_up_reg (cfg, bb, tmp, ins, dest_dreg2, 0);
+                                               free_up_hreg (cfg, bb, tmp, ins, dest_dreg2, 0);
                                }
                        }
                }
@@ -1554,11 +1601,11 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                                 */
                                int translated_bank = translate_bank (cfg->rs, bank, dest_dreg);
                                if (rs->symbolic [translated_bank] [dest_dreg] >= regbank_size [translated_bank])
-                                       free_up_reg (cfg, bb, tmp, ins, dest_dreg, translated_bank);
+                                       free_up_hreg (cfg, bb, tmp, ins, dest_dreg, translated_bank);
                        }
                        else {
                                if (rs->isymbolic [dest_dreg] >= MONO_MAX_IREGS)
-                                       free_up_reg (cfg, bb, tmp, ins, dest_dreg, bank);
+                                       free_up_hreg (cfg, bb, tmp, ins, dest_dreg, bank);
                        }
                }
 
@@ -1577,8 +1624,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                 */
                if ((clob_reg != -1) && (!(rs->ifree_mask & (regmask (clob_reg))))) {
                        DEBUG (printf ("\tforced spill of clobbered reg R%d\n", rs->isymbolic [clob_reg]));
-                       get_register_force_spilling (cfg, bb, tmp, ins, rs->isymbolic [clob_reg], 0);
-                       mono_regstate_free_int (rs, clob_reg);
+                       free_up_hreg (cfg, bb, tmp, ins, clob_reg, 0);
                }
 
                if (spec [MONO_INST_CLOB] == 'c') {
@@ -1606,7 +1652,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                                        s = regmask (j);
                                        if ((clob_mask & s) && !(rs->ifree_mask & s) && (j != ins->sreg1)) {
                                                if ((j != dreg) && (j != dreg2))
-                                                       get_register_force_spilling (cfg, bb, tmp, ins, rs->isymbolic [j], 0);
+                                                       free_up_hreg (cfg, bb, tmp, ins, j, 0);
                                                else if (rs->isymbolic [j])
                                                        /* The hreg is assigned to the dreg of this instruction */
                                                        rs->vassign [rs->isymbolic [j]] = -1;
@@ -1635,7 +1681,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                                                s = regmask (j);
                                                if ((clob_mask & s) && !(rs->free_mask [cur_bank] & s) && (j != ins->sreg1)) {
                                                        if (j != dreg)
-                                                               get_register_force_spilling (cfg, bb, tmp, ins, rs->symbolic [cur_bank] [j], cur_bank);
+                                                               free_up_hreg (cfg, bb, tmp, ins, j, cur_bank);
                                                        else if (rs->symbolic [cur_bank] [j])
                                                                /* The hreg is assigned to the dreg of this instruction */
                                                                rs->vassign [rs->symbolic [cur_bank] [j]] = -1;
@@ -1765,9 +1811,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                        sreg_masks [0] = regmask (dest_sregs [0]);
 
                        if ((rs->vassign [sregs [0]] != dest_sregs [0]) && !(rs->ifree_mask & (regmask (dest_sregs [0])))) {
-                               DEBUG (printf ("\tforced spill of R%d\n", rs->isymbolic [dest_sregs [0]]));
-                               get_register_force_spilling (cfg, bb, tmp, ins, rs->isymbolic [dest_sregs [0]], 0);
-                               mono_regstate_free_int (rs, dest_sregs [0]);
+                               free_up_hreg (cfg, bb, tmp, ins, dest_sregs [0], 0);
                        }
                        if (is_global_ireg (sregs [0])) {
                                /* The argument is already in a hard reg, need to copy */
@@ -1938,9 +1982,29 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                        bank = sreg_bank (j, spec);
                        if (MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_SRC1 + j]))
                                g_assert_not_reached ();
-                       if (is_soft_reg (sregs [j], bank)) {
+
+                       if (dest_sregs [j] != -1 && is_global_ireg (sregs [j])) {
+                               /*
+                                * Argument already in a global hard reg, copy it to the fixed reg, without
+                                * allocating it to the fixed reg.
+                                */
+                               MonoInst *copy = create_copy_ins (cfg, bb, tmp, dest_sregs [j], sregs [j], NULL, ip, 0);
+                               insert_before_ins (bb, ins, copy);
+                               sregs [j] = dest_sregs [j];
+                       } else if (is_soft_reg (sregs [j], bank)) {
                                val = rs->vassign [sregs [j]];
 
+                               if (dest_sregs [j] != -1 && val >= 0 && dest_sregs [j] != val) {
+                                       /*
+                                        * The sreg is already allocated to a hreg, but not to the fixed
+                                        * reg required by the instruction. Spill the sreg, so it can be
+                                        * allocated to the fixed reg by the code below.
+                                        */
+                                       /* Currently, this code should only be hit for CAS */
+                                       spill_vreg (cfg, bb, tmp, ins, sregs [j], 0);
+                                       val = rs->vassign [sregs [j]];
+                               }
+
                                if (val < 0) {
                                        int spill = 0;
                                        if (val < -1) {
@@ -1969,6 +2033,24 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                }
                mono_inst_set_src_registers (ins, sregs);
 
+               /* Sanity check */
+               /* Do this only for CAS for now */
+               for (j = 1; j < num_sregs; ++j) {
+                       int sreg = sregs [j];
+                       int dest_sreg = dest_sregs [j];
+
+                       if (j == 2 && dest_sreg != -1) {
+                               int k;
+
+                               g_assert (sreg == dest_sreg);
+
+                               for (k = 0; k < num_sregs; ++k) {
+                                       if (k != j)
+                                               g_assert (sregs [k] != dest_sreg);
+                               }
+                       }
+               }
+
                /*if (reg_is_freeable (ins->sreg1) && prev_sreg1 >= 0 && reginfo [prev_sreg1].born_in >= i) {
                        DEBUG (printf ("freeable %s\n", mono_arch_regname (ins->sreg1)));
                        mono_regstate_free_int (rs, ins->sreg1);
index 9ce84526a252febe1c91cfa26589c36eefddcddb..a753c58bbc3df58917cbaa3bdc4e6187e6ee1f34 100644 (file)
@@ -139,19 +139,21 @@ gpointer
 mono_get_throw_corlib_exception (void)
 {
        gpointer code = NULL;
+       MonoTrampInfo *info;
 
        /* This depends on corlib classes so cannot be inited in mono_exceptions_init () */
        if (throw_corlib_exception_func)
                return throw_corlib_exception_func;
 
-#if MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION
        if (mono_aot_only)
                code = mono_aot_get_trampoline ("throw_corlib_exception");
-       else
-               code = mono_arch_get_throw_corlib_exception (NULL, FALSE);
-#else
-       g_assert_not_reached ();
-#endif
+       else {
+               code = mono_arch_get_throw_corlib_exception (&info, FALSE);
+               if (info) {
+                       mono_save_trampoline_xdebug_info (info);
+                       mono_tramp_info_free (info);
+               }
+       }
 
        mono_memory_barrier ();
 
@@ -1641,6 +1643,8 @@ mono_setup_altstack (MonoJitTlsData *tls)
        tls->stack_ovf_guard_base = staddr + mono_pagesize ();
        tls->stack_ovf_guard_size = ALIGN_TO (8 * 4096, mono_pagesize ());
 
+       g_assert ((guint8*)&sa >= (guint8*)tls->stack_ovf_guard_base + tls->stack_ovf_guard_size);
+
        if (mono_mprotect (tls->stack_ovf_guard_base, tls->stack_ovf_guard_size, MONO_MMAP_NONE)) {
                /* mprotect can fail for the main thread stack */
                gpointer gaddr = mono_valloc (tls->stack_ovf_guard_base, tls->stack_ovf_guard_size, MONO_MMAP_NONE|MONO_MMAP_PRIVATE|MONO_MMAP_ANON|MONO_MMAP_FIXED);
@@ -2134,7 +2138,10 @@ mono_install_handler_block_guard (MonoInternalThread *thread, MonoContext *ctx)
        MonoJitTlsData *jit_tls = TlsGetValue (mono_jit_tls_id);
        gpointer resume_ip;
 
-       if (jit_tls->handler_block_return_address)
+       /* Guard against a null MonoJitTlsData. This can happens if the thread receives the
+         * interrupt signal before the JIT has time to initialize its TLS data for the given thread.
+        */
+       if (!jit_tls || jit_tls->handler_block_return_address)
                return FALSE;
 
        mono_walk_stack_full (domain, jit_tls, ctx, find_last_handler_block, FALSE, &data);
index 2b04688f543bc1a20589f0b254841723185c1d9f..51d5e681ebecb0ea35987b0a84adc890a95ab3ee 100644 (file)
@@ -12,7 +12,7 @@
 #include <mono/metadata/gc-internal.h>
 
 /*
- * The code above does not work yet, and probably needs to be thrown out if we move
+ * The code below does not work yet, and probably needs to be thrown out if we move
  * to GC safe points.
  */
 
@@ -628,3 +628,13 @@ mini_gc_init_cfg (MonoCompile *cfg)
 
        mini_gc_init_gc_map (cfg);
 }
+
+/*
+ * Problems with the precise stack scannin code:
+ * - it makes two passes over the stack
+ * - the stack walk is slow
+ * - only the locals are scanned precisely
+ * - using a pc range for live ranges is not good, have to use a list of intervals
+ * - if the code is finished, less pinning will be done, causing problems because
+ *   we promote all surviving objects to old-gen.
+ */
index 8f378285da1b76ddd130e917d1fd207a99c85b07..28a472bfc72d89302e1d58657088e176d6295143 100644 (file)
@@ -236,12 +236,6 @@ register_generic_subclass (MonoClass *class)
        MonoClass *parent = class->parent;
        MonoClass *subclass;
        MonoRuntimeGenericContextTemplate *rgctx_template = class_lookup_rgctx_template (class);
-       static gboolean hook_installed;
-
-       if (!hook_installed) {
-               mono_install_image_unload_hook (mono_class_unregister_image_generic_subclasses, NULL);
-               hook_installed = TRUE;
-       }
 
        g_assert (rgctx_template);
 
@@ -1858,4 +1852,14 @@ mini_type_stack_size_full (MonoGenericSharingContext *gsctx, MonoType *t, guint3
 void
 mono_generic_sharing_init (void)
 {
+       mono_install_image_unload_hook (mono_class_unregister_image_generic_subclasses, NULL);
+}
+
+void
+mono_generic_sharing_cleanup (void)
+{
+       mono_remove_image_unload_hook (mono_class_unregister_image_generic_subclasses, NULL);
+
+       if (generic_subclass_hash)
+               g_hash_table_destroy (generic_subclass_hash);
 }
index 8a62f88147dbc47bc0bf5f8bb17b7ea9e793c7f9..8c9f7252e83ceafb5e7229804541139eb9be424c 100644 (file)
@@ -4497,14 +4497,6 @@ mono_arch_get_patch_offset (guint8 *code)
        return 0;
 }
 
-gpointer
-mono_arch_get_vcall_slot (guint8* code, mgreg_t *regs, int *displacement)
-{
-       /* Not used on IA64 */
-       g_assert_not_reached ();
-       return NULL;
-}
-
 gpointer*
 mono_arch_get_delegate_method_ptr_addr (guint8* code, mgreg_t *regs)
 {
index 4ec5c01c0d0558a1e9312b0d54371a8f73b31f99..a13fd216db1ecf533a4b8ea318b6f1737d276cc4 100644 (file)
@@ -183,7 +183,6 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code);
 #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
 
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_SAVE_UNWIND_INFO 1
 #define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
index cff7bfbd9ddf84875bffdc9a74250ca88ea52d16..536ea921e9f2afd1810bf68f937a63ec142aa8cf 100644 (file)
@@ -116,12 +116,15 @@ public:
 
 MonoJITMemoryManager::MonoJITMemoryManager ()
 {
+#if LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION <= 7
        SizeRequired = true;
+#endif
        mm = JITMemoryManager::CreateDefaultMemManager ();
 }
 
 MonoJITMemoryManager::~MonoJITMemoryManager ()
 {
+       delete mm;
 }
 
 void
@@ -152,6 +155,9 @@ unsigned char *
 MonoJITMemoryManager::startFunctionBody(const Function *F, 
                                        uintptr_t &ActualSize)
 {
+       // FIXME: This leaks memory
+       if (ActualSize == 0)
+               ActualSize = 128;
        return alloc_cb (wrap (F), ActualSize);
 }
   
@@ -189,7 +195,7 @@ unsigned char*
 MonoJITMemoryManager::startExceptionTable(const Function* F,
                                          uintptr_t &ActualSize)
 {
-       return alloc_cb (wrap (F), ActualSize);
+       return startFunctionBody(F, ActualSize);
 }
   
 void
@@ -199,7 +205,47 @@ MonoJITMemoryManager::endExceptionTable(const Function *F, unsigned char *TableS
 {
 }
 
+class MonoJITEventListener : public JITEventListener {
+
+public:
+       FunctionEmittedCb *emitted_cb;
+
+       MonoJITEventListener (FunctionEmittedCb *cb) {
+               emitted_cb = cb;
+       }
+
+       virtual void NotifyFunctionEmitted(const Function &F,
+                                                                          void *Code, size_t Size,
+                                                                          const EmittedFunctionDetails &Details) {
+               /*
+                * X86TargetMachine::setCodeModelForJIT() sets the code model to Large on amd64,
+                * which means the JIT will generate calls of the form
+                * mov reg, <imm>
+                * call *reg
+                * Our trampoline code can't patch this. Passing CodeModel::Small to createJIT
+                * doesn't seem to work, we need Default. A discussion is here:
+                * http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-December/027999.html
+                * There seems to no way to get the TargeMachine used by an EE either, so we
+                * install a profiler hook and reset the code model here.
+                * This should be inside an ifdef, but we can't include our config.h either,
+                * since its definitions conflict with LLVM's config.h.
+                *
+                */
+               //#if defined(TARGET_X86) || defined(TARGET_AMD64)
+#ifndef LLVM_MONO_BRANCH
+               /* The LLVM mono branch contains a workaround, so this is not needed */
+               if (Details.MF->getTarget ().getCodeModel () == CodeModel::Large) {
+                       Details.MF->getTarget ().setCodeModel (CodeModel::Default);
+               }
+#endif
+               //#endif
+
+               emitted_cb (wrap (&F), Code, (char*)Code + Size);
+       }
+};
+
 static MonoJITMemoryManager *mono_mm;
+static MonoJITEventListener *mono_event_listener;
 
 static FunctionPassManager *fpm;
 
@@ -262,45 +308,6 @@ mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v)
 static cl::list<const PassInfo*, bool, PassNameParser>
 PassList(cl::desc("Optimizations available:"));
 
-class MonoJITEventListener : public JITEventListener {
-
-public:
-       FunctionEmittedCb *emitted_cb;
-
-       MonoJITEventListener (FunctionEmittedCb *cb) {
-               emitted_cb = cb;
-       }
-
-       virtual void NotifyFunctionEmitted(const Function &F,
-                                                                          void *Code, size_t Size,
-                                                                          const EmittedFunctionDetails &Details) {
-               /*
-                * X86TargetMachine::setCodeModelForJIT() sets the code model to Large on amd64,
-                * which means the JIT will generate calls of the form
-                * mov reg, <imm>
-                * call *reg
-                * Our trampoline code can't patch this. Passing CodeModel::Small to createJIT
-                * doesn't seem to work, we need Default. A discussion is here:
-                * http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-December/027999.html
-                * There seems to no way to get the TargeMachine used by an EE either, so we
-                * install a profiler hook and reset the code model here.
-                * This should be inside an ifdef, but we can't include our config.h either,
-                * since its definitions conflict with LLVM's config.h.
-                *
-                */
-               //#if defined(TARGET_X86) || defined(TARGET_AMD64)
-#ifndef LLVM_MONO_BRANCH
-               /* The LLVM mono branch contains a workaround, so this is not needed */
-               if (Details.MF->getTarget ().getCodeModel () == CodeModel::Large) {
-                       Details.MF->getTarget ().setCodeModel (CodeModel::Default);
-               }
-#endif
-               //#endif
-
-               emitted_cb (wrap (&F), Code, (char*)Code + Size);
-       }
-};
-
 static void
 force_pass_linking (void)
 {
@@ -426,12 +433,7 @@ force_pass_linking (void)
       (void) llvm::createDbgInfoPrinterPass();
       (void) llvm::createModuleDebugInfoPrinterPass();
       (void) llvm::createPartialInliningPass();
-         */
-      (void) llvm::createSSIPass();
-      (void) llvm::createSSIEverythingPass();
       (void) llvm::createGEPSplitterPass();
-      (void) llvm::createABCDPass();
-         /*
       (void) llvm::createLintPass();
          */
       (void) llvm::createSinkingPass();
@@ -447,8 +449,6 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
   LLVMInitializeX86Target ();
   LLVMInitializeX86TargetInfo ();
 
-  llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "", false);
-
   mono_mm = new MonoJITMemoryManager ();
   mono_mm->alloc_cb = alloc_cb;
 
@@ -466,31 +466,53 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
          g_assert_not_reached ();
   }
   EE->InstallExceptionTableRegister (exception_cb);
-  EE->RegisterJITEventListener (new MonoJITEventListener (emitted_cb));
+  mono_event_listener = new MonoJITEventListener (emitted_cb);
+  EE->RegisterJITEventListener (mono_event_listener);
 
   fpm = new FunctionPassManager (unwrap (MP));
 
   fpm->add(new TargetData(*EE->getTargetData()));
-  /* Add a default set of passes */
-  //createStandardFunctionPasses (fpm, 2);
-  fpm->add(createInstructionCombiningPass());
-  fpm->add(createReassociatePass());
-  fpm->add(createGVNPass());
-  fpm->add(createCFGSimplificationPass());
-
-  /* The one used by opt is:
-   * -simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -basiccg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loopsimplify -domfrontier -loopsimplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loopsimplify -lcssa -iv-users -indvars -loop-deletion -loopsimplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -gvn -simplifycfg -preverify -domtree -verify
-   */
-
-  /* Add passes specified by the env variable */
-  /* Only the passes in force_pass_linking () can be used */
-  for (unsigned i = 0; i < PassList.size(); ++i) {
-      const PassInfo *PassInf = PassList[i];
-      Pass *P = 0;
-
-      if (PassInf->getNormalCtor())
-                 P = PassInf->getNormalCtor()();
-         fpm->add (P);
+
+  llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "", false);
+
+  if (PassList.size() > 0) {
+         /* Use the passes specified by the env variable */
+         /* Only the passes in force_pass_linking () can be used */
+         for (unsigned i = 0; i < PassList.size(); ++i) {
+                 const PassInfo *PassInf = PassList[i];
+                 Pass *P = 0;
+
+                 if (PassInf->getNormalCtor())
+                         P = PassInf->getNormalCtor()();
+                 fpm->add (P);
+         }
+  } else {
+         /* Use the same passes used by 'opt' by default, without the ipo passes */
+         const char *opts = "-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -basiccg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loopsimplify -domfrontier -loopsimplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loopsimplify -lcssa -iv-users -indvars -loop-deletion -loopsimplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -gvn -simplifycfg -preverify -domtree -verify";
+         char **args;
+         int i;
+
+         args = g_strsplit (opts, " ", 1000);
+         for (i = 0; args [i]; i++)
+                 ;
+         llvm::cl::ParseCommandLineOptions (i, args, "", false);
+         g_strfreev (args);
+
+         for (unsigned i = 0; i < PassList.size(); ++i) {
+                 const PassInfo *PassInf = PassList[i];
+                 Pass *P = 0;
+
+                 if (PassInf->getNormalCtor())
+                         P = PassInf->getNormalCtor()();
+                 fpm->add (P);
+         }
+
+         /*
+         fpm->add(createInstructionCombiningPass());
+         fpm->add(createReassociatePass());
+         fpm->add(createGVNPass());
+         fpm->add(createCFGSimplificationPass());
+         */
   }
 
   return wrap(EE);
index 2c8a20dea880af0485c263af5b67135ba6106cd9..cb068ea37e369ea0417993220d8a6b71c55b036c 100644 (file)
@@ -829,7 +829,7 @@ emit_volatile_load (EmitContext *ctx, int vreg)
                 * Might have to zero extend since llvm doesn't have 
                 * unsigned types.
                 */
-               if (t->type == MONO_TYPE_U1 || t->type == MONO_TYPE_U2)
+               if (t->type == MONO_TYPE_U1 || t->type == MONO_TYPE_U2 || t->type == MONO_TYPE_CHAR || t->type == MONO_TYPE_BOOLEAN)
                        v = LLVMBuildZExt (ctx->builder, v, LLVMInt32Type (), "");
                else if (t->type == MONO_TYPE_U8)
                        v = LLVMBuildZExt (ctx->builder, v, LLVMInt64Type (), "");
@@ -912,7 +912,7 @@ sig_to_llvm_sig_full (EmitContext *ctx, MonoMethodSignature *sig, LLVMCallInfo *
                param_types [pindex] = IntPtrType ();
                pindex ++;
        }
-       if (cinfo && cinfo->imt_arg) {
+       if (cinfo && cinfo->imt_arg && IS_LLVM_MONO_BRANCH) {
                if (sinfo)
                        sinfo->imt_arg_pindex = pindex;
                param_types [pindex] = IntPtrType ();
@@ -1695,7 +1695,7 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
        LLVMValueRef *args;
        LLVMCallInfo *cinfo;
        GSList *l;
-       int i;
+       int i, len;
        gboolean vretaddr;
        LLVMTypeRef llvm_sig;
        gpointer target;
@@ -1818,10 +1818,6 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
                g_assert (ins->inst_offset % size == 0);
                index = LLVMConstInt (LLVMInt32Type (), ins->inst_offset / size, FALSE);
 
-               // FIXME: mono_arch_get_vcall_slot () can't decode the code
-               // generated by LLVM
-               //LLVM_FAILURE (ctx, "virtual call");
-
                /*
                 * When using the llvm mono branch, we can support IMT directly, otherwise
                 * we need to call a trampoline.
@@ -1856,7 +1852,9 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
        /* 
         * Collect and convert arguments
         */
-       args = alloca (sizeof (LLVMValueRef) * ((sig->param_count * 2) + sig->hasthis + vretaddr + call->rgctx_reg));
+       len = sizeof (LLVMValueRef) * ((sig->param_count * 2) + sig->hasthis + vretaddr + call->rgctx_reg);
+       args = alloca (len);
+       memset (args, 0, len);
        l = call->out_ireg_args;
 
        if (IS_LLVM_MONO_BRANCH) {
@@ -2070,8 +2068,12 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                         */
                        //LLVM_FAILURE (ctx, "aot+clauses");
                } else {
-                       /* exception_cb will decode this */
-                       ti = g_malloc (sizeof (gint32));
+                       /*
+                        * After the cfg mempool is freed, the type info will point to stale memory,
+                        * but this is not a problem, since we decode it once in exception_cb during
+                        * compilation.
+                        */
+                       ti = mono_mempool_alloc (cfg->mempool, sizeof (gint32));
                        *(gint32*)ti = clause_index;
 
                        type_info = LLVMAddGlobal (module, i8ptr, ti_name);
@@ -3730,6 +3732,7 @@ mono_llvm_emit_method (MonoCompile *cfg)
        MonoMethodHeader *header;
        MonoExceptionClause *clause;
        LLVMSigInfo sinfo;
+       char **names;
 
        /* The code below might acquire the loader lock, so use it for global locking */
        mono_loader_lock ();
@@ -3858,16 +3861,24 @@ mono_llvm_emit_method (MonoCompile *cfg)
                values [cfg->args [0]->dreg] = LLVMGetParam (method, sinfo.this_arg_pindex);
                LLVMSetValueName (values [cfg->args [0]->dreg], "this");
        }
+
+       names = g_new (char *, sig->param_count);
+       mono_method_get_param_names (cfg->method, (const char **) names);
+
        for (i = 0; i < sig->param_count; ++i) {
                char *name;
 
                values [cfg->args [i + sig->hasthis]->dreg] = LLVMGetParam (method, sinfo.pindexes [i]);
-               name = g_strdup_printf ("arg_%d", i);
+               if (names [i] && names [i][0] != '\0')
+                       name = g_strdup_printf ("arg_%s", names [i]);
+               else
+                       name = g_strdup_printf ("arg_%d", i);
                LLVMSetValueName (values [cfg->args [i + sig->hasthis]->dreg], name);
                g_free (name);
                if (linfo->args [i + sig->hasthis].storage == LLVMArgVtypeByVal)
                        LLVMAddAttribute (LLVMGetParam (method, sinfo.pindexes [i]), LLVMByValAttribute);
        }
+       g_free (names);
 
        max_block_num = 0;
        for (bb = cfg->bb_entry; bb; bb = bb->next_bb)
@@ -4285,6 +4296,8 @@ exception_cb (void *data)
        cfg->llvm_this_reg = this_reg;
        cfg->llvm_this_offset = this_offset;
 
+       /* type_info [i] is cfg mempool allocated, no need to free it */
+
        g_free (ei);
        g_free (type_info);
 }
index 1ae044c2f5d30f7634f5035265684db06683fbd5..9b709580150612c1c7d8c5d8745a96577a36bd1e 100644 (file)
@@ -28,7 +28,6 @@
 #define SAVE_FP_REGS           0
 #define SAVE_ALL_REGS          0
 #define EXTRA_STACK_SPACE      0       /* suppresses some s-reg corruption issues */
-#define LONG_BRANCH            1       /* needed for yyparse in mcs */
 
 #define SAVE_LMF               1
 #define ALWAYS_USE_FP          1
 #define PROMOTE_R4_TO_R8       1       /* promote single values in registers to doubles */
 #define USE_MUL                        1       /* use mul instead of mult/mflo for multiply */
 
+/* Emit a call sequence to 'v', using 'D' as a scratch register if necessary */
+#define mips_call(c,D,v) do {  \
+               guint32 _target = (guint32)(v); \
+               if (1 || !(v) || ((_target & 0xfc000000) != (((guint32)(c)) & 0xfc000000))) { \
+                       mips_load_const (c, D, _target); \
+                       mips_jalr (c, D, mips_ra); \
+               } \
+               else { \
+                       mips_jumpl (c, _target >> 2); \
+               } \
+               mips_nop (c); \
+       } while (0)
+
 enum {
        TLS_MODE_DETECT,
        TLS_MODE_FAILED,
@@ -147,6 +159,7 @@ typedef struct {
        int fr;
        gboolean gr_passed;
        gboolean on_stack;
+       gboolean vtype_retaddr;
        int stack_size;
        guint32 stack_usage;
        guint32 struct_ret;
@@ -192,10 +205,7 @@ mips_emit_exc_by_name(guint8 *code, const char *name)
 
        mips_load_const (code, mips_a0, exc_class->type_token);
        addr = (guint32) mono_get_throw_corlib_exception ();
-       mips_load_const (code, mips_t9, addr);
-       mips_jalr (code, mips_t9, mips_ra);
-       mips_nop (code);
-
+       mips_call (code, mips_t9, addr);
        return code;
 }
 
@@ -233,79 +243,78 @@ mips_emit_load_const(guint8 *code, int dreg, mgreg_t v)
 guint8 *
 mips_emit_cond_branch (MonoCompile *cfg, guint8 *code, int op, MonoInst *ins)
 {
-#if LONG_BRANCH
-       int br_offset = 5;
-#endif
-
        g_assert (ins);
-#if LONG_BRANCH
-       /* Invert test and emit branch around jump */
-       switch (op) {
-       case OP_MIPS_BEQ:
-               mips_bne (code, ins->sreg1, ins->sreg2, br_offset);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BNE:
-               mips_beq (code, ins->sreg1, ins->sreg2, br_offset);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BGEZ:
-               mips_bltz (code, ins->sreg1, br_offset);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BGTZ:
-               mips_blez (code, ins->sreg1, br_offset);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BLEZ:
-               mips_bgtz (code, ins->sreg1, br_offset);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BLTZ:
-               mips_bgez (code, ins->sreg1, br_offset);
+       if (cfg->arch.long_branch) {
+               int br_offset = 5;
+
+               /* Invert test and emit branch around jump */
+               switch (op) {
+               case OP_MIPS_BEQ:
+                       mips_bne (code, ins->sreg1, ins->sreg2, br_offset);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BNE:
+                       mips_beq (code, ins->sreg1, ins->sreg2, br_offset);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BGEZ:
+                       mips_bltz (code, ins->sreg1, br_offset);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BGTZ:
+                       mips_blez (code, ins->sreg1, br_offset);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BLEZ:
+                       mips_bgtz (code, ins->sreg1, br_offset);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BLTZ:
+                       mips_bgez (code, ins->sreg1, br_offset);
+                       mips_nop (code);
+                       break;
+               default:
+                       g_assert_not_reached ();
+               }
+               mono_add_patch_info (cfg, code - cfg->native_code,
+                                    MONO_PATCH_INFO_BB, ins->inst_true_bb);
+               mips_lui (code, mips_at, mips_zero, 0);
+               mips_addiu (code, mips_at, mips_at, 0);
+               mips_jr (code, mips_at);
                mips_nop (code);
-               break;
-       default:
-               g_assert_not_reached ();
        }
-       mono_add_patch_info (cfg, code - cfg->native_code,
-                            MONO_PATCH_INFO_BB, ins->inst_true_bb);
-       mips_lui (code, mips_at, mips_zero, 0);
-       mips_addiu (code, mips_at, mips_at, 0);
-       mips_jr (code, mips_at);
-       mips_nop (code);
-#else
-       mono_add_patch_info (cfg, code - cfg->native_code,
-                            MONO_PATCH_INFO_BB, ins->inst_true_bb);
-       switch (op) {
-       case OP_MIPS_BEQ:
-               mips_beq (code, ins->sreg1, ins->sreg2, 0);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BNE:
-               mips_bne (code, ins->sreg1, ins->sreg2, 0);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BGEZ:
-               mips_bgez (code, ins->sreg1, 0);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BGTZ:
-               mips_bgtz (code, ins->sreg1, 0);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BLEZ:
-               mips_blez (code, ins->sreg1, 0);
-               mips_nop (code);
-               break;
-       case OP_MIPS_BLTZ:
-               mips_bltz (code, ins->sreg1, 0);
-               mips_nop (code);
-               break;
-       default:
-               g_assert_not_reached ();
+       else {
+               mono_add_patch_info (cfg, code - cfg->native_code,
+                                    MONO_PATCH_INFO_BB, ins->inst_true_bb);
+               switch (op) {
+               case OP_MIPS_BEQ:
+                       mips_beq (code, ins->sreg1, ins->sreg2, 0);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BNE:
+                       mips_bne (code, ins->sreg1, ins->sreg2, 0);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BGEZ:
+                       mips_bgez (code, ins->sreg1, 0);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BGTZ:
+                       mips_bgtz (code, ins->sreg1, 0);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BLEZ:
+                       mips_blez (code, ins->sreg1, 0);
+                       mips_nop (code);
+                       break;
+               case OP_MIPS_BLTZ:
+                       mips_bltz (code, ins->sreg1, 0);
+                       mips_nop (code);
+                       break;
+               default:
+                       g_assert_not_reached ();
+               }
        }
-#endif
        return (code);
 }
 
@@ -511,7 +520,8 @@ gpointer
 mono_arch_get_this_arg_from_call (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, mgreg_t *regs, guint8 *code)
 {
        /* FIXME: handle returning a struct */
-       if (MONO_TYPE_ISSTRUCT (sig->ret))
+       g_assert(regs);
+       if (sig && MONO_TYPE_ISSTRUCT (sig->ret))
                return (gpointer)regs [mips_a1];
        return (gpointer)regs [mips_a0];
 }
@@ -897,6 +907,7 @@ calculate_sizes (MonoMethodSignature *sig, gboolean is_pinvoke)
 {
        guint i;
        int n = sig->hasthis + sig->param_count;
+       int pstart;
        MonoType* simpletype;
        CallInfo *cinfo = g_malloc0 (sizeof (CallInfo) + sizeof (ArgInfo) * n);
 
@@ -906,19 +917,55 @@ calculate_sizes (MonoMethodSignature *sig, gboolean is_pinvoke)
 
        DEBUG(printf("calculate_sizes\n"));
 
+       cinfo->vtype_retaddr = MONO_TYPE_ISSTRUCT (sig->ret) ? TRUE : FALSE;
+       pstart = 0;
+       n = 0;
+#if 0
        /* handle returning a struct */
        if (MONO_TYPE_ISSTRUCT (sig->ret)) {
                cinfo->struct_ret = cinfo->gr;
                add_int32_arg (cinfo, &cinfo->ret);
        }
 
-       n = 0;
        if (sig->hasthis) {
                add_int32_arg (cinfo, cinfo->args + n);
                n++;
        }
+#else
+       /*
+        * To simplify get_this_arg_reg () and LLVM integration, emit the vret arg after
+        * the first argument, allowing 'this' to be always passed in the first arg reg.
+        * Also do this if the first argument is a reference type, since virtual calls
+        * are sometimes made using calli without sig->hasthis set, like in the delegate
+        * invoke wrappers.
+        */
+       if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (NULL, sig->params [0]))))) {
+               if (sig->hasthis) {
+                       add_int32_arg (cinfo, cinfo->args + n);
+                       n ++;
+               } else {
+                       add_int32_arg (cinfo, cinfo->args + sig->hasthis);
+                       pstart = 1;
+                       n ++;
+               }
+               add_int32_arg (cinfo, &cinfo->ret);
+               cinfo->struct_ret = cinfo->ret.reg;
+       } else {
+               /* this */
+               if (sig->hasthis) {
+                       add_int32_arg (cinfo, cinfo->args + n);
+                       n ++;
+               }
+
+               if (cinfo->vtype_retaddr) {
+                       add_int32_arg (cinfo, &cinfo->ret);
+                       cinfo->struct_ret = cinfo->ret.reg;
+               }
+       }
+#endif
+
         DEBUG(printf("params: %d\n", sig->param_count));
-       for (i = 0; i < sig->param_count; ++i) {
+       for (i = pstart; i < sig->param_count; ++i) {
                if ((sig->call_convention == MONO_CALL_VARARG) && (i == sig->sentinelpos)) {
                         /* Prevent implicit arguments and sig_cookie from
                           being passed in registers */
@@ -1915,7 +1962,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, ins->dreg+1, ins->sreg1+1);
                MONO_EMIT_NEW_BIALU (cfg, OP_IADD, ins->dreg+2, ins->sreg1+2, ins->sreg2+2);
                MONO_EMIT_NEW_BIALU (cfg, OP_IADD, ins->dreg+2, ins->dreg+2, tmp1);
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LADD_IMM:
@@ -1924,7 +1971,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, ins->dreg+1, ins->sreg1+1);
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_IADD_IMM, ins->dreg+2, ins->sreg1+2, ins->inst_ms_word);
                MONO_EMIT_NEW_BIALU (cfg, OP_IADD, ins->dreg+2, ins->dreg+2, tmp1);
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LSUB:
@@ -1933,7 +1980,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, ins->sreg1+1, ins->dreg+1);
                MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, ins->dreg+2, ins->sreg1+2, ins->sreg2+2);
                MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, ins->dreg+2, ins->dreg+2, tmp1);
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LSUB_IMM:
@@ -1942,7 +1989,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, ins->sreg1+1, ins->dreg+1);
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISUB_IMM, ins->dreg+2, ins->sreg1+2, ins->inst_ms_word);
                MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, ins->dreg+2, ins->dreg+2, tmp1);
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LMUL:
@@ -1962,7 +2009,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, mips_zero, ins->dreg+1);
                MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, ins->dreg+2, mips_zero, ins->sreg1+2);
                MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, ins->dreg+2, ins->dreg+2, tmp1);
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
 #if 0
@@ -2022,7 +2069,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
 
                /* Now, if (tmp4 == 0) then overflow */
                MONO_EMIT_NEW_COMPARE_EXC (cfg, EQ, tmp4, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LADD_OVF_UN:
@@ -2035,7 +2082,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_IADD, ins->dreg+2, tmp1, ins->dreg+2);
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp2, ins->dreg+2, ins->sreg1+2);
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, tmp2, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LMUL_OVF:
@@ -2073,7 +2120,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
 
                /* Now, if (tmp4 == 1) then overflow */
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, tmp4, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LSUB_OVF_UN:
@@ -2087,7 +2134,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
 
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp2, ins->sreg1+2, ins->dreg+2);
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, tmp2, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 #if 0
        case OP_LCONV_TO_OVF_I1_UN:
@@ -2150,7 +2197,7 @@ mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHR_IMM, tmp1, ins->sreg1, 31);
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, ins->sreg2, tmp1, "OverflowException");
                MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, ins->dreg, ins->sreg1);
-               ins->opcode = OP_NOP;
+               NULLIFY_INS(ins);
                break;
 
        case OP_LMIN_UN:
@@ -2207,9 +2254,11 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
 
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHR_IMM, tmp5, tmp4, 31);
 
-               /* Now, if (tmp4 == 0) then overflow */
+               /* Now, if (tmp5 == 0) then overflow */
                MONO_EMIT_NEW_COMPARE_EXC (cfg, EQ, tmp5, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               /* Make decompse and method-to-ir.c happy, last insn writes dreg */
+               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, ins->dreg, ins->dreg);
+               NULLIFY_INS(ins);
                break;
 
        case OP_IADD_OVF_UN:
@@ -2218,7 +2267,9 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_IADD, ins->dreg, ins->sreg1, ins->sreg2);
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, ins->dreg, ins->sreg1);
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, tmp1, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               /* Make decompse and method-to-ir.c happy, last insn writes dreg */
+               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, ins->dreg, ins->dreg);
+               NULLIFY_INS(ins);
                break;
 
        case OP_ISUB_OVF:
@@ -2250,7 +2301,9 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_IAND, tmp5, tmp4, tmp3);
 
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, tmp5, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               /* Make decompse and method-to-ir.c happy, last insn writes dreg */
+               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, ins->dreg, ins->dreg);
+               NULLIFY_INS(ins);
                break;
 
        case OP_ISUB_OVF_UN:
@@ -2259,10 +2312,11 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
                MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, ins->dreg, ins->sreg1, ins->sreg2);
                MONO_EMIT_NEW_BIALU (cfg, OP_MIPS_SLTU, tmp1, ins->sreg1, ins->dreg);
                MONO_EMIT_NEW_COMPARE_EXC (cfg, NE_UN, tmp1, mips_zero, "OverflowException");
-               ins->opcode = OP_NOP;
+               /* Make decompse and method-to-ir.c happy, last insn writes dreg */
+               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, ins->dreg, ins->dreg);
+               NULLIFY_INS(ins);
                break;
        }
-
 }
 
 static int
@@ -2432,7 +2486,7 @@ loop_start:
                        next = ins->next;
                        /* Branch opts can eliminate the branch */
                        if (!next || (!(MONO_IS_COND_BRANCH_OP (next) || MONO_IS_COND_EXC (next) || MONO_IS_SETCC (next)))) {
-                               ins->opcode = OP_NOP;
+                               NULLIFY_INS(ins);
                                break;
                        }
                        break;
@@ -2443,7 +2497,7 @@ loop_start:
                        next = ins->next;
                        /* Branch opts can eliminate the branch */
                        if (!next || (!(MONO_IS_COND_BRANCH_OP (next) || MONO_IS_COND_EXC (next) || MONO_IS_SETCC (next)))) {
-                               ins->opcode = OP_NOP;
+                               NULLIFY_INS(ins);
                                break;
                        }
                        if (ins->inst_imm) {
@@ -2622,7 +2676,7 @@ loop_start:
                        next = ins->next;
                        /* Branch opts can eliminate the branch */
                        if (!next || (!(MONO_IS_COND_BRANCH_OP (next) || MONO_IS_COND_EXC (next) || MONO_IS_SETCC (next)))) {
-                               ins->opcode = OP_NOP;
+                               NULLIFY_INS(ins);
                                break;
                        }
                        g_assert(next);
@@ -2631,10 +2685,10 @@ loop_start:
                         * remap compare/branch and compare/set
                         * to MIPS specific opcodes.
                         */
-                       ins->opcode = OP_NOP;
                        next->opcode = map_to_mips_op (next->opcode);
                        next->sreg1 = ins->sreg1;
                        next->sreg2 = ins->sreg2;
+                       NULLIFY_INS(ins);
                        break;
 
 #if 0
@@ -2655,13 +2709,13 @@ loop_start:
                case OP_IBEQ:
                        g_assert (ins_is_compare(last_ins));
                        INS_REWRITE(ins, OP_MIPS_BEQ, last_ins->sreg1, last_ins->sreg2);
-                       last_ins->opcode = OP_NOP;
+                       NULLIFY_INS(last_ins);
                        break;
 
                case OP_IBNE_UN:
                        g_assert (ins_is_compare(last_ins));
                        INS_REWRITE(ins, OP_MIPS_BNE, last_ins->sreg1, last_ins->sreg2);
-                       last_ins->opcode = OP_NOP;
+                       NULLIFY_INS(last_ins);
                        break;
 
                case OP_IBGE:
@@ -2731,14 +2785,14 @@ loop_start:
                case OP_CLT:
                case OP_ICLT:
                        INS_REWRITE(ins, OP_MIPS_SLT, last_ins->sreg1, last_ins->sreg2);
-                       last_ins->opcode = OP_NOP;
+                       NULLIFY_INS(last_ins);
                        break;
 
 
                case OP_CLT_UN:
                case OP_ICLT_UN:
                        INS_REWRITE(ins, OP_MIPS_SLTU, last_ins->sreg1, last_ins->sreg2);
-                       last_ins->opcode = OP_NOP;
+                       NULLIFY_INS(last_ins);
                        break;
 
                case OP_CGT:
@@ -3242,6 +3296,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_LOAD_MEMBASE:
                case OP_LOADI4_MEMBASE:
                case OP_LOADU4_MEMBASE:
+                       g_assert (ins->dreg != -1);
                        if (mips_is_imm16 (ins->inst_offset)) {
                                mips_lw (code, ins->dreg, ins->inst_basereg, ins->inst_offset);
                        } else {
@@ -3523,18 +3578,20 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        mips_patch (patch, (guint32)code);
                        break;
                }
-               case OP_IMUL_OVF_UN:
-#if 0
-                       mips_mul (code, ins->dreg, ins->sreg1, ins->sreg2);
-#else
+               case OP_IMUL_OVF_UN: {
+                       guint32 *patch;
                        mips_mult (code, ins->sreg1, ins->sreg2);
                        mips_mflo (code, ins->dreg);
                        mips_mfhi (code, mips_at);
                        mips_nop (code);
                        mips_nop (code);
-#endif
-                       /* XXX - Throw exception if we overflowed */
+                       patch = (guint32 *)(void *)code;
+                       mips_beq (code, mips_at, mips_zero, 0);
+                       mips_nop (code);
+                       EMIT_SYSTEM_EXCEPTION_NAME("OverflowException");
+                       mips_patch (patch, (guint32)code);
                        break;
+               }
                case OP_ICONST:
                        mips_load_const (code, ins->dreg, ins->inst_c0);
                        break;
@@ -3633,15 +3690,16 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
                        mono_add_patch_info (cfg, (guint8*) code - cfg->native_code,
                                             MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
-#if LONG_BRANCH
-                       mips_lui (code, mips_t9, mips_zero, 0);
-                       mips_addiu (code, mips_t9, mips_t9, 0);
-                       mips_jr (code, mips_t9);
-                       mips_nop (code);
-#else
-                       mips_beq (code, mips_zero, mips_zero, 0);
-                       mips_nop (code);
-#endif
+                       if (cfg->arch.long_branch) {
+                               mips_lui (code, mips_t9, mips_zero, 0);
+                               mips_addiu (code, mips_t9, mips_t9, 0);
+                               mips_jr (code, mips_t9);
+                               mips_nop (code);
+                       }
+                       else {
+                               mips_beq (code, mips_zero, mips_zero, 0);
+                               mips_nop (code);
+                       }
                        break;
                case OP_CHECK_THIS:
                        /* ensure ins->sreg1 is not NULL */
@@ -3683,12 +3741,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        case OP_VCALL2:
                        case OP_VOIDCALL:
                        case OP_CALL:
-                               if (ins->flags & MONO_INST_HAS_METHOD)
+                               if (ins->flags & MONO_INST_HAS_METHOD) {
                                        mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_METHOD, call->method);
-                               else
+                                       mips_call (code, mips_t9, call->method);
+                               }
+                               else {
                                        mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_ABS, call->fptr);
-                               mips_lui (code, mips_t9, mips_zero, 0);
-                               mips_addiu (code, mips_t9, mips_t9, 0);
+                                       mips_call (code, mips_t9, call->fptr);
+                               }
                                break;
                        case OP_FCALL_REG:
                        case OP_LCALL_REG:
@@ -3697,6 +3757,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        case OP_VOIDCALL_REG:
                        case OP_CALL_REG:
                                MIPS_MOVE (code, mips_t9, ins->sreg1);
+                               mips_jalr (code, mips_t9, mips_ra);
+                               mips_nop (code);
                                break;
                        case OP_FCALL_MEMBASE:
                        case OP_LCALL_MEMBASE:
@@ -3705,10 +3767,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        case OP_VOIDCALL_MEMBASE:
                        case OP_CALL_MEMBASE:
                                mips_lw (code, mips_t9, ins->sreg1, ins->inst_offset);
+                               mips_jalr (code, mips_t9, mips_ra);
+                               mips_nop (code);
                                break;
                        }
-                       mips_jalr (code, mips_t9, mips_ra);
-                       mips_nop (code);
 #if PROMOTE_R4_TO_R8
                        /* returned an FP R4 (single), promote to R8 (double) in place */
                        if ((ins->opcode == OP_FCALL ||
@@ -3742,18 +3804,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_THROW: {
                        gpointer addr = mono_arch_get_throw_exception(NULL, FALSE);
                        mips_move (code, mips_a0, ins->sreg1);
-                       mips_load_const (code, mips_t9, addr);
-                       mips_jalr (code, mips_t9, mips_ra);
-                       mips_nop (code);
+                       mips_call (code, mips_t9, addr);
                        mips_break (code, 0xfc);
                        break;
                }
                case OP_RETHROW: {
                        gpointer addr = mono_arch_get_rethrow_exception(NULL, FALSE);
                        mips_move (code, mips_a0, ins->sreg1);
-                       mips_load_const (code, mips_t9, addr);
-                       mips_jalr (code, mips_t9, mips_ra);
-                       mips_nop (code);
+                       mips_call (code, mips_t9, addr);
                        mips_break (code, 0xfb);
                        break;
                }
@@ -3821,15 +3879,16 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                case OP_BR:
                        mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_BB, ins->inst_target_bb);
-#if LONG_BRANCH
-                       mips_lui (code, mips_at, mips_zero, 0);
-                       mips_addiu (code, mips_at, mips_at, 0);
-                       mips_jr (code, mips_at);
-                       mips_nop (code);
-#else
-                       mips_beq (code, mips_zero, mips_zero, 0);
-                       mips_nop (code);
-#endif
+                       if (cfg->arch.long_branch) {
+                               mips_lui (code, mips_at, mips_zero, 0);
+                               mips_addiu (code, mips_at, mips_at, 0);
+                               mips_jr (code, mips_at);
+                               mips_nop (code);
+                       }
+                       else {
+                               mips_beq (code, mips_zero, mips_zero, 0);
+                               mips_nop (code);
+                       }
                        break;
                case OP_BR_REG:
                        mips_jr (code, ins->sreg1);
@@ -4063,8 +4122,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 #if PROMOTE_R4_TO_R8
                        /* Need to convert ins->sreg1 to single-precision first */
                        mips_cvtsd (code, mips_ftemp, ins->sreg1);
-#endif
                        mips_swc1 (code, mips_ftemp, ins->inst_destbasereg, ins->inst_offset);
+#else
+                       mips_swc1 (code, ins->sreg1, ins->inst_destbasereg, ins->inst_offset);
+#endif
                        break;
                case OP_MIPS_LWC1:
                        g_assert (mips_is_imm16 (ins->inst_offset));
@@ -4076,6 +4137,38 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 #if PROMOTE_R4_TO_R8
                        /* Convert to double precision in place */
                        mips_cvtds (code, ins->dreg, ins->dreg);
+#endif
+                       break;
+               case OP_LOADR4_MEMINDEX:
+                       mips_addu (code, mips_at, ins->inst_basereg, ins->sreg2);
+                       mips_lwc1 (code, ins->dreg, mips_at, 0);
+                       break;
+               case OP_LOADR8_MEMINDEX:
+                       mips_addu (code, mips_at, ins->inst_basereg, ins->sreg2);
+#if _MIPS_SIM == _ABIO32
+                       mips_lwc1 (code, ins->dreg, mips_at, 0);
+                       mips_lwc1 (code, ins->dreg+1, mips_at, 4);
+#elif _MIPS_SIM == _ABIN32
+                       mips_ldc1 (code, ins->dreg, mips_at, 0);
+#endif
+                       break;
+               case OP_STORER4_MEMINDEX:
+                       mips_addu (code, mips_at, ins->inst_destbasereg, ins->sreg2);
+#if PROMOTE_R4_TO_R8
+                       /* Need to convert ins->sreg1 to single-precision first */
+                       mips_cvtsd (code, mips_ftemp, ins->sreg1);
+                       mips_swc1 (code, mips_ftemp, mips_at, 0);
+#else
+                       mips_swc1 (code, ins->sreg1, mips_at, 0);
+#endif
+                       break;
+               case OP_STORER8_MEMINDEX:
+                       mips_addu (code, mips_at, ins->inst_destbasereg, ins->sreg2);
+#if _MIPS_SIM == _ABIO32
+                       mips_swc1 (code, ins->sreg1, mips_at, 0);
+                       mips_swc1 (code, ins->sreg1+1, mips_at, 4);
+#elif _MIPS_SIM == _ABIN32
+                       mips_sdc1 (code, ins->sreg1, mips_at, 0);
 #endif
                        break;
                case OP_ICONV_TO_R_UN: {
@@ -4399,9 +4492,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p, gboolean ena
 
        mips_load_const (code, mips_a0, cfg->method);
        mips_addiu (code, mips_a1, mips_sp, offset);
-       mips_load_const (code, mips_t9, func);
-       mips_jalr (code, mips_t9, mips_ra);
-       mips_nop (code);
+       mips_call (code, mips_t9, func);
 
        MIPS_LW (code, mips_a0, mips_sp, offset + 0*SIZEOF_REGISTER);
        MIPS_LW (code, mips_a1, mips_sp, offset + 1*SIZEOF_REGISTER);
@@ -4562,6 +4653,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        MonoMethodSignature *sig;
        MonoInst *inst;
        int alloc_size, pos, i;
+       int alloc2_size = 0;
        guint8 *code;
        CallInfo *cinfo;
        int tracing = 0;
@@ -4614,26 +4706,37 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        fregs_to_save |= (fregs_to_save << 1);
 #endif
 #endif
+       /* If the stack size is too big, save 1024 bytes to start with
+        * so the prologue can use imm16(reg) addressing, then allocate
+        * the rest of the frame.
+        */
+       if (alloc_size > ((1 << 15) - 1024)) {
+               alloc2_size = alloc_size - 1024;
+               alloc_size = 1024;
+       }
        if (alloc_size) {
-               if (mips_is_imm16 (-alloc_size)) {
-                       mips_addiu (code, mips_sp, mips_sp, -alloc_size);
-               } else {
-                       mips_load_const (code, mips_at, -alloc_size);
-                       mips_addu (code, mips_sp, mips_sp, mips_at);
-               }
+               g_assert (mips_is_imm16 (-alloc_size));
+               mips_addiu (code, mips_sp, mips_sp, -alloc_size);
        }
 
-       if ((cfg->flags & MONO_CFG_HAS_CALLS) || ALWAYS_SAVE_RA)
-               mips_sw (code, mips_ra, mips_sp, alloc_size + MIPS_RET_ADDR_OFFSET);
+       if ((cfg->flags & MONO_CFG_HAS_CALLS) || ALWAYS_SAVE_RA) {
+               int offset = alloc_size + MIPS_RET_ADDR_OFFSET;
+               if (mips_is_imm16(offset))
+                       mips_sw (code, mips_ra, mips_sp, offset);
+               else {
+                       g_assert_not_reached ();
+               }
+       }
 
        /* XXX - optimize this later to not save all regs if LMF constructed */
+       pos = cfg->arch.iregs_offset - alloc2_size;
 
        if (iregs_to_save) {
                /* save used registers in own stack frame (at pos) */
-               pos = cfg->arch.iregs_offset;
                for (i = MONO_MAX_IREGS-1; i >= 0; --i) {
                        if (iregs_to_save & (1 << i)) {
                                g_assert (pos < cfg->stack_usage - sizeof(gpointer));
+                               g_assert (mips_is_imm16(pos));
                                MIPS_SW (code, i, mips_sp, pos);
                                pos += SIZEOF_REGISTER;
                        }
@@ -4642,7 +4745,9 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 #if SAVE_LMF
        if (method->save_lmf) {
                for (i = MONO_MAX_IREGS-1; i >= 0; --i) {
-                       MIPS_SW (code, i, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, iregs[i]));
+                       int offset = lmf_offset + G_STRUCT_OFFSET(MonoLMF, iregs[i]);
+                       g_assert (mips_is_imm16(offset));
+                       MIPS_SW (code, i, mips_sp, offset);
                }
        }
 #endif
@@ -4653,6 +4758,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                for (i = MONO_MAX_FREGS-1; i >= 0; --i) {
                        if (fregs_to_save & (1 << i)) {
                                g_assert (pos < cfg->stack_usage - MIPS_STACK_ALIGNMENT);
+                               g_assert (mips_is_imm16(pos));
                                mips_swc1 (code, i, mips_sp, pos);
                                pos += sizeof (gulong);
                        }
@@ -4661,7 +4767,9 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 #if SAVE_LMF
        if (method->save_lmf) {
                for (i = MONO_MAX_FREGS-1; i >= 0; --i) {
-                       mips_swc1 (code, i, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, fregs[i]));
+                       int offset = lmf_offset + G_STRUCT_OFFSET(MonoLMF, fregs[i]);
+                       g_assert (mips_is_imm16(offset));
+                       mips_swc1 (code, i, mips_sp, offset);
                }
        }
 #endif
@@ -4669,9 +4777,11 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        if (cfg->frame_reg != mips_sp) {
                MIPS_MOVE (code, cfg->frame_reg, mips_sp);
 #if SAVE_LMF
-               if (method->save_lmf)
-                       MIPS_SW (code, cfg->frame_reg, mips_sp,
-                                lmf_offset + G_STRUCT_OFFSET(MonoLMF, iregs[cfg->frame_reg]));
+               if (method->save_lmf) {
+                       int offset = lmf_offset + G_STRUCT_OFFSET(MonoLMF, iregs[cfg->frame_reg]);
+                       g_assert (mips_is_imm16(offset));
+                       MIPS_SW (code, cfg->frame_reg, mips_sp, offset);
+               }
 #endif
        }
 
@@ -4719,7 +4829,9 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 #endif
                        }
                        else if (ainfo->regtype == RegTypeBase) {
-                               mips_lw (code, inst->dreg, mips_sp, cfg->stack_usage + ainfo->offset);
+                               int offset = cfg->stack_usage + ainfo->offset;
+                               g_assert (mips_is_imm16(offset));
+                               mips_lw (code, inst->dreg, mips_sp, offset);
                        } else
                                g_assert_not_reached ();
 
@@ -4781,6 +4893,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                }
                        } else if (ainfo->regtype == RegTypeFP) {
                                g_assert (mips_is_imm16 (inst->inst_offset));
+                               g_assert (mips_is_imm16 (inst->inst_offset+4));
                                if (ainfo->size == 8) {
 #if _MIPS_SIM == _ABIO32
                                        mips_swc1 (code, ainfo->reg, inst->inst_basereg, inst->inst_offset+4);
@@ -4801,6 +4914,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                g_assert (mips_is_imm16 (inst->inst_offset + ainfo->size * sizeof (gpointer)));
                                /* Push the argument registers into their stack slots */
                                for (i = 0; i < ainfo->size; ++i) {
+                                       g_assert (mips_is_imm16(doffset));
                                        MIPS_SW (code, ainfo->reg + i, inst->inst_basereg, doffset);
                                        doffset += SIZEOF_REGISTER;
                                }
@@ -4816,9 +4930,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 
        if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
                mips_load_const (code, mips_a0, cfg->domain);
-               mips_load_const (code, mips_t9, (gpointer)mono_jit_thread_attach);
-               mips_jalr (code, mips_t9, mips_ra);
-               mips_nop (code);
+               mips_call (code, mips_t9, (gpointer)mono_jit_thread_attach);
        }
 
 #if SAVE_LMF
@@ -4831,33 +4943,33 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 #if 0
                        emit_tls_access (code, mips_temp, lmf_pthread_key);
 #endif
-                       if (G_STRUCT_OFFSET (MonoJitTlsData, lmf))
-                               mips_addiu (code, mips_a0, mips_temp, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
+                       if (G_STRUCT_OFFSET (MonoJitTlsData, lmf)) {
+                               int offset = G_STRUCT_OFFSET (MonoJitTlsData, lmf);
+                               g_assert (mips_is_imm16(offset));
+                               mips_addiu (code, mips_a0, mips_temp, offset);
+                       }
                } else {
-#if 0
-                       mips_addiu (code, mips_a0, mips_sp, lmf_offset);
-                       mips_load_const (code, mips_t9, (gpointer)mono_trace_lmf_prolog);
-                       mips_jalr (code, mips_t9, mips_ra);
-                       mips_nop (code);
-#endif
                        /* This can/will clobber the a0-a3 registers */
-                       mips_load_const (code, mips_t9, (gpointer)mono_get_lmf_addr);
-                       mips_jalr (code, mips_t9, mips_ra);
-                       mips_nop (code);
+                       mips_call (code, mips_t9, (gpointer)mono_get_lmf_addr);
                }
 
                /* mips_v0 is the result from mono_get_lmf_addr () (MonoLMF **) */
+               g_assert (mips_is_imm16(lmf_offset + G_STRUCT_OFFSET(MonoLMF, lmf_addr)));
                mips_sw (code, mips_v0, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, lmf_addr));
                /* new_lmf->previous_lmf = *lmf_addr */
                mips_lw (code, mips_at, mips_v0, 0);
+               g_assert (mips_is_imm16(lmf_offset + G_STRUCT_OFFSET(MonoLMF, previous_lmf)));
                mips_sw (code, mips_at, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, previous_lmf));
                /* *(lmf_addr) = sp + lmf_offset */
+               g_assert (mips_is_imm16(lmf_offset));
                mips_addiu (code, mips_at, mips_sp, lmf_offset);
                mips_sw (code, mips_at, mips_v0, 0);
 
                /* save method info */
                mips_load_const (code, mips_at, method);
+               g_assert (mips_is_imm16(lmf_offset + G_STRUCT_OFFSET(MonoLMF, method)));
                mips_sw (code, mips_at, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, method));
+               g_assert (mips_is_imm16(lmf_offset + G_STRUCT_OFFSET(MonoLMF, ebp)));
                MIPS_SW (code, mips_sp, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, ebp));
 
                /* save the current IP */
@@ -4866,6 +4978,18 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                mips_sw (code, mips_at, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, eip));
        }
 #endif
+       if (alloc2_size) {
+               if (mips_is_imm16 (-alloc2_size)) {
+                       mips_addu (code, mips_sp, mips_sp, -alloc2_size);
+               }
+               else {
+                       mips_load_const (code, mips_at, -alloc2_size);
+                       mips_addu (code, mips_sp, mips_sp, mips_at);
+               }
+               if (cfg->frame_reg != mips_sp)
+                       MIPS_MOVE (code, cfg->frame_reg, mips_sp);
+               alloc_size += alloc2_size;
+       }
 
        cfg->code_len = code - cfg->native_code;
        g_assert (cfg->code_len < cfg->code_size);
@@ -4932,9 +5056,11 @@ mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolea
        }
 
        mips_addiu (code, mips_sp, mips_sp, -32);
+       g_assert (mips_is_imm16(save_offset));
        switch (save_mode) {
        case SAVE_TWO:
                mips_sw (code, mips_v0, mips_sp, save_offset);
+               g_assert (mips_is_imm16(save_offset + SIZEOF_REGISTER));
                mips_sw (code, mips_v1, mips_sp, save_offset + SIZEOF_REGISTER);
                if (enable_arguments) {
                        MIPS_MOVE (code, mips_a1, mips_v0);
@@ -4951,6 +5077,7 @@ mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolea
                mips_sdc1 (code, mips_f0, mips_sp, save_offset);
                mips_ldc1 (code, mips_f12, mips_sp, save_offset);
                mips_lw (code, mips_a0, mips_sp, save_offset);
+               g_assert (mips_is_imm16(save_offset + SIZEOF_REGISTER));
                mips_lw (code, mips_a1, mips_sp, save_offset + SIZEOF_REGISTER);
                break;
        case SAVE_STRUCT:
@@ -4959,13 +5086,12 @@ mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolea
                break;
        }
        mips_load_const (code, mips_a0, cfg->method);
-       mips_load_const (code, mips_t9, func);
-       mips_jalr (code, mips_t9, mips_ra);
-       mips_nop (code);
+       mips_call (code, mips_t9, func);
 
        switch (save_mode) {
        case SAVE_TWO:
                mips_lw (code, mips_v0, mips_sp, save_offset);
+               g_assert (mips_is_imm16(save_offset + SIZEOF_REGISTER));
                mips_lw (code, mips_v1, mips_sp, save_offset + SIZEOF_REGISTER);
                break;
        case SAVE_ONE:
@@ -4991,6 +5117,7 @@ mono_arch_emit_epilog_sub (MonoCompile *cfg, guint8 *code)
        MonoMethod *method = cfg->method;
        int pos = 0, i;
        int max_epilog_size = 16 + 20*4;
+       int alloc2_size = 0;
        guint32 iregs_to_restore;
 #if SAVE_FP_REGS
        guint32 fregs_to_restore;
@@ -5026,10 +5153,17 @@ mono_arch_emit_epilog_sub (MonoCompile *cfg, guint8 *code)
        if (mono_jit_trace_calls != NULL && mono_trace_eval (method)) {
                code = mono_arch_instrument_epilog (cfg, mono_trace_leave_method, code, TRUE);
        }
-       pos = cfg->arch.iregs_offset;
        if (cfg->frame_reg != mips_sp) {
                MIPS_MOVE (code, mips_sp, cfg->frame_reg);
        }
+       /* If the stack frame is really large, deconstruct it in two steps */
+       if (cfg->stack_usage > ((1 << 15) - 1024)) {
+               alloc2_size = cfg->stack_usage - 1024;
+               /* partially deconstruct the stack */
+               mips_load_const (code, mips_at, alloc2_size);
+               mips_addu (code, mips_sp, mips_sp, mips_at);
+       }
+       pos = cfg->arch.iregs_offset - alloc2_size;
 #if SAVE_ALL_REGS
        iregs_to_restore = MONO_ARCH_CALLEE_SAVED_REGS;
 #else
@@ -5038,6 +5172,7 @@ mono_arch_emit_epilog_sub (MonoCompile *cfg, guint8 *code)
        if (iregs_to_restore) {
                for (i = MONO_MAX_IREGS-1; i >= 0; --i) {
                        if (iregs_to_restore & (1 << i)) {
+                               g_assert (mips_is_imm16(pos));
                                MIPS_LW (code, i, mips_sp, pos);
                                pos += SIZEOF_REGISTER;
                        }
@@ -5055,6 +5190,7 @@ mono_arch_emit_epilog_sub (MonoCompile *cfg, guint8 *code)
                for (i = MONO_MAX_FREGS-1; i >= 0; --i) {
                        if (fregs_to_restore & (1 << i)) {
                                g_assert (pos < cfg->stack_usage - MIPS_STACK_ALIGNMENT);
+                               g_assert (mips_is_imm16(pos));
                                mips_lwc1 (code, i, mips_sp, pos);
                                pos += FREG_SIZE
                        }
@@ -5067,8 +5203,10 @@ mono_arch_emit_epilog_sub (MonoCompile *cfg, guint8 *code)
                int lmf_offset = cfg->arch.lmf_offset;
 
                /* t0 = current_lmf->previous_lmf */
+               g_assert (mips_is_imm16(lmf_offset + G_STRUCT_OFFSET(MonoLMF, previous_lmf)));
                mips_lw (code, mips_temp, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, previous_lmf));
                /* t1 = lmf_addr */
+               g_assert (mips_is_imm16(lmf_offset + G_STRUCT_OFFSET(MonoLMF, lmf_addr)));
                mips_lw (code, mips_t1, mips_sp, lmf_offset + G_STRUCT_OFFSET(MonoLMF, lmf_addr));
                /* (*lmf_addr) = previous_lmf */
                mips_sw (code, mips_temp, mips_t1, 0);
@@ -5078,10 +5216,14 @@ mono_arch_emit_epilog_sub (MonoCompile *cfg, guint8 *code)
        /* Restore the fp */
        mips_lw (code, mips_fp, mips_sp, cfg->stack_usage + MIPS_FP_ADDR_OFFSET);
 #endif
-       /* Correct the stack pointer */
-       if ((cfg->flags & MONO_CFG_HAS_CALLS) || ALWAYS_SAVE_RA)
-               mips_lw (code, mips_ra, mips_sp, cfg->stack_usage + MIPS_RET_ADDR_OFFSET);
-       mips_addiu (code, mips_sp, mips_sp, cfg->stack_usage);
+       /* Restore ra */
+       if ((cfg->flags & MONO_CFG_HAS_CALLS) || ALWAYS_SAVE_RA) {
+               g_assert (mips_is_imm16(cfg->stack_usage - alloc2_size + MIPS_RET_ADDR_OFFSET));
+               mips_lw (code, mips_ra, mips_sp, cfg->stack_usage - alloc2_size + MIPS_RET_ADDR_OFFSET);
+       }
+       /* Restore the stack pointer */
+       g_assert (mips_is_imm16(cfg->stack_usage - alloc2_size));
+       mips_addiu (code, mips_sp, mips_sp, cfg->stack_usage - alloc2_size);
 
        /* Caller will emit either return or tail-call sequence */
 
@@ -5423,12 +5565,17 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
 
 #ifdef MONO_ARCH_HAVE_IMT
 
-#define CMP_SIZE 12
-#define BR_SIZE 4
-#define JUMP_IMM_SIZE 12
-#define JUMP_IMM32_SIZE 16
 #define ENABLE_WRONG_METHOD_CHECK 0
 
+#define MIPS_LOAD_SEQUENCE_LENGTH      8
+#define CMP_SIZE                       (MIPS_LOAD_SEQUENCE_LENGTH + 4)
+#define BR_SIZE                                8
+#define LOADSTORE_SIZE                 4
+#define JUMP_IMM_SIZE                  16
+#define JUMP_IMM32_SIZE                        (MIPS_LOAD_SEQUENCE_LENGTH + 8)
+#define LOAD_CONST_SIZE                        8
+#define JUMP_JR_SIZE                   8
+
 /*
  * LOCKING: called with the domain lock held
  */
@@ -5436,111 +5583,134 @@ gpointer
 mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count,
        gpointer fail_tramp)
 {
-       NOT_IMPLEMENTED;
-#if 0
        int i;
        int size = 0;
-       guint8 *code, *start;
+       guint8 *code, *start, *patch;
 
        for (i = 0; i < count; ++i) {
                MonoIMTCheckItem *item = imt_entries [i];
+
+               item->chunk_size += LOAD_CONST_SIZE;
                if (item->is_equals) {
                        if (item->check_target_idx) {
-                               if (!item->compare_done)
-                                       item->chunk_size += CMP_SIZE;
-                               if (fail_tramp)
-                                       item->chunk_size += BR_SIZE + JUMP_IMM32_SIZE;
-                               else
-                                       item->chunk_size += BR_SIZE + JUMP_IMM_SIZE;
+                               item->chunk_size += BR_SIZE + LOAD_CONST_SIZE + JUMP_JR_SIZE;
                        } else {
                                if (fail_tramp) {
-                                       item->chunk_size += CMP_SIZE + BR_SIZE + JUMP_IMM32_SIZE * 2;
+                                       item->chunk_size += BR_SIZE + JUMP_IMM32_SIZE * 2;
+                                       if (!item->has_target_code)
+                                               item->chunk_size += LOADSTORE_SIZE;
                                } else {
-                                       item->chunk_size += JUMP_IMM_SIZE;
+                                       item->chunk_size += LOADSTORE_SIZE + JUMP_IMM_SIZE;
 #if ENABLE_WRONG_METHOD_CHECK
                                        item->chunk_size += CMP_SIZE + BR_SIZE + 4;
 #endif
                                }
                        }
                } else {
-                       item->chunk_size += CMP_SIZE + BR_SIZE;
+                       item->chunk_size += BR_SIZE;
                        imt_entries [item->check_target_idx]->compare_done = TRUE;
                }
                size += item->chunk_size;
        }
+       /* the initial load of the vtable address */
+       size += MIPS_LOAD_SEQUENCE_LENGTH + LOADSTORE_SIZE;
        if (fail_tramp) {
                code = mono_method_alloc_generic_virtual_thunk (domain, size);
        } else {
-               /* the initial load of the vtable address */
-               size += 8;
                code = mono_domain_code_reserve (domain, size);
        }
        start = code;
-       if (!fail_tramp)
-               ppc_load (code, ppc_r11, (guint32)(& (vtable->vtable [0])));
+
+#if 0
+       /*
+        * We need to save and restore r11 because it might be
+        * used by the caller as the vtable register, so
+        * clobbering it will trip up the magic trampoline.
+        *
+        * FIXME: Get rid of this by making sure that r11 is
+        * not used as the vtable register in interface calls.
+        */
+       ppc_stptr (code, ppc_r11, PPC_RET_ADDR_OFFSET, ppc_sp);
+       ppc_load (code, ppc_r11, (gsize)(& (vtable->vtable [0])));
+#endif
+       /* t7 points to the vtable */
+       mips_load_const (code, mips_t7, (gsize)(& (vtable->vtable [0])));
+
        for (i = 0; i < count; ++i) {
                MonoIMTCheckItem *item = imt_entries [i];
+
                item->code_target = code;
+               mips_load_const (code, mips_temp, (gsize)item->key);
                if (item->is_equals) {
                        if (item->check_target_idx) {
-                               if (!item->compare_done) {
-                                       ppc_load (code, ppc_r0, (guint32)item->key);
-                                       ppc_cmpl (code, 0, 0, MONO_ARCH_IMT_REG, ppc_r0);
-                               }
                                item->jmp_code = code;
-                               ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
-                               if (fail_tramp)
-                                       ppc_load (code, ppc_r0, item->value.target_code);
-                               else
-                                       ppc_lwz (code, ppc_r0, (sizeof (gpointer) * item->value.vtable_slot), ppc_r11);
-                               ppc_mtctr (code, ppc_r0);
-                               ppc_bcctr (code, PPC_BR_ALWAYS, 0);
+                               mips_bne (code, mips_temp, MONO_ARCH_IMT_REG, 0);
+                               mips_nop (code);
+                               if (item->has_target_code) {
+                                       mips_load_const (code, mips_t9,
+                                                        item->value.target_code);
+                               }
+                               else {
+                                       mips_lw (code, mips_t9, mips_t7,
+                                               (sizeof (gpointer) * item->value.vtable_slot));
+                               }
+                               mips_jr (code, mips_t9);
+                               mips_nop (code);
                        } else {
                                if (fail_tramp) {
-                                       ppc_load (code, ppc_r0, (guint32)item->key);
-                                       ppc_cmpl (code, 0, 0, MONO_ARCH_IMT_REG, ppc_r0);
-                                       item->jmp_code = code;
-                                       ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
-                                       ppc_load (code, ppc_r0, item->value.target_code);
-                                       ppc_mtctr (code, ppc_r0);
-                                       ppc_bcctr (code, PPC_BR_ALWAYS, 0);
-                                       ppc_patch (item->jmp_code, code);
-                                       ppc_load (code, ppc_r0, fail_tramp);
-                                       ppc_mtctr (code, ppc_r0);
-                                       ppc_bcctr (code, PPC_BR_ALWAYS, 0);
-                                       item->jmp_code = NULL;
+                                       patch = code;
+                                       mips_bne (code, mips_temp, MONO_ARCH_IMT_REG, 0);
+                                       mips_nop (code);
+                                       if (item->has_target_code) {
+                                               mips_load_const (code, mips_t9,
+                                                                item->value.target_code);
+                                       } else {
+                                               g_assert (vtable);
+                                               mips_load_const (code, mips_at,
+                                                                & (vtable->vtable [item->value.vtable_slot]));
+                                               mips_lw (code, mips_t9, mips_at, 0);
+                                       }
+                                       mips_jr (code, mips_t9);
+                                       mips_nop (code);
+                                       mips_patch ((guint32 *)(void *)patch, (guint32)code);
+                                       mips_load_const (code, mips_at, fail_tramp);
+                                       mips_lw (code, mips_t9, mips_at, 0);
+                                       mips_jr (code, mips_t9);
+                                       mips_nop (code);
                                } else {
                                        /* enable the commented code to assert on wrong method */
 #if ENABLE_WRONG_METHOD_CHECK
                                        ppc_load (code, ppc_r0, (guint32)item->key);
-                                       ppc_cmpl (code, 0, 0, MONO_ARCH_IMT_REG, ppc_r0);
-                                       item->jmp_code = code;
+                                       ppc_compare_log (code, 0, MONO_ARCH_IMT_REG, ppc_r0);
+                                       patch = code;
                                        ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
 #endif
-                                       ppc_lwz (code, ppc_r0, (sizeof (gpointer) * item->value.vtable_slot), ppc_r11);
-                                       ppc_mtctr (code, ppc_r0);
-                                       ppc_bcctr (code, PPC_BR_ALWAYS, 0);
+                                       mips_lw (code, mips_t9, mips_t7,
+                                                (sizeof (gpointer) * item->value.vtable_slot));
+                                       mips_jr (code, mips_t9);
+                                       mips_nop (code);
+
 #if ENABLE_WRONG_METHOD_CHECK
-                                       ppc_patch (item->jmp_code, code);
+                                       ppc_patch (patch, code);
                                        ppc_break (code);
-                                       item->jmp_code = NULL;
 #endif
                                }
                        }
                } else {
-                       ppc_load (code, ppc_r0, (guint32)item->key);
-                       ppc_cmpl (code, 0, 0, MONO_ARCH_IMT_REG, ppc_r0);
+                       mips_load_const (code, mips_temp, (gulong)item->key);
+                       mips_slt (code, mips_temp, mips_temp, MONO_ARCH_IMT_REG);
+
                        item->jmp_code = code;
-                       ppc_bc (code, PPC_BR_FALSE, PPC_BR_LT, 0);
+                       mips_bne (code, mips_temp, mips_zero, 0);
+                       mips_nop (code);
                }
        }
        /* patch the branches to get to the target items */
        for (i = 0; i < count; ++i) {
                MonoIMTCheckItem *item = imt_entries [i];
-               if (item->jmp_code) {
-                       if (item->check_target_idx) {
-                               ppc_patch (item->jmp_code, imt_entries [item->check_target_idx]->code_target);
-                       }
+               if (item->jmp_code && item->check_target_idx) {
+                       mips_patch ((guint32 *)item->jmp_code,
+                                  (guint32)imt_entries [item->check_target_idx]->code_target);
                }
        }
 
@@ -5549,7 +5719,6 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckI
        g_assert (code - start <= size);
        mono_arch_flush_icache (start, size);
        return start;
-#endif
 }
 
 MonoMethod*
index 0ec362d8048a80639a3afebfda63aebecb99d2ea..a2e79b7b22871304ac2ff50ae73ebde5fc8551ec 100644 (file)
@@ -238,6 +238,7 @@ typedef struct MonoCompileArch {
        guint           spillvar_offset;
        guint           spillvar_offset_float;
        guint           tracing_offset;
+       guint           long_branch;
 } MonoCompileArch;
 
 #if SIZEOF_REGISTER == 4
@@ -272,17 +273,16 @@ typedef struct MonoCompileArch {
 #define MIPS_LAST_FPARG_REG    mips_f19
 #endif
 
-//#define MONO_ARCH_HAVE_IMT 1
-//#define MONO_ARCH_IMT_REG mips_v0            /* XXX */
+#define MONO_ARCH_HAVE_IMT     1
+#define MONO_ARCH_IMT_REG      mips_t0
 
-//#define MONO_ARCH_VTABLE_REG mips_v0         /* XXX */
-#define MONO_ARCH_RGCTX_REG    mips_v0         /* XXX */
+#define MONO_ARCH_VTABLE_REG   mips_t0
+#define MONO_ARCH_RGCTX_REG    mips_t0
 
 #define MONO_ARCH_HAVE_DECOMPOSE_OPTS 1
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 
 /* XXX - a mystery, but it works */
 #define MONO_GET_CONTEXT \
@@ -296,6 +296,8 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_NEED_DIV_CHECK 1
 #define MONO_ARCH_NO_IOV_CHECK 1
 
+#define MONO_ARCH_THIS_AS_FIRST_ARG 1
+
 #define MIPS_NUM_REG_ARGS (MIPS_LAST_ARG_REG-MIPS_FIRST_ARG_REG+1)
 #define MIPS_NUM_REG_FPARGS (MIPS_LAST_FPARG_REG-MIPS_FIRST_FPARG_REG+1)
 
index 2f76fd211fa16319660994a330e9ebcb0ef91718..0a541355c38fbc4cd7753ae948293decef2d8f1b 100644 (file)
@@ -88,7 +88,7 @@ MINI_OP(OP_STORE_MEMBASE_REG,"store_membase_reg", IREG, IREG, NONE)
 MINI_OP(OP_STOREI1_MEMBASE_REG, "storei1_membase_reg", IREG, IREG, NONE)
 MINI_OP(OP_STOREI2_MEMBASE_REG, "storei2_membase_reg", IREG, IREG, NONE)
 MINI_OP(OP_STOREI4_MEMBASE_REG, "storei4_membase_reg", IREG, IREG, NONE)
-MINI_OP(OP_STOREI8_MEMBASE_REG, "storei8_membase_reg", IREG, IREG, NONE)
+MINI_OP(OP_STOREI8_MEMBASE_REG, "storei8_membase_reg", IREG, LREG, NONE)
 MINI_OP(OP_STORER4_MEMBASE_REG, "storer4_membase_reg", IREG, FREG, NONE)
 MINI_OP(OP_STORER8_MEMBASE_REG, "storer8_membase_reg", IREG, FREG, NONE)
 
@@ -135,8 +135,8 @@ MINI_OP(OP_LOADU2_MEMINDEX,"loadu2_memindex", IREG, IREG, IREG)
 MINI_OP(OP_LOADI4_MEMINDEX,"loadi4_memindex", IREG, IREG, IREG)
 MINI_OP(OP_LOADU4_MEMINDEX,"loadu4_memindex", IREG, IREG, IREG)
 MINI_OP(OP_LOADI8_MEMINDEX,"loadi8_memindex", IREG, IREG, IREG)
-MINI_OP(OP_LOADR4_MEMINDEX,"loadr4_memindex", IREG, IREG, IREG)
-MINI_OP(OP_LOADR8_MEMINDEX,"loadr8_memindex", IREG, IREG, IREG)
+MINI_OP(OP_LOADR4_MEMINDEX,"loadr4_memindex", FREG, IREG, IREG)
+MINI_OP(OP_LOADR8_MEMINDEX,"loadr8_memindex", FREG, IREG, IREG)
 /* indexed stores: store sreg1 at (destbasereg + sreg2) */
 /* MONO_IS_STORE_MEMINDEX depends on the order here */
 MINI_OP(OP_STORE_MEMINDEX,"store_memindex", IREG, IREG, IREG)
@@ -144,8 +144,8 @@ MINI_OP(OP_STOREI1_MEMINDEX,"storei1_memindex", IREG, IREG, IREG)
 MINI_OP(OP_STOREI2_MEMINDEX,"storei2_memindex", IREG, IREG, IREG)
 MINI_OP(OP_STOREI4_MEMINDEX,"storei4_memindex", IREG, IREG, IREG)
 MINI_OP(OP_STOREI8_MEMINDEX,"storei8_memindex", IREG, IREG, IREG)
-MINI_OP(OP_STORER4_MEMINDEX,"storer4_memindex", IREG, IREG, IREG)
-MINI_OP(OP_STORER8_MEMINDEX,"storer8_memindex", IREG, IREG, IREG)
+MINI_OP(OP_STORER4_MEMINDEX,"storer4_memindex", IREG, FREG, IREG)
+MINI_OP(OP_STORER8_MEMINDEX,"storer8_memindex", IREG, FREG, IREG)
 
 MINI_OP(OP_LOAD_MEM,"load_mem", IREG, NONE, NONE)
 MINI_OP(OP_LOADU1_MEM,"loadu1_mem", IREG, NONE, NONE)
@@ -587,6 +587,9 @@ MINI_OP(OP_MEMSET, "memset", NONE, NONE, NONE)
 MINI_OP(OP_SAVE_LMF, "save_lmf", NONE, NONE, NONE)
 MINI_OP(OP_RESTORE_LMF, "restore_lmf", NONE, NONE, NONE)
 
+/* write barrier */
+MINI_OP(OP_CARD_TABLE_WBARRIER, "card_table_wbarrier", NONE, IREG, IREG)
+
 /* arch-dep tls access */
 MINI_OP(OP_TLS_GET,            "tls_get", IREG, NONE, NONE)
 
@@ -1120,13 +1123,12 @@ MINI_OP(OP_ALPHA_TRAPB, "alpha_trapb")
 #endif
 
 #if defined(__mips__)
-MINI_OP(OP_LONG_SHRUN_32,   "long_shrun_32", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BEQ,   "mips_beq", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BGEZ,  "mips_bgez", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BGTZ,  "mips_bgtz", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BLEZ,  "mips_blez", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BLTZ,  "mips_bltz", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BNE,   "mips_bne", NONE, NONE, NONE)
+MINI_OP(OP_MIPS_BEQ,   "mips_beq", NONE, IREG, IREG)
+MINI_OP(OP_MIPS_BGEZ,  "mips_bgez", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BGTZ,  "mips_bgtz", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BLEZ,  "mips_blez", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BLTZ,  "mips_bltz", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BNE,   "mips_bne", NONE, IREG, IREG)
 MINI_OP(OP_MIPS_CVTSD, "mips_cvtsd", FREG, FREG, NONE)
 MINI_OP(OP_MIPS_FBEQ,  "mips_fbeq", NONE, FREG, FREG)
 MINI_OP(OP_MIPS_FBGE,  "mips_fbge", NONE, FREG, FREG)
index ff0dfca92b77231e4a191a4733a2054b1f919c90..53f8e3a88b1750062545db421dac82c76a065fce 100644 (file)
 
 #include "jit-icalls.h"
 
+#if defined(__native_client__)
+
+void
+mono_runtime_setup_stat_profiler (void)
+{
+       printf("WARNING: mono_runtime_setup_stat_profiler() called!\n");
+}
+
+
+void
+mono_runtime_shutdown_stat_profiler (void)
+{
+}
+
+
+gboolean
+SIG_HANDLER_SIGNATURE (mono_chain_signal)
+{
+       return FALSE;
+}
+
+void
+mono_runtime_install_handlers (void)
+{
+}
+
+void
+mono_runtime_shutdown_handlers (void)
+{
+}
+
+void
+mono_runtime_cleanup_handlers (void)
+{
+}
+
+
+
+#else
+
 static GHashTable *mono_saved_signal_handlers = NULL;
 
 static gpointer
@@ -620,3 +660,5 @@ mono_gdb_render_native_backtraces ()
        return TRUE;
 }
 #endif
+#endif /* __native_client__ */
+
index 5992b007fdc7832a5407bb3a5f8ae074c58e4fd7..3a2faa209897f7597d9c22b72e41b0aca5b0e1ca 100755 (executable)
@@ -376,16 +376,6 @@ mono_ppc_is_direct_call_sequence (guint32 *code)
 #endif
 }
 
-gpointer
-mono_arch_get_vcall_slot (guint8 *code_ptr, mgreg_t *regs, int *displacement)
-{
-       *displacement = 0;
-
-       /* Not used on PPC */
-       g_assert_not_reached ();
-       return NULL;
-}
-
 #define MAX_ARCH_DELEGATE_PARAMS 7
 
 static gpointer
@@ -971,7 +961,7 @@ has_only_a_r48_field (MonoClass *klass)
 #endif
 
 static CallInfo*
-calculate_sizes (MonoMethodSignature *sig, gboolean is_pinvoke)
+calculate_sizes (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, gboolean is_pinvoke)
 {
        guint i, fr, gr, pstart;
        int n = sig->hasthis + sig->param_count;
@@ -1472,6 +1462,11 @@ mono_arch_allocate_vars (MonoCompile *m)
                        }
                        if (MONO_TYPE_ISSTRUCT (sig->params [i]) && size < sizeof (gpointer))
                                size = align = sizeof (gpointer);
+                       /* 
+                        * Use at least 4/8 byte alignment, since these might be passed in registers, and
+                        * they are saved using std in the prolog.
+                        */
+                       align = sizeof (gpointer);
                        offset += align - 1;
                        offset &= ~(align - 1);
                        inst->inst_offset = offset;
@@ -1494,7 +1489,7 @@ mono_arch_allocate_vars (MonoCompile *m)
        m->stack_offset = offset;
 
        if (sig->call_convention == MONO_CALL_VARARG) {
-               CallInfo *cinfo = calculate_sizes (m->method->signature, m->method->signature->pinvoke);
+               CallInfo *cinfo = calculate_sizes (m->generic_sharing_context, m->method->signature, m->method->signature->pinvoke);
 
                m->sig_cookie = cinfo->sig_cookie.offset;
 
@@ -1540,7 +1535,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
        sig = call->signature;
        n = sig->param_count + sig->hasthis;
        
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = calculate_sizes (cfg->generic_sharing_context, sig, sig->pinvoke);
 
        for (i = 0; i < n; ++i) {
                ArgInfo *ainfo = cinfo->args + i;
@@ -3015,7 +3010,7 @@ emit_load_volatile_arguments (MonoCompile *cfg, guint8 *code)
 
        pos = 0;
 
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = calculate_sizes (cfg->generic_sharing_context, sig, sig->pinvoke);
 
        if (MONO_TYPE_ISSTRUCT (sig->ret)) {
                ArgInfo *ainfo = &cinfo->ret;
@@ -3155,7 +3150,7 @@ ins_native_length (MonoCompile *cfg, MonoInst *ins)
 
        call = (MonoCallInst*)ins;
        sig = mono_method_signature (cfg->method);
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = calculate_sizes (cfg->generic_sharing_context, sig, sig->pinvoke);
 
        if (MONO_TYPE_ISSTRUCT (sig->ret))
                len += 4;
@@ -3556,7 +3551,22 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        }
                        break;
                case OP_BREAK:
-                       ppc_break (code);
+                       /*
+                        * gdb does not like encountering a trap in the debugged code. So 
+                        * instead of emitting a trap, we emit a call a C function and place a 
+                        * breakpoint there.
+                        */
+                       //ppc_break (code);
+                       ppc_mr (code, ppc_r3, ins->sreg1);
+                       mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, 
+                                            (gpointer)"mono_break");
+                       if ((FORCE_INDIR_CALL || cfg->method->dynamic) && !cfg->compile_aot) {
+                               ppc_load_func (code, ppc_r0, 0);
+                               ppc_mtlr (code, ppc_r0);
+                               ppc_blrl (code);
+                       } else {
+                               ppc_bl (code, 0);
+                       }
                        break;
                case OP_ADDCC:
                case OP_IADDCC:
@@ -4921,7 +4931,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        /* load arguments allocated to register from the stack */
        pos = 0;
 
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = calculate_sizes (cfg->generic_sharing_context, sig, sig->pinvoke);
 
        if (MONO_TYPE_ISSTRUCT (sig->ret)) {
                ArgInfo *ainfo = &cinfo->ret;
@@ -4967,7 +4977,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_stb (code, ainfo->reg, ppc_r11, inst->inst_offset);
+                                                       ppc_stb (code, ainfo->reg, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_stbx (code, ainfo->reg, inst->inst_basereg, ppc_r11);
@@ -4980,7 +4990,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_sth (code, ainfo->reg, ppc_r11, inst->inst_offset);
+                                                       ppc_sth (code, ainfo->reg, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_sthx (code, ainfo->reg, inst->inst_basereg, ppc_r11);
@@ -4994,7 +5004,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_stw (code, ainfo->reg, ppc_r11, inst->inst_offset);
+                                                       ppc_stw (code, ainfo->reg, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_stwx (code, ainfo->reg, inst->inst_basereg, ppc_r11);
@@ -5028,7 +5038,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_stptr (code, ainfo->reg, ppc_r11, inst->inst_offset);
+                                                       ppc_stptr (code, ainfo->reg, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_stptr_indexed (code, ainfo->reg, inst->inst_basereg, ppc_r11);
@@ -5048,7 +5058,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_stb (code, ppc_r0, ppc_r11, inst->inst_offset);
+                                                       ppc_stb (code, ppc_r0, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_stbx (code, ppc_r0, inst->inst_basereg, ppc_r11);
@@ -5061,7 +5071,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_sth (code, ppc_r0, ppc_r11, inst->inst_offset);
+                                                       ppc_sth (code, ppc_r0, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_sthx (code, ppc_r0, inst->inst_basereg, ppc_r11);
@@ -5075,7 +5085,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_stw (code, ppc_r0, ppc_r11, inst->inst_offset);
+                                                       ppc_stw (code, ppc_r0, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_stwx (code, ppc_r0, inst->inst_basereg, ppc_r11);
@@ -5113,7 +5123,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                        } else {
                                                if (ppc_is_imm32 (inst->inst_offset)) {
                                                        ppc_addis (code, ppc_r11, inst->inst_basereg, ppc_ha(inst->inst_offset));
-                                                       ppc_stptr (code, ppc_r0, ppc_r11, inst->inst_offset);
+                                                       ppc_stptr (code, ppc_r0, inst->inst_offset, ppc_r11);
                                                } else {
                                                        ppc_load (code, ppc_r11, inst->inst_offset);
                                                        ppc_stptr_indexed (code, ppc_r0, inst->inst_basereg, ppc_r11);
index 8df95d3af2bd7806d8e01fc43c7b9b56d7048e46..5542e51b7594a17761858ea90db786b87ed98dd0 100644 (file)
@@ -202,7 +202,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 
 #define MONO_ARCH_HAVE_STATIC_RGCTX_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
index dd542f85dfd2365a8b9582931f4ce1aeb285d104..ace0affbcf63a43cc98fc4e98927f5fca61f5a6a 100644 (file)
@@ -58,7 +58,6 @@ typedef struct
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 // #define MONO_ARCH_SIGSEGV_ON_ALTSTACK               1
 // #define MONO_ARCH_SIGNAL_STACK_SIZE         65536
-// #define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION       1
 
 #define MONO_ARCH_USE_SIGACTION        1
 
index 3c4baf035565681528d8d53f33037554cc1f3cca..116f542c725ef2c8193d4dee37278e5e3a65af60 100644 (file)
@@ -114,7 +114,6 @@ typedef struct
 #define MONO_ARCH_SIGNAL_STACK_SIZE                    256*1024
 #define MONO_ARCH_HAVE_DECOMPOSE_OPTS                  1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE      1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION          1
 #define MONO_ARCH_HAVE_IMT                             1
 #define MONO_ARCH_IMT_REG                              s390_r9
 #define MONO_ARCH_THIS_AS_FIRST_ARG                    1
index eb94c7c862b2c0a1480b51266c098b00f931e09f..880612013cab77d0135654da13d688eb15b9fb9e 100644 (file)
@@ -504,6 +504,8 @@ get_call_info (MonoCompile *cfg, MonoMethodSignature *sig, gboolean is_pinvoke)
                /* The address of the return value is passed in %o0 */
                add_general (&gr, &stack_size, &cinfo->ret, FALSE);
                cinfo->ret.reg += sparc_i0;
+               /* FIXME: Pass this after this as on other platforms */
+               NOT_IMPLEMENTED;
        }
 #endif
 
@@ -2257,84 +2259,6 @@ mono_sparc_is_virtual_call (guint32 *code)
        return FALSE;
 }
 
-/*
- * mono_arch_get_vcall_slot:
- *
- *  Determine the vtable slot used by a virtual call.
- */
-gpointer
-mono_arch_get_vcall_slot (guint8 *code8, mgreg_t *regs, int *displacement)
-{
-       guint32 *code = (guint32*)(gpointer)code8;
-       guint32 ins = code [0];
-       guint32 prev_ins = code [-1];
-
-       mono_sparc_flushw ();
-
-       *displacement = 0;
-
-       if (!mono_sparc_is_virtual_call (code))
-               return NULL;
-
-       if ((sparc_inst_op (ins) == 0x2) && (sparc_inst_op3 (ins) == 0x38)) {
-               if ((sparc_inst_op (prev_ins) == 0x3) && (sparc_inst_i (prev_ins) == 1) && (sparc_inst_op3 (prev_ins) == 0 || sparc_inst_op3 (prev_ins) == 0xb)) {
-                       /* ld [r1 + CONST ], r2; call r2 */
-                       guint32 base = sparc_inst_rs1 (prev_ins);
-                       gint32 disp = (((gint32)(sparc_inst_imm13 (prev_ins))) << 19) >> 19;
-                       gpointer base_val;
-
-                       g_assert (sparc_inst_rd (prev_ins) == sparc_inst_rs1 (ins));
-
-                       g_assert ((base >= sparc_o0) && (base <= sparc_i7));
-
-                       base_val = regs [base];
-
-                       *displacement = disp;
-
-                       return (gpointer)base_val;
-               }
-               else if ((sparc_inst_op (prev_ins) == 0x3) && (sparc_inst_i (prev_ins) == 0) && (sparc_inst_op3 (prev_ins) == 0)) {
-                       /* set r1, ICONST; ld [r1 + r2], r2; call r2 */
-                       /* Decode a sparc_set32 */
-                       guint32 base = sparc_inst_rs1 (prev_ins);
-                       guint32 disp;
-                       gpointer base_val;
-                       guint32 s1 = code [-3];
-                       guint32 s2 = code [-2];
-
-#ifdef SPARCV9
-                       NOT_IMPLEMENTED;
-#endif
-
-                       /* sparc_sethi */
-                       g_assert (sparc_inst_op (s1) == 0);
-                       g_assert (sparc_inst_op2 (s1) == 4);
-
-                       /* sparc_or_imm */
-                       g_assert (sparc_inst_op (s2) == 2);
-                       g_assert (sparc_inst_op3 (s2) == 2);
-                       g_assert (sparc_inst_i (s2) == 1);
-                       g_assert (sparc_inst_rs1 (s2) == sparc_inst_rd (s2));
-                       g_assert (sparc_inst_rd (s1) == sparc_inst_rs1 (s2));
-
-                       disp = ((s1 & 0x3fffff) << 10) | sparc_inst_imm13 (s2);
-
-                       g_assert ((base >= sparc_o0) && (base <= sparc_i7));
-
-                       base_val = regs [base];
-
-                       *displacement = disp;
-
-                       return (gpointer)base_val;
-               } else
-                       g_assert_not_reached ();
-       }
-       else
-               g_assert_not_reached ();
-
-       return NULL;
-}
-
 #define CMP_SIZE 3
 #define BR_SMALL_SIZE 2
 #define BR_LARGE_SIZE 2
index 3f3eefd6ab9ce3f8ca65500a1eb9d88914c9ce68..8a42f3ec021336a0a61c4b9f0b2b3f6c7f835694 100644 (file)
@@ -113,7 +113,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
 #define MONO_ARCH_EMULATE_FREM 1
 #define MONO_ARCH_NEED_DIV_CHECK 1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 #define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_IMT_REG sparc_g1
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
@@ -122,6 +121,8 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS
 #endif
 
+#define MONO_ARCH_THIS_AS_FIRST_ARG 1
+
 #ifndef __GNUC__
 /* assume Sun compiler if not GCC */
 static void * __builtin_return_address(int depth)
index 2bb080a05883f3d0b506c624a6096bdc707ce0fa..41b06d2c2cf1c8f3406f771a961bbc3c617b32df 100644 (file)
@@ -21,7 +21,7 @@ guint8* mono_trampoline_code [MONO_TRAMPOLINE_NUM];
 static GHashTable *class_init_hash_addr = NULL;
 static GHashTable *rgctx_lazy_fetch_trampoline_hash = NULL;
 static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr = NULL;
-static guint32 trampoline_calls;
+static guint32 trampoline_calls, jit_trampolines, unbox_trampolines, static_rgctx_trampolines;
 
 #define mono_trampolines_lock() EnterCriticalSection (&trampolines_mutex)
 #define mono_trampolines_unlock() LeaveCriticalSection (&trampolines_mutex)
@@ -40,6 +40,7 @@ get_unbox_trampoline (MonoGenericSharingContext *gsctx, MonoMethod *m, gpointer
                else
                        return mono_aot_get_unbox_trampoline (m);
        } else {
+               unbox_trampolines ++;
                return mono_arch_get_unbox_trampoline (gsctx, m, addr);
        }
 }
@@ -133,6 +134,8 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
        g_hash_table_insert (domain_jit_info (domain)->static_rgctx_trampoline_hash, info, res);
        mono_domain_unlock (domain);
 
+       static_rgctx_trampolines ++;
+
        return res;
 }
 #else
@@ -147,21 +150,13 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
 }
 #endif
 
-gpointer*
-mono_get_vcall_slot_addr (guint8* code, mgreg_t *regs)
-{
-       gpointer vt;
-       int displacement;
-       vt = mono_arch_get_vcall_slot (code, regs, &displacement);
-       if (!vt)
-               return NULL;
-       return (gpointer*)((char*)vt + displacement);
-}
-
 #ifdef MONO_ARCH_HAVE_IMT
 
+/*
+ * Either IMPL_METHOD or AOT_ADDR will be set on return.
+ */
 static gpointer*
-mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used)
+mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used, gpointer *aot_addr)
 {
        MonoObject *this_argument = mono_arch_get_this_arg_from_call (NULL, mono_method_signature (method), regs, code);
        MonoVTable *vt = this_argument->vtable;
@@ -175,6 +170,7 @@ mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *cod
                return slot;
        } else {
                MonoMethod *imt_method = mono_arch_find_imt_method (regs, code);
+               MonoMethod *impl;
                int interface_offset;
                int imt_slot = MONO_IMT_SIZE + displacement;
 
@@ -186,37 +182,42 @@ mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *cod
                }
                mono_vtable_build_imt_slot (vt, mono_method_get_imt_slot (imt_method));
 
-               if (impl_method) {
-                       MonoMethod *impl;
+               if (imt_method->is_inflated && ((MonoMethodInflated*)imt_method)->context.method_inst) {
+                       MonoGenericContext context = { NULL, NULL };
 
-                       if (imt_method->is_inflated && ((MonoMethodInflated*)imt_method)->context.method_inst) {
-                               MonoGenericContext context = { NULL, NULL };
+                       /* 
+                        * Generic virtual method, imt_method contains the inflated interface 
+                        * method, need to get the inflated impl method.
+                        */
+                       /* imt_method->slot might not be set */
+                       impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_declaring_generic_method (imt_method)->slot);
 
-                               /* 
-                                * Generic virtual method, imt_method contains the inflated interface 
-                                * method, need to get the inflated impl method.
-                                */
-                               /* imt_method->slot might not be set */
-                               impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_declaring_generic_method (imt_method)->slot);
-
-                               if (impl->klass->generic_class)
-                                       context.class_inst = impl->klass->generic_class->context.class_inst;
-                               context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst;
-                               impl = mono_class_inflate_generic_method (impl, &context);
-                       } else {
+                       if (impl->klass->generic_class)
+                               context.class_inst = impl->klass->generic_class->context.class_inst;
+                       context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst;
+                       impl = mono_class_inflate_generic_method (impl, &context);
+               } else {
+                       /* Avoid loading metadata or creating a generic vtable if possible */
+                       if (!vt->klass->valuetype)
+                               *aot_addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method));
+                       else
+                               *aot_addr = NULL;
+                       if (*aot_addr)
+                               impl = NULL;
+                       else
                                impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_vtable_slot (imt_method));
-                       }
+               }
 
-                       if (mono_method_needs_static_rgctx_invoke (impl, FALSE))
-                               *need_rgctx_tramp = TRUE;
+               if (impl && mono_method_needs_static_rgctx_invoke (impl, FALSE))
+                       *need_rgctx_tramp = TRUE;
 
-                       *impl_method = impl;
+               *impl_method = impl;
 #if DEBUG_IMT
                printf ("mono_convert_imt_slot_to_vtable_slot: method = %s.%s.%s, imt_method = %s.%s.%s\n",
                                method->klass->name_space, method->klass->name, method->name, 
                                imt_method->klass->name_space, imt_method->klass->name, imt_method->name);
 #endif
-               }
+
                g_assert (imt_slot < MONO_IMT_SIZE);
                if (vt->imt_collisions_bitmap & (1 << imt_slot)) {
                        int slot = mono_method_get_vtable_index (imt_method);
@@ -279,12 +280,13 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
        MonoMethod *generic_virtual = NULL, *variant_iface = NULL;
        int context_used;
        gboolean virtual, proxy = FALSE, variance_used = FALSE;
-       gpointer *orig_vtable_slot, *imt_vcall_slot = NULL;
+       gpointer *orig_vtable_slot, *vtable_slot_to_patch = NULL;
        MonoJitInfo *ji = NULL;
 
        virtual = (gpointer)vtable_slot > (gpointer)vt;
 
        orig_vtable_slot = vtable_slot;
+       vtable_slot_to_patch = vtable_slot;
 
 #ifdef MONO_ARCH_HAVE_IMT
        /* IMT call */
@@ -305,9 +307,12 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                        /* Use the slow path for now */
                        proxy = TRUE;
                    m = mono_object_get_virtual_method (this_arg, m);
+                       vtable_slot_to_patch = NULL;
                } else {
-                       imt_vcall_slot = mono_convert_imt_slot_to_vtable_slot (vtable_slot, regs, code, m, &impl_method, &need_rgctx_tramp, &variance_used);
-                       vtable_slot = imt_vcall_slot;
+                       addr = NULL;
+                       vtable_slot = mono_convert_imt_slot_to_vtable_slot (vtable_slot, regs, code, m, &impl_method, &need_rgctx_tramp, &variance_used, &addr);
+                       /* This is the vcall slot which gets called through the IMT thunk */
+                       vtable_slot_to_patch = vtable_slot;
                        /* mono_convert_imt_slot_to_vtable_slot () also gives us the method that is supposed
                         * to be called, so we compile it and go ahead as usual.
                         */
@@ -319,6 +324,17 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                        } else if (variance_used && mono_class_has_variant_generic_params (m->klass)) {
                                variant_iface = m;
                        }
+
+                       if (addr && !generic_virtual && !variant_iface) {
+                               /*
+                                * We found AOT compiled code for the method, skip the rest.
+                                */
+                               if (mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot))
+                                       *vtable_slot = addr;
+
+                               return mono_create_ftnptr (mono_domain_get (), addr);
+                       }
+
                        m = impl_method;
                }
        }
@@ -515,13 +531,10 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
        if (vtable_slot) {
                if (m->klass->valuetype)
                        addr = get_unbox_trampoline (mono_get_generic_context_from_code (code), m, addr, need_rgctx_tramp);
-               g_assert (*vtable_slot);
 
-               if (!proxy && (mono_aot_is_got_entry (code, (guint8*)vtable_slot) || mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot))) {
-                       if (imt_vcall_slot)
-                               /* This is the vcall slot which gets called through the IMT thunk */
-                               vtable_slot = imt_vcall_slot;
-                       *vtable_slot = mono_get_addr_from_ftnptr (addr);
+               if (vtable_slot_to_patch && (mono_aot_is_got_entry (code, (guint8*)vtable_slot_to_patch) || mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot_to_patch))) {
+                       g_assert (*vtable_slot_to_patch);
+                       *vtable_slot_to_patch = mono_get_addr_from_ftnptr (addr);
                }
        }
        else {
@@ -580,9 +593,6 @@ mono_vcall_trampoline (mgreg_t *regs, guint8 *code, int slot, guint8 *tramp)
        MonoMethod *m;
        gboolean need_rgctx_tramp = FALSE;
        gpointer addr;
-#ifndef MONO_ARCH_THIS_AS_FIRST_ARG
-       int displacement;
-#endif
 
        trampoline_calls ++;
 
@@ -593,35 +603,18 @@ mono_vcall_trampoline (mgreg_t *regs, guint8 *code, int slot, guint8 *tramp)
         * We use one vtable trampoline per vtable slot index, so we need only the vtable,
         * the other two can be computed from the vtable + the slot index.
         */
-#ifdef MONO_ARCH_THIS_AS_FIRST_ARG
+#ifndef MONO_ARCH_THIS_AS_FIRST_ARG
+       /* All architectures should support this */
+       g_assert_not_reached ();
+#endif
+
        /*
-        * If the arch passes 'this' as the first arg, obtain the vtable using it.
+        * Obtain the vtable from the 'this' arg.
         */
        this = mono_arch_get_this_arg_from_call (NULL, NULL, regs, code);
        g_assert (this);
 
        vt = this->vtable;
-#else
-       g_assert (!mono_use_llvm);
-       /*
-        * Obtain the vtable pointer in an arch specific manner.
-        */
-       vt = mono_arch_get_vcall_slot (code, regs, &displacement);
-
-       if (!vt) {
-               int i;
-               MonoJitInfo *ji;
-
-               ji = mono_jit_info_table_find (mono_domain_get (), (char*)code);
-               if (ji)
-                       printf ("Caller: %s\n", mono_method_full_name (ji->method, TRUE));
-               /* Print some debug info */
-               for (i = 0; i < 32; ++i)
-                       printf ("0x%x ", code [-32 + i]);
-               printf ("\n");
-               g_assert (vt);
-       }
-#endif
 
        if (slot >= 0) {
                /* Normal virtual call */
@@ -660,9 +653,6 @@ mono_vcall_trampoline (mgreg_t *regs, guint8 *code, int slot, guint8 *tramp)
                need_rgctx_tramp = FALSE;
        }
 
-       // FIXME:
-       // - get rid of mono_arch_get_vcall_slot where possible
-
        return common_call_trampoline (regs, code, m, tramp, vt, vtable_slot, need_rgctx_tramp);
 }
 
@@ -1126,6 +1116,9 @@ mono_trampolines_init (void)
 #endif
 
        mono_counters_register ("Calls to trampolines", MONO_COUNTER_JIT | MONO_COUNTER_INT, &trampoline_calls);
+       mono_counters_register ("JIT trampolines", MONO_COUNTER_JIT | MONO_COUNTER_INT, &jit_trampolines);
+       mono_counters_register ("Unbox trampolines", MONO_COUNTER_JIT | MONO_COUNTER_INT, &unbox_trampolines);
+       mono_counters_register ("Static rgctx trampolines", MONO_COUNTER_JIT | MONO_COUNTER_INT, &static_rgctx_trampolines);
 }
 
 void
@@ -1133,6 +1126,10 @@ mono_trampolines_cleanup (void)
 {
        if (class_init_hash_addr)
                g_hash_table_destroy (class_init_hash_addr);
+       if (rgctx_lazy_fetch_trampoline_hash)
+               g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash);
+       if (rgctx_lazy_fetch_trampoline_hash_addr)
+               g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash_addr);
 
        DeleteCriticalSection (&trampolines_mutex);
 }
@@ -1290,7 +1287,7 @@ mono_create_jit_trampoline_in_domain (MonoDomain *domain, MonoMethod *method)
        g_hash_table_insert (domain_jit_info (domain)->jit_trampoline_hash, method, tramp);
        mono_domain_unlock (domain);
 
-       mono_jit_stats.method_trampolines++;
+       jit_trampolines++;
 
        return tramp;
 }      
@@ -1317,7 +1314,7 @@ mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token)
 
        tramp = mono_create_specific_trampoline (start, MONO_TRAMPOLINE_AOT, domain, NULL);
 
-       mono_jit_stats.method_trampolines++;
+       jit_trampolines++;
 
        return tramp;
 }      
@@ -1414,6 +1411,7 @@ gpointer
 mono_create_monitor_enter_trampoline (void)
 {
        static gpointer code;
+       MonoTrampInfo *info;
 
        if (mono_aot_only) {
                if (!code)
@@ -1424,8 +1422,13 @@ mono_create_monitor_enter_trampoline (void)
 #ifdef MONO_ARCH_MONITOR_OBJECT_REG
        mono_trampolines_lock ();
 
-       if (!code)
-               code = mono_arch_create_monitor_enter_trampoline (NULL, FALSE);
+       if (!code) {
+               code = mono_arch_create_monitor_enter_trampoline (&info, FALSE);
+               if (info) {
+                       mono_save_trampoline_xdebug_info (info);
+                       mono_tramp_info_free (info);
+               }
+       }
 
        mono_trampolines_unlock ();
 #else
@@ -1440,6 +1443,7 @@ gpointer
 mono_create_monitor_exit_trampoline (void)
 {
        static gpointer code;
+       MonoTrampInfo *info;
 
        if (mono_aot_only) {
                if (!code)
@@ -1450,8 +1454,13 @@ mono_create_monitor_exit_trampoline (void)
 #ifdef MONO_ARCH_MONITOR_OBJECT_REG
        mono_trampolines_lock ();
 
-       if (!code)
-               code = mono_arch_create_monitor_exit_trampoline (NULL, FALSE);
+       if (!code) {
+               code = mono_arch_create_monitor_exit_trampoline (&info, FALSE);
+               if (info) {
+                       mono_save_trampoline_xdebug_info (info);
+                       mono_tramp_info_free (info);
+               }
+       }
 
        mono_trampolines_unlock ();
 #else
index f6a7ca4a6b9cdbfbd30f889ec0389e82d5b477da..a7abb8871295253d2edf10a64cafa3fd6f66739d 100644 (file)
@@ -20,6 +20,7 @@
 #include <mono/metadata/threads.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/mono-debug.h>
+#include <mono/metadata/gc-internal.h>
 #include <mono/utils/mono-math.h>
 #include <mono/utils/mono-counters.h>
 #include <mono/utils/mono-mmap.h>
@@ -65,6 +66,65 @@ static CRITICAL_SECTION mini_arch_mutex;
 MonoBreakpointInfo
 mono_breakpoint_info [MONO_BREAKPOINT_ARRAY_SIZE];
 
+static gpointer
+mono_realloc_native_code (MonoCompile *cfg)
+{
+#ifdef __native_client_codegen__
+       guint old_padding;
+       gpointer native_code;
+       guint alignment_check;
+
+       /* Save the old alignment offset so we can re-align after the realloc. */
+       old_padding = (guint)(cfg->native_code - cfg->native_code_alloc);
+
+       cfg->native_code_alloc = g_realloc (cfg->native_code_alloc, 
+                                                                               cfg->code_size + kNaClAlignment);
+
+       /* Align native_code to next nearest kNaClAlignment byte. */
+       native_code = (guint)cfg->native_code_alloc + kNaClAlignment;
+       native_code = (guint)native_code & ~kNaClAlignmentMask;
+
+       /* Shift the data to be 32-byte aligned again. */
+       memmove (native_code, cfg->native_code_alloc + old_padding, cfg->code_size);
+
+       alignment_check = (guint)native_code & kNaClAlignmentMask;
+       g_assert (alignment_check == 0);
+       return native_code;
+#else
+       return g_realloc (cfg->native_code, cfg->code_size);
+#endif
+}
+
+#ifdef __native_client_codegen__
+
+/* mono_arch_nacl_pad: Add pad bytes of alignment instructions at code,       */
+/* Check that alignment doesn't cross an alignment boundary.        */
+guint8 *
+mono_arch_nacl_pad (guint8 *code, int pad)
+{
+       const int kMaxPadding = 7;    /* see x86-codegen.h: x86_padding() */
+
+       if (pad == 0) return code;
+       /* assertion: alignment cannot cross a block boundary */
+       g_assert(((uintptr_t)code & (~kNaClAlignmentMask)) ==
+                        (((uintptr_t)code + pad - 1) & (~kNaClAlignmentMask)));
+       while (pad >= kMaxPadding) {
+               x86_padding (code, kMaxPadding);
+               pad -= kMaxPadding;
+       }
+       if (pad != 0) x86_padding (code, pad);
+       return code;
+}
+
+guint8 *
+mono_arch_nacl_skip_nops (guint8 *code)
+{
+       x86_skip_nops (code);
+       return code;
+}
+
+#endif /* __native_client_codegen__ */
+
 /*
  * The code generated for sequence points reads from this location, which is
  * made read-only when single stepping is enabled.
@@ -540,14 +600,16 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
 int
 mono_arch_get_argument_info (MonoMethodSignature *csig, int param_count, MonoJitArgumentInfo *arg_info)
 {
-       int k, args_size = 0;
+       int len, k, args_size = 0;
        int size, pad;
        guint32 align;
        int offset = 8;
        CallInfo *cinfo;
 
        /* Avoid g_malloc as it is not signal safe */
-       cinfo = (CallInfo*)g_newa (guint8*, sizeof (CallInfo) + (sizeof (ArgInfo) * (csig->param_count + 1)));
+       len = sizeof (CallInfo) + (sizeof (ArgInfo) * (csig->param_count + 1));
+       cinfo = (CallInfo*)g_newa (guint8*, len);
+       memset (cinfo, 0, len);
 
        cinfo = get_call_info_internal (NULL, cinfo, csig, FALSE);
 
@@ -617,6 +679,14 @@ typedef void (*CpuidFunc) (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_ed
 static int 
 cpuid (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_edx)
 {
+#if defined(__native_client__)
+       /* Taken from below, the bug listed in the comment is */
+       /* only valid for non-static cases.                   */
+       __asm__ __volatile__ ("cpuid"
+               : "=a" (*p_eax), "=b" (*p_ebx), "=c" (*p_ecx), "=d" (*p_edx)
+               : "a" (id));
+       return 1;
+#else
        int have_cpuid = 0;
 #ifndef _MSC_VER
        __asm__  __volatile__ (
@@ -671,6 +741,7 @@ cpuid (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_edx)
                return 1;
        }
        return 0;
+#endif
 }
 
 /*
@@ -724,6 +795,7 @@ mono_arch_cleanup (void)
 guint32
 mono_arch_cpu_optimizazions (guint32 *exclude_mask)
 {
+#if !defined(__native_client__)
        int eax, ebx, ecx, edx;
        guint32 opts = 0;
        
@@ -755,6 +827,9 @@ mono_arch_cpu_optimizazions (guint32 *exclude_mask)
 #endif
        }
        return opts;
+#else
+       return MONO_OPT_CMOV | MONO_OPT_FCMOV | MONO_OPT_SSE2;
+#endif
 }
 
 /*
@@ -2211,6 +2286,11 @@ x86_pop_reg (code, X86_ECX); \
 x86_pop_reg (code, X86_EDX); \
 x86_pop_reg (code, X86_EAX);
 
+/* REAL_PRINT_REG does not appear to be used, and was not adapted to work with Native Client. */
+#ifdef __native__client_codegen__
+#define REAL_PRINT_REG(text, reg) g_assert_not_reached()
+#endif
+
 /* benchmark and set based on cpu */
 #define LOOP_ALIGNMENT 8
 #define bb_is_loop_start(bb) ((bb)->loop_body_start && (bb)->nesting)
@@ -2237,7 +2317,23 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        bb->native_offset = cfg->code_len;
                }
        }
-
+#ifdef __native_client_codegen__
+       {
+               /* For Native Client, all indirect call/jump targets must be   */
+               /* 32-byte aligned.  Exception handler blocks are jumped to    */
+               /* indirectly as well.                                         */
+               gboolean bb_needs_alignment = (bb->flags & BB_INDIRECT_JUMP_TARGET) ||
+                       (bb->flags & BB_EXCEPTION_HANDLER);
+
+               /* if ((cfg->code_len & kNaClAlignmentMask) != 0) { */
+               if ( bb_needs_alignment && ((cfg->code_len & kNaClAlignmentMask) != 0)) {
+            int pad = kNaClAlignment - (cfg->code_len & kNaClAlignmentMask);
+            if (pad != kNaClAlignment) code = mono_arch_nacl_pad(code, pad);
+            cfg->code_len += pad;
+            bb->native_offset = cfg->code_len;
+               }
+       }
+#endif  /* __native_client_codegen__ */
        if (cfg->verbose_level > 2)
                g_print ("Basic block %d starting at offset 0x%x\n", bb->block_num, bb->native_offset);
 
@@ -2257,14 +2353,19 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
        mono_debug_open_block (cfg, bb, offset);
 
+    if (mono_break_at_bb_method && mono_method_desc_full_match (mono_break_at_bb_method, cfg->method) && bb->block_num == mono_break_at_bb_bb_num)
+               x86_breakpoint (code);
+
        MONO_BB_FOR_EACH_INS (bb, ins) {
                offset = code - cfg->native_code;
 
                max_len = ((guint8 *)ins_get_spec (ins->opcode))[MONO_INST_LEN];
 
-               if (G_UNLIKELY (offset > (cfg->code_size - max_len - 16))) {
+#define EXTRA_CODE_SPACE (NACL_SIZE (16, 16 + kNaClAlignment))
+
+               if (G_UNLIKELY (offset > (cfg->code_size - max_len - EXTRA_CODE_SPACE))) {
                        cfg->code_size *= 2;
-                       cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
+                       cfg->native_code = mono_realloc_native_code(cfg);
                        code = cfg->native_code + offset;
                        mono_jit_stats.code_reallocs++;
                }
@@ -3893,17 +3994,59 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                }
                case OP_ATOMIC_CAS_I4: {
+                       g_assert (ins->dreg == X86_EAX);
                        g_assert (ins->sreg3 == X86_EAX);
                        g_assert (ins->sreg1 != X86_EAX);
                        g_assert (ins->sreg1 != ins->sreg2);
 
                        x86_prefix (code, X86_LOCK_PREFIX);
                        x86_cmpxchg_membase_reg (code, ins->sreg1, ins->inst_offset, ins->sreg2);
+                       break;
+               }
+#ifdef HAVE_SGEN_GC
+               case OP_CARD_TABLE_WBARRIER: {
+                       int ptr = ins->sreg1;
+                       int value = ins->sreg2;
+                       guchar *br;
+                       int nursery_shift, card_table_shift;
+                       gpointer card_table_mask;
+                       size_t nursery_size;
+                       gulong card_table = (gulong)mono_gc_get_card_table (&card_table_shift, &card_table_mask);
+                       gulong nursery_start = (gulong)mono_gc_get_nursery (&nursery_shift, &nursery_size);
 
-                       if (ins->dreg != X86_EAX)
-                               x86_mov_reg_reg (code, ins->dreg, X86_EAX, 4);
+                       /*
+                        * We need one register we can clobber, we choose EDX and make sreg1
+                        * fixed EAX to work around limitations in the local register allocator.
+                        * sreg2 might get allocated to EDX, but that is not a problem since
+                        * we use it before clobbering EDX.
+                        */
+                       g_assert (ins->sreg1 == X86_EAX);
+
+                       /*
+                        * This is the code we produce:
+                        *
+                        *   edx = value
+                        *   edx >>= nursery_shift
+                        *   cmp edx, (nursery_start >> nursery_shift)
+                        *   jne done
+                        *   edx = ptr
+                        *   edx >>= card_table_shift
+                        *   card_table[edx] = 1
+                        * done:
+                        */
+
+                       if (value != X86_EDX)
+                               x86_mov_reg_reg (code, X86_EDX, value, 4);
+                       x86_shift_reg_imm (code, X86_SHR, X86_EDX, nursery_shift);
+                       x86_alu_reg_imm (code, X86_CMP, X86_EDX, nursery_start >> nursery_shift);
+                       br = code; x86_branch8 (code, X86_CC_NE, -1, FALSE);
+                       x86_mov_reg_reg (code, X86_EDX, ptr, 4);
+                       x86_shift_reg_imm (code, X86_SHR, X86_EDX, card_table_shift);
+                       x86_mov_membase_imm (code, X86_EDX, card_table, 1, 1);
+                       x86_patch (br, code);
                        break;
                }
+#endif
 #ifdef MONO_ARCH_SIMD_INTRINSICS
                case OP_ADDPS:
                        x86_sse_alu_ps_reg_reg (code, X86_SSE_ADD, ins->sreg1, ins->sreg2);
@@ -4463,9 +4606,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                }
 
                if (G_UNLIKELY ((code - cfg->native_code - offset) > max_len)) {
+#ifndef __native_client_codegen__
                        g_warning ("wrong maximal instruction length of instruction %s (expected %d, got %d)",
-                                  mono_inst_name (ins->opcode), max_len, code - cfg->native_code - offset);
+                                          mono_inst_name (ins->opcode), max_len, code - cfg->native_code - offset);
                        g_assert_not_reached ();
+#endif  /* __native_client_codegen__ */
                }
               
                cpos += max_len;
@@ -4548,13 +4693,30 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        int alloc_size, pos, max_offset, i, cfa_offset;
        guint8 *code;
        gboolean need_stack_frame;
+#ifdef __native_client_codegen__
+       guint alignment_check;
+#endif
 
        cfg->code_size = MAX (cfg->header->code_size * 4, 10240);
 
        if (cfg->prof_options & MONO_PROFILE_ENTER_LEAVE)
                cfg->code_size += 512;
 
+#ifdef __native_client_codegen__
+       /* native_code_alloc is not 32-byte aligned, native_code is. */
+       cfg->native_code_alloc = g_malloc (cfg->code_size + kNaClAlignment);
+
+       /* Align native_code to next nearest kNaclAlignment byte. */
+       cfg->native_code = (guint)cfg->native_code_alloc + kNaClAlignment; 
+       cfg->native_code = (guint)cfg->native_code & ~kNaClAlignmentMask;
+       
+       code = cfg->native_code;
+
+       alignment_check = (guint)cfg->native_code & kNaClAlignmentMask;
+       g_assert(alignment_check == 0);
+#else
        code = cfg->native_code = g_malloc (cfg->code_size);
+#endif
 
        /* Offset between RSP and the CFA */
        cfa_offset = 0;
@@ -4741,7 +4903,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                if (G_UNLIKELY (required_code_size >= (cfg->code_size - offset))) {
                        while (required_code_size >= (cfg->code_size - offset))
                                cfg->code_size *= 2;
-                       cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
+                       cfg->native_code = mono_realloc_native_code(cfg);
                        code = cfg->native_code + offset;
                        mono_jit_stats.code_reallocs++;
                }
@@ -4787,11 +4949,23 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                        /* max alignment for loops */
                        if ((cfg->opt & MONO_OPT_LOOP) && bb_is_loop_start (bb))
                                max_offset += LOOP_ALIGNMENT;
-
+#ifdef __native_client_codegen__
+                       /* max alignment for native client */
+                       max_offset += kNaClAlignment;
+#endif
                        MONO_BB_FOR_EACH_INS (bb, ins) {
                                if (ins->opcode == OP_LABEL)
                                        ins->inst_c1 = max_offset;
-                               
+#ifdef __native_client_codegen__
+                               {
+                                       int space_in_block = kNaClAlignment -
+                                               ((max_offset + cfg->code_len) & kNaClAlignmentMask);
+                                       int max_len = ((guint8 *)ins_get_spec (ins->opcode))[MONO_INST_LEN];
+                                       if (space_in_block < max_len && max_len < kNaClAlignment) {
+                                               max_offset += space_in_block;
+                                       }
+                               }
+#endif  /* __native_client_codegen__ */
                                max_offset += ((guint8 *)ins_get_spec (ins->opcode))[MONO_INST_LEN];
                        }
                }
@@ -4846,7 +5020,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
 
        while (cfg->code_len + max_epilog_size > (cfg->code_size - 16)) {
                cfg->code_size *= 2;
-               cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
+               cfg->native_code = mono_realloc_native_code(cfg);
                mono_jit_stats.code_reallocs++;
        }
 
@@ -5027,7 +5201,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
 
        while (cfg->code_len + code_size > (cfg->code_size - 16)) {
                cfg->code_size *= 2;
-               cfg->native_code = g_realloc (cfg->native_code, cfg->code_size);
+               cfg->native_code = mono_realloc_native_code(cfg);
                mono_jit_stats.code_reallocs++;
        }
 
@@ -5060,8 +5234,12 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
                                guint32 size;
 
                                /* Compute size of code following the push <OFFSET> */
+#ifdef __native_client_codegen__
+                               code = mono_nacl_align (code);
+                               size = kNaClAlignment;
+#else
                                size = 5 + 5;
-
+#endif
                                /*This is aligned to 16 bytes by the callee. This way we save a few bytes here.*/
 
                                if ((code - cfg->native_code) - throw_ip < 126 - size) {
@@ -5176,8 +5354,16 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
 //[1 + 5] x86_jump_mem(inst,mem)
 
 #define CMP_SIZE 6
+#ifdef __native_client_codegen__
+/* These constants should be coming from cpu-x86.md            */
+/* I suspect the size calculation below is actually incorrect. */
+/* TODO: fix the calculation that uses these sizes.            */
+#define BR_SMALL_SIZE 16
+#define BR_LARGE_SIZE 12
+#else
 #define BR_SMALL_SIZE 2
 #define BR_LARGE_SIZE 5
+#endif  /* __native_client_codegen__ */
 #define JUMP_IMM_SIZE 6
 #define ENABLE_WRONG_METHOD_CHECK 0
 #define DEBUG_IMT 0
@@ -5202,6 +5388,9 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckI
        int size = 0;
        guint8 *code, *start;
 
+#ifdef __native_client_codegen__
+       /* g_print("mono_arch_build_imt_thunk needs to be aligned.\n"); */
+#endif
        for (i = 0; i < count; ++i) {
                MonoIMTCheckItem *item = imt_entries [i];
                if (item->is_equals) {
@@ -5493,36 +5682,6 @@ mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guin
        return can_write;
 }
 
-gpointer
-mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
-{
-       guint8 buf [8];
-       guint8 reg = 0;
-       gint32 disp = 0;
-
-       mono_breakpoint_clean_code (NULL, code, 8, buf, sizeof (buf));
-       code = buf + 8;
-
-       *displacement = 0;
-
-       code -= 6;
-
-       /*
-        * This function is no longer used, the only caller is
-        * mono_arch_nullify_class_init_trampoline ().
-        */
-       if ((code [0] == 0xff) && ((code [1] & 0x18) == 0x10) && ((code [1] >> 6) == 2)) {
-               reg = code [1] & 0x07;
-               disp = *((gint32*)(code + 2));
-       } else {
-               g_assert_not_reached ();
-               return NULL;
-       }
-
-       *displacement = disp;
-       return (gpointer)regs [reg];
-}
-
 /*
  * mono_x86_get_this_arg_offset:
  *
@@ -5585,8 +5744,12 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
        } else {
                int i = 0;
                /* 8 for mov_reg and jump, plus 8 for each parameter */
+#ifdef __native_client_codegen__
+               /* TODO: calculate this size correctly */
+               int code_reserve = 13 + (param_count * 8) + 2 * kNaClAlignment;
+#else
                int code_reserve = 8 + (param_count * 8);
-
+#endif  /* __native_client_codegen__ */
                /*
                 * The stack contains:
                 * <args in reverse order>
index 8e712e3375435c2c3210d8f85584b2e9cd035895..54062784354b859fe535d4a4f090d953dc067ec7 100644 (file)
@@ -55,6 +55,16 @@ struct sigcontext {
 #define MONO_ARCH_USE_SIGACTION
 #endif
 
+#if defined(__native_client__)
+#undef MONO_ARCH_USE_SIGACTION
+#endif
+
+#if defined(__native_client_codegen__) || defined(__native_client__)
+#define NACL_SIZE(a, b) (b)
+#else
+#define NACL_SIZE(a, b) (a)
+#endif
+
 #ifndef HOST_WIN32
 
 #ifdef HAVE_WORKING_SIGALTSTACK
@@ -255,7 +265,6 @@ typedef struct {
 #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
 #define MONO_ARCH_NEED_GOT_VAR 1
-#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_ATOMIC_ADD 1
@@ -270,7 +279,7 @@ typedef struct {
 #define MONO_ARCH_HAVE_LIVERANGE_OPS 1
 #define MONO_ARCH_HAVE_XP_UNWIND 1
 #define MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX 1
-#if defined(__linux__) && !defined(HAVE_MOVING_COLLECTOR)
+#if defined(__linux__)
 #define MONO_ARCH_MONITOR_OBJECT_REG X86_EAX
 #endif
 #define MONO_ARCH_HAVE_STATIC_RGCTX_TRAMPOLINE 1
@@ -286,7 +295,7 @@ typedef struct {
 
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 
-#if !defined(__APPLE__)
+#if !defined(__APPLE__) || defined(__native_client_codegen__)
 #define MONO_ARCH_AOT_SUPPORTED 1
 #endif
 
@@ -307,6 +316,8 @@ typedef struct {
 #define MONO_ARCH_HAVE_EXCEPTIONS_INIT 1
 #define MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD 1
 
+#define MONO_ARCH_HAVE_CARD_TABLE_WBARRIER 1
+
 /* Used for optimization, not complete */
 #define MONO_ARCH_IS_OP_MEMBASE(opcode) ((opcode) == OP_X86_PUSH_MEMBASE)
 
index 10e0942f5c934990ea9e082bb14b2b49941e2dba..cbe3d979c8095648745add866e2b80c8d38a4eaf 100644 (file)
@@ -81,6 +81,11 @@ MonoMethodSignature *helper_sig_rgctx_lazy_fetch_trampoline = NULL;
 MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline = NULL;
 MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline_llvm = NULL;
 
+#ifdef __native_client_codegen__
+/* Default alignment for Native Client is 32-byte. */
+guint8 nacl_align_byte = 0xe0;
+#endif
+
 static guint32 default_opt = 0;
 static gboolean default_opt_set = FALSE;
 
@@ -111,19 +116,9 @@ gboolean mono_do_signal_chaining;
 static gboolean        mono_using_xdebug;
 static int mini_verbose = 0;
 
-/* Statistics */
-#ifdef ENABLE_LLVM
-static int methods_with_llvm, methods_without_llvm;
-#endif
-
 /*
- * This flag controls whenever the runtime uses LLVM compiled code.
- * Enabling this causes different/slower code paths to be used, which is why it
- * defaults to FALSE.
- * Changes when this flag is set include:
- * - a per method vtable trampoline is used to handle virtual calls, instead of only
- *   one trampoline.
- * - fast generic virtual calls are not supported.
+ * This flag controls whenever the runtime uses LLVM for JIT compilation, and whenever
+ * it can load AOT code compiled by LLVM.
  */
 gboolean mono_use_llvm = FALSE;
 
@@ -157,6 +152,82 @@ gboolean disable_vtypes_in_regs = FALSE;
 
 gboolean mono_dont_free_global_codeman;
 
+#ifdef __native_client_codegen__
+
+/* Prevent instructions from straddling a 32-byte alignment boundary.   */
+/* Instructions longer than 32 bytes must be aligned internally.        */
+/* IN: pcode, instlen                                                   */
+/* OUT: pcode                                                           */
+void mono_nacl_align_inst(guint8 **pcode, int instlen) {
+  int space_in_block;
+
+  space_in_block = kNaClAlignment - ((uintptr_t)(*pcode) & kNaClAlignmentMask);
+
+  if (G_UNLIKELY (instlen >= kNaClAlignment)) {
+    g_assert_not_reached();
+  } else if (instlen > space_in_block) {
+    *pcode = mono_arch_nacl_pad(*pcode, space_in_block);
+  }
+}
+
+/* Move emitted call sequence to the end of a kNaClAlignment-byte block.  */
+/* IN: start    pointer to start of call sequence                         */
+/* IN: pcode    pointer to end of call sequence (current "IP")            */
+/* OUT: start   pointer to the start of the call sequence after padding   */
+/* OUT: pcode   pointer to the end of the call sequence after padding     */
+void mono_nacl_align_call(guint8 **start, guint8 **pcode) {
+  const size_t MAX_NACL_CALL_LENGTH = kNaClAlignment;
+  guint8 copy_of_call[MAX_NACL_CALL_LENGTH];
+  guint8 *temp;
+
+  const size_t length = (size_t)((*pcode)-(*start));
+  g_assert(length < MAX_NACL_CALL_LENGTH);
+
+  memcpy(copy_of_call, *start, length);
+  temp = mono_nacl_pad_call(*start, (guint8)length);
+  memcpy(temp, copy_of_call, length);
+  (*start) = temp;
+  (*pcode) = temp + length;
+}
+
+/* mono_nacl_pad_call(): Insert padding for Native Client call instructions */
+/*    code     pointer to buffer for emitting code                          */
+/*    ilength  length of call instruction                                   */
+guint8 *mono_nacl_pad_call(guint8 *code, guint8 ilength) {
+  int freeSpaceInBlock = kNaClAlignment - ((uintptr_t)code & kNaClAlignmentMask);
+  int padding = freeSpaceInBlock - ilength;
+
+  if (padding < 0) {
+    /* There isn't enough space in this block for the instruction. */
+    /* Fill this block and start a new one.                        */
+    code = mono_arch_nacl_pad(code, freeSpaceInBlock);
+    freeSpaceInBlock = kNaClAlignment;
+    padding = freeSpaceInBlock - ilength;
+  }
+  g_assert(ilength > 0);
+  g_assert(padding >= 0);
+  g_assert(padding < kNaClAlignment);
+  if (0 == padding) return code;
+  return mono_arch_nacl_pad(code, padding);
+}
+
+guint8 *mono_nacl_align(guint8 *code) {
+  int padding = kNaClAlignment - ((uintptr_t)code & kNaClAlignmentMask);
+  if (padding != kNaClAlignment) code = mono_arch_nacl_pad(code, padding);
+  return code;
+}
+
+void mono_nacl_fix_patches(const guint8 *code, MonoJumpInfo *ji)
+{
+  MonoJumpInfo *patch_info;
+  for (patch_info = ji; patch_info; patch_info = patch_info->next) {
+    unsigned char *ip = patch_info->ip.i + code;
+    ip = mono_arch_nacl_skip_nops(ip);
+    patch_info->ip.i = ip - code;
+  }
+}
+#endif  /* __native_client_codegen__ */
+
 gboolean
 mono_running_on_valgrind (void)
 {
@@ -426,9 +497,15 @@ mono_tramp_info_create (const char *name, guint8 *code, guint32 code_size, MonoJ
 void
 mono_tramp_info_free (MonoTrampInfo *info)
 {
+       GSList *l;
+
        g_free (info->name);
 
-       // FIXME: ji + unwind_ops
+       // FIXME: ji
+       for (l = info->unwind_ops; l; l = l->next)
+               g_free (l->data);
+       g_slist_free (info->unwind_ops);
+       g_free (info);
 }
 
 #define MONO_INIT_VARINFO(vi,id) do { \
@@ -1271,8 +1348,8 @@ mini_assembly_can_skip_verification (MonoDomain *domain, MonoMethod *method)
  * 
  * Returns true if the method is invalid. 
  */
-gboolean
-mini_method_verify (MonoCompile *cfg, MonoMethod *method)
+static gboolean
+mini_method_verify (MonoCompile *cfg, MonoMethod *method, gboolean fail_compile)
 {
        GSList *tmp, *res;
        gboolean is_fulltrust;
@@ -1289,7 +1366,10 @@ mini_method_verify (MonoCompile *cfg, MonoMethod *method)
        res = mono_method_verify_with_current_settings (method, cfg->skip_visibility);
 
        if ((error = mono_loader_get_last_error ())) {
-               cfg->exception_type = error->exception_type;
+               if (fail_compile)
+                       cfg->exception_type = error->exception_type;
+               else
+                       mono_loader_clear_error ();
                if (res)
                        mono_free_verify_list (res);
                return TRUE;
@@ -1299,19 +1379,23 @@ mini_method_verify (MonoCompile *cfg, MonoMethod *method)
                for (tmp = res; tmp; tmp = tmp->next) {
                        MonoVerifyInfoExtended *info = (MonoVerifyInfoExtended *)tmp->data;
                        if (info->info.status == MONO_VERIFY_ERROR) {
+                               if (fail_compile) {
                                char *method_name = mono_method_full_name (method, TRUE);
-                               cfg->exception_type = info->exception_type;
-                               cfg->exception_message = g_strdup_printf ("Error verifying %s: %s", method_name, info->info.message);
+                                       cfg->exception_type = info->exception_type;
+                                       cfg->exception_message = g_strdup_printf ("Error verifying %s: %s", method_name, info->info.message);
+                                       g_free (method_name);
+                               }
                                mono_free_verify_list (res);
-                               g_free (method_name);
                                return TRUE;
                        }
                        if (info->info.status == MONO_VERIFY_NOT_VERIFIABLE && (!is_fulltrust || info->exception_type == MONO_EXCEPTION_METHOD_ACCESS || info->exception_type == MONO_EXCEPTION_FIELD_ACCESS)) {
-                               char *method_name = mono_method_full_name (method, TRUE);
-                               cfg->exception_type = info->exception_type;
-                               cfg->exception_message = g_strdup_printf ("Error verifying %s: %s", method_name, info->info.message);
+                               if (fail_compile) {
+                                       char *method_name = mono_method_full_name (method, TRUE);
+                                       cfg->exception_type = info->exception_type;
+                                       cfg->exception_message = g_strdup_printf ("Error verifying %s: %s", method_name, info->info.message);
+                                       g_free (method_name);
+                               }
                                mono_free_verify_list (res);
-                               g_free (method_name);
                                return TRUE;
                        }
                }
@@ -1321,11 +1405,10 @@ mini_method_verify (MonoCompile *cfg, MonoMethod *method)
        return FALSE;
 }
 
-/*Returns true is something went wrong*/
-static gboolean
-mono_compile_is_broken (MonoCompile *cfg)
+/*Returns true if something went wrong*/
+gboolean
+mono_compile_is_broken (MonoCompile *cfg, MonoMethod *method, gboolean fail_compile)
 {
-       MonoMethod *method = cfg->method;
        MonoMethod *method_definition = method;
        gboolean dont_verify = mini_assembly_can_skip_verification (cfg->domain, method);
        dont_verify |= method->klass->image->assembly->corlib_internal;
@@ -1335,7 +1418,7 @@ mono_compile_is_broken (MonoCompile *cfg)
                method_definition = imethod->declaring;
        }
 
-       return !dont_verify && mini_method_verify (cfg, method_definition);
+       return !dont_verify && mini_method_verify (cfg, method_definition, fail_compile);
 }
 
 static void
@@ -2944,6 +3027,15 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
                g_assert_not_reached ();
 #endif
                break;
+#ifdef HAVE_SGEN_GC
+       case MONO_PATCH_INFO_GC_CARD_TABLE_ADDR: {
+               int card_table_shift_bits;
+               gpointer card_table_mask;
+
+               target = mono_gc_get_card_table (&card_table_shift_bits, &card_table_mask);
+               break;
+       }
+#endif
        default:
                g_assert_not_reached ();
        }
@@ -3330,7 +3422,17 @@ mono_codegen (MonoCompile *cfg)
        }
 
        memcpy (code, cfg->native_code, cfg->code_len);
+#ifdef __native_client_codegen__
+       if (cfg->native_code_alloc) {
+               g_free (cfg->native_code_alloc);
+               cfg->native_code_alloc = 0;
+       }
+       else if (cfg->native_code) {
+               g_free (cfg->native_code);
+       }
+#else
        g_free (cfg->native_code);
+#endif
        cfg->native_code = code;
        code = cfg->native_code + cfg->code_len;
   
@@ -3369,6 +3471,10 @@ if (valgrind_register){
        mono_arch_save_unwind_info (cfg);
 #endif
        
+#ifdef __native_client_codegen__
+       mono_nacl_fix_patches (cfg->native_code, cfg->patch_info);
+#endif
+
        mono_arch_patch_code (cfg->method, cfg->domain, cfg->native_code, cfg->patch_info, cfg->run_cctors);
 
        if (cfg->method->dynamic) {
@@ -3575,6 +3681,16 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
                        g_assert (tblock->native_offset);
                        tblock = cfg->cil_offset_to_bb [ec->try_offset + ec->try_len];
                        g_assert (tblock);
+                       if (!tblock->native_offset) {
+                               int j, end;
+                               for (j = ec->try_offset + ec->try_len, end = ec->try_offset; j >= end; --j) {
+                                       MonoBasicBlock *bb = cfg->cil_offset_to_bb [j];
+                                       if (bb && bb->native_offset) {
+                                               tblock = bb;
+                                               break;
+                                       }
+                               }
+                       }
                        ei->try_end = cfg->native_code + tblock->native_offset;
                        g_assert (tblock->native_offset);
                        tblock = cfg->cil_offset_to_bb [ec->handler_offset];
@@ -3734,7 +3850,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
        MonoCompile *cfg;
        int dfn, i, code_size_ratio;
        gboolean deadce_has_run = FALSE;
-       gboolean try_generic_shared, try_llvm;
+       gboolean try_generic_shared, try_llvm = FALSE;
        MonoMethod *method_to_compile, *method_to_register;
 
        mono_jit_stats.methods_compiled++;
@@ -3762,7 +3878,9 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                        mono_stats.generics_unsharable_methods++;
        }
 
+#ifdef ENABLE_LLVM
        try_llvm = mono_use_llvm;
+#endif
 
  restart_compile:
        if (try_generic_shared) {
@@ -3838,8 +3956,6 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                static gboolean inited;
 
                if (!inited) {
-                       mono_counters_register ("Methods JITted using LLVM", MONO_COUNTER_JIT | MONO_COUNTER_INT, &methods_with_llvm);  
-                       mono_counters_register ("Methods JITted using mono JIT", MONO_COUNTER_JIT | MONO_COUNTER_INT, &methods_without_llvm);
                        inited = TRUE;
                }
 
@@ -3855,7 +3971,6 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                                        printf ("LLVM failed for '%s': %s\n", method->name, cfg->exception_message);
                                        //g_free (nm);
                                }
-                               InterlockedIncrement (&methods_without_llvm);
                                mono_destroy_compile (cfg);
                                try_llvm = FALSE;
                                goto restart_compile;
@@ -4012,7 +4127,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
        //cfg->enable_extended_bblocks = TRUE;
 
        /*We must verify the method before doing any IR generation as mono_compile_create_vars can assert.*/
-       if (mono_compile_is_broken (cfg))
+       if (mono_compile_is_broken (cfg, cfg->method, TRUE))
                return cfg;
 
        /*
@@ -4431,14 +4546,11 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                                printf ("LLVM failed for '%s': %s\n", method->name, cfg->exception_message);
                                //g_free (nm);
                        }
-                       InterlockedIncrement (&methods_without_llvm);
                        mono_destroy_compile (cfg);
                        try_llvm = FALSE;
                        goto restart_compile;
                }
 
-               InterlockedIncrement (&methods_with_llvm);
-
                if (cfg->verbose_level > 0 && !cfg->compile_aot) {
                        nm = mono_method_full_name (cfg->method, TRUE);
                        g_print ("LLVM Method %s emitted at %p to %p (code length %d) [%s]\n", 
@@ -4451,6 +4563,11 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                mono_codegen (cfg);
        }
 
+       if (COMPILE_LLVM (cfg))
+               InterlockedIncrement (&mono_jit_stats.methods_with_llvm);
+       else
+               InterlockedIncrement (&mono_jit_stats.methods_without_llvm);
+
        if (cfg->verbose_level >= 2) {
                char *id =  mono_method_full_name (cfg->method, FALSE);
                mono_disassemble_code (cfg, cfg->native_code, cfg->code_len, id + 3);
@@ -5461,6 +5578,7 @@ mini_get_vtable_trampoline (int slot_index)
 
                        if (vtable_trampolines)
                                memcpy (new_table, vtable_trampolines, vtable_trampolines_size * sizeof (gpointer));
+                       g_free (vtable_trampolines);
                        mono_memory_barrier ();
                        vtable_trampolines = new_table;
                        vtable_trampolines_size = new_size;
@@ -5574,6 +5692,15 @@ mini_get_addr_from_ftnptr (gpointer descr)
 #endif
 }      
 
+static void
+register_jit_stats (void)
+{
+       mono_counters_register ("Compiled methods", MONO_COUNTER_JIT | MONO_COUNTER_LONG, &mono_jit_stats.methods_compiled);
+       mono_counters_register ("Methods from AOT", MONO_COUNTER_JIT | MONO_COUNTER_LONG, &mono_jit_stats.methods_aot);
+       mono_counters_register ("Methods JITted using LLVM", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.methods_with_llvm);   
+       mono_counters_register ("Methods JITted using mono JIT", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.methods_without_llvm);
+}
+
 static void runtime_invoke_info_free (gpointer value);
  
 static void
@@ -5664,7 +5791,7 @@ mini_init (const char *filename, const char *runtime_version)
 
        MONO_PROBE_VES_INIT_BEGIN ();
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__native_client__)
        if (access ("/proc/self/maps", F_OK) != 0) {
                g_print ("Mono requires /proc to be mounted.\n");
                exit (1);
@@ -5730,9 +5857,11 @@ mini_init (const char *filename, const char *runtime_version)
        }
 
 #ifdef ENABLE_LLVM
-       if (!mono_llvm_load (NULL)) {
-               mono_use_llvm = FALSE;
-               fprintf (stderr, "Mono Warning: llvm support could not be loaded.\n");
+       if (mono_use_llvm) {
+               if (!mono_llvm_load (NULL)) {
+                       mono_use_llvm = FALSE;
+                       fprintf (stderr, "Mono Warning: llvm support could not be loaded.\n");
+               }
        }
        if (mono_use_llvm)
                mono_llvm_init ();
@@ -5835,6 +5964,8 @@ mini_init (const char *filename, const char *runtime_version)
 
        create_helper_signature ();
 
+       register_jit_stats ();
+
 #define JIT_CALLS_WORK
 #ifdef JIT_CALLS_WORK
        /* Needs to be called here since register_jit_icall depends on it */
@@ -5851,10 +5982,8 @@ mini_init (const char *filename, const char *runtime_version)
 
        register_icall (mono_get_throw_exception (), "mono_arch_throw_exception", "void object", TRUE);
        register_icall (mono_get_rethrow_exception (), "mono_arch_rethrow_exception", "void object", TRUE);
-#if MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION
        register_icall (mono_get_throw_corlib_exception (), "mono_arch_throw_corlib_exception", 
                                 "void ptr", TRUE);
-#endif
        register_icall (mono_thread_get_undeniable_exception, "mono_thread_get_undeniable_exception", "object", FALSE);
        register_icall (mono_thread_interruption_checkpoint, "mono_thread_interruption_checkpoint", "void", FALSE);
        register_icall (mono_thread_force_interruption_checkpoint, "mono_thread_force_interruption_checkpoint", "void", FALSE);
@@ -6018,9 +6147,7 @@ mini_init (const char *filename, const char *runtime_version)
        register_icall (mono_get_native_calli_wrapper, "mono_get_native_calli_wrapper", "ptr ptr ptr ptr", FALSE);
        register_icall (mono_resume_unwind, "mono_resume_unwind", "void", TRUE);
 
-#ifdef HAVE_WRITE_BARRIERS
        register_icall (mono_gc_wbarrier_value_copy_bitmap, "mono_gc_wbarrier_value_copy_bitmap", "void ptr ptr int int", FALSE);
-#endif
 
 #endif
 
@@ -6062,10 +6189,7 @@ print_jit_stats (void)
 {
        if (mono_jit_stats.enabled) {
                g_print ("Mono Jit statistics\n");
-               g_print ("Compiled methods:       %ld\n", mono_jit_stats.methods_compiled);
-               g_print ("Methods from AOT:       %ld\n", mono_jit_stats.methods_aot);
                g_print ("Methods cache lookup:   %ld\n", mono_jit_stats.methods_lookups);
-               g_print ("Method trampolines:     %ld\n", mono_jit_stats.method_trampolines);
                g_print ("Basic blocks:           %ld\n", mono_jit_stats.basic_blocks);
                g_print ("Max basic blocks:       %ld\n", mono_jit_stats.max_basic_blocks);
                g_print ("Allocated vars:         %ld\n", mono_jit_stats.allocate_var);
@@ -6180,6 +6304,8 @@ mini_cleanup (MonoDomain *domain)
                mono_llvm_cleanup ();
 #endif
 
+       mono_aot_cleanup ();
+
        mono_trampolines_cleanup ();
 
        mono_unwind_cleanup ();
@@ -6189,9 +6315,12 @@ mini_cleanup (MonoDomain *domain)
        g_hash_table_destroy (jit_icall_name_hash);
        g_free (emul_opcode_map);
        g_free (emul_opcode_opcodes);
+       g_free (vtable_trampolines);
 
        mono_arch_cleanup ();
 
+       mono_generic_sharing_cleanup ();
+
        mono_cleanup ();
 
        mono_trace_cleanup ();
index a8e8cdc6684df1c98e09b000244ba19ea7b50601..6b26c49fff951fac98448a14ae96d79d23ac1cc4 100644 (file)
@@ -111,7 +111,7 @@ typedef gint64 mgreg_t;
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION "68"
+#define MONO_AOT_FILE_VERSION "69"
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -155,6 +155,8 @@ typedef struct MonoAotFileInfo
        guint32 flags;
        /* Optimization flags used to compile the module */
        guint32 opts;
+       /* Index of the blob entry holding the GC used by this module */
+       gint32 gc_name_index;
 
        guint32 num_trampolines [MONO_AOT_TRAMP_NUM];
        guint32 trampoline_got_offset_base [MONO_AOT_TRAMP_NUM];
@@ -560,11 +562,13 @@ struct MonoBasicBlock {
 
 /* BBlock flags */
 enum {
-       BB_VISITED            = 1 << 0,
-       BB_REACHABLE          = 1 << 1,
-       BB_EXCEPTION_DEAD_OBJ = 1 << 2,
-       BB_EXCEPTION_UNSAFE   = 1 << 3,
-       BB_EXCEPTION_HANDLER  = 1 << 4
+       BB_VISITED              = 1 << 0,
+       BB_REACHABLE            = 1 << 1,
+       BB_EXCEPTION_DEAD_OBJ   = 1 << 2,
+       BB_EXCEPTION_UNSAFE     = 1 << 3,
+       BB_EXCEPTION_HANDLER    = 1 << 4,
+       /* for Native Client, mark the blocks that can be jumped to indirectly */
+       BB_INDIRECT_JUMP_TARGET = 1 << 5 
 };
 
 typedef struct MonoMemcpyArgs {
@@ -1068,6 +1072,11 @@ typedef struct {
        MonoGenericSharingContext *generic_sharing_context;
 
        unsigned char   *cil_start;
+#ifdef __native_client_codegen__
+       /* this alloc is not aligned, native_code */
+       /* is the 32-byte aligned version of this */
+       unsigned char   *native_code_alloc;
+#endif
        unsigned char   *native_code;
        guint            code_size;
        guint            code_len;
@@ -1217,7 +1226,6 @@ typedef struct {
        gulong methods_compiled;
        gulong methods_aot;
        gulong methods_lookups;
-       gulong method_trampolines;
        gulong allocate_var;
        gulong cil_code_size;
        gulong native_code_size;
@@ -1238,6 +1246,8 @@ typedef struct {
        gulong cas_linkdemand;
        gulong cas_demand_generation;
        gulong generic_virtual_invocations;
+    int methods_with_llvm;
+       int methods_without_llvm;
        char *max_ratio_method;
        char *biggest_method;
        gboolean enabled;
@@ -1266,6 +1276,7 @@ enum {
 #define OP_PCONST OP_I8CONST
 #define OP_PADD OP_LADD
 #define OP_PADD_IMM OP_LADD_IMM
+#define OP_PAND_IMM OP_LAND_IMM
 #define OP_PSUB OP_LSUB
 #define OP_PMUL OP_LMUL
 #define OP_PMUL_IMM OP_LMUL_IMM
@@ -1288,6 +1299,7 @@ enum {
 #define OP_PCONST OP_ICONST
 #define OP_PADD OP_IADD
 #define OP_PADD_IMM OP_IADD_IMM
+#define OP_PAND_IMM OP_IAND_IMM
 #define OP_PSUB OP_ISUB
 #define OP_PMUL OP_IMUL
 #define OP_PMUL_IMM OP_IMUL_IMM
@@ -1567,7 +1579,7 @@ MonoJitICallInfo *mono_find_jit_opcode_emulation (int opcode) MONO_INTERNAL;
 void     mono_print_ins_index (int i, MonoInst *ins) MONO_INTERNAL;
 void     mono_print_ins (MonoInst *ins) MONO_INTERNAL;
 gboolean  mini_assembly_can_skip_verification (MonoDomain *domain, MonoMethod *method) MONO_INTERNAL;
-gboolean  mini_method_verify (MonoCompile *cfg, MonoMethod *method) MONO_INTERNAL;
+gboolean mono_compile_is_broken (MonoCompile *cfg, MonoMethod *method, gboolean fail_compile) MONO_INTERNAL;
 MonoInst *mono_get_got_var (MonoCompile *cfg) MONO_INTERNAL;
 void      mono_add_seq_point (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int native_offset) MONO_INTERNAL;
 MonoInst* mono_emit_jit_icall (MonoCompile *cfg, gconstpointer func, MonoInst **args) MONO_INTERNAL;
@@ -1587,8 +1599,22 @@ gint32    mono_linterval_get_intersect_pos  (MonoLiveInterval *i1, MonoLiveInter
 void      mono_linterval_split              (MonoCompile *cfg, MonoLiveInterval *interval, MonoLiveInterval **i1, MonoLiveInterval **i2, int pos) MONO_INTERNAL;
 void      mono_liveness_handle_exception_clauses (MonoCompile *cfg) MONO_INTERNAL;
 
+/* Native Client functions */
+#ifdef __native_client_codegen__
+void mono_nacl_align_inst(guint8 **pcode, int instlen);
+void mono_nacl_align_call(guint8 **start, guint8 **pcode);
+guint8 *mono_nacl_pad_call(guint8 *code, guint8 ilength);
+guint8 *mono_nacl_align(guint8 *code);
+void mono_nacl_fix_patches(const guint8 *code, MonoJumpInfo *ji);
+/* Defined for each arch */
+guint8 *mono_arch_nacl_pad(guint8 *code, int pad);
+guint8 *mono_arch_nacl_skip_nops(guint8 *code);
+
+#endif
+
 /* AOT */
 void      mono_aot_init                     (void) MONO_INTERNAL;
+void      mono_aot_cleanup                  (void) MONO_INTERNAL;
 gpointer  mono_aot_get_method               (MonoDomain *domain,
                                                                                         MonoMethod *method) MONO_INTERNAL;
 gpointer  mono_aot_get_method_from_token    (MonoDomain *domain, MonoImage *image, guint32 token) MONO_INTERNAL;
@@ -1688,7 +1714,6 @@ void              mono_monitor_enter_trampoline (mgreg_t *regs, guint8 *code, Mo
 void              mono_monitor_exit_trampoline (mgreg_t *regs, guint8 *code, MonoObject *obj, guint8 *tramp) MONO_INTERNAL;
 gconstpointer     mono_get_trampoline_func (MonoTrampolineType tramp_type);
 gpointer          mini_get_vtable_trampoline (int slot_index) MONO_INTERNAL;
-gpointer*         mono_get_vcall_slot_addr (guint8* code, mgreg_t *regs) MONO_INTERNAL;
 char*             mono_get_generic_trampoline_name (MonoTrampolineType tramp_type) MONO_INTERNAL;
 char*             mono_get_rgctx_fetch_trampoline_name (int slot) MONO_INTERNAL;
 
@@ -1837,7 +1862,6 @@ MonoInst* mono_arch_get_domain_intrinsic        (MonoCompile* cfg) MONO_INTERNAL
 gboolean mono_arch_is_int_overflow              (void *sigctx, void *info) MONO_INTERNAL;
 void     mono_arch_invalidate_method            (MonoJitInfo *ji, void *func, gpointer func_arg) MONO_INTERNAL;
 guint32  mono_arch_get_patch_offset             (guint8 *code) MONO_INTERNAL;
-gpointer mono_arch_get_vcall_slot               (guint8 *code, mgreg_t *regs, int *displacement) MONO_INTERNAL;
 gpointer*mono_arch_get_delegate_method_ptr_addr (guint8* code, mgreg_t *regs) MONO_INTERNAL;
 void     mono_arch_create_vars                  (MonoCompile *cfg) MONO_INTERNAL;
 void     mono_arch_save_unwind_info             (MonoCompile *cfg) MONO_INTERNAL;
@@ -2049,6 +2073,7 @@ gpointer mono_helper_get_rgctx_other_ptr (MonoClass *caller_class, MonoVTable *v
                                          gint32 rgctx_index) MONO_INTERNAL;
 
 void mono_generic_sharing_init (void) MONO_INTERNAL;
+void mono_generic_sharing_cleanup (void) MONO_INTERNAL;
 
 MonoClass* mini_class_get_container_class (MonoClass *class) MONO_INTERNAL;
 MonoGenericContext* mini_class_get_context (MonoClass *class) MONO_INTERNAL;
index 2b02c0c0aeaa9202fe20f4707a0197e19603ce29..6f43b653f45fc0e5e861af73e2c5ec094e4f4e61 100644 (file)
@@ -1456,5 +1456,33 @@ ncells ) {
 
                return 0;
        }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       static void UseValue (int index)
+       {
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       static bool IsFalse ()
+       {
+               return false;
+       }
+
+       static int test_0_llvm_moving_faulting_loads ()
+       {
+               int[] indexes = null;
+
+               if (IsFalse ()) {
+                       indexes = new int[0];
+               }
+                       
+               while (IsFalse ()) {
+                       UseValue (indexes[0]);
+                       UseValue (indexes[0]);
+               }
+
+               return 0;
+       }
+
 }
 
index a45f7bf3e3472f5b2b325d86a1951f8454f419b9..5e51ace6d82cd3aa30540403554e74124434b34f 100644 (file)
@@ -40,4 +40,5 @@ PATCH_INFO(MONITOR_EXIT, "monitor_exit")
 PATCH_INFO(MSCORLIB_GOT_ADDR, "mscorlib_got_addr")
 PATCH_INFO(SEQ_POINT_INFO, "seq_point_info")
 PATCH_INFO(LLVM_IMT_TRAMPOLINE, "llvm_imt_trampoline")
+PATCH_INFO(GC_CARD_TABLE_ADDR, "gc_card_table_addr")
 PATCH_INFO(NONE, "none")
index cb966c912f3686526c168144ef003e5a37dd282b..c4685b81aa70024b83a49301d405dd2ee9aab2cd 100644 (file)
@@ -483,7 +483,7 @@ void
 mono_ssa_remove (MonoCompile *cfg)
 {
        MonoInst *ins, *var, *move;
-       int i, j, first;
+       int bbindex, i, j, first;
 
        g_assert (cfg->comp_done & MONO_COMP_SSA);
 
@@ -551,12 +551,12 @@ mono_ssa_remove (MonoCompile *cfg)
         * can coalesce them into the original variable.
         */
 
-       for (i = 0; i < cfg->num_bblocks; ++i) {
-               MonoBasicBlock *bb = cfg->bblocks [i];
+       for (bbindex = 0; bbindex < cfg->num_bblocks; ++bbindex) {
+               MonoBasicBlock *bb = cfg->bblocks [bbindex];
 
                for (ins = bb->code; ins; ins = ins->next) {
                        const char *spec = INS_INFO (ins->opcode);
-                       int num_sregs, j;
+                       int num_sregs;
                        int sregs [MONO_MAX_SRC_REGS];
 
                        if (ins->opcode == OP_NOP)
@@ -580,7 +580,7 @@ mono_ssa_remove (MonoCompile *cfg)
                        }
 
                        num_sregs = mono_inst_get_src_registers (ins, sregs);
-                       for (j = 0; j < num_sregs; ++j) {
+                       for (i = 0; i < num_sregs; ++i) {
                                MonoInst *var = get_vreg_to_inst (cfg, sregs [i]);
 
                                if (var) {
index 9bc47ab5bb4bfee984b94023a4f0d64c377bd24b..214eff5d153d245829dcc52f55e27fd86ab6a5ab 100644 (file)
@@ -202,6 +202,48 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *a
        InterlockedExchangePointer (plt_jump_table_entry, addr);
 }
 
+static gpointer
+get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
+{
+       guint8 buf [10];
+       gint32 disp;
+       MonoJitInfo *ji = NULL;
+
+#ifdef ENABLE_LLVM
+       /* code - 9 might be before the start of the method */
+       /* FIXME: Avoid this expensive call somehow */
+       ji = mono_jit_info_table_find (mono_domain_get (), (char*)code);
+#endif
+
+       mono_breakpoint_clean_code (ji ? ji->code_start : NULL, code, 9, buf, sizeof (buf));
+       code = buf + 9;
+
+       *displacement = 0;
+
+       code -= 7;
+
+       if ((code [0] == 0x41) && (code [1] == 0xff) && (code [2] == 0x15)) {
+               /* call OFFSET(%rip) */
+               g_assert_not_reached ();
+               *displacement = *(guint32*)(code + 3);
+               return (gpointer*)(code + disp + 7);
+       } else {
+               g_assert_not_reached ();
+               return NULL;
+       }
+}
+
+static gpointer*
+get_vcall_slot_addr (guint8* code, mgreg_t *regs)
+{
+       gpointer vt;
+       int displacement;
+       vt = get_vcall_slot (code, regs, &displacement);
+       if (!vt)
+               return NULL;
+       return (gpointer*)((char*)vt + displacement);
+}
+
 void
 mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
 {
@@ -229,7 +271,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
                gpointer *vtable_slot;
 
                /* call *<OFFSET>(%rip) */
-               vtable_slot = mono_get_vcall_slot_addr (code, regs);
+               vtable_slot = get_vcall_slot_addr (code, regs);
                g_assert (vtable_slot);
 
                *vtable_slot = nullified_class_init_trampoline;
@@ -777,6 +819,8 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
 
        code = buf = mono_global_codeman_reserve (tramp_size);
 
+       unwind_ops = mono_arch_get_cie_program ();
+
        if (mono_thread_get_tls_offset () != -1) {
                /* MonoObject* obj is in RDI */
                /* is obj null? */
@@ -884,6 +928,8 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
 
        code = buf = mono_global_codeman_reserve (tramp_size);
 
+       unwind_ops = mono_arch_get_cie_program ();
+
        if (mono_thread_get_tls_offset () != -1) {
                /* MonoObject* obj is in RDI */
                /* is obj null? */
index f8ae3eff822894bb4933d29664a05881ffac4a6a..21557ee3768afc2976ba56ccd8cca0d9380a9336 100644 (file)
@@ -24,6 +24,8 @@
 #include "mini.h"
 #include "mini-mips.h"
 
+static guint8* nullified_class_init_trampoline;
+
 /*
  * get_unbox_trampoline:
  * @gsctx: the generic sharing context
@@ -64,9 +66,9 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
 {
        guint32 *code = (guint32*)orig_code;
 
-       /* Locate the address of the method-specific trampoline. The call using
-       the vtable slot that took the processing flow to 'arch_create_jit_trampoline' 
-       looks something like this:
+       /* Locate the address of the method-specific trampoline.
+       The call using the vtable slot that took the processing flow to
+       'arch_create_jit_trampoline' looks something like one of these:
 
                jal     XXXXYYYY
                nop
@@ -83,19 +85,19 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
        if ((code[-2] >> 26) == 0x03) {
                //g_print ("direct patching\n");
                mips_patch ((code-2), (gsize)addr);
-       } else {
-               /* Sanity check: look for the jalr */
-               g_assert((code[-2] & 0xfc1f003f) == 0x00000009);
-
-               //printf ("mips_magic_trampoline: jalr @ 0x%0x, w/ reg %d\n", code-2, reg);
-
+               return;
+       }
+       /* Look for the jalr */
+       if ((code[-2] & 0xfc1f003f) == 0x00000009) {
                /* The lui / addiu / jalr case */
-               if ((code [-4] >> 26) == 0x0f && (code [-3] >> 26) == 0x09 && (code [-2] >> 26) == 0) {
+               if ((code [-4] >> 26) == 0x0f && (code [-3] >> 26) == 0x09
+                   && (code [-2] >> 26) == 0) {
                        mips_patch ((code-4), (gsize)addr);
-               } else {
-                       g_assert_not_reached ();
+                       return;
                }
        }
+       g_print("error: bad patch at 0x%08x\n", code);
+       g_assert_not_reached ();
 }
 
 void
@@ -167,7 +169,7 @@ mono_arch_get_vcall_slot (guint8 *code_ptr, mgreg_t *regs, int *displacement)
                                o = (gpointer)lmf->iregs [base];
                        }
                        else {
-                               o = regs [base];
+                               o = (gpointer) regs [base];
                        }
                        break;
                }
@@ -179,7 +181,10 @@ mono_arch_get_vcall_slot (guint8 *code_ptr, mgreg_t *regs, int *displacement)
 void
 mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
 {
-       g_assert_not_reached ();
+       if (mono_aot_only && !nullified_class_init_trampoline)
+               nullified_class_init_trampoline = mono_aot_get_trampoline ("nullified_class_init_trampoline");
+
+       mono_arch_patch_plt_entry (code, NULL, regs, nullified_class_init_trampoline);
 }
 
 void
@@ -196,9 +201,26 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
                mips_nop (code32);
                mono_arch_flush_icache ((gpointer)(code32 - 1), 4);
                return;
-       } else {
-               g_assert_not_reached ();
        }
+       g_assert_not_reached ();
+}
+
+gpointer
+mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
+{
+       guint8 *buf, *code;
+
+       code = buf = mono_global_codeman_reserve (16);
+
+       mips_jr (code, mips_ra);
+       mips_nop (code);
+
+       mono_arch_flush_icache (buf, code - buf);
+
+       if (info)
+               *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+
+       return buf;
 }
 
 /*
@@ -221,11 +243,12 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
 {
        guint8 *buf, *tramp, *code = NULL;
        int i, lmf;
+       GSList *unwind_ops = NULL;
+       MonoJumpInfo *ji = NULL;
        int max_code_len = 768;
 
+       /* AOT not supported on MIPS yet */
        g_assert (!aot);
-       if (info)
-               *info = NULL;
 
        /* Now we'll create in 'buf' the MIPS trampoline code. This
           is the trampoline code common to all methods  */
@@ -284,11 +307,11 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
         * Now we're ready to call mips_magic_trampoline ().
         */
 
-       /* Arg 1: stack pointer so that the magic trampoline can access the
-        * registers we saved above
+       /* Arg 1: pointer to registers so that the magic trampoline can
+        * access what we saved above
         */
-       mips_move (code, mips_a0, mips_sp);
-               
+       mips_addiu (code, mips_a0, mips_sp, lmf + G_STRUCT_OFFSET (MonoLMF, iregs[0]));
+
        /* Arg 2: code (next address to the instruction that called us) */
        if (tramp_type == MONO_TRAMPOLINE_JUMP) {
                mips_move (code, mips_a1, mips_zero);
@@ -349,6 +372,13 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        /* Sanity check */
        g_assert ((code - buf) <= max_code_len);
 
+       if (tramp_type == MONO_TRAMPOLINE_CLASS_INIT)
+               /* Initialize the nullified class init trampoline used in the AOT case */
+               nullified_class_init_trampoline = mono_arch_get_nullified_class_init_trampoline (NULL);
+
+       if (info)
+               *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
+
        return buf;
 }
 
index 399ce487dfd37fa4181226365f3e4acc86b26dcc..945ffa31242fa330b1849191aea55818edc1079e 100644 (file)
@@ -205,31 +205,6 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
 
 /*========================= End of Function ========================*/
 
-/*------------------------------------------------------------------*/
-/*                                                                  */
-/* Name                - mono_arch_get_vcall_slot                          */
-/*                                                                  */
-/* Function    - This method is called by the arch independent     */
-/*            trampoline code to determine the vtable slot used by  */
-/*            the call which invoked the trampoline.                */
-/*                                                                  */
-/* Parameters   - code   - Pointer into caller code                 */
-/*                regs   - Register state at the point of the call  */
-/*                displacement - Out parameter which will receive   */
-/*                the displacement of the vtable slot               */
-/*                                                                  */
-/*------------------------------------------------------------------*/
-
-gpointer
-mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
-{
-       /* Not used on s390x */
-       g_assert_not_reached ();
-       return NULL;
-}
-
-/*========================= End of Function ========================*/
-
 /*------------------------------------------------------------------*/
 /*                                                                  */
 /* Name                - mono_arch_create_trampoline_code                  */
index 0b871ff9a4aab1e86ddd66fb9203869293624b89..1a15c3d01ea33ba70bccd1aac051f474c2110295 100644 (file)
@@ -144,17 +144,73 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *a
 
        /* Patch the jump table entry used by the plt entry */
 
+#if defined(__native_client_codegen__) || defined(__native_client__)
+       /* for both compiler and runtime      */
+       /* A PLT entry:                       */
+       /*        mov <DISP>(%ebx), %ecx      */
+       /*        and 0xffffffe0, %ecx        */
+       /*        jmp *%ecx                   */
+       g_assert (code [0] == 0x8b);
+       g_assert (code [1] == 0x8b);
+
+       offset = *(guint32*)(code + 2);
+#else
        /* A PLT entry: jmp *<DISP>(%ebx) */
        g_assert (code [0] == 0xff);
        g_assert (code [1] == 0xa3);
 
        offset = *(guint32*)(code + 2);
-
+#endif  /* __native_client_codegen__ */
        if (!got)
                got = (gpointer*)(gsize) regs [MONO_ARCH_GOT_REG];
        *(guint8**)((guint8*)got + offset) = addr;
 }
 
+static gpointer
+get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
+{
+       const int kBufSize = NACL_SIZE (8, 16);
+       guint8 buf [64];
+       guint8 reg = 0;
+       gint32 disp = 0;
+
+       mono_breakpoint_clean_code (NULL, code, kBufSize, buf, kBufSize);
+       code = buf + 8;
+
+       *displacement = 0;
+
+       if ((code [0] == 0xff) && ((code [1] & 0x18) == 0x10) && ((code [1] >> 6) == 2)) {
+               reg = code [1] & 0x07;
+               disp = *((gint32*)(code + 2));
+#if defined(__native_client_codegen__) || defined(__native_client__)
+       } else if ((code[1] == 0x83) && (code[2] == 0xe1) && (code[4] == 0xff) &&
+                          (code[5] == 0xd1) && (code[-5] == 0x8b)) {
+               disp = *((gint32*)(code - 3));
+               reg = code[-4] & 0x07;
+       } else if ((code[-2] == 0x8b) && (code[1] == 0x83) && (code[4] == 0xff)) {
+               reg = code[-1] & 0x07;
+               disp = (signed char)code[0];
+#endif
+       } else {
+               g_assert_not_reached ();
+               return NULL;
+       }
+
+       *displacement = disp;
+       return (gpointer)regs [reg];
+}
+
+static gpointer*
+get_vcall_slot_addr (guint8* code, mgreg_t *regs)
+{
+       gpointer vt;
+       int displacement;
+       vt = get_vcall_slot (code, regs, &displacement);
+       if (!vt)
+               return NULL;
+       return (gpointer*)((char*)vt + displacement);
+}
+
 void
 mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
 {
@@ -199,7 +255,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
                /* call *<OFFSET>(<REG>) -> Call made from AOT code */
                gpointer *vtable_slot;
 
-               vtable_slot = mono_get_vcall_slot_addr (code + 5, regs);
+               vtable_slot = get_vcall_slot_addr (code + 5, regs);
                g_assert (vtable_slot);
 
                *vtable_slot = nullified_class_init_trampoline;
@@ -481,7 +537,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
        
        tramp = mono_get_trampoline_code (tramp_type);
 
-       code = buf = mono_domain_code_reserve_align (domain, TRAMPOLINE_SIZE, 4);
+       code = buf = mono_domain_code_reserve_align (domain, TRAMPOLINE_SIZE, NACL_SIZE (4, kNaClAlignment));
 
        x86_push_imm (buf, arg1);
        x86_jump_code (buf, tramp);
@@ -522,7 +578,13 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
                index -= size - 1;
        }
 
+#ifdef __native_client_codegen__
+       /* TODO: align for Native Client */
+       tramp_size = (aot ? 64 : 36) + 2 * kNaClAlignment +
+               6 * (depth + kNaClAlignment);
+#else
        tramp_size = (aot ? 64 : 36) + 6 * depth;
+#endif  /* __native_client_codegen__ */
 
        code = buf = mono_global_codeman_reserve (tramp_size);
 
@@ -635,7 +697,9 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        mono_arch_flush_icache (code, code - buf);
 
        g_assert (code - buf <= tramp_size);
-
+#ifdef __native_client_codegen__
+       g_assert (code - buf <= kNaClAlignment);
+#endif
        if (info)
                *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
 
@@ -680,7 +744,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
        owner_offset = MONO_THREADS_SYNC_MEMBER_OFFSET (owner_offset);
        nest_offset = MONO_THREADS_SYNC_MEMBER_OFFSET (nest_offset);
 
-       tramp_size = 64;
+       tramp_size = NACL_SIZE (64, 128);
 
        code = buf = mono_global_codeman_reserve (tramp_size);
 
@@ -796,7 +860,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
        nest_offset = MONO_THREADS_SYNC_MEMBER_OFFSET (nest_offset);
        entry_count_offset = MONO_THREADS_SYNC_MEMBER_OFFSET (entry_count_offset);
 
-       tramp_size = 64;
+       tramp_size = NACL_SIZE (64, 128);
 
        code = buf = mono_global_codeman_reserve (tramp_size);
 
@@ -955,5 +1019,5 @@ mono_arch_get_call_target (guint8 *code)
 guint32
 mono_arch_get_plt_info_offset (guint8 *plt_entry, mgreg_t *regs, guint8 *code)
 {
-       return *(guint32*)(plt_entry + 6);
+       return *(guint32*)(plt_entry + NACL_SIZE (6, 12));
 }
index b6c7ae694ddf8423d8e18a9759188ba3ee1beedf..e9d94af800e9a2606952722e32a4d712d24265db 100644 (file)
@@ -25,3 +25,4 @@
 /page.aspx
 /tests-config
 /TAGS
+/runtime-invoke.gen.cs
index 66f02beb616cfb5807e6c4b3aed4b5918485d6ff..f98d4da35e3300e925487763bd84e7a48f14473d 100644 (file)
@@ -1,19 +1,12 @@
 SUBDIRS = cas assemblyresolve
 
-# avoid including eglib twice since GLIB_LIBS == GMODULE_LIBS for eglib builds
-if EGLIB_BUILD
-glib_libs = $(GLIB_LIBS)
-else
-glib_libs = $(GLIB_LIBS) $(GMODULE_LIBS)
-endif
-
 check-local: test
 
 aotcheck: testaot gshared-aot
 
 TEST_PROG = ../interpreter/mint
 
-JITTEST_PROG = $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/mono/mini/mono)
+JITTEST_PROG = $(if $(VALGRIND), valgrind $(VALGRIND_ARGS),) $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/mono/mini/mono)
 
 TEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(TEST_PROG)
 JITTEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(JITTEST_PROG)
@@ -219,6 +212,9 @@ BASE_TEST_CS_SRC=           \
        threadpool-exceptions2.cs \
        threadpool-exceptions3.cs \
        threadpool-exceptions4.cs \
+       threadpool-exceptions5.cs \
+       threadpool-exceptions6.cs \
+       threadpool-exceptions7.cs \
        base-definition.cs      \
        bug-27420.cs            \
        bug-47295.cs            \
@@ -494,7 +490,8 @@ TEST_IL_SRC=                        \
        array_load_exception.il \
        bug-481403.il   \
        interface-with-static-method.il \
-       bug-515884.il
+       bug-515884.il   \
+       bug-633291.il
 
 #      bug-318677.il
 
@@ -695,6 +692,7 @@ test-inline-call-stack.exe: TestDriver.dll test-inline-call-stack-library.dll $(
 
 EXTRA_DIST += unhandled-exception-base-configuration.config
 EXTRA_DIST += unhandled-exception-legacy-configuration.config
+EXTRA_DIST += appdomain-unload.exe.config
 EXTRA_DIST += unhandled-exception-test-case.2.cs
 EXTRA_DIST += unhandled-exception-test-runner.2.cs
 unhandled-exception-test-case.1.cs: unhandled-exception-test-case.2.cs
@@ -888,6 +886,6 @@ else
 libtest_la_LDFLAGS = -rpath `pwd`
 endif
 libtest_la_SOURCES = libtest.c
-libtest_la_LIBADD = $(glib_libs)
+libtest_la_LIBADD = $(GLIB_LIBS)
 
 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.aotlog *.exe stest.dat
index b43368cf0a77421df2dd665188a81eb367e1aee6..c811eec33676834d4ce737fd0434385a9ce6987e 100644 (file)
@@ -97,8 +97,8 @@ class CrossDomainTester : MarshalByRefObject
 
 public class Tests
 {
-       public static int Main() {
-               return TestDriver.RunTests (typeof (Tests));
+       public static int Main(string[] args) {
+               return TestDriver.RunTests (typeof (Tests), args);
        }
 
        public static int test_0_unload () {
diff --git a/mono/tests/appdomain-unload.exe.config b/mono/tests/appdomain-unload.exe.config
new file mode 100644 (file)
index 0000000..b9680d2
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <runtime>
+    <legacyUnhandledExceptionPolicy enabled="1"/>
+  </runtime>
+</configuration>
index a5d7aef796135edf535c018ba992ed70400feeec..5d845024b284aa01b0d68776367a030c5db94c6e 100644 (file)
@@ -124,7 +124,7 @@ class Driver
 
 class PassesStuffBinder : BaseBinder
 {
-       object stuff = stuff;
+       object stuff = null;
 
        public PassesStuffBinder (object stuff)
        {
diff --git a/mono/tests/bug-633291.il b/mono/tests/bug-633291.il
new file mode 100644 (file)
index 0000000..61a6b5f
--- /dev/null
@@ -0,0 +1,65 @@
+.assembly extern mscorlib
+{
+  .ver 2:0:0:0
+  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+}
+.assembly 'bug'
+{
+  .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() =  (
+               01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
+               63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) // ceptionThrows.
+
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+.module bug.exe // GUID = {7CDDF4B6-7581-4902-9709-6155199DC325}
+
+
+.class private auto ansi beforefieldinit Program extends [mscorlib]System.Object
+{
+       .method public static hidebysig default void Main ()  cil managed 
+    {
+       .entrypoint
+       .maxstack 2
+       .locals init ( class [mscorlib]System.Exception V_0)
+
+       nop
+       nop
+
+TRY_START:
+               nop
+               nop
+
+               ldloc.0
+               ldnull
+               ceq
+               brfalse MID
+
+               leave END
+               br MID2
+               nop
+MID:
+               nop
+               nop
+MID2:
+
+               ldstr "a"
+               call void class [mscorlib]System.Console::WriteLine(string)
+               leave END
+               leave END
+TRY_END:
+               nop //This causes a crash since this BB will be unlinked and lack a native_offset
+
+CATCH_START:
+               isinst     [mscorlib]System.FormatException
+               stloc.0 
+               ldstr "b"
+               call void class [mscorlib]System.Console::WriteLine(string)
+               leave END
+               nop
+END:
+               .try TRY_START to TRY_END catch [mscorlib]System.Exception handler CATCH_START to END
+               ret 
+    }
+}
+
diff --git a/mono/tests/delegate2.exe.config b/mono/tests/delegate2.exe.config
new file mode 100644 (file)
index 0000000..b9680d2
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <runtime>
+    <legacyUnhandledExceptionPolicy enabled="1"/>
+  </runtime>
+</configuration>
index c9db8d046c4c96ed20262b8dd4e92c09618c8a06..cba58400b0106571866ef25daf4aa37c2e92fe90 100644 (file)
@@ -7,6 +7,13 @@ static class Program
            DocumentForm<object> browseForm = new DocumentForm<object> ();
            if (browseForm.DoInit () != 248)
                    return 1;
+
+        var domain = AppDomain.CreateDomain ("foo");
+        var engine = Engine.CreateRemote (domain);
+
+        if (engine.GetDomainName<object> () != "foo")
+                       return 2;
+
            return 0;
     }
 }
@@ -48,3 +55,27 @@ public class Grid2<TEntity> : MarshalByRefObject where TEntity : EntityBase, new
                num = i + 1;
        }
 }
+
+public class Engine : MarshalByRefObject
+{
+    public Engine ()
+    {
+    }
+
+    public string GetDomainName<T> ()
+    {
+        return AppDomain.CurrentDomain.FriendlyName;
+    }
+
+    public string GetDomainName ()
+    {
+        return AppDomain.CurrentDomain.FriendlyName;
+    }
+
+    public static Engine CreateRemote (AppDomain domain)
+    {
+        return (Engine) domain.CreateInstanceAndUnwrap (
+            typeof (Engine).Assembly.FullName,
+            typeof (Engine).FullName);
+    }
+}
index 450abadc558f4aecceb226e11a1bf7be46eacdba..d17a0a7bf7e4c548f025c9131d45725932f0b8fc 100644 (file)
@@ -61,11 +61,27 @@ public class InterlockTest
 
                Thread.MemoryBarrier ();
 
+               interlocked_regalloc1 ();
+
                Console.WriteLine ("done!");
 
                return 0;
        }
 
+       public static object[] buckets;
+       public static object segmentCache;
+
+       public static int interlocked_regalloc1 () {
+          int segment = 0;
+          buckets = new object [10];
+
+          if (buckets[segment] == null) {
+                  object newSegment = new Object ();
+                  segmentCache = Interlocked.CompareExchange (ref buckets[segment], newSegment, null) == null ? null : newSegment;
+          }
+          return 0;
+       }
+
        public static string IncTest () {
                return "A" + Interlocked.Increment (ref s_test);
        }
index 13b75de6da12fc5ea6fd760803c2425744671e9e..0c3f5146766f3f47cec68eb1df1f75017eb9b3cb 100644 (file)
@@ -9,6 +9,11 @@ using System.Reflection;
 class Miss1 : Missing.Foo1 {
 }
 
+public class Miss2 {
+       public class Foo : Missing.Foo1 {
+       }
+}
+
 public class Tests : LoadMissing {
 
        public delegate void TestDel ();
@@ -314,6 +319,12 @@ public class Tests : LoadMissing {
        }
 #endif
 
+       public static int test_0_missing_nested () {
+               if (typeof (Miss2).GetNestedTypes ().Length != 0)
+                       return 1;
+               return 0;
+       }
+
        public static int Main () {
                return TestDriver.RunTests (typeof (Tests));
        }
index e594b3e7c21343d2c7f99bfcce5f33d144795da9..dbdd53cfc67d292c43de08958f35721947dda489 100644 (file)
@@ -25,6 +25,7 @@ public class Foo2 {
 #endif
 }
 
+
 public class Foo3 {
 #if FOUND
        public static int i;
diff --git a/mono/tests/threadpool-exceptions5.cs b/mono/tests/threadpool-exceptions5.cs
new file mode 100644 (file)
index 0000000..da9c354
--- /dev/null
@@ -0,0 +1,31 @@
+using System;
+using System.Threading;
+
+class Test {
+       static int return_value = 2;
+       static int Main ()
+       {
+               AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
+               WaitCallback wcb = new WaitCallback ((a) => {
+                       Thread.CurrentThread.Abort();
+               });
+               wcb.BeginInvoke (wcb, OnCBFinished, null);
+               Thread.Sleep (1000);
+               return 1;
+       }
+
+       static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
+       {
+               string str = e.ExceptionObject.ToString ();
+               if (str.IndexOf ("From the threadpool") != -1)
+                       return_value = 3;
+               Environment.Exit (return_value);
+       }
+
+       static void OnCBFinished (object arg)
+       {
+               return_value = 0;
+               throw new Exception ("From OnCBFinished");
+       }
+}
+
diff --git a/mono/tests/threadpool-exceptions6.cs b/mono/tests/threadpool-exceptions6.cs
new file mode 100644 (file)
index 0000000..5612106
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+using System.Threading;
+
+class Test {
+       static int Main ()
+       {
+               AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
+               WaitCallback wcb = new WaitCallback ((a) => {
+                       Thread.CurrentThread.Abort ();
+               });
+               wcb.BeginInvoke (wcb, null, null);
+               Thread.Sleep (1000);
+               return 0;
+       }
+
+       static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
+       {
+               Environment.Exit (1);
+       }
+}
+
diff --git a/mono/tests/threadpool-exceptions7.cs b/mono/tests/threadpool-exceptions7.cs
new file mode 100644 (file)
index 0000000..942662a
--- /dev/null
@@ -0,0 +1,31 @@
+
+using System;
+using System.Threading;
+
+class Test {
+       static int Main ()
+       {
+               AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
+               OtherDomain ();
+               return 0;
+       }
+
+       static void OtherDomain ()
+       {
+               AppDomain domain = AppDomain.CreateDomain ("test");
+               ThreadPool.QueueUserWorkItem (unused => {
+                       domain.DoCallBack (() => {
+                               // This will get a ThreadAbortedException
+                               Thread.Sleep (10000);
+                               });
+                       });
+               Thread.Sleep (1000);
+               AppDomain.Unload (domain);
+       }
+
+       static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
+       {
+               Environment.Exit (1);
+       }
+}
+
index 86812d75ca21ede0eb63907af8b3473e9103da6f..f9fae4ea62aa2e25d482b5b5deacdddecc49de78 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * Makefile: Fix build.
+
 2010-07-12 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * valid_generic_arg_satisty_constraint_compat_check.cs:
index 3b5f79f0b22d18f23ca8cfccfbb647d322ea536a..aac8a6aada784fae50ef906a9c6096b5dcb07e6f 100644 (file)
@@ -3,7 +3,7 @@
        ilasm2 -out:$@ $<
 
 BatchCompiler.exe: BatchCompiler.cs
-       gmcs -r:../../../../mcs/class/lib/net_2_0/ilasm.exe BatchCompiler.cs
+       gmcs -r:../../../mcs/class/lib/net_2_0/ilasm.exe BatchCompiler.cs
 
 test_lib.dll: test_lib.cs
        gmcs test_lib.cs -target:library
@@ -16,7 +16,7 @@ compile-stamp: generate-stamp BatchCompiler.exe test_lib.dll
                        gmcs /unsafe $$i; \
                fi \
        done 
-       MONO_PATH=../../../../mcs/class/lib/net_2_0/ mono BatchCompiler.exe
+       MONO_PATH=../../../mcs/class/lib/net_2_0/ mono BatchCompiler.exe
        #for $$I in *.il; do ilasm2 $$I; done
        touch compile-stamp
 
diff --git a/mono/tests/verifier/invalid_bad_merge_with_leave.il b/mono/tests/verifier/invalid_bad_merge_with_leave.il
new file mode 100644 (file)
index 0000000..b088957
--- /dev/null
@@ -0,0 +1,89 @@
+.assembly extern mscorlib
+{
+  .ver 2:0:0:0
+  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+}
+.assembly 'bug'
+{
+  .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() =  (
+               01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
+               63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) // ceptionThrows.
+
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+.module bug.exe // GUID = {7CDDF4B6-7581-4902-9709-6155199DC325}
+
+
+.class private auto ansi beforefieldinit Program extends [mscorlib]System.Object
+{
+       .method public static hidebysig default void Main ()  cil managed 
+    {
+       .entrypoint
+       .maxstack 2
+       ret
+       }
+
+
+       .method public static hidebysig default int32 Bla (object arg)  cil managed 
+    {
+       .locals init ( class [mscorlib]System.Exception V_0)
+
+       nop       
+       ldarg.0   
+       ldnull    
+       ceq       
+       brfalse   LB_0
+
+       nop       
+       nop       
+
+       leave.s   LB_1
+
+LB_0:
+       nop
+       nop
+       nop       
+       ldarg.0   
+
+LB_1:
+       isinst    object
+       ldnull    
+        ceq       
+       ldc.i4.0  
+       ceq       
+       brfalse   LB_2
+
+       nop       
+       ldarg.0   
+       castclass object
+       callvirt     int32 object::GetHashCode ()
+       pop
+
+LB_2:
+       nop       
+       nop       
+       nop       
+       ldarg.0   
+       isinst    object
+       ldnull    
+       ceq       
+       ldc.i4.0  
+       ceq       
+       brfalse   LB_3
+
+       nop       
+       ldarg.0   
+       unbox     int32
+       ldobj     int32
+       ret   
+
+LB_3:
+       nop       
+       nop       
+       nop       
+       ldc.i4.0
+               ret 
+    }
+}
+
index ee95f6725670b83d9b38e06637b26d211cdb6cce..9ca6ed4a0fa41835cc61ab7f5674bc92e39a4549 100644 (file)
@@ -483,6 +483,13 @@ DEFAULT_MMAP_THRESHOLD       default: 256K
 #endif  /* HAVE_MORECORE */
 #endif  /* DARWIN */
 
+#if defined(__native_client__)
+#undef HAVE_MMAP
+#undef HAVE_MREMAP
+#define HAVE_MMAP 0
+#define HAVE_MREMAP 0
+#endif
+
 #ifndef LACKS_SYS_TYPES_H
 #include <sys/types.h>  /* For size_t */
 #endif  /* LACKS_SYS_TYPES_H */
index fcef18e0f7dcddf886182188ce19566072cb2976..32d7319dc14428d7289a7e4871cbff0b93c82d08 100644 (file)
 #else
 #define MIN_ALIGN 8
 #endif
+#ifdef __native_client_codegen__
+/* For Google Native Client, all targets of indirect control flow need to    */
+/* be aligned to a 32-byte boundary. MIN_ALIGN was updated to 32 to force    */
+/* alignment for calls from tramp-x86.c to mono_global_codeman_reserve()     */
+/* and mono_domain_code_reserve().                                           */
+#undef MIN_ALIGN
+#define MIN_ALIGN 32
+#endif
 
 /* if a chunk has less than this amount of free space it's considered full */
 #define MAX_WASTAGE 32
index 634cb2fa3c92c2db60cf8102fe23bd0875101498..5c8a57a450a18a26fabc1fa62ad82fd927b5388c 100644 (file)
        #define UCONTEXT_REG_RSI(ctx) ((ctx)->sc_rsi)
        #define UCONTEXT_REG_RDI(ctx) ((ctx)->sc_rdi)
        #define UCONTEXT_REG_RIP(ctx) ((ctx)->sc_rip)
+       #define UCONTEXT_REG_R8(ctx) ((ctx)->sc_r8)
+       #define UCONTEXT_REG_R9(ctx) ((ctx)->sc_r9)
+       #define UCONTEXT_REG_R10(ctx) ((ctx)->sc_r10)
+       #define UCONTEXT_REG_R11(ctx) ((ctx)->sc_r11)
        #define UCONTEXT_REG_R12(ctx) ((ctx)->sc_r12)
        #define UCONTEXT_REG_R13(ctx) ((ctx)->sc_r13)
        #define UCONTEXT_REG_R14(ctx) ((ctx)->sc_r14)
index 71d1f08b9d1265c2bc71cce2d9807ed613cb083e..fc9ad206c83b39782ef6ac3279b008de5916eff9 100644 (file)
@@ -1548,6 +1548,11 @@ hexnan
 #endif /*No_Hex_NaN*/
 #endif /* INFNAN_CHECK */
 
+       /*
+        * LOCKING: This is not thread-safe, since the locking macros are defined as no-ops,
+        * the caller should lock.
+        */
+
  double
 mono_strtod
 #ifdef KR_headers
index 06532542e2b21807ef95e147dd0fd5013e8d3b69..bf6805ba93142a81991d80534f8ce60e7eb80784 100644 (file)
@@ -1,39 +1,39 @@
 # List of source files which contain translatable strings.
-../mcs/mcs/anonymous.cs
-../mcs/mcs/assign.cs
-../mcs/mcs/attribute.cs
-../mcs/mcs/cs-tokenizer.cs
-../mcs/mcs/cfold.cs
-../mcs/mcs/class.cs
-../mcs/mcs/codegen.cs
-../mcs/mcs/const.cs
-../mcs/mcs/constant.cs
-../mcs/mcs/convert.cs
-../mcs/mcs/decl.cs
-../mcs/mcs/delegate.cs
-../mcs/mcs/doc.cs
-../mcs/mcs/driver.cs
-../mcs/mcs/ecore.cs
-../mcs/mcs/enum.cs
-../mcs/mcs/eval.cs
-../mcs/mcs/expression.cs
-../mcs/mcs/flowanalysis.cs
-../mcs/mcs/generic.cs
-../mcs/mcs/iterators.cs
-../mcs/mcs/lambda.cs
-../mcs/mcs/linq.cs
-../mcs/mcs/literal.cs
-../mcs/mcs/location.cs
-../mcs/mcs/modifiers.cs
-../mcs/mcs/namespace.cs
-../mcs/mcs/nullable.cs
-../mcs/mcs/parameter.cs
-../mcs/mcs/pending.cs
-../mcs/mcs/report.cs
-../mcs/mcs/rootcontext.cs
-../mcs/mcs/roottypes.cs
-../mcs/mcs/statement.cs
-../mcs/mcs/support.cs
-../mcs/mcs/typemanager.cs
-../mcs/mcs/symbolwriter.cs
+mcs/mcs/anonymous.cs
+mcs/mcs/assign.cs
+mcs/mcs/attribute.cs
+mcs/mcs/cs-tokenizer.cs
+mcs/mcs/cfold.cs
+mcs/mcs/class.cs
+mcs/mcs/codegen.cs
+mcs/mcs/const.cs
+mcs/mcs/constant.cs
+mcs/mcs/convert.cs
+mcs/mcs/decl.cs
+mcs/mcs/delegate.cs
+mcs/mcs/doc.cs
+mcs/mcs/driver.cs
+mcs/mcs/ecore.cs
+mcs/mcs/enum.cs
+mcs/mcs/eval.cs
+mcs/mcs/expression.cs
+mcs/mcs/flowanalysis.cs
+mcs/mcs/generic.cs
+mcs/mcs/iterators.cs
+mcs/mcs/lambda.cs
+mcs/mcs/linq.cs
+mcs/mcs/literal.cs
+mcs/mcs/location.cs
+mcs/mcs/modifiers.cs
+mcs/mcs/namespace.cs
+mcs/mcs/nullable.cs
+mcs/mcs/parameter.cs
+mcs/mcs/pending.cs
+mcs/mcs/report.cs
+mcs/mcs/rootcontext.cs
+mcs/mcs/roottypes.cs
+mcs/mcs/statement.cs
+mcs/mcs/support.cs
+mcs/mcs/typemanager.cs
+mcs/mcs/symbolwriter.cs
 
index 24cca02fb82cd59c0740a530360379cacc49a939..5c00b0dd13987a8acaff167b2c53d90a2c22d078 100644 (file)
@@ -5,6 +5,7 @@
 /caspol
 /cert2spc
 /certmgr
+/ccrewrite
 /chktrust
 /cilc
 /csharp
index bf818c8d6d8f2ec2ddfa995868865923a1c3ad26..8f5e8f8b504d4282815302f242315fcd1eee35a8 100644 (file)
@@ -96,7 +96,8 @@ scripts_4_0 = \
        sqlmetal$(SCRIPT_SUFFIX)                \
        sqlsharp$(SCRIPT_SUFFIX)                \
        svcutil$(SCRIPT_SUFFIX)                 \
-       xbuild$(SCRIPT_SUFFIX)
+       xbuild$(SCRIPT_SUFFIX)                  \
+       ccrewrite$(SCRIPT_SUFFIX)
 
 MDOC_SUBCOMMANDS = \
        mdoc-assemble \
diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py
new file mode 100755 (executable)
index 0000000..c95f230
--- /dev/null
@@ -0,0 +1,284 @@
+#!/usr/bin/python
+
+from optparse import OptionParser
+import subprocess
+import re
+import os.path
+import fnmatch
+import os
+import sys
+
+# subtract 8 for the leading tabstop
+fill_column = 74 - 8
+
+path_to_root = None
+
+all_changelogs = {}
+
+def git (command, *args):
+    popen = subprocess.Popen (["git", command] + list (args), stdout = subprocess.PIPE)
+    output = popen.communicate () [0]
+    if popen.returncode != 0:
+        print >> sys.stderr, "Error: git failed"
+        exit (1)
+    return output
+
+def changelog_path (changelog):
+    global path_to_root
+    if not path_to_root:
+        path_to_root = git ("rev-parse", "--show-cdup").strip ()
+    (pathname, filename) = changelog
+    return path_to_root + "./" + pathname + "/" + filename
+
+def changelog_for_file (filename):
+    while filename != "":
+        dirname = os.path.dirname (filename)
+        if dirname in all_changelogs:
+            return (dirname, all_changelogs [dirname])
+        filename = dirname
+    assert False
+
+def changelogs_for_file_pattern (pattern, changed_files):
+    changelogs = set ()
+    for filename in changed_files:
+        suffix = filename
+        while suffix != "":
+            # FIXME: fnmatch doesn't support the {x,y} pattern
+            if fnmatch.fnmatch (suffix, pattern):
+                changelogs.add (changelog_for_file (filename))
+            (_, _, suffix) = suffix.partition ("/")
+    return changelogs
+
+def format_paragraph (paragraph):
+    lines = []
+    words = paragraph.split ()
+    current = words [0]
+    for word in words [1:]:
+        if len (current) + 1 + len (word) <= fill_column:
+            current += " " + word
+        else:
+            lines.append ("\t" + current)
+            current = word
+    lines.append ("\t" + current)
+    return lines
+
+def format_changelog_paragraph (files, paragraph):
+    files_string = ""
+    for (filename, entity) in files:
+        if len (files_string) > 0:
+            files_string += ", "
+        files_string += filename
+        if entity:
+            files_string += " (" + entity + ")"
+    return format_paragraph ("* " + files_string + ": " + paragraph)
+
+def append_paragraph (lines, paragraph):
+    if len (lines):
+        lines.append ("")
+    lines += paragraph
+
+def format_changelog_entries (commit, changed_files, prefix, file_entries, all_paragraphs):
+    changelogs = set ()
+    for f in changed_files:
+        changelogs.add (changelog_for_file (f))
+    marked_changelogs = set ()
+
+    author_line = git ("log", "-n1", "--date=short", "--format=%ad  %an  <%ae>", commit).strip ()
+
+    paragraphs = {}
+    for changelog in changelogs:
+        paragraphs [changelog] = [author_line]
+
+    for (files, comments) in file_entries:
+        changelog_entries = {}
+        for (filename, entity) in files:
+            entry_changelogs = changelogs_for_file_pattern (filename, changed_files)
+            if len (entry_changelogs) == 0:
+                print "Warning: could not match file %s in commit %s" % (filename, commit)
+            for changelog in entry_changelogs:
+                if changelog not in changelog_entries:
+                    changelog_entries [changelog] = []
+                changelog_entries [changelog].append ((filename, entity))
+                marked_changelogs.add (changelog)
+
+        for (changelog, files) in changelog_entries.items ():
+            append_paragraph (paragraphs [changelog], format_changelog_paragraph (files, comments [0]))
+            for paragraph in comments [1:]:
+                append_paragraph (paragraphs [changelog], format_paragraph (paragraph))
+
+    unmarked_changelogs = changelogs - marked_changelogs
+    for changelog in unmarked_changelogs:
+        if len (prefix) == 0:
+            print "Warning: empty entry in %s for commit %s" % (changelog_path (changelog), commit)
+            insert_paragraphs = all_paragraphs
+        else:
+            insert_paragraphs = prefix
+        for paragraph in insert_paragraphs:
+            append_paragraph (paragraphs [changelog], format_paragraph (paragraph))
+
+    return paragraphs
+
+def debug_print_commit (commit, raw_message, prefix, file_entries, changed_files, changelog_entries):
+    print "===================== Commit"
+    print commit
+    print "--------------------- RAW"
+    print raw_message
+    print "--------------------- Prefix"
+    for line in prefix:
+        print line
+    print "--------------------- File entries"
+    for (files, comments) in file_entries:
+        files_str = ""
+        for (filename, entity) in files:
+            if len (files_str):
+                files_str = files_str + ", "
+            files_str = files_str + filename
+            if entity:
+                files_str = files_str + " (" + entity + ")"
+        print files_str
+        for line in comments:
+            print "  " + line
+    print "--------------------- Files touched"
+    for f in changed_files:
+        print f
+    print "--------------------- ChangeLog entries"
+    for ((dirname, filename), lines) in changelog_entries.items ():
+        print "%s/%s:" % (dirname, filename)
+        for line in lines:
+            print line
+
+def process_commit (commit):
+    changed_files = map (lambda l: l.split () [2], git ("diff-tree", "--numstat", commit).splitlines () [1:])
+    if len (filter (lambda f: re.search ("(^|/)Change[Ll]og$", f), changed_files)):
+        return None
+    raw_message = git ("log", "-n1", "--format=%B", commit)
+    # filter SVN migration message
+    message = re.sub ("(^|\n)svn path=[^\n]+revision=\d+(?=$|\n)", "", raw_message)
+    # filter ChangeLog headers
+    message = re.sub ("(^|\n)\d+-\d+-\d+[ \t]+((\w|[.-])+[ \t]+)+<[^\n>]+>(?=$|\n)", "", message)
+    # filter leading whitespace
+    message = re.sub ("^\s+", "", message)
+    # filter trailing whitespace
+    message = re.sub ("\s+$", "", message)
+    # paragraphize - first remove whitespace at beginnings and ends of lines
+    message = re.sub ("[ \t]*\n[ \t]*", "\n", message)
+    # paragraphize - now replace three or more consecutive newlines with two
+    message = re.sub ("\n\n\n+", "\n\n", message)
+    # paragraphize - replace single newlines with a space
+    message = re.sub ("(?<!\n)\n(?!\n)", " ", message)
+    # paragraphize - finally, replace double newlines with single ones
+    message = re.sub ("\n\n", "\n", message)
+
+    # A list of paragraphs (strings without newlines) that occur
+    # before the first file comments
+    prefix = []
+
+    # A list of tuples of the form ([(filename, entity), ...], [paragraph, ...]).
+    #
+    # Each describes a file comment, containing multiple paragraphs.
+    # Those paragraphs belong to a list of files, each with an
+    # optional entity (usually a function name).
+    file_entries = []
+
+    current_files = None
+    current_files_comments = None
+
+    message_lines = message.splitlines ()
+    for line in message_lines:
+        if re.match ("\*\s[^:]+:", line):
+            if current_files:
+                file_entries.append ((current_files, current_files_comments))
+
+            (files, _, comments) = line.partition (":")
+
+            current_files_comments = [comments.strip ()]
+
+            current_files = []
+            for f in re.split ("\s*,\s*", files [1:].strip ()):
+                m = re.search ("\(([^()]+)\)$", f)
+                if m:
+                    filename = f [:m.start (0)].strip ()
+                    entity = m.group (1).strip ()
+                else:
+                    filename = f
+                    entity = None
+                current_files.append ((filename, entity))
+        else:
+            if current_files:
+                current_files_comments.append (line)
+            else:
+                prefix.append (line)
+    if current_files:
+        file_entries.append ((current_files, current_files_comments))
+
+    changelog_entries = format_changelog_entries (commit, changed_files, prefix, file_entries, message_lines)
+
+    #debug_print_commit (commit, raw_message, prefix, file_entries, changed_files, changelog_entries)
+
+    return changelog_entries
+
+def start_changelog (changelog):
+    full_path = changelog_path (changelog)
+    old_name = full_path + ".old"
+    os.rename (full_path, old_name)
+    return open (full_path, "w")
+
+def finish_changelog (changelog, file):
+    old_file = open (changelog_path (changelog) + ".old")
+    file.write (old_file.read ())
+    old_file.close ()
+    file.close ()
+
+def append_lines (file, lines):
+    for line in lines:
+        file.write (line + "\n")
+    file.write ("\n")
+
+def main ():
+    usage = "usage: %prog [options] <start-commit>"
+    parser = OptionParser (usage)
+    parser.add_option ("-r", "--root", dest = "root", help = "Root directory of the working tree to be changed")
+    (options, args) = parser.parse_args ()
+    if len (args) != 1:
+        parser.error ("incorrect number of arguments")
+    start_commit = args [0]
+
+    if options.root:
+        global path_to_root
+        path_to_root = options.root + "/"
+
+    # MonkeyWrench uses a shared git repo but sets BUILD_REVISION,
+    # if present we use it instead of HEAD
+    HEAD = "HEAD"
+    if 'BUILD_REVISION' in os.environ:
+        HEAD = os.environ['BUILD_REVISION']
+
+    #see if git supports %B in --format
+    output = git ("log", "-n1", "--format=%B", HEAD)
+    if output.startswith ("%B"):
+        print >> sys.stderr, "Error: git doesn't support %B in --format - install version 1.7.2 or newer"
+        exit (1)
+
+    for filename in git ("ls-tree", "-r", "--name-only", HEAD).splitlines ():
+        if re.search ("(^|/)Change[Ll]og$", filename):
+            (path, name) = os.path.split (filename)
+            all_changelogs [path] = name
+
+    commits = git ("rev-list", "--no-merges", HEAD, "^%s" % start_commit).splitlines ()
+
+    touched_changelogs = {}
+    for commit in commits:
+        entries = process_commit (commit)
+        if entries == None:
+            continue
+        for (changelog, lines) in entries.items ():
+            if not os.path.exists (changelog_path (changelog)):
+                continue
+            if changelog not in touched_changelogs:
+                touched_changelogs [changelog] = start_changelog (changelog)
+            append_lines (touched_changelogs [changelog], lines)
+    for (changelog, file) in touched_changelogs.items ():
+        finish_changelog (changelog, file)
+
+if __name__ == "__main__":
+    main ()
index c4bce2de45194e3ab2a73cb323fe41c3c6a2de83..3db83416dfde8fa6ef798b203d715242722824a2 100755 (executable)
@@ -35,7 +35,7 @@ if [ ! -f $dir/gettext-runtime-0.17-1.zip ]; then
        wget -P $dir http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip
 fi
 if [ ! -f $dir/libiconv-1.13-mingw32-dev.tar.gz ]; then
-       wget -P $dir http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/release%201.13/libiconv-1.13-mingw32-dev.tar.gz/download
+       wget -P $dir http://sourceforge.net/projects/mingw/files/MinGW/libiconv/release%201.13/libiconv-1.13-mingw32-dev.tar.gz/download
 fi
 echo "done."
 
index 0daa98351a81b9d4af677b939aabf629380637d5..fe13da6c7f8fe509372c6309ed6b97191966dbf0 100755 (executable)
@@ -8,7 +8,7 @@
 from __future__ import print_function
 import sys, os
 import Image, ImageDraw
-from xml.sax import ContentHandler, saxutils, make_parser
+from xml.sax import ContentHandler, make_parser
 from xml.sax.handler import feature_namespaces
 from optparse import OptionParser
 
@@ -127,7 +127,7 @@ class LargeSectionHandler (SectionHandler):
     def header (self):
         return self.kind + ' section'
 
-class DocHandler (saxutils.DefaultHandler):
+class DocHandler (ContentHandler):
     def start (self):
         self.collection_index = 0
         self.index_file = open ('index.html', 'w')
index a4d5b4e77c241cf5818156f7ee10f0fc2c998835..4e41e8a35732ba1446fbe574865cad18d190a841 100644 (file)
@@ -3,6 +3,9 @@
 #include <assert.h>
 #include <glib.h>
 
+#define SGEN_BINARY_PROTOCOL
+#define MONO_INTERNAL
+
 #include <mono/metadata/sgen-protocol.h>
 
 #define SGEN_PROTOCOL_EOF      255