├── src
├── Castle.Core.Tests
│ ├── Core.Tests
│ │ └── Resources
│ │ │ ├── file1.txt
│ │ │ └── MoreRes
│ │ │ └── file2.txt
│ ├── DynamicProxy.Tests
│ │ ├── Classes
│ │ │ ├── SimpleClass.cs
│ │ │ ├── HasFinalizer.cs
│ │ │ ├── AbstractClassWithMethod.cs
│ │ │ ├── VirtualClassWithAutoProperty.cs
│ │ │ ├── VirtualClassWithMethod.cs
│ │ │ ├── ClassWithCharRetType.cs
│ │ │ ├── ClassWithIndexer.cs
│ │ │ ├── HasCtorWithParamsStrings.cs
│ │ │ ├── ClassWithVirtualInterface.cs
│ │ │ ├── HasCtorWithParamsArgument.cs
│ │ │ ├── VirtualClassWithPublicField.cs
│ │ │ ├── InheritsAbstractClassWithMethod.cs
│ │ │ ├── VirtuallyImplementsInterfaceWithProperty.cs
│ │ │ ├── HasCtorWithIntAndParamsArgument.cs
│ │ │ ├── ClassWithInterface.cs
│ │ │ ├── NonPublicMethodsClass.cs
│ │ │ ├── HasTwoProtectedMethods.cs
│ │ │ ├── VirtuallyImplementsInterfaceWithEvent.cs
│ │ │ ├── ClassCallingVirtualMethodFromCtor.cs
│ │ │ ├── VirtualClassWithNoDefaultCtor.cs
│ │ │ ├── NonPublicConstructorClass.cs
│ │ │ ├── ClassWithExplicitInterface.cs
│ │ │ ├── ClassToSerialize.cs
│ │ │ ├── ClassWithDefaultConstructor.cs
│ │ │ ├── ClassWithAttributesOnMethodParameters.cs
│ │ │ ├── ClassWithInternalDefaultConstructor.cs
│ │ │ ├── ClassWithProtectedDefaultConstructor.cs
│ │ │ └── ProtectedInternalConstructorClass.cs
│ │ ├── Interfaces
│ │ │ ├── IBase.cs
│ │ │ ├── ISub1.cs
│ │ │ ├── ISub2.cs
│ │ │ ├── IGenericInterfaceWithGenericMethodWithCascadingConstraintOnClass.cs
│ │ │ ├── IGenericInterfaceWithGenericMethodWithCascadingConstraintOnInterface.cs
│ │ │ ├── IGenericInterfaceWithGenericMethodWithCascadingConstraintOnAnyReferenceType.cs
│ │ │ └── IGenericInterfaceWithGenericMethodWithCascadingConstraintOnAnyTypeWithDefaultConstructor.cs
│ │ ├── Serialization
│ │ │ ├── IMixedInterface.cs
│ │ │ ├── ComplexHolder.cs
│ │ │ ├── EventHandlerClass.cs
│ │ │ ├── C.cs
│ │ │ ├── SerializableMixin.cs
│ │ │ ├── IndirectDelegateHolder.cs
│ │ │ ├── SerializableExplicitImpl.cs
│ │ │ ├── DelegateHolder.cs
│ │ │ ├── ClassWithIndirectSelfReference.cs
│ │ │ └── SerializableInterceptorSelector.cs
│ │ └── Explicit
│ │ │ ├── GenInterfaceExplicit.cs
│ │ │ ├── TwoInterfacesExplicit.cs
│ │ │ ├── GenericMethodExplicit.cs
│ │ │ ├── WithRefOutExplicit.cs
│ │ │ └── SimpleInterfaceExplicit.cs
│ ├── Interfaces
│ │ ├── IOne.cs
│ │ ├── ITwo.cs
│ │ ├── IWithRefOut.cs
│ │ ├── IFooWithIntPtr.cs
│ │ ├── IFooWithOutIntPtr.cs
│ │ ├── IDecimalOutParam.cs
│ │ ├── INullable.cs
│ │ ├── IdenticalInterfaces.cs
│ │ ├── IEmpty.cs
│ │ ├── IHaveIndexers.cs
│ │ └── ISimple.cs
│ ├── Components.DictionaryAdapter.Tests
│ │ ├── Color.cs
│ │ ├── IPersonWithMethod.cs
│ │ ├── IPersonWithoutPrefix.cs
│ │ ├── IUseBehaviorBuilder.cs
│ │ ├── IPersonWithPrefix.cs
│ │ ├── IItemContainerWithComponent.cs
│ │ ├── IPersonWithTypePrefixOverride.cs
│ │ ├── IPersonWithPrefixOverride.cs
│ │ ├── IEnsureMetaDoesNotConflict.cs
│ │ ├── IStringLists.cs
│ │ ├── IConversionsToString.cs
│ │ ├── IPersonWithPrefixOverrideFurtherOverride.cs
│ │ ├── IPhone.cs
│ │ ├── IMutableName.cs
│ │ ├── IName.cs
│ │ ├── IPersonWithDeniedInheritancePrefix.cs
│ │ └── IEmptyTest.cs
│ ├── InterClasses
│ │ ├── IExtendedService.cs
│ │ ├── InterfaceWithIndexer.cs
│ │ ├── One.cs
│ │ ├── OneAndEmpty.cs
│ │ ├── ClassWithIndexer.cs
│ │ ├── ClassWithMarkerInterface.cs
│ │ ├── Two.cs
│ │ ├── OneTwo.cs
│ │ ├── IClassWithMultiDimentionalArray.cs
│ │ ├── WithRefOutEmpty.cs
│ │ ├── WithRefOut.cs
│ │ ├── IService2.cs
│ │ └── ClassWithMultiDimentionalArray.cs
│ ├── Properties
│ │ └── Settings.settings
│ ├── Mixins
│ │ ├── IDerivedSimpleMixin.cs
│ │ ├── OtherMixinImplementingISimpleMixin.cs
│ │ ├── ClassImplementingISimpleMixin.cs
│ │ ├── OtherMixin.cs
│ │ └── ClassImplementingIDerivedSImpleMixin.cs
│ ├── ProxyKind.cs
│ ├── GenInterfaces
│ │ ├── GenericMethodWhereOneGenParamInheritsTheOther.cs
│ │ ├── GenInterfaceWithMethodWithNestedGenericReturn.cs
│ │ ├── GenInterface.cs
│ │ ├── GenInterfaceWithMethodWithNestedGenericParameter.cs
│ │ ├── GenInterfaceWithMethodWithNestedGenericParameterByRef.cs
│ │ ├── GenInterfaceWithGenMethods.cs
│ │ ├── OnlyGenMethodsInterface.cs
│ │ ├── GenInterfaceWithGenMethodsAndGenReturn.cs
│ │ └── GenExplicitImplementation.cs
│ ├── Interceptors
│ │ ├── DoNothingInterceptor.cs
│ │ ├── ThrowingInterceptor.cs
│ │ ├── AssertCannotChangeTargetInterceptor.cs
│ │ ├── SetReturnValueInterceptor.cs
│ │ └── AddTwoInterceptor.cs
│ ├── ThrowingInterceptorException.cs
│ ├── InternalsVisibleTo.cs
│ ├── GenClasses
│ │ ├── ClassWithMethodWithArrayOfListOfT.cs
│ │ ├── MethodWithArgumentBeingArrayOfGenericTypeOfT.cs
│ │ ├── ClassWithMethodWithGenericOfGenericOfT.cs
│ │ ├── GenClassWithGenReturn.cs
│ │ ├── OnlyGenMethodsClass.cs
│ │ ├── GenClassWithConstraints.cs
│ │ ├── ClassWithMethodWithReturnArrayOfListOfT.cs
│ │ └── GenClassNameClash.cs
│ ├── BugAttribute.cs
│ ├── log4netIntegration
│ │ └── log4net.xml
│ └── BugsReported
│ │ ├── DynProxy132.cs
│ │ ├── DynProxy145_SynchronizationContext.cs
│ │ └── DynProxy46.cs
├── Castle.Core
│ ├── DynamicProxy
│ │ ├── DynProxy.snk
│ │ ├── Generators
│ │ │ ├── Emitters
│ │ │ │ ├── EventCollection.cs
│ │ │ │ ├── MethodCollection.cs
│ │ │ │ ├── ConstructorCollection.cs
│ │ │ │ ├── NestedClassCollection.cs
│ │ │ │ ├── SimpleAST
│ │ │ │ │ ├── IILEmitter.cs
│ │ │ │ │ ├── Statement.cs
│ │ │ │ │ ├── Expression.cs
│ │ │ │ │ ├── NopStatement.cs
│ │ │ │ │ ├── TryStatement.cs
│ │ │ │ │ ├── FinallyStatement.cs
│ │ │ │ │ ├── EndExceptionBlockStatement.cs
│ │ │ │ │ └── NullExpression.cs
│ │ │ │ ├── CodeBuilders
│ │ │ │ │ └── MethodCodeBuilder.cs
│ │ │ │ ├── PropertiesCollection.cs
│ │ │ │ └── IMemberEmitter.cs
│ │ │ └── IGenerator.cs
│ │ ├── IInterceptor.cs
│ │ ├── Tokens
│ │ │ ├── DelegateMethods.cs
│ │ │ ├── TypeUtilMethods.cs
│ │ │ └── TypeMethods.cs
│ │ ├── ProxyGenerationException.cs
│ │ └── IProxyTargetAccessor.cs
│ ├── Components.DictionaryAdapter
│ │ ├── Util
│ │ │ ├── IValueInitializer.cs
│ │ │ ├── ICondition.cs
│ │ │ └── DynamicValueDelegate.cs
│ │ ├── IDictionaryCoerceStrategy.cs
│ │ ├── IDictionaryCopyStrategy.cs
│ │ ├── IDictionaryCreateStrategy.cs
│ │ ├── IDictionaryEqualityHashCodeStrategy.cs
│ │ ├── Attributes
│ │ │ ├── XmlDefaultsAttribute.cs
│ │ │ ├── IfExistsAttribute.cs
│ │ │ └── VolatileAttribute.cs
│ │ ├── IXPathSerializer.cs
│ │ └── IDictionaryBehaviorBuilder.cs
│ ├── Core
│ │ ├── Logging
│ │ │ ├── IContextStacks.cs
│ │ │ └── IContextStack.cs
│ │ ├── Internal
│ │ │ ├── ILockHolder.cs
│ │ │ ├── IUpgradeableLockHolder.cs
│ │ │ └── NoOpLock.cs
│ │ └── IServiceProviderEx.cs
│ ├── Compatibility
│ │ └── SilverlightHacks.cs
│ └── Properties
│ │ └── InternalsVisibleToTests.cs
├── Castle.Core.Tests-SL
│ ├── Properties
│ │ └── AppManifest.xml
│ └── App.xaml
└── Castle.Services.Logging.log4netIntegration
│ └── ThreadContextStacks.cs
├── tools
├── StatLight
│ ├── StatLight.EULA.txt
│ ├── StatLight.exe
│ ├── StatLight.Core.dll
│ ├── Ionic.Zip.Reduced.dll
│ ├── StatLight.Client.For.May2010.xap
│ ├── StatLight.Client.For.April2010.xap
│ ├── StatLight.Client.For.July2009.xap
│ ├── StatLight.Client.For.March2010.xap
│ ├── StatLight.Client.For.November2009.xap
│ ├── StatLight.Client.For.October2009.xap
│ ├── StatLight.Client.For.UnitDrivenDecember2009.xap
│ └── Microsoft.Silverlight.Testing.License.txt
├── NUnit
│ ├── bin
│ │ ├── runpnunit.bat
│ │ ├── agent.conf
│ │ ├── nunit.exe
│ │ ├── lib
│ │ │ ├── fit.dll
│ │ │ ├── Failure.png
│ │ │ ├── Ignored.png
│ │ │ ├── Skipped.png
│ │ │ ├── Success.png
│ │ │ ├── log4net.dll
│ │ │ ├── Inconclusive.png
│ │ │ ├── nunit.core.dll
│ │ │ ├── nunit.uikit.dll
│ │ │ ├── nunit.util.dll
│ │ │ ├── nunit.fixtures.dll
│ │ │ ├── nunit-gui-runner.dll
│ │ │ ├── nunit.uiexception.dll
│ │ │ ├── nunit-console-runner.dll
│ │ │ └── nunit.core.interfaces.dll
│ │ ├── runFile.exe
│ │ ├── nunit-agent.exe
│ │ ├── nunit-x86.exe
│ │ ├── nunit-console.exe
│ │ ├── pnunit-agent.exe
│ │ ├── pnunit.tests.dll
│ │ ├── nunit-agent-x86.exe
│ │ ├── nunit.framework.dll
│ │ ├── pnunit-launcher.exe
│ │ ├── pnunit.framework.dll
│ │ ├── nunit-console-x86.exe
│ │ ├── tests
│ │ │ ├── timing-tests.dll
│ │ │ ├── mock-assembly.dll
│ │ │ ├── nunit-gui.tests.dll
│ │ │ ├── nunit.framework.dll
│ │ │ ├── test-assembly.dll
│ │ │ ├── test-utilities.dll
│ │ │ ├── loadtest-assembly.dll
│ │ │ ├── nunit.core.tests.dll
│ │ │ ├── nunit.mocks.tests.dll
│ │ │ ├── nunit.uikit.tests.dll
│ │ │ ├── nunit.util.tests.dll
│ │ │ ├── nonamespace-assembly.dll
│ │ │ ├── nunit-console.tests.dll
│ │ │ ├── nunit.fixtures.tests.dll
│ │ │ ├── nunit.framework.tests.dll
│ │ │ └── nunit.uiexception.tests.dll
│ │ ├── framework
│ │ │ ├── nunit.mocks.dll
│ │ │ ├── nunit.framework.dll
│ │ │ └── pnunit.framework.dll
│ │ ├── agent.log.conf
│ │ ├── launcher.log.conf
│ │ ├── NUnitTests.nunit
│ │ └── test.conf
│ └── license.txt
└── MSBuildCommunityTasks
│ ├── Ionic.Zip.Reduced.dll
│ └── MSBuild.Community.Tasks.dll
├── Changes.txt
├── lib
├── net35
│ ├── NLog.dll
│ ├── NLog.pdb
│ ├── adodb.dll
│ ├── log4net.dll
│ ├── NLog.Extended.dll
│ ├── NLog.Extended.pdb
│ └── Rhino.Mocks.CPP.Interfaces.dll
├── net40
│ ├── NLog.dll
│ ├── NLog.pdb
│ ├── NLog.Extended.dll
│ └── NLog.Extended.pdb
├── sl40
│ ├── NLog.dll
│ ├── NLog.pdb
│ ├── NUnit.Silverlight.Framework.dll
│ └── NUnit.Silverlight.Compatibility.dll
├── mono26
│ ├── NLog.dll
│ ├── log4net.dll
│ └── NLog.Extended.dll
├── nunit.framework.dll
└── nunit.framework.license.txt
├── Settings-SL.proj
├── .gitignore
├── readme
└── License.txt
/src/Castle.Core.Tests/Core.Tests/Resources/file1.txt:
--------------------------------------------------------------------------------
1 | Something
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Core.Tests/Resources/MoreRes/file2.txt:
--------------------------------------------------------------------------------
1 | Another thing
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.EULA.txt:
--------------------------------------------------------------------------------
1 | See:
2 |
3 | http://statlight.codeplex.com/license
--------------------------------------------------------------------------------
/tools/NUnit/bin/runpnunit.bat:
--------------------------------------------------------------------------------
1 | start pnunit-agent agent.conf
2 | pnunit-launcher test.conf
--------------------------------------------------------------------------------
/Changes.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/Changes.txt
--------------------------------------------------------------------------------
/lib/net35/NLog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/NLog.dll
--------------------------------------------------------------------------------
/lib/net35/NLog.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/NLog.pdb
--------------------------------------------------------------------------------
/lib/net40/NLog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net40/NLog.dll
--------------------------------------------------------------------------------
/lib/net40/NLog.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net40/NLog.pdb
--------------------------------------------------------------------------------
/lib/sl40/NLog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/sl40/NLog.dll
--------------------------------------------------------------------------------
/lib/sl40/NLog.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/sl40/NLog.pdb
--------------------------------------------------------------------------------
/lib/mono26/NLog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/mono26/NLog.dll
--------------------------------------------------------------------------------
/lib/net35/adodb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/adodb.dll
--------------------------------------------------------------------------------
/lib/net35/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/log4net.dll
--------------------------------------------------------------------------------
/lib/mono26/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/mono26/log4net.dll
--------------------------------------------------------------------------------
/lib/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/nunit.framework.dll
--------------------------------------------------------------------------------
/tools/NUnit/license.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/license.txt
--------------------------------------------------------------------------------
/tools/NUnit/bin/agent.conf:
--------------------------------------------------------------------------------
1 |
2 | 8080
3 | .
4 |
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit.exe
--------------------------------------------------------------------------------
/lib/mono26/NLog.Extended.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/mono26/NLog.Extended.dll
--------------------------------------------------------------------------------
/lib/net35/NLog.Extended.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/NLog.Extended.dll
--------------------------------------------------------------------------------
/lib/net35/NLog.Extended.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/NLog.Extended.pdb
--------------------------------------------------------------------------------
/lib/net40/NLog.Extended.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net40/NLog.Extended.dll
--------------------------------------------------------------------------------
/lib/net40/NLog.Extended.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net40/NLog.Extended.pdb
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/fit.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/fit.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/runFile.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/runFile.exe
--------------------------------------------------------------------------------
/lib/nunit.framework.license.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/nunit.framework.license.txt
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/Failure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/Failure.png
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/Ignored.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/Ignored.png
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/Skipped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/Skipped.png
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/Success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/Success.png
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/log4net.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit-agent.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit-agent.exe
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit-x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit-x86.exe
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.exe
--------------------------------------------------------------------------------
/Settings-SL.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit-console.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit-console.exe
--------------------------------------------------------------------------------
/tools/NUnit/bin/pnunit-agent.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/pnunit-agent.exe
--------------------------------------------------------------------------------
/tools/NUnit/bin/pnunit.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/pnunit.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/Inconclusive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/Inconclusive.png
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit.core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit.core.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit.uikit.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit.uikit.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit.util.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit.util.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit-agent-x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit-agent-x86.exe
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit.framework.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/pnunit-launcher.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/pnunit-launcher.exe
--------------------------------------------------------------------------------
/tools/NUnit/bin/pnunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/pnunit.framework.dll
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Core.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit.fixtures.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit.fixtures.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/nunit-console-x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/nunit-console-x86.exe
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/timing-tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/timing-tests.dll
--------------------------------------------------------------------------------
/tools/StatLight/Ionic.Zip.Reduced.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/Ionic.Zip.Reduced.dll
--------------------------------------------------------------------------------
/lib/net35/Rhino.Mocks.CPP.Interfaces.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/net35/Rhino.Mocks.CPP.Interfaces.dll
--------------------------------------------------------------------------------
/lib/sl40/NUnit.Silverlight.Framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/sl40/NUnit.Silverlight.Framework.dll
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/DynProxy.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/src/Castle.Core/DynamicProxy/DynProxy.snk
--------------------------------------------------------------------------------
/tools/NUnit/bin/framework/nunit.mocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/framework/nunit.mocks.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit-gui-runner.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit-gui-runner.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit.uiexception.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit.uiexception.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/mock-assembly.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/mock-assembly.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit-gui.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit-gui.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.framework.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/test-assembly.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/test-assembly.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/test-utilities.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/test-utilities.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/loadtest-assembly.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/loadtest-assembly.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.core.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.core.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.mocks.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.mocks.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.uikit.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.uikit.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.util.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.util.tests.dll
--------------------------------------------------------------------------------
/lib/sl40/NUnit.Silverlight.Compatibility.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/lib/sl40/NUnit.Silverlight.Compatibility.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/framework/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/framework/nunit.framework.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/framework/pnunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/framework/pnunit.framework.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit-console-runner.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit-console-runner.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/lib/nunit.core.interfaces.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/lib/nunit.core.interfaces.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nonamespace-assembly.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nonamespace-assembly.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit-console.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit-console.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.fixtures.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.fixtures.tests.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.framework.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.framework.tests.dll
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.May2010.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.May2010.xap
--------------------------------------------------------------------------------
/tools/MSBuildCommunityTasks/Ionic.Zip.Reduced.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/MSBuildCommunityTasks/Ionic.Zip.Reduced.dll
--------------------------------------------------------------------------------
/tools/NUnit/bin/tests/nunit.uiexception.tests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/NUnit/bin/tests/nunit.uiexception.tests.dll
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.April2010.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.April2010.xap
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.July2009.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.July2009.xap
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.March2010.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.March2010.xap
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.November2009.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.November2009.xap
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.October2009.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.October2009.xap
--------------------------------------------------------------------------------
/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.dll
--------------------------------------------------------------------------------
/tools/StatLight/StatLight.Client.For.UnitDrivenDecember2009.xap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castleproject-deprecated/Castle.Core-READONLY/HEAD/tools/StatLight/StatLight.Client.For.UnitDrivenDecember2009.xap
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | /build
3 | AssemblyInfo.cs
4 |
5 | # Standard VS.NET and ReSharper Foo
6 | src/*/obj
7 | src/*/bin
8 | *.csproj.user
9 | _ReSharper*
10 | *.user
11 | *.suo
12 | *.cache
13 | * Thumbs.db
14 | *.csproj.ReSharper
15 |
16 | *.orig
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/Util/IValueInitializer.cs:
--------------------------------------------------------------------------------
1 | namespace Castle.Components.DictionaryAdapter
2 | {
3 | public interface IValueInitializer
4 | {
5 | void Initialize(IDictionaryAdapter dictionaryAdapter, object value);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests-SL/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/readme:
--------------------------------------------------------------------------------
1 | More information about Castle.Core
2 | can be found at http://www.castleproject.org/
3 |
4 | Castle Dynamic Proxy is now part of Castle.Core
5 |
6 | If you intend to use it in production it is advised to use released version. You can find download link to latest released version here: http://castleproject.org/castle/projects.html
7 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests-SL/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tools/NUnit/bin/agent.log.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/tools/NUnit/bin/launcher.log.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/License.txt:
--------------------------------------------------------------------------------
1 | Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
15 |
--------------------------------------------------------------------------------
/tools/NUnit/bin/NUnitTests.nunit:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/SimpleClass.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class SimpleClass
18 | {
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IOne.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IOne
18 | {
19 | int OneMethod();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/ITwo.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface ITwo
18 | {
19 | int TwoMethod();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/Color.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public enum Color { Red, Green, Blue };
18 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/IBase.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IBase
18 | {
19 | void Foo();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Core/Logging/IContextStacks.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core.Logging
16 | {
17 | public interface IContextStacks
18 | {
19 | IContextStack this[string key] { get; }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/ISub1.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface ISub1 : IBase
18 | {
19 | void Bar();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/ISub2.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface ISub2 : IBase
18 | {
19 | void Baz();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/IExtendedService.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.InterClasses
16 | {
17 | public interface IExtendedService : IService
18 | {
19 | void DoSomething();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <?xml version="1.0" encoding="utf-16"?>
7 | <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8 | <string>%PROGRAMFILES%\Microsoft SDKs\Windows\v6.0A\Bin</string>
9 | <string>%PROGRAMFILES(x86)%\Microsoft Visual Studio 8\SDK\v2.0\bin</string>
10 | </ArrayOfString>
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/HasFinalizer.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class HasFinalizer
18 | {
19 | ~HasFinalizer()
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Mixins/IDerivedSimpleMixin.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Mixins
16 | {
17 | public interface IDerivedSimpleMixin : ISimpleMixin
18 | {
19 | int DoSomethingDerived();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/ProxyKind.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests
16 | {
17 | public enum ProxyKind
18 | {
19 | Class,
20 | WithTarget,
21 | WithoutTarget,
22 | WithTargetInterface
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Core/Internal/ILockHolder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core.Internal
16 | {
17 | using System;
18 |
19 | public interface ILockHolder:IDisposable
20 | {
21 | bool LockAcquired { get; }
22 | }
23 | }
--------------------------------------------------------------------------------
/tools/NUnit/bin/test.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Testing
6 |
7 |
8 | Testing
9 | pnunit.tests.dll
10 | TestLibraries.Testing.EqualTo19
11 | localhost:8080
12 |
13 | ..\server
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/InterfaceWithIndexer.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.InterClasses
16 | {
17 | public interface InterfaceWithIndexer
18 | {
19 | object this[int index] { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IWithRefOut.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IWithRefOut
18 | {
19 | void Do(out int i);
20 | void Did(ref int i);
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithMethod.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public interface IPersonWithMethod : IPerson
18 | {
19 | void Run();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IFooWithIntPtr.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | using System;
18 |
19 | public interface IFooWithIntPtr
20 | {
21 | IntPtr Buffer(UInt32 index);
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IFooWithOutIntPtr.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | using System;
18 |
19 | public interface IFooWithOutIntPtr
20 | {
21 | int Bar(out IntPtr i);
22 | }
23 | }
--------------------------------------------------------------------------------
/tools/StatLight/Microsoft.Silverlight.Testing.License.txt:
--------------------------------------------------------------------------------
1 | MSDN CODE GALLERY BINARY LICENSE
2 |
3 | You are free to install, use, copy and distribute any number of copies of the software, in object code form, provided that you retain:
4 |
5 | • all copyright, patent, trademark, and attribution notices that are present in the software,
6 | • this list of conditions, and
7 | • the following disclaimer in the documentation and/or other materials provided with the software.
8 |
9 | The software is licensed “as-is.” You bear the risk of using it. No express warranties, guarantees or conditions are provided. To the extent permitted under your local laws, the implied warranties of merchantability, fitness for a particular purpose and non-infringement are excluded.
10 |
11 | This license does not grant you any rights to use any other party’s name, logo, or trademarks. All rights not specifically granted herein are reserved.
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/AbstractClassWithMethod.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public abstract class AbstractClassWithMethod
18 | {
19 | public abstract int Method();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IDecimalOutParam.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IDecimalOutParam
18 | {
19 | void Dance(out decimal fuel);
20 | void Run(out T fuel);
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/INullable.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface INullable
18 | {
19 | int? Get();
20 | void GetOut(out int? param);
21 | void Set(int? param);
22 |
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithoutPrefix.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public interface IPersonWithoutPrefix : IPerson
18 | {
19 | int NumberOfFeet { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/VirtualClassWithAutoProperty.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class VirtualClassWithAutoProperty
18 | {
19 | public virtual int AutoProperty { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Core/Internal/IUpgradeableLockHolder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core.Internal
16 | {
17 | public interface IUpgradeableLockHolder : ILockHolder
18 | {
19 | ILockHolder Upgrade();
20 | ILockHolder Upgrade(bool waitForLock);
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/One.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.InterClasses
16 | {
17 | using Castle.DynamicProxy.Tests.Interfaces;
18 |
19 | public class One : IOne
20 | {
21 | public int OneMethod()
22 | {
23 | return 1;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/EventCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters
16 | {
17 | using System.Collections.ObjectModel;
18 |
19 | public class EventCollection : Collection
20 | {
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/VirtualClassWithMethod.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class VirtualClassWithMethod
18 | {
19 | public virtual int Method()
20 | {
21 | return 42;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/MethodCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters
16 | {
17 | using System.Collections.ObjectModel;
18 |
19 | public class MethodCollection : Collection
20 | {
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithCharRetType.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class ClassWithCharRetType
18 | {
19 | public virtual char DoSomething()
20 | {
21 | return 'c';
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithIndexer.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | using Castle.DynamicProxy.Tests.GenClasses;
18 |
19 | public class ClassWithIndexer : ClassWithIndexer
20 | { }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IUseBehaviorBuilder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public interface IUseBehaviorBuilder
18 | {
19 | [KeyBehaviorBuilder]
20 | string First_Name { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/IMixedInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | public interface IMixedInterface
19 | {
20 | object GetExecutingObject();
21 | }
22 | #endif
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/HasCtorWithParamsStrings.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class HasCtorWithParamsStrings
18 | {
19 | public HasCtorWithParamsStrings(params string[] arguments)
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenericMethodWhereOneGenParamInheritsTheOther.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | public interface GenericMethodWhereOneGenParamInheritsTheOther
18 | {
19 | T2 Foo(T1 foo) where T1 : T2;
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/ConstructorCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters
16 | {
17 | using System.Collections.ObjectModel;
18 |
19 | public class ConstructorCollection : Collection
20 | {
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/NestedClassCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters
16 | {
17 | using System.Collections.ObjectModel;
18 |
19 | public class NestedClassCollection : Collection
20 | {
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithVirtualInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class ClassWithVirtualInterface : ISimpleInterface
18 | {
19 | public virtual int Do()
20 | {
21 | return 5;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/HasCtorWithParamsArgument.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class HasCtorWithParamsArgument
18 | {
19 | public HasCtorWithParamsArgument(params object[] arguments)
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/OneAndEmpty.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.InterClasses
16 | {
17 | using Castle.DynamicProxy.Tests.Interfaces;
18 |
19 | public class OneAndEmpty : IOne, IEmpty
20 | {
21 | public int OneMethod()
22 | {
23 | return 1;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IdenticalInterfaces.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IIdenticalTwo
18 | {
19 | string Foo();
20 | }
21 |
22 | public interface IIdenticalOne
23 | {
24 | string Foo();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithPrefix.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | [KeyPrefix("Person_")]
18 | public interface IPersonWithPrefix : IPersonWithoutPrefix
19 | {
20 | Color HairColor { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interceptors/DoNothingInterceptor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interceptors
16 | {
17 | public class DoNothingInterceptor : IInterceptor
18 | {
19 | public void Intercept(IInvocation invocation)
20 | {
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IEmpty.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | using System;
18 |
19 | public interface IEmpty
20 | {
21 | }
22 |
23 | #if !SILVERLIGHT
24 | [Serializable]
25 | #endif
26 | public class Empty : IEmpty
27 | {
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/ThrowingInterceptorException.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle
16 | {
17 | using System;
18 |
19 | public class ThrowingInterceptorException : Exception
20 | {
21 | public ThrowingInterceptorException(string message)
22 | : base(message)
23 | {
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/IDictionaryCoerceStrategy.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 |
19 | public interface IDictionaryCoerceStrategy
20 | {
21 | object Coerce(IDictionaryAdapter adapter, Type type);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IItemContainerWithComponent.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public interface IItemContainerWithComponent : IDictionaryNotify
18 | {
19 | [Component]
20 | TItem Item { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/VirtualClassWithPublicField.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class VirtualClassWithPublicField
18 | {
19 | public int field;
20 | public virtual int Method()
21 | {
22 | return 42;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/ClassWithIndexer.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.InterClasses
16 | {
17 | public class ClassWithIndexer : InterfaceWithIndexer
18 | {
19 | public object this[int index]
20 | {
21 | get { return index; }
22 | set { }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/IILEmitter.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public interface IILEmitter
20 | {
21 | void Emit(IMemberEmitter member, ILGenerator gen);
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/IInterceptor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy
16 | {
17 | ///
18 | /// New interface that is going to be used by DynamicProxy 2
19 | ///
20 | public interface IInterceptor
21 | {
22 | void Intercept(IInvocation invocation);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/Util/ICondition.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | ///
18 | /// Contract for value matching.
19 | ///
20 | public interface ICondition
21 | {
22 | bool SatisfiedBy(object value);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Castle.Core/Core/Logging/IContextStack.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core.Logging
16 | {
17 | using System;
18 |
19 | public interface IContextStack
20 | {
21 | int Count { get; }
22 |
23 | void Clear();
24 |
25 | string Pop();
26 |
27 | IDisposable Push(string message);
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithTypePrefixOverride.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | [TypeKeyPrefix]
18 | public interface IPersonWithTypePrefixOverride : IPersonWithPrefixOverride
19 | {
20 | int Height { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/InheritsAbstractClassWithMethod.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class InheritsAbstractClassWithMethod : AbstractClassWithMethod
18 | {
19 | public override int Method()
20 | {
21 | return 42;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/VirtuallyImplementsInterfaceWithProperty.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class VirtuallyImplementsInterfaceWithProperty:IHasProperty
18 | {
19 | public virtual int Prop
20 | {
21 | get; set;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/IHaveIndexers.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | using System;
18 |
19 | public interface IHaveIndexers
20 | {
21 | string this[string name] { get; }
22 | string this[Guid id] { get; }
23 | string this[Type type] { get; }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InternalsVisibleTo.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | using System.Runtime.CompilerServices;
16 | using Castle.Core.Internal;
17 |
18 | [assembly: InternalsVisibleTo(InternalsVisible.ToDynamicProxyGenAssembly2)]
19 | #if SILVERLIGHT
20 | [assembly: InternalsVisibleTo(InternalsVisible.ToCastleCore)]
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/HasCtorWithIntAndParamsArgument.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class HasCtorWithIntAndParamsArgument
18 | {
19 | public HasCtorWithIntAndParamsArgument(int first, params object[] arguments)
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/IGenerator.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators
16 | {
17 | using Castle.DynamicProxy.Generators.Emitters;
18 |
19 | public interface IGenerator
20 | {
21 | T Generate(ClassEmitter @class, ProxyGenerationOptions options, INamingScope namingScope);
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithPrefixOverride.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | [KeyPrefix("Person2_")]
18 | public interface IPersonWithPrefixOverride : IPersonWithPrefix
19 | {
20 | [Key("Eye__Color")]
21 | Color EyeColor { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/Statement.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public abstract class Statement : IILEmitter
20 | {
21 | public abstract void Emit(IMemberEmitter member, ILGenerator gen);
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/ComplexHolder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 |
20 | [Serializable]
21 | public class ComplexHolder
22 | {
23 | public object Element;
24 | public Type Type;
25 | }
26 | #endif
27 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Mixins/OtherMixinImplementingISimpleMixin.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Mixins
16 | {
17 | using System;
18 |
19 | public class OtherMixinImplementingISimpleMixin : ISimpleMixin
20 | {
21 | public int DoSomething()
22 | {
23 | throw new NotImplementedException();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/Expression.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public abstract class Expression : IILEmitter
20 | {
21 | public abstract void Emit(IMemberEmitter member, ILGenerator gen);
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/ClassWithMarkerInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | using System;
18 |
19 | public interface IMarkerInterface
20 | {
21 | }
22 |
23 | #if !SILVERLIGHT
24 | [Serializable]
25 | #endif
26 | public class ClassWithMarkerInterface
27 | {
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/ClassWithMethodWithArrayOfListOfT.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | using System.Collections.Generic;
18 |
19 | public abstract class ClassWithMethodWithArrayOfListOfT
20 | {
21 | public virtual void GenericMethodWithListArrayArgument(List[] action) { }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/Two.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.InterClasses
16 | {
17 | using System;
18 |
19 | using Castle.DynamicProxy.Tests.Interfaces;
20 |
21 | #if !SILVERLIGHT
22 | [Serializable]
23 | #endif
24 | public class Two : ITwo
25 | {
26 | public int TwoMethod()
27 | {
28 | return 20;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/IDictionaryCopyStrategy.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 |
19 | public interface IDictionaryCopyStrategy
20 | {
21 | bool Copy(IDictionaryAdapter source, IDictionaryAdapter target, ref Func selector);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | using System;
18 |
19 | #if !SILVERLIGHT
20 | [Serializable]
21 | #endif
22 | public class ClassWithInterface : ISimpleInterface
23 | {
24 | public int Do()
25 | {
26 | return 5;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/NonPublicMethodsClass.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class NonPublicMethodsClass
18 | {
19 | public virtual void DoSomething()
20 | {
21 | DoOtherThing();
22 | }
23 |
24 | protected virtual void DoOtherThing()
25 | {
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenInterfaceWithMethodWithNestedGenericReturn.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | public interface GenInterfaceWithMethodWithNestedGenericReturn
21 | {
22 | IEnumerable> Foo();
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/OneTwo.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.InterClasses
16 | {
17 | using Castle.DynamicProxy.Tests.Interfaces;
18 |
19 | public class OneTwo : IOne, ITwo
20 | {
21 | public int OneMethod()
22 | {
23 | return 3;
24 | }
25 |
26 | public int TwoMethod()
27 | {
28 | return 2;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/IDictionaryCreateStrategy.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 | using System.Collections;
19 |
20 | public interface IDictionaryCreateStrategy
21 | {
22 | object Create(IDictionaryAdapter adapter, Type type, IDictionary dictionary);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IEnsureMetaDoesNotConflict.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public interface IEnsureMetaDoesNotConflict
18 | {
19 | string Dictionary { get; set; }
20 |
21 | object Properties { get; set; }
22 |
23 | int FetchProperties { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/IClassWithMultiDimentionalArray.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.InterClasses
16 | {
17 | public interface IClassWithMultiDimentionalArray
18 | {
19 | void Do(int[] args);
20 |
21 | // void Do2(int[,] args);
22 |
23 | void Do3(string[] args);
24 |
25 | // void Do4(string[,] args);
26 | }
27 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IStringLists.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | using System.Collections.Generic;
18 |
19 | public interface IStringLists
20 | {
21 | [StringList]
22 | IList Names { get; }
23 |
24 | [StringList]
25 | IList Ages { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/HasTwoProtectedMethods.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class HasTwoProtectedMethods
18 | {
19 | protected virtual int Method1()
20 | {
21 | return 42;
22 | }
23 |
24 | protected virtual string Method2()
25 | {
26 | return "42";
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Explicit/GenInterfaceExplicit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Explicit
16 | {
17 | using Castle.DynamicProxy.Tests.GenInterfaces;
18 |
19 | public class GenInterfaceExplicit : GenInterface
20 | {
21 | int GenInterface.DoSomething(int t)
22 | {
23 | return t + 1;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | public interface GenInterface where T : new()
18 | {
19 | T DoSomething(T t);
20 | }
21 |
22 | public class GenInterfaceImpl : GenInterface where T : new()
23 | {
24 | public T DoSomething(T t)
25 | {
26 | return t;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interceptors/ThrowingInterceptor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Interceptors
16 | {
17 | using Castle.DynamicProxy;
18 |
19 | public class ThrowingInterceptor : IInterceptor
20 | {
21 | public void Intercept(IInvocation invocation)
22 | {
23 | throw new ThrowingInterceptorException("Because I feel like it");
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/BugAttribute.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace CastleTests
16 | {
17 | using System;
18 |
19 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
20 | public class BugAttribute : Attribute
21 | {
22 | public BugAttribute(string bugId)
23 | {
24 | BugId = bugId;
25 | }
26 |
27 | public string BugId { get; set; }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/EventHandlerClass.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 |
20 | [Serializable]
21 | public class EventHandlerClass
22 | {
23 | public void TestHandler(object sender, EventArgs e)
24 | {
25 | }
26 | }
27 | #endif
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenInterfaceWithMethodWithNestedGenericParameter.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | public interface GenInterfaceWithMethodWithNestedGenericParameter
21 | {
22 | void Foo(IEnumerable> bars);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Core/IServiceProviderEx.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core
16 | {
17 | using System;
18 |
19 | ///
20 | /// Increments IServiceProvider with a generic service resolution operation.
21 | ///
22 | public interface IServiceProviderEx : IServiceProvider
23 | {
24 | T GetService() where T : class;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Castle.Core/Core/Internal/NoOpLock.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core.Internal
16 | {
17 | internal class NoOpLock : ILockHolder
18 | {
19 | public static readonly ILockHolder Lock = new NoOpLock();
20 |
21 | public void Dispose()
22 | {
23 |
24 | }
25 |
26 | public bool LockAcquired
27 | {
28 | get { return true; }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IConversionsToString.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | using System.ComponentModel;
18 |
19 | [StringValues]
20 | public interface IConversionsToString : IConversions
21 | {
22 | [TypeConverter(typeof(PhoneConverter))]
23 | Phone Phone { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/CodeBuilders/MethodCodeBuilder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.CodeBuilders
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public class MethodCodeBuilder : AbstractCodeBuilder
20 | {
21 | public MethodCodeBuilder(ILGenerator generator) : base(generator)
22 | {
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/MethodWithArgumentBeingArrayOfGenericTypeOfT.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | using System;
18 |
19 | public class MethodWithArgumentBeingArrayOfGenericTypeOfT
20 | {
21 |
22 | public virtual T Method( Action[] actions) where T : class
23 | {
24 | return default(T);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenInterfaceWithMethodWithNestedGenericParameterByRef.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | public interface GenInterfaceWithMethodWithNestedGenericParameterByRef
21 | {
22 | void Foo(ref IEnumerable> bars);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Mixins/ClassImplementingISimpleMixin.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Mixins
16 | {
17 | using System;
18 | #if !SILVERLIGHT
19 | [Serializable]
20 | #endif
21 | public class ClassImplementingISimpleMixin : ISimpleMixin
22 | {
23 | public int DoSomething()
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/PropertiesCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters
16 | {
17 | using System.Collections.ObjectModel;
18 |
19 | ///
20 | /// Summary description for PropertiesCollection.
21 | ///
22 | public class PropertiesCollection : Collection
23 | {
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/ClassWithMethodWithGenericOfGenericOfT.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | using System.Collections.Generic;
18 |
19 | public abstract class ClassWithMethodWithGenericOfGenericOfT
20 | {
21 | public virtual void GenericMethodWithGenericOfGenericArgument(IEnumerable> compararers) { }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/WithRefOutEmpty.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.InterClasses
16 | {
17 | using Castle.DynamicProxy.Tests.Interfaces;
18 |
19 | public class WithRefOutAndEmpty : IWithRefOut, IEmpty
20 | {
21 | public void Did(ref int i)
22 | {
23 | i = 5;
24 | }
25 |
26 | public void Do(out int i)
27 | {
28 | i = 5;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/log4netIntegration/log4net.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/NopStatement.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public class NopStatement : Statement
20 | {
21 | public override void Emit(IMemberEmitter member, ILGenerator gen)
22 | {
23 | gen.Emit(OpCodes.Nop);
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/TryStatement.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public class TryStatement : Statement
20 | {
21 | public override void Emit(IMemberEmitter member, ILGenerator gen)
22 | {
23 | gen.BeginExceptionBlock();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithPrefixOverrideFurtherOverride.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | using System.ComponentModel;
18 |
19 | public interface IPersonWithPrefixOverrideFurtherOverride : IPersonWithPrefixOverride
20 | {
21 | [DefaultValue(1)]
22 | int NumberOfHeads { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Explicit/TwoInterfacesExplicit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Explicit
16 | {
17 | using System;
18 |
19 | public class TwoInterfacesExplicit : ISimpleInterface, IDisposable
20 | {
21 | void IDisposable.Dispose()
22 | {
23 | }
24 |
25 | int ISimpleInterface.Do()
26 | {
27 | return 5;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenInterfaceWithGenMethods.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | public interface GenInterfaceWithGenMethods
18 | {
19 | void DoSomething(Z z, T t);
20 | }
21 |
22 | public class GenInterfaceWithGenMethodsImpl : GenInterfaceWithGenMethods
23 | {
24 | public void DoSomething(Z z, T t)
25 | {
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/IDictionaryEqualityHashCodeStrategy.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | public interface IDictionaryEqualityHashCodeStrategy
18 | {
19 | bool Equals(IDictionaryAdapter adapter1, IDictionaryAdapter adapter2);
20 |
21 | bool GetHashCode(IDictionaryAdapter adapter, out int hashCode);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/C.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 |
20 | [Serializable]
21 | public class C
22 | {
23 | public int I;
24 | public C This;
25 |
26 | public C(int i)
27 | {
28 | I = i;
29 | This = this;
30 | }
31 | }
32 | #endif
33 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/SerializableMixin.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 |
20 | [Serializable]
21 | public class SerializableMixin : IMixedInterface
22 | {
23 | public object GetExecutingObject()
24 | {
25 | return this;
26 | }
27 | }
28 | #endif
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/GenClassWithGenReturn.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | public class GenClassWithGenReturn where T : new() where Z : new()
18 | {
19 | public virtual T DoSomethingT()
20 | {
21 | return new T();
22 | }
23 |
24 | public virtual Z DoSomethingZ()
25 | {
26 | return new Z();
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/Attributes/XmlDefaultsAttribute.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 |
19 | [AttributeUsage(AttributeTargets.Interface)]
20 | public class XmlDefaultsAttribute : Attribute
21 | {
22 | public bool Qualified { get; set; }
23 |
24 | public bool IsNullable { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/FinallyStatement.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public class FinallyStatement : Statement
20 | {
21 | public override void Emit(IMemberEmitter member, ILGenerator gen)
22 | {
23 | gen.BeginFinallyBlock();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPhone.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | using System.ComponentModel;
18 |
19 | public interface IPhone : IEditableObject, INotifyPropertyChanged
20 | #if !SL3
21 | , IDataErrorInfo
22 | #endif
23 | {
24 | [Fetch]string Number { get; set; }
25 | string Extension { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Explicit/GenericMethodExplicit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Explicit
16 | {
17 | public class GenericMethodExplicit : IGenericInterface
18 | {
19 | T IGenericInterface.GenericMethod()
20 | {
21 | if(typeof(T) == typeof(int))
22 | {
23 | return (T)(object)7;
24 | }
25 | return default(T);
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/IMemberEmitter.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters
16 | {
17 | using System;
18 | using System.Reflection;
19 |
20 | public interface IMemberEmitter
21 | {
22 | MemberInfo Member { get; }
23 |
24 | Type ReturnType { get; }
25 |
26 | void EnsureValidCodeBlock();
27 |
28 | void Generate();
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Tokens/DelegateMethods.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tokens
16 | {
17 | using System;
18 | using System.Reflection;
19 |
20 | public static class DelegateMethods
21 | {
22 | public static readonly MethodInfo CreateDelegate =
23 | typeof(Delegate).GetMethod("CreateDelegate", new[] { typeof(Type), typeof(object), typeof(MethodInfo) });
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Compatibility/SilverlightHacks.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 |
16 | #if SILVERLIGHT
17 | namespace System
18 | {
19 | using System.Diagnostics;
20 |
21 | [Conditional("THIS_IS_NEVER_TRUE")]
22 | internal class SerializableAttribute : Attribute
23 | {
24 | }
25 |
26 | [Conditional("THIS_IS_NEVER_TRUE")]
27 | internal class NonSerializedAttribute : Attribute
28 | {
29 | }
30 | }
31 | #endif
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/Attributes/IfExistsAttribute.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 |
19 | ///
20 | /// Suppresses any on-demand behaviors.
21 | ///
22 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
23 | public class IfExistsAttribute : Attribute
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/VirtuallyImplementsInterfaceWithEvent.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | using System;
18 |
19 | public class VirtuallyImplementsInterfaceWithEvent : IHasEvent
20 | {
21 | public virtual event EventHandler MyEvent;
22 |
23 | public void Raise()
24 | {
25 | MyEvent(null, EventArgs.Empty);
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Mixins/OtherMixin.cs:
--------------------------------------------------------------------------------
1 | // You may obtain a copy of the License at
2 | //
3 | // http://www.apache.org/licenses/LICENSE-2.0
4 | //
5 | // Unless required by applicable law or agreed to in writing, software
6 | // distributed under the License is distributed on an "AS IS" BASIS,
7 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | // See the License for the specific language governing permissions and
9 | // limitations under the License.
10 |
11 | namespace Castle.DynamicProxy.Tests.Mixins
12 | {
13 | using System;
14 |
15 | public interface IOtherMixin
16 | {
17 | int Sum(int x, int y);
18 | }
19 |
20 | ///
21 | /// Summary description for OtherMixin.
22 | ///
23 | #if !SILVERLIGHT
24 | [Serializable]
25 | #endif
26 | public class OtherMixin : IOtherMixin
27 | {
28 | public OtherMixin()
29 | {
30 | }
31 |
32 | #region IOtherMixin Members
33 |
34 | public int Sum(int x, int y)
35 | {
36 | return x + y;
37 | }
38 |
39 | #endregion
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/IGenericInterfaceWithGenericMethodWithCascadingConstraintOnClass.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IGenericInterfaceWithGenericMethodWithCascadingConstraintOnClass
18 | where TGenericType : Empty
19 | {
20 | void Method() where TGenericSubType : TGenericType;
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/EndExceptionBlockStatement.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public class EndExceptionBlockStatement : Statement
20 | {
21 | public override void Emit(IMemberEmitter member, ILGenerator gen)
22 | {
23 | gen.EndExceptionBlock();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IMutableName.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | public interface IMutableName : IName, IDictionaryEdit
18 | {
19 | [ValidateStringLengthAtLeast(10)]
20 | [Group("A")]new string FirstName { get; set; }
21 |
22 | [ValidateStringLengthAtLeast(15)]
23 | [Group("B")]new string LastName { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Explicit/WithRefOutExplicit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Explicit
16 | {
17 | using Castle.DynamicProxy.Tests.Interfaces;
18 |
19 | public class WithRefOutExplicit : IWithRefOut
20 | {
21 | void IWithRefOut.Did(ref int i)
22 | {
23 | i = 5;
24 | }
25 |
26 | void IWithRefOut.Do(out int i)
27 | {
28 | i = 5;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/IGenericInterfaceWithGenericMethodWithCascadingConstraintOnInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IGenericInterfaceWithGenericMethodWithCascadingConstraintOnInterface
18 | where TGenericType : IEmpty
19 | {
20 | void Method() where TGenericSubType : TGenericType;
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interfaces/ISimple.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface ISimple
18 | {
19 | void Method();
20 | }
21 |
22 | public class Simple : ISimple
23 | {
24 | private int count;
25 |
26 | public int Count
27 | {
28 | get { return count; }
29 | }
30 |
31 | public void Method()
32 | {
33 | count++;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/OnlyGenMethodsInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | public interface OnlyGenMethodsInterface
18 | {
19 | Z DoSomething(Z z) where Z : new();
20 | }
21 |
22 | public class OnlyGenMethodsInterfaceImpl : OnlyGenMethodsInterface
23 | {
24 | public Z DoSomething(Z z) where Z : new()
25 | {
26 | return z;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Tokens/TypeUtilMethods.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tokens
16 | {
17 | using System.Reflection;
18 |
19 | using Castle.DynamicProxy.Generators.Emitters;
20 |
21 | #if !SILVERLIGHT
22 | public static class TypeUtilMethods
23 | {
24 | public static readonly MethodInfo Sort = typeof(TypeUtil).GetMethod("Sort", BindingFlags.Public | BindingFlags.Static);
25 | }
26 | #endif
27 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/IGenericInterfaceWithGenericMethodWithCascadingConstraintOnAnyReferenceType.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IGenericInterfaceWithGenericMethodWithCascadingConstraintOnAnyReferenceType
18 | where TGenericType : class
19 | {
20 | void Method() where TGenericSubType : TGenericType;
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassCallingVirtualMethodFromCtor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 | namespace Castle.DynamicProxy.Tests.Classes
15 | {
16 | public class ClassCallingVirtualMethodFromCtor
17 | {
18 | public int Result;
19 |
20 | public ClassCallingVirtualMethodFromCtor()
21 | {
22 | Result = VirtualMethod();
23 | }
24 |
25 | public virtual int VirtualMethod()
26 | {
27 | return 7;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/OnlyGenMethodsClass.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | public class OnlyGenMethodsClass
18 | {
19 | private bool invoked;
20 |
21 | public bool Invoked
22 | {
23 | get { return invoked; }
24 | }
25 |
26 | public virtual Z DoSomething(Z z) where Z : new()
27 | {
28 | invoked = true;
29 |
30 | return new Z();
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/IXPathSerializer.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | #if !SILVERLIGHT
16 |
17 | namespace Castle.Components.DictionaryAdapter
18 | {
19 | using System.Xml.XPath;
20 |
21 | public interface IXPathSerializer
22 | {
23 | bool WriteObject(XPathResult result, XPathNavigator node, object value);
24 |
25 | bool ReadObject(XPathResult result, XPathNavigator node, out object value);
26 | }
27 | }
28 | #endif
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/ProxyGenerationException.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy
16 | {
17 | using System;
18 |
19 | public class ProxyGenerationException : Exception
20 | {
21 | public ProxyGenerationException(string message) : base(message)
22 | {
23 | }
24 |
25 | public ProxyGenerationException(string message, Exception innerException) : base(message, innerException)
26 | {
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/VirtualClassWithNoDefaultCtor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class VirtualClassWithNoDefaultCtor
18 | {
19 | private readonly int result;
20 |
21 | public VirtualClassWithNoDefaultCtor(int result)
22 | {
23 | this.result = result;
24 | }
25 |
26 | public virtual int Method()
27 | {
28 | return result;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/GenClassWithConstraints.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | using System;
18 |
19 | public class GenClassWithConstraints where T : IComparable
20 | {
21 | private bool invoked;
22 |
23 | public bool Invoked
24 | {
25 | get { return invoked; }
26 | }
27 |
28 | public virtual void DoSomething()
29 | {
30 | invoked = true;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenInterfaceWithGenMethodsAndGenReturn.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | public interface GenInterfaceWithGenMethodsAndGenReturn
18 | {
19 | Z DoSomething(Z z, T t);
20 | }
21 |
22 | public class GenInterfaceWithGenMethodsAndGenReturnImpl : GenInterfaceWithGenMethodsAndGenReturn
23 | {
24 | public Z DoSomething(Z z, T t)
25 | {
26 | return z;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/WithRefOut.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.InterClasses
16 | {
17 | using System;
18 |
19 | using Castle.DynamicProxy.Tests.Interfaces;
20 |
21 | #if !SILVERLIGHT
22 | [Serializable]
23 | #endif
24 | public class WithRefOut : IWithRefOut
25 | {
26 | public void Do(out int i)
27 | {
28 | i = 5;
29 | }
30 |
31 | public void Did(ref int i)
32 | {
33 | i = 5;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IName.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | [TestDictionaryValidator]
18 | public interface IName : IDictionaryAdapter, IDictionaryNotify, IDictionaryCreate, IDictionaryValidate
19 | {
20 | string FirstName { get; }
21 | string LastName { get; }
22 |
23 | [StringFormat("{0} {1}", "FirstName,LastName")]
24 | string FullName { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPersonWithDeniedInheritancePrefix.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | [KeyPrefix("")]
18 | [KeySubstitution("_", " ")]
19 | public interface IPersonWithDeniedInheritancePrefix : IPersonWithPrefixOverrideFurtherOverride
20 | {
21 | int NumberOfFingers { get; set; }
22 |
23 | [SuppressNotifications]
24 | int Max_Width { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/IService2.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.InterClasses
16 | {
17 | using System;
18 |
19 | public interface IService2
20 | {
21 | void DoOperation2();
22 | }
23 |
24 | #if SILVERLIGHT
25 | public class Service2 : IService2
26 | #else
27 | public class Service2 : MarshalByRefObject, IService2
28 | #endif
29 | {
30 | public void DoOperation2()
31 | {
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/BugsReported/DynProxy132.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.BugsReported
16 | {
17 | using Castle.DynamicProxy.Tests.Interfaces;
18 |
19 | using NUnit.Framework;
20 |
21 | [TestFixture]
22 | public class DynProxy132 : BasePEVerifyTestCase
23 | {
24 | [Test]
25 | public void ShouldGenerateTypeWithIndexers()
26 | {
27 | generator.CreateInterfaceProxyWithoutTarget();
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Explicit/SimpleInterfaceExplicit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Explicit
16 | {
17 | using System;
18 |
19 | #if !SILVERLIGHT
20 | [Serializable]
21 | #endif
22 | public class SimpleInterfaceExplicit : ISimpleInterface
23 | {
24 | int ISimpleInterface.Do()
25 | {
26 | return 5;
27 | }
28 |
29 | public virtual int DoVirtual()
30 | {
31 | return 7;
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/IndirectDelegateHolder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 |
20 | [Serializable]
21 | public class IndirectDelegateHolder
22 | {
23 | public DelegateHolder DelegateHolder = new DelegateHolder();
24 |
25 | public void TestHandler(object sender, EventArgs e)
26 | {
27 | }
28 | }
29 | #endif
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Interfaces/IGenericInterfaceWithGenericMethodWithCascadingConstraintOnAnyTypeWithDefaultConstructor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interfaces
16 | {
17 | public interface IGenericInterfaceWithGenericMethodWithCascadingConstraintOnAnyTypeWithDefaultConstructor
18 | where TGenericType : new()
19 | {
20 | void Method() where TGenericSubType : TGenericType;
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/NonPublicConstructorClass.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class NonPublicConstructorClass
18 | {
19 | protected NonPublicConstructorClass()
20 | {
21 | }
22 |
23 | public virtual void DoSomething()
24 | {
25 | }
26 |
27 | public static NonPublicConstructorClass Create()
28 | {
29 | return new NonPublicConstructorClass();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Mixins/ClassImplementingIDerivedSImpleMixin.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Mixins
16 | {
17 | using System;
18 |
19 | #if !SILVERLIGHT
20 | [Serializable]
21 | #endif
22 | public class ClassImplementingIDerivedSimpleMixin : IDerivedSimpleMixin
23 | {
24 | public int DoSomething()
25 | {
26 | return 3;
27 | }
28 |
29 | public int DoSomethingDerived()
30 | {
31 | return 2;
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithExplicitInterface.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | using System;
18 |
19 | #if !SILVERLIGHT
20 | [Serializable]
21 | #endif
22 | public class ClassWithExplicitInterface : ISimpleInterface
23 | {
24 | int ISimpleInterface.Do()
25 | {
26 | return 5;
27 | }
28 |
29 | public virtual int DoVirtual()
30 | {
31 | return 7;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/SerializableExplicitImpl.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 | using System.Runtime.Serialization;
20 |
21 | [Serializable]
22 | public class SerializableExplicitImpl : ISerializable
23 | {
24 | void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
25 | {
26 | }
27 | }
28 | #endif
29 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/Attributes/VolatileAttribute.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 |
19 | ///
20 | /// Indicates that underlying values are changeable and should not be cached.s
21 | ///
22 | [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Property, AllowMultiple = false)]
23 | public class VolatileAttribute : Attribute
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassToSerialize.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | using System;
18 |
19 | public class ClassToSerialize
20 | {
21 | private int id;
22 | private String name;
23 |
24 | public int Id
25 | {
26 | get { return id; }
27 | set { id = value; }
28 | }
29 |
30 | public string Name
31 | {
32 | get { return name; }
33 | set { name = value; }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Interceptors/AssertCannotChangeTargetInterceptor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Interceptors
16 | {
17 | using NUnit.Framework;
18 |
19 | public class AssertCannotChangeTargetInterceptor : IInterceptor
20 | {
21 | public void Intercept(IInvocation invocation)
22 | {
23 | Assert.IsNotInstanceOf(typeof (IChangeProxyTarget), invocation);
24 | invocation.Proceed();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/DelegateHolder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 | using System.Collections;
20 |
21 | [Serializable]
22 | public class DelegateHolder
23 | {
24 | public ArrayList ComplexTypeMember;
25 | public EventHandler DelegateMember;
26 |
27 | public void TestHandler(object sender, EventArgs e)
28 | {
29 | }
30 | }
31 | #endif
32 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Properties/InternalsVisibleToTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | using System.Runtime.CompilerServices;
16 |
17 | [assembly: InternalsVisibleTo("Castle.Core.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077f5e87030dadccce6902c6adab7a987bd69cb5819991531f560785eacfc89b6fcddf6bb2a00743a7194e454c0273447fc6eec36474ba8e5a3823147d214298e4f9a631b1afee1a51ffeae4672d498f14b000e3d321453cdd8ac064de7e1cf4d222b7e81f54d4fd46725370d702a05b48738cc29d09228f1aa722ae1a9ca02fb")]
18 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/ClassWithIndirectSelfReference.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 | using System.Collections;
20 |
21 | [Serializable]
22 | public class ClassWithIndirectSelfReference
23 | {
24 | public ArrayList List = new ArrayList();
25 |
26 | public ClassWithIndirectSelfReference()
27 | {
28 | List.Add(this);
29 | }
30 | }
31 | #endif
32 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Tokens/TypeMethods.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tokens
16 | {
17 | using System;
18 | using System.Reflection;
19 |
20 | public static class TypeMethods
21 | {
22 | public static readonly MethodInfo GetTypeFromHandle =
23 | typeof(Type).GetMethod("GetTypeFromHandle");
24 |
25 | public static readonly MethodInfo StaticGetType =
26 | typeof(Type).GetMethod("GetType", new[] { typeof(string), typeof(bool), typeof(bool) });
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithDefaultConstructor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class ClassWithDefaultConstructor
18 | {
19 | public ClassWithDefaultConstructor()
20 | {
21 | _someString = "Something";
22 | }
23 |
24 | private string _someString = string.Empty;
25 |
26 | public string SomeString
27 | {
28 | get { return _someString; }
29 | set { _someString = value; }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/BugsReported/DynProxy145_SynchronizationContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.BugsReported
16 | {
17 | using System.Threading;
18 | using NUnit.Framework;
19 |
20 | [TestFixture]
21 | public class DynProxy145_SynchronizationContext
22 | {
23 | [Test]
24 | public void ProxySynchronizationContext()
25 | {
26 | var proxyGenerator = new ProxyGenerator();
27 | proxyGenerator.CreateClassProxy();
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithAttributesOnMethodParameters.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Core.Tests.Classes
16 | {
17 | using NUnit.Framework;
18 |
19 | public class ClassWithAttributesOnMethodParameters
20 | {
21 | public virtual void MethodOne([Required(BadValue = -1)] int val)
22 | {
23 | Assert.IsFalse(val == -1);
24 | }
25 |
26 | public virtual void MethodTwo([Required("")] string name)
27 | {
28 | Assert.IsNotNull(name);
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenInterfaces/GenExplicitImplementation.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenInterfaces
16 | {
17 | using System.Collections.Generic;
18 |
19 | public class GenExplicitImplementation : InterfaceWithExplicitImpl
20 | {
21 | IEnumerator InterfaceWithExplicitImpl.GetEnum1()
22 | {
23 | return new List.Enumerator();
24 | }
25 | }
26 |
27 | public interface InterfaceWithExplicitImpl
28 | {
29 | IEnumerator GetEnum1();
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/GenClasses/ClassWithMethodWithReturnArrayOfListOfT.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.GenClasses
16 | {
17 | using System.Collections.Generic;
18 |
19 | public class ClassWithMethodWithReturnArrayOfListOfT
20 | {
21 | public virtual List[] GenericMethodReturnsListArray()
22 | {
23 | return null;
24 | }
25 |
26 | public virtual IEnumerable> GenericMethodReturnsGenericOfGenericType()
27 | {
28 | return null;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/InterClasses/ClassWithMultiDimentionalArray.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.InterClasses
16 | {
17 | public class ClassWithMultiDimentionalArray : IClassWithMultiDimentionalArray
18 | {
19 | public virtual void Do(int[] args)
20 | {
21 | }
22 |
23 | public virtual void Do2(int[,] args)
24 | {
25 | }
26 |
27 | public virtual void Do3(string[] args)
28 | {
29 | }
30 |
31 | public virtual void Do4(string[,] args)
32 | {
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/IProxyTargetAccessor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy
16 | {
17 | public interface IProxyTargetAccessor
18 | {
19 | ///
20 | /// Get the proxy target (note that null is a valid target!)
21 | ///
22 | ///
23 | object DynProxyGetTarget();
24 |
25 | ///
26 | /// Gets the interceptors for the proxy
27 | ///
28 | ///
29 | IInterceptor[] GetInterceptors();
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IEmptyTest.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter.Tests
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | [RemoveIfEmpty]
21 | public interface IEmptyTest
22 | {
23 | string StringValue { get; set; }
24 |
25 | Guid GuidValue { get; set; }
26 |
27 | int[] ArrayValue { get; set; }
28 |
29 | IEnumerable CollectionValue { get; set; }
30 |
31 | float? NullableValue { get; set; }
32 | }
33 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithInternalDefaultConstructor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class ClassWithInternalDefaultConstructor
18 | {
19 | internal ClassWithInternalDefaultConstructor()
20 | {
21 | _someString = "Something";
22 | }
23 |
24 | private string _someString = string.Empty;
25 |
26 | public string SomeString
27 | {
28 | get { return _someString; }
29 | set { _someString = value; }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithProtectedDefaultConstructor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Classes
16 | {
17 | public class ClassWithProtectedDefaultConstructor
18 | {
19 | protected ClassWithProtectedDefaultConstructor()
20 | {
21 | _someString = "Something";
22 | }
23 |
24 | private string _someString = string.Empty;
25 |
26 | public string SomeString
27 | {
28 | get { return _someString; }
29 | set { _someString = value; }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/DynamicProxy.Tests/Serialization/SerializableInterceptorSelector.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.Serialization
16 | {
17 | #if !MONO && !SILVERLIGHT
18 | using System;
19 | using System.Reflection;
20 |
21 | [Serializable]
22 | public class SerializableInterceptorSelector : IInterceptorSelector
23 | {
24 | public IInterceptor[] SelectInterceptors(Type type, MethodInfo method, IInterceptor[] interceptors)
25 | {
26 | return interceptors;
27 | }
28 | }
29 | #endif
30 | }
--------------------------------------------------------------------------------
/src/Castle.Core.Tests/BugsReported/DynProxy46.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2010 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Tests.BugsReported
16 | {
17 | public interface IMyInterface
18 | {
19 | void MyTestMethod(string myParam);
20 | }
21 |
22 | public class MyClass : IMyInterface
23 | {
24 | private string myProperty;
25 |
26 | public virtual string MyProperty
27 | {
28 | get { return myProperty; }
29 | set { myProperty = value; }
30 | }
31 |
32 | public virtual void MyTestMethod(string myParam)
33 | {
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/Util/DynamicValueDelegate.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System;
18 |
19 | public class DynamicValueDelegate : DynamicValue
20 | {
21 | private readonly Func dynamicDelegate;
22 |
23 | public DynamicValueDelegate(Func dynamicDelegate)
24 | {
25 | this.dynamicDelegate = dynamicDelegate;
26 | }
27 |
28 | public override T Value
29 | {
30 | get { return dynamicDelegate(); }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/NullExpression.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2011 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
16 | {
17 | using System.Reflection.Emit;
18 |
19 | public class NullExpression : Expression
20 | {
21 | public static readonly NullExpression Instance = new NullExpression();
22 |
23 | protected NullExpression()
24 | {
25 | }
26 |
27 | public override void Emit(IMemberEmitter member, ILGenerator gen)
28 | {
29 | gen.Emit(OpCodes.Ldnull);
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Castle.Core/Components.DictionaryAdapter/IDictionaryBehaviorBuilder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2004-2009 Castle Project - http://www.castleproject.org/
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace Castle.Components.DictionaryAdapter
16 | {
17 | using System.Collections.Generic;
18 |
19 | ///
20 | /// Defines the contract for building s.
21 | ///
22 | public interface IDictionaryBehaviorBuilder
23 | {
24 | ///
25 | /// Builds the dictionary behaviors.
26 | ///
27 | ///
28 | IEnumerable